I don't know if this will be useful for anyone but I came up with a few command lines to change the default passwords for the CVM and IPMI users and create a new user to mimic the dell DRAC's user
#change IPMI passwordfor i in `hostips`; do ssh root@$i 'for id in `/ipmitool user list |grep 'ADMIN '|cut -d" " -f1`;do echo $id;/ipmitool user set password $id ;done' ; donefor i in `ncli host list | grep -E 'ID ' | cut -d":" -f4`; do ncli host edit id=$i ipmi-password=; done
#create root user on all nodes ipmi to keep consitant with Dell Dracfor i in `hostips`; do ssh root@$i '/ipmitool user set name 3 root;/ipmitool user set password 3 ; /ipmitool user priv 3 4;/ipmitool channel setaccess 1 3 privilege=4;/ipmitool user enable 3' ; done
# change esxi passwordfor i in `hostips`;do echo "--$i--";ssh root@$i 'echo -e "" | passwd';done
#change cvm passwordfor i in `svmips`;do echo "--$i--";ssh nutanix@$i 'echo -e "" | sudo passwd nutanix';done
Already have an account? Login
Login to the community
Login with your account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
I just used the IPMI script on a dell XC cluster (ESX6 / AOS 4.7.2) and had to slightly modify the script to the below.
for i in `hostips`; do ssh root@$i 'for id in `/ipmitool user list 1|grep 'root '|cut -d" " -f1`;do echo $id;/ipmitool user set password $id ;done' ; done
for i in `ncli host list | grep -E 'Id ' | cut -d":" -f4`; do ncli host edit id=$i ipmi-password=; done
I'm not familiar with those commands. What scripting language are you running those commands from?
How would you that when one cannot SSH. OR no longer remember the password of the CVM.
There are 2 ways to connect to CVM, one via host -> 192.168.5.0 network and second is via CVM outside IP Address.
If you could not make it run in both ways, you can leverage the Prism to do that (follow the KB 2233 on Nutanix Portal)
the password change for the CVM worked. Whats the possible password complexity? I just created a random one with all kinds of special chars in it but it didn't run.
How can I change the root password for all AHV hosts?
that worked. Thanks a lot. Is passwd a nutanix command?
I used a less complex password this time. My "nutanix" user is still locked out on my CVMs. Guess I used a too complex password or chars that are not supported.
Guess I need to invest more time into that topic if I want to handle Nutanix.
Thanks for your quick reply.
PS: Do you know the password for the CVM root user or know a way how I can recover my "nutanix" user password?
Ok I just solved it. After reading tons of Linux articles I found this:
1. Basically I logged in with my PRISM "admin" account
2. I ran: su root - pasword = nutanix/4
3. passwd nutanix
I tried a couple of times to log in with root and nutanix/4u directly via putty which didn't work but the "su root" command works.
In a case that you lost password in one of CVM in the cluster, you could leverage other CVM to login to it and executed "sudo passwd nutanix" command to assign new password for CVM.
Other way is using Prism to do that (you can search Nutanix Portal/Knowledge Base to find out how to do)
Basically, CVM and AHV are all developed based on CentOS and leverage OpenvSwitch to provide services upfront so it is better off to know a little bit about Linux/Unix or CentOS based command lines. I recommend to have a reference at AHV Best Practice and AHV Networking documents on Nutanix Portal to get deeper into AHV infra.
1. Use a tool like putty to connect to your AHV
2. run the command: passwd root
3. Enter your new password
4. Retype your new password