Article Title: How to Solve root user and Other Logon Problems In Ubuntu. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
After Ubuntu is installed, the root user is locked by default and cannot log on or "su" to the root user. Some people say this is a bad practice, especially for servers. I think this is more secure for desktop users. But for servers, you can set it to "allow su to root, but not allow root users to log on directly ". For the convenience of development, I use this method on both the desktop and server.
Allow su to root
It is very simple. The following is the setting method:
Me @ tipfoo :~ $ Sudo passwd
Password: <-- enter the Password of the user during installation.
Enter new UNIX password: <-- new Root User password
Retype new UNIX password: <-- repeat the new Root User password
Passwd: the password is successfully updated.
Allow root Login
If you want to allow root logon (not recommended), perform the following operations:
Me @ tipfoo :~ $ Gksu/usr/sbin/gdmsetup
(Or use the desktop menu: system> System Management> logon window)
Click the "Security" option page and select "Allow Local Administrator Logon ".
Note: This step depends on the previous step.
Log on directly without a password
Someone complained on the forum that Ubuntu in the House could not be logged on like Window $ -- without a password. In fact, the same can be done:
On the "Security" option page in the previous step, select:
"Enable Automatic Logon" and "user" (for example, "me ");
Note: Do not set this for public computers!
Log on to the remote server using SSH
If the remote server only allows the root user to SSH to the server, you must "su to root" in Ubuntu to log on successfully (depending on the server configuration ).
First, copy the key to the "/root/. ssh/" directory,
Me @ tipfoo :~ $ Su
Password:
Root @ tipfoo:/home/me # chmod 600-R/root/. ssh/
Root @ tipfoo:/home/me # ssh-p 27482 11.22.33.44
Enter passphrase for key'/root/. ssh/id_rsa ':
Last login: Thu Jun 21 14:29:00 2007 from 11.22.33.45