To remove users from example group "users", i usually do it by editing the
file /etc/group, and remove it manually.
Is there a way from command line to remove some users from a specific
group ?

I want to do a script like that :

list="1 2 3 4 5 6"
for i in $list
do
usermod -G wheel, staff username$i
done

This will add username[1-6] to group wheel and staff, but how can i do
like this script to remove them in staff group without editing the file
/etc/group ? 

thanks

Reply via email to