LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Please explain about sudoers (https://www.linuxquestions.org/questions/linux-newbie-8/please-explain-about-sudoers-854966/)

Mr. Alex 01-08-2011 04:14 AM

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.

grail 01-08-2011 04:21 AM

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.

EricTRA 01-08-2011 04:25 AM

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

Mr. Alex 01-08-2011 04:29 AM

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?

EDDY1 01-08-2011 05:06 AM

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

GazL 01-08-2011 07:22 AM

Quote:

Originally Posted by Mr. Alex (Post 4217208)
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.


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