Hi all,
How do you create the encrypted password within the ks.cfg, is have a the default sample ks.cfg which has :
\# root password
\# The MD5 encrypted string below is for "password"
rootpw --iscrypted $1$XoNAfIU3$9ZvhBFDJ3o8QMnfgnjPpB0
Now how do I create my own MD5 encrpyted password.
I have done it in 2.x in the past via using the Source CD, but there is nothing for 3.x
Can anyone help.
Message was edited by:
armstrongn
Use the Skripted Installation Link on you ESX Host (http://ip-or-hostname-of-esx). That will create a sample ks.cfg with the encrypted password.
Download the openssl light toolkit from the link below. A quick read of the doco will have knocking out encrypted passwords in no time.
Run this command from the service console:
Create new MD% password
/sbin/grub-md5-crypt
perl can do this on the command line as well:
perl -e '@az=("a".."z","0".."9","A".."Z"); print crypt("SecretPassword","\$1\$".$az\[rand 61].$az\[rand 61].$az\[rand 61].$az\[rand 61].$az\[rand 61].$az\[rand 61].$az\[rand 61].$az\[rand 61])."\n"'
(replace SecretPassword by your own password of choice).
or
perl -e 'print crypt("SecretPassword","\$1\$vbFGrt45")."\n"'
where you vary the vbFGrt45 string manually to generate different salts for different hosts.
No offense, but I think there is an easier way to do it by leveraging openssl (included in ESX).
Add a user in the ks.cfg with the following command:
/usr/sbin/useradd username
/usr/sbin/usermod -p '
Then make the encrypted password with this command from the COS:
\[root@esx1 root]# openssl passwd -1
Password:
Verifying - Password:
$1$dSkCAWDj$2TKDuGPWN0iFJqtSV6pTh1[/b] (This is the encrypted password)
Wasn't my way easy enough?
Sure mooihoek, more than enough,
rgds,
J.