Article Title: linux basics: Create a Linux User. 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.
Linux is a multi-user multi-task time-sharing operating system. any user who wants to use system resources must first apply for an account from the system administrator and then enter the system as the account. User Accounts can help system administrators track users who use the system and control their access to system resources. They can also help users organize files and provide security protection for users. Each user account has a unique user name and password. After you enter the correct user name and password during logon, you can access the system and your home directory.
Create users, Set passwords, modify users, and delete users:
Useradd testuser create user testuser
Passwd testuser: Set the password for the created user testuser
Note: The newly created user creates a user directory testuser under/home.
Usermod -- help modify the parameters of the USER command
Userdel testuser delete user testuser
Rm-rf testuser: Delete the directory of user testuser
The above commands can only be used by the root account. If you do not know where the commands on your system are located, you can use the following command to find the path:
Locate useradd
After creating a new user, the new user information will be added to the passwd file under the etc directory.
Note: For this purpose, I used the tail-3 passwd command to only display the last three lines of information (which is also my concern) of the file.
[1] [2] Next page