Detailed steps for creating and Deleting Users in linux
In linux, user operations are relatively easy to understand. The basic operations are as follows: 1. Only root users can create new users.
# Useradd user1
A user home directory with the same user name is generated in the/home directory.
A new group is created, which has the same name as this user and belongs to this group.
To assign a new user to an existing group, run the following command:
# Useradd-g usergroup1 user1
In this way, the user is a member of usergroup1.
If you want to make it belong to another group of usergroup2, use:
# Useradd-G usergroup2 user1
Use the passwd command to set an initial password for new users to log on:
# Passwd user1
2. delete a user
Userdel <User Name>
Delete files from the system. You can use
Userdel-r user name
3. Add a group
Groupadd <Group Name>
4. delete a group
Groupdel <Group Name>
The end...