LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-08-2011, 05:14 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question Please explain about sudoers


Code:
user from-host = (who) commands
I read Web-pages and man page and don't quite understand:
1. from-host - is it IP or hostname?
2. what does "who" mean? Explain with a simple language please.
 
Old 01-08-2011, 05:21 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,254

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Well I think you will need to explain further? I have just looked at man page for sudoers and cannot find the line you have shown above.

Whilst scrolling through the man page though it does seem to quite explicitly list what a host and user are.

Without more details on where you have drawn this from it is difficult to tell you what it actually means.
 
Old 01-08-2011, 05:25 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

The line you indicated can be 'translated' into the following:
Code:
usernames/group servername = (usernames command can be run as) command
Have a look at this website that explains it in pretty easy terms (halfway on the page).

Kind regards,

Eric
 
Old 01-08-2011, 05:29 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
I was reading some pages in Web and this line is what I know the syntaxis. It's not in the man page or anywhere else.

For example from man:
Code:
steve          CSNETS = (operator) /usr/local/op_commands/

The user steve may run any command in the directory /usr/local/op_commands/ but only as user operator.
1 2 = (3) 4 is a syntaxis here.

"The user steve may run any command ... only as user operator"
I don't get it. Who is allowed to run any command - user steve or user operator?
 
Old 01-08-2011, 06:06 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If you have sudo or are a sudo user, you can use sudo to execute commands that a normal user isn't authorized to do.

http://linux.die.net/man/8/sudo

Last edited by EDDY1; 01-08-2011 at 06:09 AM.
 
Old 01-08-2011, 08:22 AM   #6
GazL
Senior Member
 
Registered: May 2008
Posts: 4,087
Blog Entries: 1

Rep: Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535Reputation: 1535
Quote:
Originally Posted by Mr. Alex View Post
I don't get it. Who is allowed to run any command - user steve or user operator?
user 'steve' can run any command, but only when telling sudo to run the command as user operator.
i.e.
sudo -u operator command
would work, but
sudo -u fred command
or
sudo command
(which defaults to "-u root" wouldn't.

The sudoers man-page is notoriously hard to understand. Best bet is to skip down to the bottom of it and just look at the examples.

Last edited by GazL; 01-08-2011 at 08:26 AM.
 
1 members found this post helpful.
  


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
Re;sudoers palisetty_suman Linux - Newbie 4 01-28-2009 12:25 AM
sudoers madwac Linux - Newbie 1 03-10-2007 07:54 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 usa1234 Linux - General 1 10-24-2004 04:07 PM
help with /etc/sudoers keevitaja Linux - Newbie 5 08-17-2002 02:00 PM


All times are GMT -5. The time now is 08:17 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