[Tutor] usernames and uid in linux
Pat Martin
wpmartin at gmail.com
Fri Mar 3 18:50:23 CET 2006
Hello all,
I seem to be having a problem finding the right tool in python. Given a
username I want to find the uid for it. I can do the reverse very easily
with:
pwd.getpwuid(2012)
This returns a tuple of data from the passwd file. But I want to do
something like:
command(username)
And get something that returns the uid (the number).
Thanks
--
Pat Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060303/fff49fd6/attachment-0001.html
More information about the Tutor
mailing list