Today we will take a look at the method of setting the main group and additional groups by usermod in LINUX. It is very simple. Please see the detailed tutorial below.
1. Open the LINUX UBUNTU operating system, find the terminal and open the window.
2. After entering id, you can view all main groups and additional groups .
3. The second 1000 shown here in the passwd file is the number of the main group.
4. Here you can see at a glance the
group-attached permissions of the study user.
5,
chrisThis user does not have the permissions of the additional group sudo, and the user cannot be created.
6. Capital G can add
additional groups.
7. Check here, there are two users with sudo permission.
8. But it still doesn’t work here because you have to exit and reconnect.
9. At this time, the permissions have been successfully added.
10, and
-g is used to change the main group.
The above is the detailed content of How to use usermod to set the main group and additional groups in LINUX?. For more information, please follow other related articles on the PHP Chinese website!