Save passwords in scripts

Florian Lindner Florian.Lindner at xgm.de
Mon Mar 21 10:56:39 EST 2005


Hello,
I've a scripts that allows limited manipulation of a database to users. This
script of course needs to save a password for the database connection. The
users, on the other hand need read permission on the script in order to
execute it but should not be able to read out the password.
What is the common way to solve this problem?

My current way is to allow the users to execute the script with sudo while
not having read permission when acting as a ordinary user. But I don't like
this solutions and consider it very ugly.

Thanks,
Florian



More information about the Python-list mailing list