Re: [SLUG] shell script question

From: Matt Miller (mmiller1@mptotalcare.com)
Date: Wed Jan 29 2003 - 12:33:39 EST


On Wed, 2003-01-29 at 12:21, Matt Miller wrote:
> On Wed, 2003-01-29 at 11:57, Russell Hires wrote:
> > Background: I'm running a shell command in sh via Applescript in Apple's OS X
> > to restart the computer (from OS X to OS 9), but I have to use the sudo
> > command. (We have a lab full of Macs that constantly go back and forth
> > between the OS's)
> >
> > About the sudo command: when you run a shell script in this basic form: sudo
> > <command>, you get a prompt back asking for the password. How do I make the
> > script know that the prompt has appeared, and then fill in the password?
> >
>
> IIRC, in your sudoers file add the following (root@host$ visudo):
>
> <User or User_Alias> <user_to_run_as> = NOPASSWD: <command or
> command_alias>
>
> man sudo for more info.

Or even better, man sudoers. :)

-- 

Matt Miller Systems Administrator MP TotalCare gpg public key id: 08BC7B06

-- An improperly trained Samurai dies quickly.




This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:54:39 EDT