Linux user operations is relatively easy to understand, the basic operation is as follows:
1, the new user
Only the root user can create a new user
It will generate a user with the same name in the user's home directory / home directory after New.
At the same time will create a new group, the group with the same name as the user, the user is a member of the group.
If you let the new user belongs to a group that already exists, use the following command:
#useradd -g usergroup1 user1
So that the user belongs to a group of usergroup1.
If you want it to be part of a group usergroup2, then you use:
#useradd -G usergroup2 user1
Use the passwd command to set an initial password, a new user can log in:
2, delete users
userdel < username >
The files on the system are removed, you can use
3, the new group
groupadd < group name >
4. Delete Group
groupdel < group name >
The end ...