Install Ubuntu system to machine, Admin account is set up, change root password and login with root account password
Change root password:
Check some information on the Internet change the root password, and user name and user password.
Modify root password: sudo passwd root
Modify host Name: sudo vi/etc/hostname change the name to its own name
sudo vi/etc/hosts changed the name to his name.
Modify user name: sudo vi/etc/passwd find the original username, change it to its own user name, but/home/"original username" in the can not change, if the change restart, then landing system.
sudo vi/etc/shadow find the original username and change to its own username
When the above steps are complete, sudo reboot reboots
After restarting, into the system, found in the home directory user directory or the original user name, but with the command ls-al can see the user directory of users have changed to your own users, the following "MV User directory name of their own user directory name" will be changed under the directory name. For example, the original directory name xxxx is now to be changed to user yyyy. With the command MV XXXX YYYY can be.
Login with Root account password: (excerpt from Baidu Experience)
Problem phenomenon:
1. Use Xshell to access Ubuntu Server, unable to connect
2. Install SSH without service on Ubuntu server. sudo apt-get install openssh-server Xshell tests non-root users and can connect normally, but root users still cannot access
Workaround:
1. Modify the/etc/ssh/sshd_config file, add the Permitrootlogin Prohibit-password # comment out
New add: Permitrootlogin yes2. Reboot SSH service/etc/init.d/ssh restart;
3. Re-use root connection, OK.