Ubuntu default is not to start the root user, now describes how to enter the root method.
(1) switch from user to root
Whether you're logging in to Ubuntu in graphical mode or in command-line mode, we'll find the default user
simply execute sudo su to
Note: For security reasons, the default Ubuntu root user does not have a fixed password, its password is randomly generated and dynamically changed
, seems to change every 5 minutes, so using su (switch user) is not possible, because we do not know the root password
(2) User user is cut back from root
To cut back from the root user, simply execute the command:su User (user is the username of your own installation), or enter exit directly, or you can ctrl+d the key combination
(3) Set a password for root
The default root user is not a fixed password, and is locked, if you want to set a password for root
Just execute the command:
sudo passwd root (then follow the prompts step-by-step)
Enter the user password:
Enter the root password:
Enter the root password:
This can be referred to in (1) as the su root , enter the root password to switch to the root user
Note: After setting the password for root, sudo su can still switch to the root user
Attached: Users and Groups in the graphical mode system---system management can also set a password for root
(4) Disabling and enabling root login
Execute sudo passwd-l root (just disable root, but the root password is still saved), then perform SU root discovery authentication failed,
To start root login again, execute sudo passwd-u root
(5) Allow Ubuntu to log in automatically
Graphics mode, System Management, login window authorization to unlock after the selection
Automatically login as user.
Source: http://www.cnblogs.com/weiweiqiao99/archive/2010/11/10/1873761.html
Linux Learning Notes (i) switching between root and user in Ubuntu