Is there a standard module library function to access /etc/passwd or /etc/group

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Wed Jul 30 08:35:46 EDT 2003


Robin Cull wrote:

> Hi all, 
> 
> I'm writing a script that needs to do lookups on the UNIX passwd and
> groups file on textual usernames/group names and return numeric
> UID/GID.

Would the pwd and grp modules do the trick?

http://www.python.org/doc/current/lib/module-pwd.html
http://www.python.org/doc/current/lib/module-grp.html

--Irmen





More information about the Python-list mailing list