How can I remove a specific user from the group?
G Gabriel Turqos Active Member Joined Mar 11, 2019 May 11, 2020 #1 How can I remove a specific user from the group?
Neemobeer Cloud Security Engineer Staff member Joined Jul 4, 2015 Location Colorado May 11, 2020 #2 usermod -G group1,group2,group3 user this without the -a will drop any groups you don't specify, or you can just go edit the /etc/group file and reboot or you can use gpasswd -d user group
usermod -G group1,group2,group3 user this without the -a will drop any groups you don't specify, or you can just go edit the /etc/group file and reboot or you can use gpasswd -d user group
edizgeorgi Active Member Joined May 31, 2019 May 13, 2020 #3 It is easier than you think. Use the usermod command with root privileges. Following example will remove the user george from the root group. $ sudo usermod -G root george Referance: User Groups in Linux – POFTUT
It is easier than you think. Use the usermod command with root privileges. Following example will remove the user george from the root group. $ sudo usermod -G root george Referance: User Groups in Linux – POFTUT