How do I add multiple users to a group in Linux?

Danh Trịnh

New member
How do I add multiple users to a group in Linux?
Answer
To add the multiple users to a secondary group,
use the gpasswd command with -M option and the name of the group
. In this example, we are going to add the user2 and user3 into mygroup1 . Let us see the output using getent command. Yes, user2 and user3 are successfully added into mygroup1 .
 

Tìm kiếm

Back
Top