Linux environment to change the user's UID Application example: 1, add newuser2 to the group staff # usermod-Gstaffnewuser22, modify newuser username newuser1 # usermod-lnewuser1newuser3, lock account newuser1... example of changing the UID Application in linux: 1. add newuser2 to the staff group # usermod-G staff newuser2. 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] supplementary instructions: usermod can be used to modify user account settings. Parameter:-c <> modify the remarks of the user account. -D logon directory <modify the directory when the user logs in. -E <> modify the validity period of the account. -F <> If the password expires, the account is closed for several days. -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 user login. -U: modify the user ID. -U unlocks the password.
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.