Linux : create a user if not exists

Christian Heimes lists at
Tue Aug 16 10:14:33 EDT 2011

Am 16.08.2011 10:04, schrieb Chris Rebert:
> You can replace the /etc/passwd parsing with a call to pwd.getpwnam():

You should replace it. /etc/passwd is not the only source for users.
/etc/nsswitch.conf may list more user and group sources like nis/yp,
LDAP and so on.


More information about the Python-list mailing list