Home > System Tutorial > LINUX > How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

WBOY
Release: 2023-12-28 20:11:47
forward
1037 people have browsed it

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.

How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

2. After entering id, you can view all main groups and additional groups .

How to use usermod to set the main group and additional groups in LINUX?

3. The second 1000 shown here in the passwd file is the number of the main group.

How to use usermod to set the main group and additional groups in LINUX?

4. Here you can see at a glance the

group-attached permissions of the study user.

How to use usermod to set the main group and additional groups in LINUX?

5,

chrisThis user does not have the permissions of the additional group sudo, and the user cannot be created.

How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

6. Capital G can add

additional groups.

How to use usermod to set the main group and additional groups in LINUX?

7. Check here, there are two users with sudo permission.

How to use usermod to set the main group and additional groups in LINUX?

8. But it still doesn’t work here because you have to exit and reconnect.

How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

How to use usermod to set the main group and additional groups in LINUX?

9. At this time, the permissions have been successfully added.

How to use usermod to set the main group and additional groups in LINUX?

10, and

-g is used to change the main group.

How to use usermod to set the main group and additional groups in LINUX?

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!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template