1. User lock: Passwd-l user1
2. Unlock User: Passwd-u user1
3. User no Password registration: passwd-d user1
4. Add to the secondary user group: Gpasswd-a user1 boss (group name)
Remove user to Secondary user group: Gpasswd-d user1 boss
5. Switch to the Boss user group: Newgrp boss (after User1 login), you may want to enter a user group.
6. Add users to the main user group and to the secondary user group:
Useradd-g group01-g GROUP02,GROUP03
7. Group user group plus password: gpasswd newpasswd renewpasswd
8. Switch user's identity: Su username or su after the user name, that is, the switch user name.
9 Current Login user name: WhoAmI
ID + username. Indicates that the specified user information, including user number, user name, is displayed. Primary group number and name, subordinate group list.
Groups + Username. Displays all groups for that user.
Advanced commands for Linux user groups and user groups