Basic linux knowledge: Create a Linux User

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.