pwd behaviour when new users are added
tjg at exceptionalminds.com
Mon Mar 19 21:31:23 CET 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
if my programme now issues another 'pwd.pwgetall()' or a
'pwd.pwgetnam()' or 'pwd.pwgetuid()' the new user name is not
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.
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