continuous integration - Jenkins: How to Change LDAP Password -
my institution requires me periodically change ldap password.
in past, able perform following steps change password:-
- create base64 encoded password @ http://www.base64encode.org/
- edit
/var/lib/jenkins/config.xml
, change<managerpassword/>
.
however, recent version of jenkins no longer use <managerpassword/>
. instead, i'm seeing <managerpasswordsecret/>
.
i'm not sure how generate new secret password, did following:-
- backup
/var/lib/jenkins/config.xml
first. - edit
/var/lib/jenkins/config.xml
, change<usesecurity/>
false
. - restart jenkins service.
- go jenkins.
- enable ldap security.
- enter new ldap password.
- save it.
- open
/var/lib/jenkins/config.xml
, copy<managerpasswordsecret/>
. - restore backup config file.
- replace
<managerpasswordsecret/>
new value.
this incredibly convoluted.
is there more straightforward way me maintain ldap password change in future?
thanks much!
you can still use <managerpassword>.
generate new encoded password with
perl -e 'use mime::base64; print encode_base64("yournewpassword");'
in config.xml, find <hudson>/<securityrealm>/<managerpasswordsecret>. change <managerpasswordsecret> <managerpassword> (both before , after) , put encoding #1 between them. save file.
- restart jenkins
- login , using ui, reset ldap manager password same yournewpassword. config.xml should <managerpasswordsecret>.
- if paranoid (like me), restart jenkins again use newly modified config.xml.
Comments
Post a Comment