Command-line 'adduser': password not hashing
(Fedora Core 2, PAM-enabled, shadow passwords enabled)
At the moment I'm trying to set up an automation script, allowing an account to be created and configured with a single command. A friend is starting up a webhosting business but isn't all that tech-savvy, much less Linux-savvy.
Unfortunately, both adduser and useradd simply place the password that the script hands them (with the -p option) into /etc/shadow, in plaintext. Obvious problem is that since authentication is expecting a hash, the password entered is always incorrect. Using 'passwd' to change it does the proper hashing, but cannot be called 'invisibly'.
I'd much rather set up a random password and have it mail itself to the subscriber with instructions on how to change it.
Anyone know a command to silently change the password, or failing that, what is taken into account for the MD5SUM hashing so I can just hand 'adduser' THAT as the password?