Console Admin Password


#1

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

Ramon


#2

Try,

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

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

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

thanks


#3

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?


#4

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’; user.save;”