Saturday, February 9, 2013

Can't login in hudson as administrator

Today i can't login to our hudson application as administrator. I am sure the password i tried is correct. I restarted tomcat and still the issue persists.

Error log :
INFO: Hudson is ready.
9 Feb, 2013 4:11:43 PM hudson.security.AuthenticationProcessingFilter2 onUnsuccessfulAuthentication
INFO: Login attempt failed
org.acegisecurity.BadCredentialsException: Bad credentials
        at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:122)
        at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:195)
        at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:45)
        at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:71)
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:252)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)

Solution :
I created a new user in hudson via. backend.
Logged in server.
cd /root/.hudson/users
Create a folder shivin and copy the config.xml file from /root/.hudson/users/Administrator folder
Go to /root/.hudson/
Edit config.xml file for giving privileges for the new user "shivin"
Once you give all permission, Stop tomcat and start again.
Try the web for login with the user "shivin" , you can
There go to People and select "Administrator", change password and save
Logout from user shivin and try with the new Administrator password

Issue fixed. I can login fine.

No comments:

Post a Comment