Secure Passwords in Memory

Eric Gillespie, Jr. epg at
Sat Sep 30 23:05:05 CEST 2000

I searched DejaNews and found some similar topics, but nothing
which really answered my question. I need to get the root
password from the user to exec a program which requires root
privileges. I would like to immediately zero out the memory used
to store the password.

This is easy in a language such as C, but i don't want to write a
module just for this. I doubt 'del pw' or

for i in range(len(pw)):
    pw[i] = 0

will work.

Eric Gillespie, Jr. <*> epg at
Software Developer
Progeny Linux Systems -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list