Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to know how to manually encode the LDAP managerPassword which controls the authentication to hudson:

<securityRealm class="hudson.security.LDAPSecurityRealm">
    <server>ldap.example.org</server>
    <rootDN>dc=example,dc=org</rootDN>
    <userSearchBase>ou=People</userSearchBase>
    <userSearch>uid={0}</userSearch>
    <groupSearchBase>ou=Groups</groupSearchBase>
    <managerDN>cn=admin,dc=example,dc=org</managerDN>
    <managerPassword>{HOW DO I ENCODE THIS?}</managerPassword>
</securityRealm>

This question has already been raised here: http://jenkins.361315.n4.nabble.com/How-to-encode-the-LDAP-managerPassword-td2295570.html

The answer was to configure the managerPassword field via the hudson web interface. The problem we have is that in order to configure LDAP one must be authenticated to hudson, which we cannot do because our LDAP authentication is currently broken (password mismatch between LDAP and the hudson configuration).

Can someone explain how to manually encode the LDAP managerPassword?

Thanks

share|improve this question

3 Answers 3

Password value is base64 encoded. You can encode it online: www.base64encode.org and decode it here: www.base64decode.org.

share|improve this answer

Try using slappasswd. It should get you something like rootpw {SSHA}vv2y+i6V6esazrIv70xSSnNAJE18bb2u.

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-ldap-quickstart.html

On Debian: apt-get install slapd.

share|improve this answer
    
thanks for the suggestion. unfortunately, by looking at an example for which I know the password (short one) have the corresponding managerPassword (long string ending up with ==) it looks like there is also some base64 and salt so slappasswd won't do the trick. –  user64204 May 23 '11 at 8:22
    
did you solve this? I need to do the same. –  Denis Kot Mar 20 '12 at 15:58

I found how to do this. This is simply base64. But linux's console base64 adds padding characters while in jenkins config.xml it's stored w/o it so I had to use perl's base64: perl -e 'use MIME::Base64; print encode_base64('password');'

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.