Root management
(1) New User: Useradd
-U |
Specify UID |
-G |
Specify GID |
-G |
Add to a group as a member |
-M |
Do not create a master user directory |
-M |
Create a Master User directory |
-C |
User Information Description column |
-D |
Specify a directory as the primary user directory |
-R |
Create a System account |
-S |
Specify Shell |
-E |
Account Expiration Date |
-F |
0 means the password is immediately invalid,-1 means never expires |
(2) Default value reference file for Useradd:/etc/default/useradd
(3) Uid/gid and password parameter reference file:/etc/login.defs
(3) Change Password: passwd
(4) Password aging management:chage(change age)
(5) Modify the relevant data of the account:usermod(user modify)
(6) Delete users:userdel(user delete)
It is mainly used with-R and can be deleted together with the home folder.
General user Management
(1) View user information:finger(fingerprint)
To query your own information:
Query the relevant user information:
Establish plan
(2) Modify the value of finger:chfn(change finger)
(3) Modify Shell:chsh(change shell)
(4) Query Uid/gid:id
Query yourself:
Find someone:
User Group Management
(1) New user group: Groupadd
(2) Modify user group: Groupmod
(3) Delete user group: Groupdel
(4) Modify user group password/designated team leader: GPASSWD
Linux Learning Notes---User management---account management