Open Root Login under Ubuntu

Source: Internet
Author: User
Tags switches

Children's shoes that have been installed with Ubuntu are aware that the default installation will only add a normal user name and password, while Superuser privileges are performed using the sudo command. Using root login under Ubuntu or switching to root with the SU command in the shell will prompt the error " Authentication failed ". Because root is not enabled during the installation process , and it is not assigned a password .

Other Linux distributions used by Uguanto, like Fedora, Mandriva, and so on, typically require a root password during installation, and ordinary users can use the SU root command to convert to super users, while Ubuntu can only use sudo, This command provides administrators with a granular access control method that is more secure.

This article resolves how to enable root user login under Ubuntu 11.04 .

There are two ways of doing this:

1. Set password for root: sudo passwd root, then prompt to enter the root user's password, enter two consecutive times to set the password.

2, edit the Gnome configuration file, sudo vi/etc/gdm/gdm.conf, find Allowroot=false, False to True, save and exit, of course, you can also use other non-VI editor.

After the setup is successful, you can use root to log in and switch to Superuser using the SU command in the terminal. After you use the sudo passwd root command to set the root user's password to open the root account, you can execute sudo passwd root-l lock root, and of course the open account is sudo passwd root-u(requires a previously locked Otherwise, it is not valid) to manage similar commands for other users.

Some other things to note :

Old version of Ubuntu if you follow the above settings, but also only in the terminal in such a login or switch, in the Ubuntu Landing screen root users will also appear "not allowed to log on to the system administrator from this screen" system prompt, you need to do the following: "System--system management," Login Window menu and switch to the security Options page, and then select the Allow Local System administrator login option under it.

Finally, it is to be remembered that the direct use of root landing in any Linux system is not advocated .

the difference between sudo and SU commands :

The SU command is a tool to switch users without exiting the current user, and the SU can switch between users, and if the superuser root switches to normal or virtual users, no password is required, and the normal user switches to any other user requires password authentication.

Sudo is a very useful tool on the Unix/linux platform that allows system administrators to assign some reasonable "rights" to ordinary users to perform tasks that only superuser or other privileged users can accomplish, thus reducing the number of logins and administration time of the root user. It also improves the security of the system. The purpose of sudo designers is to give users as few permissions as possible but still allow them to complete their work.

We can simply understand that Su obtains a stable superuser (or other user rights), Sudo has temporary restricted superuser privileges, and will expire after a certain period of time.

This article organized from: http://www.linuxdiyf.com/viewarticle.php?id=160965

Enable root login under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.