Http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu installed, the root user is locked by default, does not allow logins, and does not allow" su "to root. Some people say this is a bad practice, especially for servers. I think it's more secure for desktop users, but the server can be set to "Allow Su to root, but not allow root users to log in directly." For the convenience of development, I use this approach on both the desktop and the server.
Allow Su to root
Very simple, here's how to set it up:
me@tipfo~$ sudo passwd
Password: <---Enter the user's password at installation
Enter New UNIX Password: <---The user password
Retype new UNIX Password: <---Repeat root password
passwd: Password updated successfully
Allow Root Login
If you want to allow root login (not recommended), do this:
me@tipfo~$ Gksu/usr/sbin/gdmsetup
(or Use Desktop menu: System > System Management > login window)
Click the Security Options page and select Allow local administrator to log on.
Note: This step relies on the previous step
Login without entering password
There are also people complaining at the forum that Ubuntu in your home can't be like window$--you can log in without typing a password. In fact, you can do the same:
On the Security Options page in the previous step, tick:
"Enable automatic Logon", "user" selection (such as: "Me");
Note: Public computers must not be so set!
SSH Login Remote Server
If the remote server only allows root users to SSH to the server, under Ubuntu, the "Su to root" user must be able to log on successfully (depending on the server-side configuration).
First, copy the key to the "/root/.ssh/" directory
me@tipfo~$ su
Password:
root@tipfo/home/me# chmod 600-r/root/.ssh/
root@tipfo/home/me# ssh-p 27482 11.22.33.44
Enter passphrase for key '/root/.ssh/id_rsa ':
Last Login:thu June 14:29:00 2007 from 11.22.33.45