[Tutor] Fwd: Running shell command

Ricardo Dueñas Parada rduenasp at gmail.com
Fri May 30 20:13:07 CEST 2008


I´m running Fedora 8, in this case the command is
su -c 'command'.

I also think it's better to allow a specific user to use smartctl.
I will do that.

Thank´s, it was really helpfull.

_Ricardo



2008/5/30 W W <srilyk at gmail.com>:

> Curse my forgetting to reply to all!
>
> ---------- Forwarded message ----------
> From: W W <srilyk at gmail.com>
> Date: Fri, May 30, 2008 at 1:05 PM
> Subject: Re: [Tutor] Running shell command
> To: Ricardo Dueñas Parada <rduenasp at gmail.com>
>
>
> On Fri, May 30, 2008 at 12:52 PM, Ricardo Dueñas Parada
> <rduenasp at gmail.com> 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  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080530/4817d57c/attachment.htm>


More information about the Tutor mailing list