LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2006, 11:07 PM   #1
aarulan
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 0
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.
 
Old 03-26-2006, 11:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
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?
 
Old 03-26-2006, 11:17 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
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
 
Old 03-26-2006, 11:20 PM   #4
aarulan
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 03-26-2006, 11:24 PM   #5
aarulan
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudoers File Help Harlin Linux - Software 1 03-15-2006 05:16 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 06:03 PM
sudoers file cactus-bob Linux - Newbie 2 03-11-2004 12:24 PM
help with sudoers file ogden2k Linux - Security 4 03-11-2003 11:39 AM
The Sudoers File Rubicone Linux - Security 0 05-02-2002 07:17 PM


All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration