Tuesday, September 24, 2013

Cloudera Manager - How to reset admin password

Forget your admin user password in Cloudera manager? Here is how you can reset admin's password to default password "admin".

1. In CM server, look for database password in this file "/etc/cloudera-scm-server/db.properties".

2. Connect to postgresql db:
psql -h localhost -U scm

3. Reset admin users password to "admin":
scm=> SELECT * FROM USERS;
scm=> update USERS set password_hash='ffa2eb4251b38e069e968890cb2bcdb6229982322f5ed2470bf96231fe4c39c8', password_salt=-4382599614486590865 WHERE user_name = 'admin';
scm=> \q

4. You are all set, now you can log in as "admin/admin".

1 comment:

Oleg Ivchenko said...

In newer versions of Cloudera (e.g. 5.11-5.12) I couldn't connect to scm database. But I've connected to cloudera-scm database:

psql -U cloudera-scm -p 7432 -h localhost -d scm

I've found the password to the database in /var/lib/cloudera-scm-server-db/data/generated_password.txt file (as its first string).

To reset admin's password I had to use another password's hash and salt, found in this post on Cloudera's forum: href="http://community.cloudera.com/t5/Cloudera-Manager-Installation/reset-cdm-5-8-password/m-p/45843#M8319"