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?
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?
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)
Maybe your looking for something like:
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.Code:usermod -G wheel,audio stix
[quote author=Stix link=board=12;threadid=5163;start=0#51003 date=1033398696]
Maybe your looking for something like:
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]Code:usermod -G wheel,audio stix
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.
Bookmarks