[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "activating" changes to /etc/group



Ethan,

I'm a bit of a newbie, so thanks for pointing this information out to
me. I am a bit confused though, it seems 'newgrp' is to used to, "change
the group ID during a login session." The ID is the number associated
with the group.  For example, in my /etc/group file, the following line,

cdrom:x:24:barry

indicates group ID 24 for the 'cdrom' group, and that user, 'barry' is a
member.

I am the sole user of my machine, and I interpreted the posted question
similarly. I added myself (user, barry) to the cdrom group by su'ing
to root and editing the /etc/group file (the result shown above).
Immediately following this file edit, I attempted to play a CD (yes, the
audio group is involved also) and it didn't work. Without login-out &
in, I again su'ed to root, issued 'update-passwd' and I, as user, could
play CD's. Again, I, the user, did not logout or in. I used a terminal
window to do the su'ing and file editing, and operated the cdplayer from
a menu. My windowing system is WindowMaker. 

My interpretation of the posted question was that the individual already
had the group defined and a user needed to be added. Also, it appeared
the process that needed the group was not running.

My current interpretation of the 'newgrp' command is it can change the
group ID of a running process.  Using the above example, if the CD
player were currently playing a CD, I could define a new group, and new
ID, and point the process at that new group ID. I'm really not sure what
all this means, it's just semblance of ideas from my readings on Linux.

Again, I'm a newbie and my understanding of some these fundamental
concepts isn't at all mature. For example, I still very much struggle
with Mutt! 

Thanks for your input,
Barry

On Fri, Mar 30, 2001 at 05:15:26AM -0900, Ethan Benson (erbenson@alaska.net) wrote:
> 
> thats really interesting since update-passwd has absolutely nothing
> whatsoever to do with the group membership a particular user has in a
> login session:
> 
> man update-passwd
> 
> DESCRIPTION
>        update-passwd handles updates of /etc/passwd,  /etc/shadow
>        /etc/group  on  running  Debian  systems.  It compares the
>        current  files  to  master  copies,  distributed  in   the
>        base-passwd package, and updates all entries in the global
>        system range (that is, 0-99).
> 
> 
> it is impossible in unix to add a new group to the list of groups of
> an existing process, you MUST kill that process or else have a
> privileged process spawn a new shell with the new group.
> update-passwd will not do this.  newgrp however will it is setuid
> root.  man newgrp.  
> 
> -- 
> Ethan Benson
> http://www.alaska.net/~erbenson/




Reply to: