How To Add a User During Kickstart

Adding a user during kickstart:

/usr/sbin/useradd username
/usr/sbin/usermod -p ‘<encrypterd_password>’ <username>

Making encrypted passwords:

$ openssl passwd -1
Password: secret!
$1$ZhEKgpbS$KtmSr63TRqGQ1NcGXCaR01

Openssl only asks once, so you might want to verify the output:
(notice the salt is between the second and third $ signs)

$ openssl passwd -1 -salt ZhEKgpbS
Password: secret!
$1$ZhEKgpbS$KtmSr63TRqGQ1NcGXCaR01

Thanks Phil for the above password creation help.

Leave a Comment