Linux command: detailed description of the usermod command!

Source: Internet
Author: User
Syntax: usermod [-LU] [-c & lt; remarks & gt;] [-d & lt; logon Directory & gt;] [-e & lt; valid

Example:
1. add newuser2 to the staff group.
# Usermod-G staff newuser2
2. change newuser's username to newuser1.
# Usermod-l newuser1 newuser
3. lock account newuser1
# Usermod-L newuser1
4. unlock newuser1
# Usermod-U newuser1

Function description: modify a user account.

Syntax: usermod [-LU] [-c <备注> ] [-D <登入目录> ] [-E <有效期限> ] [-F <缓冲天数> ] [-G <群组> ] [-G <群组> ] [-L <帐号名称> ] [-S ] [-U ] [User account]

Note: usermod can be used to modify user account settings.

Parameters:
-C <备注> Modify the remarks of a user account.
-D logon Directory> modify the directory when a user logs in.
-E <有效期限> Modifies the validity period of an account.
-F <缓冲天数> The account is closed after the password expires.
-G <群组> Modify the group to which the user belongs.
-G <群组> Modify the additional group to which the user belongs.
-L <帐号名称> Modify the account name.
-L lock the user password to make it invalid.
-S Modify the shell used after the user logs in.
-U Modify the user ID.
-U unlocks the password.

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.