Curse my forgetting to reply to all! ---------- Forwarded message ---------- From: W W <[EMAIL PROTECTED]> Date: Fri, May 30, 2008 at 1:05 PM Subject: Re: [Tutor] Running shell command To: Ricardo Dueñas Parada <[EMAIL PROTECTED]>
On Fri, May 30, 2008 at 12:52 PM, Ricardo Dueñas Parada <[EMAIL PROTECTED]> wrote: > Thanks for your answers. > > How can I make that action more secure? Is there any way for running > the program from a regular user (non su) without having the password > within the code? > > _Ricardo What type of system are you running? Ubuntu? Suse? Redhat? Or some Unix variety? Most *nix variants have a sudo, which allows non-root users to run commands as another user, most often a super-user (su). Assuming you have root access, you could easily set up a specific user account that has access to the smartctl command and nothing else (above that of a regular user), which would basically allow for a more secure method of running the script. google sudo or sudoers, or type "man sudo" or "man sudoers" at the command line for more help. HTH, Wayne -- To be considered stupid and to be told so is more painful than being called gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness, every vice, has found its defenders, its rhetoric, its ennoblement and exaltation, but stupidity hasn't. - Primo Levi _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
