Console Admin Password

Is there a way to change the admin password without using the console?
By ssh directly into the appliance?



cd /var/www/miq/vmdb/
bin/rails c

user = User.find_by_userid(“admin”)
user.password = 'Your_New_Password’

This will reset your password for the admin user to ‘Your_New_Password’



Hello, I unearth this old thread with an additional question on the subject: I’m working on automating the deployment of the appliance, and I was wondering how to automate this password change through cloud-init, as the automation is done on an AMI that I create on AWS. The idea is to not do it interactively as is proposed in the solution, but as a batch with no user interaction. Do you have any advice on this?

1 Like

If anyone else looking for no user interaction

try this

cd /var/www/miq/vmdb/ && source /etc/default/evm && rails runner -e production “user = User.find_by_userid(‘admin’); user.password = ‘Your_New_Password’;;”