Ubuntu change password and username steps

Ubuntu is a Linux operating system. Modifying the password and user name is a dangerous action. Please modify it carefully.

Ubuntu change password steps:
1、 Enter Ubuntu, open a terminal, and enter sudo su to become the root user. Note that you must first become a root user! ! !
2、 sudo passwd user (user is the corresponding user name)
3、 Enter the new password and confirm the password.
4、 Change the password successfully, restart, enter the new password to enter Ubuntu.

Steps to change user name on Ubuntu:
1、 Enter Ubuntu, open a terminal, and enter sudo su to become the root user. Note that you must first become a root user! ! !
2、 gedit /etc/passwd, find the line that represents you, and change the username to the new username. Note: Only modify the user name! Keep the full name, directory, etc. behind!
3、 gedit /etc/shadow, find the line that represents you, and change the username to the new username
4、 gedit /etc/group, you should find that your username is in many groups, modify them all!
5、 After modification, save and restart.

Note: Be careful when making changes, and don't type a letter incorrectly.

Tip: If you want to change the password and user name, please change the password first. After restarting, change the user name and restart. If you change your username first and then change your password, you may not be able to log in to Ubuntu.

Recommended Posts

Ubuntu change password and username steps
Python implements username and password verification
Detailed steps to install MySQL to change the default password in Ubuntu
How to change MySQL password under Ubuntu
How to change root user password on Ubuntu
Summary: Ubuntu Python2.x and
Implementation steps of opening and viewing Ubuntu cron logs
Ubuntu20.04 experience and beautification
Ubuntu introduction and installation
[python] python2 and python3 under ubuntu
Detailed steps to configure Ubuntu 16.04 and Apache virtual host
Ubuntu backup and restore
Method steps for installing and configuring SSH service under Ubuntu 18.04
ubuntu16.04 build vim and pyt
Ubuntu 16.04 compile and install PHP 7.2
Ubuntu16.04 installation and simple configuration
ubuntu install and configure GitLab
Ubuntu deployment and experience Nexus3
ubuntu19.04 installation tutorial (graphic steps)
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Ubuntu PostgreSQL installation and configuration
ubuntu root default password (initial password)