[sudo-users] Running as a user other than root

Jeremy C. Reed reed at reedmedia.net
Wed Feb 7 09:13:11 EST 2007


On Tue, 6 Feb 2007, Mia Durand wrote:

> Fairly new to using sudo, and I'm trying to set up a user to run a job 
> as a user other than root.  I included all of the syntax that I believe 
> should work, but I'm still unable to get the command to run.  Here is a 
> snippet of my sudoers file.
> 
> User_alias DB2=sds
> 
> Cmnd_Alias REPCHK=/home/db2sds/bin/repchk

I don't see REPCHK used below.

> DB2 ALL=(db2sds) NOPASSWD:repchk
> 
> I have also tried this with:
> 
> DB2 ALL=(ALL) NOPASSWD:repchk
> 
> and also with:
> 
> DB2 ALL=(ALL)repchk
> 
> and also with:
> 
> DB2 ALL=(db2sds)repchk
> 
> But no matter what I include in the user specs I am continually told that user sds is not permitted to run this command.
> 
> I remember hearing along the way somewhere that there may be some issue 
> with running commands as a user other than root, but I haven't been able 
> to find anything substantial to back that up.  Does anyone know what I 
> might be doing wrong, or if this possibly does not work?  Thanks in 
> advance.

Try:

	sudo -u db2sds repchk

Also, use full path to the executable.

  Jeremy C. Reed



More information about the sudo-users mailing list