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.