[CentOS] OT: Scripting with sudo password

Wed Nov 14 23:56:11 UTC 2007
Robert Spangler <lazydog at zoominternet.net>

On Wed November 14 2007 14:41, James A. Peltier wrote:

>  Completely off topic, but I'm sure someone out there is using scripts
>  that require a sudo password of some sort, so I'll ask.
>
>  What are people doing to automate tasks that required sudo passwords in
>  order to run?  sudo without a password is not an option for me, but I
>  would like to be able to enter the password once have it saved and then
>  read back when sudo is required.

Question for you then, why is sudo without a password not an option?

Check the man pages of sudoers.  It is possible to setup a sudo user that is 
only allowed to run a set of command.  This in effect only allows the user to 
run that one program (or as many as you setup) as sudo and no other.

This has to be better then reading a password file that is lying around on a 
disk somewhere.

>  Any examples?

Plenty in the man pages.


-- 

Regards
Robert

Smile... it increases your face value!