Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: GID behavior



> 
> According to zsh manaul:
> 
>      GID <S>
>           The real group ID of the shell process.   If  you  have
>           sufficient  privileges,  you may change the group ID of
>           the shell process by assigning to this parameter.  Also
>           (assuming  sufficient privileges), you may start a sin-
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>           gle command under a different group  ID  by  `(GID=gid;
>           command)'
> 

     setgid()   If the effective user ID of the process calling setgid() is
                the superuser, the real, effective, and saved group IDs are
                set to the gid.

                If the effective user ID of the calling process is not the
                superuser, but gid is either the real group ID or the saved
                group ID of the calling process, the effective group ID is
                set to gid.

You must be root to change your GID. The newgrp command is SUID root:

bor@itsrm2% ll =newgrp  
-rwsr-xr-x   1 root     bin        22805 Nov 18  1998 /usr/bin/newgrp*

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author