Custom adduser function...

Jeff Bauer jbauer at rubic.com
Wed May 10 14:49:31 EDT 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.

-Jeff




More information about the Python-list mailing list