VMware Cloud Community
Yattong
Expert
Expert

adding user by script, password doesnt work

hi, help.

Trying to add a user by script and have already read the other thread to use either the esx ks.cfg creator or htpasswd.exe to create the hashed password.

Have also tried different variations with the \ in front and placing in quotes ' but the user password still doesnt work.

am i doing something wrong?

im trying to make sure it works just via the command line before i put it into a script.

useradd -p hashedpassword -c username login

any ideas?

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points ~y
Reply
0 Kudos
2 Replies
ExCon
Enthusiast
Enthusiast

The following works in my script:

#To generate the encrypted password, run "/sbin/grub-md5-crypt" from an ESX box

#Create the user "gumby"

/usr/sbin/useradd -p '$1$ZxJpF$QW57o88C6pZStNyCFHrwh0' gumby

Reply
0 Kudos
Yattong
Expert
Expert

Thanks Excon,

10 points on your way.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points ~y
Reply
0 Kudos