Results 1 to 4 of 4

Thread: How to move a user from group to group

Hybrid View

  1. #1
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    How to move a user from group to group

    Let's say I have a user "A" in group "X". That user move to another building and have another responsibilities and needed to change his group membership to "Y". How do I do that?

  2. #2

    Re:How to move a user from group to group

    I don't know the command, but you could edit the user's group id in /etc/passwd (assuming we are talking about their main group id - otherwise remove them from X and add them to Y in /etc/groups)

  3. #3

    Re:How to move a user from group to group

    Maybe your looking for something like:
    Code:
    usermod -G wheel,audio stix
    that adds the user stix to the wheel and audio groups. If you don't list the users current group with the command, the user is removed from that group, man usermod for more details.



  4. #4

    Re:How to move a user from group to group

    [quote author=Stix link=board=12;threadid=5163;start=0#51003 date=1033398696]
    Maybe your looking for something like:
    Code:
    usermod -G wheel,audio stix
    that adds the user stix to the wheel and audio groups. If you don't list the users current group with the command, the user is removed from that group, man usermod for more details.[/quote]

    this isn't their primary group though, just secondary groups.
    -g will change the primary group, but i think you must use gid not the name for it.

Similar Threads

  1. Configuring User group & Policies
    By saswata in forum Windows - General Topics
    Replies: 0
    Last Post: 06-01-2007, 05:44 PM
  2. Group Policies
    By cveselka in forum Windows - General Topics
    Replies: 0
    Last Post: 06-21-2005, 01:38 PM
  3. Linux User Group Radio
    By in forum General Chat
    Replies: 1
    Last Post: 07-12-2004, 11:23 PM
  4. adding new user and new group
    By -JhAzEr- in forum Linux - General Topics
    Replies: 2
    Last Post: 10-16-2002, 03:35 PM
  5. adding users:  own group or common group
    By Blaqb0x in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 05-26-2002, 03:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •