For the past couple of weeks I have been playing around with customising the Pentaho User Console (PUC) Version 3.5.x and to follow it up I thought I would put together a multi-part post on the topic. Each post will cover one aspect of customising the PUC, these include:
- Login page and dialog (covered in this post)
- Messages
- Main toolbar, menu bar and logo panel
- Launch page
In this post I will show you how to customise the default login dialog and how to create a new login page.
Customising the Login Dialog
The login dialog is the form which pops up when you click on the Login button. This is part of the default PUC login page.

With modifications to the loginsettings.properties file it is possible to:
- Modify the users of the Sample User select box
- Remove the Sample User select box
Modify Sample Users Select Box
To modify the users which appear in the Sample Users select box first locate the loginsettings.properties file which is found under the \tomcat\webapps\pentaho\mantleLogin\ directory and open up the file in a text editor:
# this file contains settings to configure the login dialog # flag to turn on/off show users list (overrides pentaho.xml) #showUsersList=true # launch PUC in new window (default setting) openInNewWindow=false # sample users (be sure that each group has the same # of items as the rest) userIds=joe, suzy, pat, tiffany userDisplayNames=Joe (admin), Suzy, Pat, Tiffany userPasswords=password, password, password, password
At the time of testing this the openInNewWindow option did not work.
To modify the users which appear in the select box you will need to make changes to three lines (you do not need to stop the Apache-Tomcat server before making any modifications):
userIds=joe, suzy, pat, tiffany userDisplayNames=Joe (admin), Suzy, Pat, Tiffany userPasswords=password, password, password, password
For example I would like to:
- Remove all users except for joe (Joe (admin))
- Add a new user with the
- userId of prashant (the userId which is stored in the Hibernate database)
- userDisplayName of Prashant Raju (the value displayed in the select box)
- userPassword of analysethis (the password which is stored in the Hibernate database against the userId prashant)
After making modifications the loginsettings.properties file now looks like this:
# this file contains settings to configure the login dialog # flag to turn on/off show users list (overrides pentaho.xml) #showUsersList=true # launch PUC in new window (default setting) openInNewWindow=false # sample users (be sure that each group has the same # of items as the rest) userIds=joe, prashant userDisplayNames=Joe (admin), Prashant Raju userPasswords=password, analysethis
Save and close the file, clear your web browser’s cache and refresh the login page. The login dialog now looks like this:

Remove Sample Users Select Box
To remove the Sample Users select box you will need to make modifications to the loginsettings.properties file (you do not have to stop the Apache-Tomcat server). To remove the Sample Users select box you will need to make changes this line:
#showUsersList=true
After making modifications the loginsettings.properties file now looks like this:
# this file contains settings to configure the login dialog # flag to turn on/off show users list (overrides pentaho.xml) showUsersList=false # launch PUC in new window (default setting) openInNewWindow=false # sample users (be sure that each group has the same # of items as the rest) userIds=joe, suzy, pat, tiffany userDisplayNames=Joe (admin), Suzy, Pat, Tiffany userPasswords=password, password, password, password
Save and close the file, clear your web browser’s cache and refresh the login page. The login dialog now looks like this:

Customising the Login Page
If you would like to modify the look of the login page to look similar to a specific style you will need to modify the PUC_Login.JSP file which is found under the /tomcat/webapps/pentaho/jsp directory.
Before we move onto the code here is a screenshot of the new login page which we will be creating:
You can click here for a HTML/CSS version (JSP code is commented out) of the above screenshot or below is a JSP/HTML/CSS version which you are able to copy and paste – make sure you read through the comments:
<%@ page language="java" import="org.springframework.security.ui.AbstractProcessingFilter,org.springframework.security.ui.webapp.AuthenticationProcessingFilter,org.springframework.security.ui.savedrequest.SavedRequest,org.springframework.security.AuthenticationException,org.pentaho.platform.uifoundation.component.HtmlComponent,org.pentaho.platform.engine.core.system.PentahoSystem,org.pentaho.platform.util.messages.LocaleHelper,org.pentaho.platform.api.engine.IPentahoSession,org.pentaho.platform.web.http.WebTemplateHelper,org.pentaho.platform.api.engine.IUITemplater,org.pentaho.platform.web.jsp.messages.Messages,java.util.List,java.util.ArrayList,java.util.StringTokenizer,org.apache.commons.lang.StringEscapeUtils,org.pentaho.platform.web.http.PentahoHttpSessionHelper" %> <% // If the User is already logged in redirect to PUC Home String remoteUser = request.getRemoteUser(); if (remoteUser != null && remoteUser != "") { response.sendRedirect("/pentaho/Home"); } %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>Login to Steel Wheels - Pentaho User Console</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="gwt:property" content="locale=<%=request.getLocale()%>"> <!-- Uncomment to put your own favicon <link rel="shortcut icon" href="/pentaho-style/favicon.ico" /> --> <style type="text/css" media="screen, projection"> *{margin:0;padding:0;} html{font-size:100%;} body{background:#fff;color:#222;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;text-align:center;font-size:75%;} h2{font-size:2em;margin-bottom:0.75em;} .error{background:#FBE3E4;border:2px solid #FBC2C4;color:#8a1f11;margin-bottom:1em;text-align:center;width:332px;padding:6px;} #login-logo{padding:40px 0;} #login-form{background:#fff;border:1px solid #ccc;text-align:left;width:350px;-moz-border-radius:5px;-webkit-border-radius:5px;-moz-box-shadow:0 1px 3px #ddd;-webkit-box-shadow:0 1px 3px #ddd;margin:0 auto;padding:15px 15px 25px;} #login-form h2{text-align:center;padding:5px 0;} #login-form .field{width:335px;margin:15px 0;} #login-form .field label{color:#777;display:block;font-size:1em;font-weight:700;margin-bottom:5px;text-align:left;} #login-form .field input{border:1px solid #ccc;font-size:1.2em;width:100%;padding:5px;} </style> <script type="text/javascript"> // If the Username and Password values are blank then alert(); // This can be replaced with an AJAX solution function checkForm(form) { if(form.j_username.value == "" && form.j_password.value == "") { alert('You can not have a blank Username and Password!') return false; } } </script> </head> <body> <!-- Login Logo --> <div id="login-logo"> <img src="/sw-style/active/sw_logo.jpg" alt="Steel Wheels Logo"> </div> <!-- Login Form --> <div id="login-form"> <!-- Header --> <h2>Login to Steel Wheels</h2> <!-- If the login_error URL parameter is set then show error box --> <% if (request.getParameter("login_error") != null) {%> <div class="error">Authentication failed! Please try again!</div> <% }%> <!-- Form --> <form id="sw-login" method="POST" action="/pentaho/j_spring_security_check"> <!-- Username --> <div class="field"> <label for="username">Username</label> <input id="username" name="j_username" type="text"> </div> <!-- Password --> <div class="field"> <label for="password">Password</label> <input id="password" name="j_password" type="password"> </div> <!-- On click on the submit button run the checkFrom function --> <input type="submit" value="Login" onclick="return checkForm(form);"> </form> </div> </body> </html>
Below I have separated the code (seen above) into important parts, this will help you get a better understanding on the purpose of each section of code.
This section of code uses the getRemoteUser() function to check if the user loading the login page isn’t already logged in – if they are logged in they are redirected to the PUC home URL.
<% // If the User is already logged in redirect to PUC Home String remoteUser = request.getRemoteUser(); if (remoteUser != null && remoteUser != "") { response.sendRedirect("/pentaho/Home"); } %>
The following piece of code is a JavaScript function which checks if the Username and Password of the login form are empty and if they are create an alert box to let the user know. This function was used because if a user submits an empty form a 500 error is thrown back by Spring Security – this isn’t as intuitive as an AJAX solution so if you would like to see an AJAX example let me know.
function checkForm(form) { if(form.j_username.value == "" && form.j_password.value == "") { alert('You can not have a blank Username and Password!') return false; } }
To call the above function (checkForm()) it is attached to the onclick event of the submit button:
<input type="submit" value="Login" onclick="return checkForm(form);">
This section of code checks to see if an error has occurred when trying to login i.e. wrong password. When an error occurs it is sent back as a URL parameter login_error, the value of this parameter is a number (in this example I gave a generic error response to any number). If the login_error URL parameter value is not null it then shows the error message (div).
<% if (request.getParameter("login_error") != null) {%> <div class="error">Authentication failed! Please try again!</div> <% }%>
The last and most important section of code is the login form. It should be noted that the form action points to the /pentaho/j_spring_security_check URL and the username and password names are j_username and j_password – these are essential as they are needed by Spring Security to authenticate user credentials correctly.
<form id="sw-login" method="POST" action="/pentaho/j_spring_security_check"> <!-- Username --> <div class="field"> <label for="username">Username</label> <input id="username" name="j_username" type="text"> </div> <!-- Password --> <div class="field"> <label for="password">Password</label> <input id="password" name="j_password" type="password"> </div> <!-- When the submit button is clicked run the checkForm function --> <input type="submit" value="Login" onclick="return checkForm(form);"> </form>
Well that’s it for now. Stay tuned for the next part which outlines how to change the default messages which appear throughout the PUC (including the login dialog, loading bar, titles etc.).
Enjoy.

Posted by AnOs on Mar 2, 2010
Hi,
I try that and it’s working.
Posted by Indian on Mar 17, 2010
Nice Post, thank you, its a good starter.
Posted by Mateo on Mar 20, 2010
Very Helpful Post and Website in General.
It’s a great resource for those of us learning Pentaho!
Keep up the great work Prashant!
Posted by Sam on Jun 17, 2010
Hi,
your articles about pentaho are really very interesting und well written!
But there is one thing which is not covered yet: What do you have to do if you dont want to be redirected to the PUC but to another website (i.e. dashboard page)?
Thanks for your efforts and keep up the good work!
Regards,
Sam
Posted by Prashant Raju on Jun 17, 2010
Sam
I did
. Check out this post (Part 4 of the series).
Prashant
Posted by santenkelapa on Aug 11, 2010
Like this …!
all your artikel very good ..
Posted by Kaushik on Aug 27, 2010
How can we remove the login page?
Posted by omar on Aug 27, 2010
hi ,
is it possible to change the admin( joe ) to myname ??
thanks
Posted by Prashant Raju on Aug 30, 2010
@Kaushik
You can enable no authentication but not sure about disabling the login page.
Prashant.
Posted by ganteng on Sep 16, 2010
hi praju,
is it possible if i don’t want to use the login page?
cause i have an application that use pentaho, in my apps i have a link to access the dashboards. so i don’t want to use the login page from the default of biserver cause i use my application login page.
thank’s from me
Posted by Prashant Raju on Sep 16, 2010
Hi ganteng,
From your application you can create a hyperlink which includes the username and password for pentaho as part of the URL.
This thread has it all.
Prashant
Posted by Paul on Sep 18, 2010
Hi Prashant,
first thank you for your wunderful blog, which helped me already lots of times.
Maybe you can give me a hint what i’m doing wrong. I just copied the PUCLogin.jsp from you and it worked fine.
Now i did some modifications like changing the logo or “steel wheels” to “acme”. Problem: Nothing happens.
I cleared my cache, restarted my pc, restarted the bi server a several times. I even deleted the puclogin.jsp. but when i visit the bi-server STILL the steel-wheels loginscreen appears.
That is somehow impossible. Do you have a hint for me? Thanks in advance!
Paul
Posted by Paul on Sep 18, 2010
Oh i found the solution: I had to delete the puclogin.java and puclogin.class files under tomcat/work/Catalina/localhost/pentaho/org/apache/jsp/jsp.
paul
Posted by Priyank Diwaker on Oct 15, 2010
Hi Prashant,
Thanks for the article.
I wanted to change my user name and password which i did thanks to your article, but the problem is i want to remove all other username and password like joe and all.
Could you please help in this scenario.
Thanks
Priyank Diwaker
Posted by Michael on Oct 25, 2010
Thanks Prashant for this article.
But something still bothers me – I can’t find any resource on how to deploy pentaho without the steel-wheels or bi-developer solution. The only resource on building a new solution for pentaho is quite old (2006) and doesnt apply.
Paradventure, you could guide to one of such a resource to help me.
I want to try out the World Class Movie Schema from Roland Bouman’s co-authoured book and remove every reference of steel-wheel or bi-developer but its been hard for me.
Thanks
Posted by Mahi on Dec 2, 2010
Hi Prashanth ,
Could you please tell me how do you set up access rights for reports/folders on Pentaho user console? Are the access rights inherited by the child folders/reports from parent folder?
Also is possible , tell me about levels of security available and how to implement those in Pentaho.
Thanks in advance!!
Posted by crorella on Apr 1, 2011
Hey Prashat, really nice guide.
Do you know if this works on Pentaho 3.8?
Regards
Posted by Eric on Apr 28, 2011
I really liked your article. I had a question regarding the drop-down to display the username. Do I need to put in the password or is there a way to leave it blank so that the user enters the password by themselves. I just want the drop-down to display their username.