Remove A User From the specific Group In Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel9999
    New Member
    • Jul 2019
    • 15

    Remove A User From the specific Group In Linux

    How can I remove a specific user from the group?
  • edizgeorgi
    New Member
    • Oct 2019
    • 8

    #2
    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
    Last edited by Rabbit; May 13 '20, 06:33 PM. Reason: External link removed

    Comment

    • cetpainfotech
      New Member
      • Jan 2023
      • 15

      #3
      To remove a user from a specific group in Linux, you can use the "usermod" command with the option "-G" (remove the user from the specified group) and specify the group name.

      Here's the basic syntax:

      sudo usermod -G <group-name> <username>
      For example, to remove the user "john" from the group "admin", you can run the following command:

      sudo usermod -G admin john
      Note: You will need superuser (root) privileges to execute this command.

      Comment

      Working...