LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help with sudoers file (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-sudoers-file-428826/)

aarulan 03-26-2006 10:07 PM

help with sudoers file
 
I was wondering if someone could help me with this problem...
I need to make changes to the sudo configuration file to allow a user to run sudo for the following commands as root; mount, ls, ifconfig, and route.

I've tried working with the file, but I cant seem to get it to work. Any help would be greatlly appreciated, thanks.

gilead 03-26-2006 10:11 PM

Someone here posted a link earlier which describes using the sudoers file quite well. Have you had a look at http://www.linuxhomenetworking.com/l...n/addusers.htm?

twantrd 03-26-2006 10:17 PM

Quote:

I was wondering if someone could help me with this problem...
I need to make changes to the sudo configuration file to allow a user to run sudo for the following commands as root; mount, ls, ifconfig, and route.

I've tried working with the file, but I cant seem to get it to work. Any help would be greatlly appreciated, thanks.
Suppose the user is "aarulan". Type 'visudo' to write to the file. Below is what you need in the sudoers file to do what you want.

Code:

# Cmnd alias specification
Cmnd_Alias ROOTPWR=/bin/mount,/bin/ls,/sbin/ifconifg,/sbin/route

# User privilege specification
root    ALL=(ALL) ALL
aarulan ALL= NOPASSWD: ROOTPWR

Save it and test it.

-twantrd

aarulan 03-26-2006 10:20 PM

thanks I think that helped a bit, still a little unsure though, would it look something like this?

aarulan ALL=(root) ls, mount, ifconfig, route

aarulan 03-26-2006 10:24 PM

Sorry i didnt see that other response, but thank you.
I guess i was a little off with my attempt, but I will give it a try.
Thank you again for the help.


All times are GMT -5. The time now is 11:34 AM.