Connecting Tech Pros Worldwide Forums | Help | Site Map

getting the uid of a system user

Marco Herrn
Guest
 
Posts: n/a
#1: Jul 18 '05
Hi I need to get the uid of a system user from the /etc/passwd file. Is
there an already existing module/function available or do I have to
parse it myself?

Marco

--
Marco Herrn herrn@gmx.net
(GnuPG/PGP-signed and crypted mail preferred)
Key ID: 0x94620736




Irmen de Jong
Guest
 
Posts: n/a
#2: Jul 18 '05

re: getting the uid of a system user


Marco Herrn wrote:[color=blue]
> Hi I need to get the uid of a system user from the /etc/passwd file. Is
> there an already existing module/function available or do I have to
> parse it myself?[/color]

You're probably looking for the pwd and grp modules;
http://www.python.org/doc/current/lib/module-pwd.html

--Irmen

Closed Thread