GNU-Screen still has only old groups for my username

3

I was recently added to a group on the unix server. My active screen session has not been update to the new groups:

$groups
A B C D
$screen -r
$groups
A B C

Without closing my screen session is there a way for me to use my new privileges in the screen session? Or if not, is there at least a way I can save all of the different directories each of the tabs are on?

Thanks, Dan

Jarvin

Posted 2010-03-26T16:03:05.477

Reputation: 6 712

Answers

5

Take a look at the newgrp command.

Paused until further notice.

Posted 2010-03-26T16:03:05.477

Reputation: 86 075

3exec newgrp if you don't want to leave an useless shell process hanging. – user1686 – 2010-03-26T21:00:16.463

Also note that you will still have the old groups on any newly created (ie. C-a, C) windows in that particular screen session. – user1686 – 2010-03-26T21:02:34.150

3

Unfortunately, unix groups are generally established at login, so you will have to log out and log back in to get the additional group permissions. That does mean killing your screen session.

Jon Lasser

Posted 2010-03-26T16:03:05.477

Reputation: 1 267

How are the groups determined? Does the kernel store groups for each process, or is it that the processes don't think they are part of that group? It seems like it would be possible to update the groups for a live process with a debugger. – intuited – 2010-03-26T18:02:04.613

@intuited: Unix systems store the uid/gid/euid/egid/groups in the kernel's "process table". So unless you like hacking at the kernel internals with a debugger... – user1686 – 2010-03-26T20:59:38.433

hmm.. so what if you forked the process? would the forked process get the new group set? ..wait, no, it would have to do whatever newgrp does. at least. – intuited – 2010-03-27T09:35:01.110

2

Give newgrp a shot.

coneslayer

Posted 2010-03-26T16:03:05.477

Reputation: 7 494