Problem Statement: you have changed the password of the admin user in UI and now you forgot the password. you want to reset the admin password.
Steps
1) Stop ambari server
ambari-server stop
2) login to your database (default password will be bigdata)
psql -U ambari ambari
or ( for mysql)
mysql -U ambari -D ambari
3) execute the command :
update user_authentication set authentication_key='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_id in (select user_id from users where user_name='admin');
4) exit the database and restart ambari-server
ambari-server start
Now password is reset to default one(ie admin) and you can login to ambari-server using admin/admin .