Operating System - HP-UX
1753305 Members
6442 Online
108792 Solutions
New Discussion юеВ

Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

 
SOLVED
Go to solution
Susan Harris
Occasional Advisor

Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

Hi,

I just installed 1.6.3 of sudo and the doc with it isn't too clear. The syntax of the visudo file (sudoers) is

sue ALL=(ALL) ALL for all permissions...

But, I'm trying to set just 1 command for ops to be able to sudo to run... I've tried

ops /home/ops/runignite

but it doesn't like it... Any ideas?

Thanks,

Sue
4 REPLIES 4
Rick Garland
Honored Contributor

Re: Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

Try

%users ALL=(ALL) ALL

Patrick Wallek
Honored Contributor
Solution

Re: Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

Here is an excerpt from my sudoers file:

# Host alias specification
Host_Alias EXCALIBUR=cruella

# Command alias specification
#
Cmnd_Alias SHELLS=/bin/sh,/bin/csh,/bin/tcsh,/bin/ksh,/bin/bash,/bin/zsh
Cmnd_Alias FILES=/bin/chmod,/bin/chown,/bin/rm,/bin/mv,/bin/cp
Cmnd_Alias PRINT=/usr/bin/cancel,/uprc/local/scripts/prtadmin
Cmnd_Alias SYSMENU=/uprc/local/sysmenu
Cmnd_Alias KILL=/usr/bin/kill

#
z15551 EXCALIBUR=FILES,PRINT,KILL # Tracie Sullivan
Curtis Larson
Trusted Contributor

Re: Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

you should give the sudoers man page a good reading as the syntax is somewhat complex, but the short version goes like this:

who_is_executing on_which_hosts = (execute_as_this_user) these_commands

so for you that would be something like this:

ops hostname = (another_user) /home/ops/runignite
Susan Harris
Occasional Advisor

Re: Sudo 1.6.3 - Syntax problem in sudoers (visudo) file

Thanks everyone! Used Patricks suggestion and it works great...