Find the best way to change all of the administrators password on Nutanix.
This what I have done:
#Changing the admin acct of PE
ncli user reset-password user-name=admin password='$NewPassWD$@pe'
#Changing the root acct of AHV
for i in `hostips`;do echo "--$i--";ssh root@$i 'echo -e "$NewPassWD$@ahv" | passwd --stdin root';done
#Changing the nutanix acct of CVM
echo "$NewPassWD$@cvm" | sudo passwd --stdin nutanix
#Change the ADMIN acct of the IPMI
for 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 "ADMINXXXXXXX";
done' ;
done
ncc health_checks system_checks default_password_check