Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

Allowing users to belong to multiple groups

Allowing users to belong to multiple groups

Group information in Linux is stored in the "/etc/group" file, which has the following notation
tama:x:500:
From left to right, tama is the group name, X is the password (when it says X, it is written in the /etc/gshadow file). 500 is the GID.
To make a user belong to multiple groups, edit the "/etc/group" file, but it is convenient to use the vigr command to edit the "/etc/group" file. (The operation method is the same as vi)
●To allow a user to belong to multiple groups, add the user lan to the group tama

[root@lion root]# vigr ←Run the vigr command
tama:x:500:lan ←Add lan to the right side of GID500。
Copied title and URL