LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it necessary to add root to sudoers? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-necessary-to-add-root-to-sudoers-854964/)

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

Is it necessary to add root to sudoers?
 
Code:

root ALL = (ALL) ALL
Do I need it in /etc/sudoers? It's there by default and I don't know why does root need sudo.

grail 01-08-2011 04:25 AM

Ahhh ... now your other question makes a little more sense.

It also means that if you know this format, I am unsure as to why you do not already know the answer to your other question

My understanding of the above is, yes you need this on a sudo based system otherwise even root would need to authenticate themselves each time they use
a super user command.

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

Quote:

My understanding of the above is, yes you need this on a sudo based system otherwise even root would need to authenticate themselves each time they use a super user command.
Why would root need "sudo"? It already has all the privileges.

sandy.bhadoriya 01-08-2011 04:42 AM

When you login as a Root than you don't need write sudo.
root can do anything .
and sudo is use by user who is login with different user other than
root.

acid_kewpie 01-08-2011 04:46 AM

The point is that it's there by default. Initially it's an illogical thing to do, but I guss it's to cover some services which will use sudo as part of their startup process. Note that sudo it's not just for root access, it can be used to run processes as other service, or user, accounts too.

falmdavis 01-08-2011 12:50 PM

who is certain?
 
Quote:

Originally Posted by acid_kewpie (Post 4217218)
but I guss it's to cover some services which will use sudo as part of their startup process.

Does someone know for certain if it is there for the root account to run commands with superuser privileges?
Does someone know for certain if it is there for services at startup that use sudo as part of their startup process?

Is there a website that explains the reasoning for the root line in the sudoers file?
http://www.go2linux.org/sudoers-how-to
Quote:

As you can see there is basically one line

root ALL=(ALL) ALL

This lines means that the user root can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command.

So the first part is the user, the second is the terminal from where the user can use sudo, the third is as which user he may act, and the last one, is which commands he may run.
Note that on Ubunutu systems, that you use sudo. Does someone know what the sudoers file looks like in Ubunutu and if it also has the root line mentioned in the post?


All times are GMT -5. The time now is 04:52 PM.