Linux Create user command

Source: Internet
Author: User

Create a user, set a password, modify a user, delete a user:
useradd testuser Create user TestUser
passwd testuser set a password for the created user TestUser
Description: The newly created user will create a user directory under/home TestUser
usermod--help Modify user parameters for this command
userdel testuser Delete user testuser
rm-rf testuser Delete the directory where the user testuser is located

The above commands can only be used by the root account, if you do not know where the command above your system can use the following command to find its path:

Locate Useradd




When a new user is created, the information about the new user is added to the passwd file in the ETC directory.
Note: In order to, here I used the tail-3passwd command, only the last 3 lines of the file (and the information I am concerned about) display



User Switching between command-line windows:
SU User name
Description:su is an abbreviation for switch user, indicating
Enter "exit" from the new user state to return to the user state you just made



Add and remove user groups:
Groupaddtestgroup

Adding a group
Removal of Groupdeltestgroup groups
Note: the addition and deletion information of the group is reflected in the groups file of the etc directory .


Linux Create user command

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.