Which command should I use to remove a user from a group in Debian?When adding a user to a group, it can be done with:usermod -a -G group userHowever, I could not find a similar command (accepting a group and user as arguments) for removing the user from the group. The closest I could get is:usermod -G all,existing,groups,except,for,group userIs there a command like usermod OPTION group user with OPTION an option to make usermod (or a similar program) remove the user from group?
How do I remove a user from a group?
users;group
You can use gpasswd:# gpasswd -d user groupthen the new group config will be assigned at the next login, at least on Debian. If the user is logged in, the effects of the command aren't seen immediately.