Possible Duplicate:
Is there a way in Linux to update the user/group properties without having to login again?
How does one refresh the groups that a logged-in user is in without having to re-login?
Possible Duplicate:
Is there a way in Linux to update the user/group properties without having to login again?
How does one refresh the groups that a logged-in user is in without having to re-login?
possible in shell (I don't think it is for gui)
try newgrp groupname
I wrote more info on this on my blog a while back. according to that this will also change the default group of the shell. you can use sg to Switch your default Group
su - username as ignacio pointed out. a new shell process gets loaded and layered on top of the old one. however, you are still technically correct :)
– moo
Apr 25 '10 at 13:31
exec (exec newgrp groupname) if you don't want to have an old shell process laying around.
– u1686_grawity
Apr 25 '10 at 15:24
@grawity I didn't know that. thanks for the tip.
– xenoterracide Apr 26 '10 at 01:16su - username will do it for the shell (and subproccesses) that su opens up, but for everything else you'll need to relog.
newgrp in an open shell session to add groups to that session, that you've been added to.
– xenoterracide
Apr 25 '10 at 01:14