pwd behaviour when new users are added
Timothy Grant
tjg at exceptionalminds.com
Mon Mar 19 15:31:23 EST 2001
I just ran into an interesting feature of the pwd module
say I have users fred, ethel, ricky and lucy on my system and I
issue a 'pwd.pwgetall()' this returns a tuple with user
information. Now, while my programme is running I issue a
'useradd gilligan'
if my programme now issues another 'pwd.pwgetall()' or a
'pwd.pwgetnam()' or 'pwd.pwgetuid()' the new user name is not
available.
if I 'reload(pwd)' it still doesn't work if I 'del pwd' and
then 'import pwd' it doesn't work.
What am I doing wrong?
BTW: I have posted here a couple of times on shadow password
issues, and the outcrop of those posts is that I have written
three replacement functions for the pwget*() that include
shadow information in the tuple returned. It works quite well.
--
Stand Fast,
tjg.
Timothy Grant tjg at exceptionalminds.com
Red Hat Certified Engineer www.exceptionalminds.com
Avalon Technology Group, Inc. <>< (503) 246-3630
>>>>>>>>>>>>>Linux, because rebooting is *NOT* normal<<<<<<<<<
>>>>This machine was last rebooted: 62 days 4 hours ago<<
More information about the Python-list
mailing list