Ubuntu set Root account password

Source: Internet
Author: User
Tags auth root access

Ubuntu Linux has a distinctive feature, that is, when you first use, you cannot log on as root to the system, why this? This will start with the installation of the system. For other Linux systems, the root password is typically set during the installation process so that users can log on to the root account or use the SU command to switch to Superuser status. By contrast, Ubuntu does not set a password for the root user and does not have the root account enabled when it is installed by default. The question is, what if you want to run the command as root? It doesn't matter, we can use the sudo command to achieve this.
sudo is a tool commonly used under Linux that allows ordinary users to use superuser privileges, which gives administrators a granular access control method through which people can access the system as both Superuser and other types of users. The advantage of this is that administrators can grant certain types of superuser privileges without telling the user the root password, which is what many system administrators are dreaming of.

Method One:
Setting the allocation is simple, just set a root password for root: $ sudo passwd root
You will then be prompted to enter the root user's password, enter the root password consecutively, and then use: $ su
You can switch to Super Admin user login!

1. After the terminal executes the sudo passwd root command, you will be prompted to set a new root account password.
2. Click the Login Window menu, System-Preferences, and switch to the Security Options page and select the Allow local System Administrator Login option under it. After performing these two steps, you can log in to the Ubuntu system using the root account.

If you want to disable the root account again, you can execute sudo passwd-l root

sudo passwd root to set the root user's password to open the root account, the lock account is sudo passwd-l, the open account is sudo passwd-u (need to be locked before, otherwise invalid).


Method Two:
Log in with the root account in Ubuntu
In fact, I personally think this is not much necessary, because when you need root permissions, use sudo can be. If you really need to enable the root account in Ubuntu, then you might want to do the following:
1. Reset the root password: $sudo passwd root
#按照提示输入两次新的密码, and to be confirmed.
2. Enable root User login: $sudo vi/etc/gdm/gdm.conf
#打开gnome的配置文件, enter in the last line mode: Allowroot carriage return, find Allowroot=false, change false to True, save and exit.
Then, when you restart the system, you can log in with root. If you want to disable the root account, execute the following command: $sudo passwd-l root
The root account in Ubuntu is disabled by default. In this case, if you want to use root permissions to do something, you will need sudo instructions. For some friends, they may need to activate the root account in Ubuntu.

How to make root login system on Fedora 10

FEDORA10 default is not allow root account GUI login, the following is the solution.
First, the user account into the terminal, allow the root account login:
First Su
Then VI/ETC/PAM.D/GDM
Delete one of the rows auth required pam_succeed_if.so user! = root quiet
Then Wq save and exit.
This allows the GUI to log on using root.
You can also modify the/etc/gdm/contom.conf file, add the following lines, enable root automatic login
[Daemon]
Automaticloginenable=true
Automaticlogin=user_name
  
Fedora 10 's Network service does not start automatically and also needs to be modified
Chkconfig--level Network on
If you use the GUI interface to modify the network configuration, it seems that the modification program has a bug, the subnet mask has been changed and then turned into a 192.168.1.1
Again, you can modify it directly in the file. File Location:/etc/sysconfig/network-scripts/ifcfg-eth0
can also be turned on to the root login system, login mode is a graphical interface, the prompt can not verify the user, very puzzled, the password is right ah, entered several times still prompted "Unable to verify the user." Had to use an ordinary user landed. Open the terminal input Su, and then enter the root password to successfully go to the root user. Set the boot mode to text mode, reboot into text mode, enter root and password, login success, it appears that in text mode can be logged in the root.
Cannot log in to graphics mode as root, possibly for security reasons. Although the user can only log on to the graphical interface with ordinary users, but in the graphical interface mode, it is possible to change the root password. Select the system----and the root password, which pops up a dialog box to change the root secret.

Graphical Root Login
Fedora 11 By default does not allow root access in GDM, but must be rooted in the terminal with normal user login. Then many users still want to log on as root. I don't approve of it, but I'll tell you what to do. Please do not forget that once you use root login will destroy your system, so please do not enter the following command, unless you know what you are doing.
Open Terminal input: Su-c ' GEDIT/ETC/PAM.D/GDM
Find the following line: Auth required pam_succeed_if.so user! = root quiet
Comment out this line: #auth required pam_succeed_if.so user! = root quiet
Save the file and log out, then you can log in as root.

Ubuntu set Root account password

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.