Adding multiple users to group in Samba

I have created the new group in samba and i need to add 24 users in that group.....

Is that possible with any command....????

Tags: Samba
user image Author :   oliver

You can use gpasswd command as follows, # gpasswd -M user1,user2,user3,.....,user24 group_name Orelse the below script may help you.....

# !/bin/sh for USER in user1 user2 user3 user4 .... user24; do usermod -G group_name $USER done

Jus run this script, it will add the respective users to that group...!!!!

user image
jagan January 31, 2017
Add comment