LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 04: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, 04:21 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
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, 04: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: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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, 04: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, 05:06 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

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 05:09 AM.
 
Old 01-08-2011, 07:22 AM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023Reputation: 5023
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 07:26 AM.
 
1 members found this post helpful.
  


Reply



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-27-2009 11:25 PM
sudoers madwac Linux - Newbie 1 03-10-2007 06: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 05:03 PM
sudoers usa1234 Linux - General 1 10-24-2004 03:07 PM
help with /etc/sudoers keevitaja Linux - Newbie 5 08-17-2002 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:12 PM.

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
Open Source Consulting | Domain Registration