Results 1 to 3 of 3
In the sudoer file can I have a user run any command in a directory??
What I mean is I have let say 20 commands that might be accessed by ...
- 09-22-2008 #1Linux Newbie
- Join Date
- Jun 2006
- Posts
- 139
sudo question
In the sudoer file can I have a user run any command in a directory??
What I mean is I have let say 20 commands that might be accessed by other command(not alias) but one calls another.
Can I ,in sudo, code:
user1 /usr/commands/*
and this would let them run any command in the /usr/commands directory or
must I spell out all the commands they are permitted to use?
thanks
Mace
- 09-23-2008 #2Linux User
- Join Date
- Jun 2007
- Posts
- 318
It should work. Use visudo to edit /etc/sudoers and enter the following:
Cmnd_Alias CMNDS=/usr/commands/*
user1 ALL=CMNDS
- 09-24-2008 #3Linux Newbie
- Join Date
- Jun 2006
- Posts
- 139
thanks for the reply.
But now I have another question.
I may be reading or understanding this wrong so I'm asking for clarification.
If I add user1 in the sudoers file to perform shutdown,(/sbin/shutdown) will I have to logon as root through user to shutdown the system?
Can I prevent root from removing files (!rm ) as user1.
My problem is my boss is putting an incompetent person in to do backups and must sign in as root to bring the system up or execute certain commands.
I am trying to limit the damages up front.
thanks
Mace


Reply With Quote
