User and group management commands and user group management commands

Source: Internet
Author: User

User and group management commands and user group management commands

Command parameter description
--------------------------------------------------------------------------------
Useradd is used to create a new user.
-D specifies the user's home directory (default:/home/username)
-D Display Default Value
-Enew account expiration date, in the format of "YYYY-MM-DD"
-G: Specifies an initial user group (it must already exist)
-G: specify one or more extended user groups.
-N: do not create a user group with the same name
-S specifies the default logon shell
-U indicates the UID of the user.

Passwd is used to change the user's password.
-L the user is locked and cannot log on.
-U unlock, allowing users to log on
-- Stdin allows users to change their passwords from standard input
-D: no password for the Account
-E force the user to change the password upon next login
-S: displays the user's password status

Userdel is used to delete a user.
-F force delete a user. The Home Directory and Related Files
-R: deletes users, home directories, and email pools.

Usermod is used to modify user attributes.
-C fill in account remarks
-D-m and-d can be used to re-specify the user's home directory and automatically transfer new data
-E account expiration time, in the format of "YYYY-MM-DD"
-G Change User Group
-G change Extended user group
-L locking a user and forbidding it from logging on to the system
-U unlock a user and allow it to log on to the system
-S: Change the user's logon shell
-U: Modify the UID of a user.

Groupadd is used to create a group.

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.