CVM / AHV / ESXi / IPMI 的密碼…是公開的秘密…一定要改掉!
花大錢在強化資安,加厚裝甲。不如養成好習慣,定期更換密碼,強化服務安全
修改 CVM 密碼。登入至任一台 CVM
方法一:
for i in `svmips`; do echo “=== $i : change password ==="; ssh $i “echo nutanix:xTreme123! | sudo chpasswd"; done
(較少使用了)
方法二:
allssh ‘echo “nutanix:xTreme123!" | sudo chpasswd’
上面例子的 xTreme123! 是你的新密碼 (這是個範例)
修改 AHV 密碼,登入至任一台 CVM
hostssh ‘echo “root:xTreme456!" | chpasswd’
上面例子的 xTreme456! 是你的新密碼 (這是個範例)
修改 ipmi 密碼,登入至 hypervisor 主機
用 ipmi user list 看一下 admin id (大部分情況是 2)
esxi platform
AHV platform
正常的指令是:
ipmitool user set password 2 xTreme789!
上面例子的 xTreme789! 是你的新密碼 (這是個範例)
請使用 8位以上的英數特別符號組合,否則不會成功。
唉…算了…送佛送上天吧。改 esxi password
在cvm裡執行:
echo -e “CHANGING ALL ESXi HOST PASSWORDS. Note – This script cannot be used for passwords that contain special characters ( $ \ { } ^ &)
Please input new password: “; read -s password1; echo “Confirm new password: “; read -s password2; if [ “$password1″ == “$password2″ ] && [[ ! “$password1″ =~ [\\\{\$\^\}\&] ]]; then hostssh “echo -e \"${password1}\" | passwd root –stdin"; else echo “The passwords do not match or contain invalid characters (\ $ { } ^ &)"; fi