Find out username and UID/GID

Find out username and UID/GID

Post by Florian Li » Tue, 06 Jan 2004 00:00:19


Hello,
how can I find out the username and it's UID and GID on a linux system,
using the most recent python version? If possible, without the use of extra
libraries.
Thanks,
Florian
 
 
 

Find out username and UID/GID

Post by Paul Rubi » Tue, 06 Jan 2004 00:01:14

Florian Lindner < XXXX@XXXXX.COM > writes:

os.getuid(), os.getgid()

 
 
 

Find out username and UID/GID

Post by Gerrit Hol » Tue, 06 Jan 2004 00:10:33


500
500
('gerrit', 'x', 500, 500, 'Gerrit Holl', '/home/gerrit', '/bin/bash')

I think there is a simpler way for the last one in the docs, but I'm not
entirely sure.

yours,
Gerrit.

--
188. If an artizan has undertaken to rear a child and teaches him his
craft, he can not be demanded back.
-- 1780 BC, Hammurabi, Code of Law
--
Asperger's Syndrome - a personal approach:
http://www.yqcomputer.com/ ~gerrit/english/