[Tutor] passwords

Lewis Bergman lbergman@abi.tconline.net
Mon, 11 Feb 2002 15:02:13 -0600

OK, word of warning
I have only been at python for about three weeks so listen at your own risk.

The first program I made uses libxmlrpc and SimpleXMLRPCServer to manage many 
different machines password and shadow password files along with things like 
RADIUS db records from a single point. While this works, it is full of 
dangerous implications. 

It does this with spawnv and it's P_WAIT option (so I can get the status code 
back) from the os module. I also used the crypt module to encrypt the 
passwords before writing them so I could use the useradd command with the -p 
switch instead of having to interact with the passwd command with some kind 
of expect deal.

I found an abandoned project very useful in this. In fact, I rewote all but 
one function from the ground up but the clues in that project were 
invaluable. I would also suggest getting the shadow source files so you can 
see exactly what the return codes are so you can program with appropriate 
responses in mind.

Hope this helps.
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115