advanced search 
Wednesday, July 03 2024 @ 01:15 AM EDT
   

To sudo or not to sudo - that is the question!

HowTo

Not unlike other Linux distributions, Ubuntu has the root account disabled by default and requires you to use 'sudo' in a terminal session to execute commands that normally require root level or elevated privileges. There are several different schools of thought here and I can clearly see both sides, so I'm not a good person to debate with on this. What I will do is give you the knowledge to decide for yourself which school you want to attend. :)



Now, I know that it has already been said on this site that having it not enabled is, well, stupid. It is not recommended to enable it for login unless you are aware of the risks. But, before you do, think about this: If you enable it, and forget to disable it for any reason, you have given 50% of your security information to any person who may have access and may want to compromise your rig or server regardless of local or remote exploitation. It is also possible that it may violate policies that your company has (if you are in a corporate environment) and that may be enough to get you a date in your local neighborhood HR department. Either way, weigh your risks prior to enabling or diabling it. Nuff said...


Open a new terminal window and...

 

To enable it type:

sudo passwd root (hit enter key)

(type new root password, hit enter key)

(type same new root password again and hit enter key)

 

To disable it type:

sudo usermod -p '!' root

 

To test the status of root login capability:

su - root

(enter your root password that used when you enabled it)

whoami

 

To leave root level and check who you are now logged in as:

exit

whoami

Trackback

Trackback URL for this entry: http://www.empirelinux.org/trackback.php?id=20110104193239451

No trackback comments for this entry.
To sudo or not to sudo - that is the question! | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.