Sudo / Root Commands

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/12/2012 at 08:48 AM

 

Category:
Ubuntu
Configuration Files

Issue:
Where is root login?

Solution:
Root login is disabled in Ubuntu. Typically, you use sudo /path/to/command.

Notes:
You should be careful when using either root or giving somebody sudo, which means ability to become another user.
Never use sudo to start graphical (X Windows) apps as root. They might leave your home files owned by Root. For this use gksudo instead, ex: gksudo gedit /etc/smb.conf.

To simulate a root login (starts root's environment and includes login scripts), do sudo -i, you can also do sudo su - or sudo -s (keeps the current shell's environment and doesn't run scripts).

To enable the root account:
1. Give the root user a password:
sudo passwd root
2. Enter the root password and confirm password.
3. Log out and log back in as root.

To disable the root account again:
sudo passwd -dl root
(The deletes the password, leaving it disabled.)


previous page

×