jms1

Puppet Enterprise 2016.2 - Reset admin password

Apr 7th, 2017
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Save existing password

# su -s /bin/bash - pe-postgres
$ psql pe-rbac
pe-rbac=# select password from subjects where login='admin'
$shiro1$SHA-256$500000$xxxxxxxxxxxxxxxxxxxxxxxx$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
pe-rbac=# \q
$ exit

Reset admin password

/opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/server/data/enterprise/modules/pe_install/files/set_console_admin_password.rb 'new-password'

Restore old admin password

# su -s /bin/bash - pe-postgres
$ psql pe-rbac
pe-rbac=# update subjects set password='$shiro1$SHA-256$500000$xxxxxxxxxxxxxxxxxxxxxxxx$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' where login='admin' ;
UPDATE 1
pe-rbac=# \q
$ exit

Reference

https://docs.puppet.com/pe/latest/rbac_user_roles.html#reset-the-admin-password

Add Comment
Please, Sign In to add comment