User Management
-
Add user
the useradd [option] username
default system automatically assigns primary group and the UID
options [G, G, U]
-g: Specifies the user's home group
-G: about the specified user group is attached
-u: Specifies the uid -
Modify the user
the usermod [options] username
option [G, G, U, L]
-l: modify the user name -
Replace the user
su (switch user) username -
Change the user password
passwd username
User group management
-
Adding user groups
groupadd [options] user group names
by default the system automatically assigns the user group id
option [G]
-g: Specifies the user group id -
Modify User Group
groupmod [Option] User group name
option [G, n-]
-g: Modify User Group ID
-n: Modify User Group Name