Custom adduser function...
jbauer at rubic.com
Wed May 10 20:49:31 CEST 2000
Channel21 Python Team wrote:
> for some reason, the -p option does not actually
> set the password to what we think it is. I.E., if
> you run "/usr/sbin/useradd -p passwordval usernameval"
> it doesn't actually set the password to passwordval...
Ah, the useradd command wants the encrypted [crypt(3)]
password passed in as an argument. You can modify
the earlier code to pass in the encrypted password
or create the account without a password and use
os.popen to set it via the passwd command.
More information about the Python-list