1. User Management
A. User classification
Super User: Admin account root UID is 0
System User: System service generated UID range 1 ~ 999
Normal User: Account created by Administrator himself, UID range 1000 ~ 60000
B. Creating a user
# ID account name Verify that the system exists for this account
# Useradd account name Create account
C. Setting a password
#passwd Account Setup Password
D. Modify account information
#usermod
-L new Account old account change login name
E. Deleting an account
Delete an account #userdel account
-R along with home directory delete
Summarize:
When a normal user is created by default, a folder with the same name is created under/home.
This folder is where the user's home directory is created
Experiment One:
1. Create a new user account named Nvshen and set the password to 1234567
Testing with user Nvshen Telnet to the native system
2. Migrate this user's home directory to the/opt/nvshen directory
Re-login the native system with user Nvshen to confirm the current PWD working directory location
3. Completely delete the user account named Nvshen
Check its ID information to see the prompt results. Check if the home directory is available
Experiment Two: Group management
A. Creating a group
#groupadd Group Name
-G GID specifies GID when creating group
B. Adding a Delete member (user) to a group
#gpasswd
-A: Add specified user as group member
-D: Delete the specified member user from within the group
C. Deleting a group
#groupdel
Some operations on Linux users