CentOS user and user group management, centos User Group

Source: Internet
Author: User

CentOS user and user group management, centos User Group

Groupadd maid creates a group according to the system's default gid. The same as the root uid, gid also starts from 1000.

Groupadd-g 1008 create a user group with gid = 1008: maid

Groupdel maid Delete Group

Groupdel cannot delete the user master group of user1

Useradd [-u UID] [-g UID] [-d HOME] [-M] [-s]

-U indicates the custom UID

-G indicates the name of the new user group, which can be followed by the group id or group name.

-D. Customize the user's home directory

-M indicates that the home directory is not created.

-S indicates the custom shell

Useradd test10 adds user test10.

If useradd directly follows the user name without any options, a group with the same name is created.

Userdel user12 delete user user12 and keep the home directory

Userdel-r user12: delete user12 together with the home directory.

Passed gys: Set the user's gys password.

Su switches to the root user, and the current directory remains unchanged.

Su-switch to the root user and change the directory to/root

 

Related Article

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.