continuous integration - Jenkins: How to Change LDAP Password -


my institution requires me periodically change ldap password.

in past, able perform following steps change password:-

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>.

  1. generate new encoded password with

    perl -e 'use mime::base64; print encode_base64("yournewpassword");'

  2. in config.xml, find <hudson>/<securityrealm>/<managerpasswordsecret>. change <managerpasswordsecret> <managerpassword> (both before , after) , put encoding #1 between them. save file.

  3. restart jenkins
  4. login , using ui, reset ldap manager password same yournewpassword. config.xml should <managerpasswordsecret>.
  5. if paranoid (like me), restart jenkins again use newly modified config.xml.

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -