ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



NEWGRP(1)                 BSD General Commands Manual                NEWGRP(1)

NAME
     newgrp -- change to a new group

SYNOPSIS
     newgrp [-l] [group]

DESCRIPTION
     The newgrp utility creates a new shell execution environment with modified real and effective group
     IDs.

     The options are as follows:

     -l      Simulate a full login.  The environment and umask are set to what would be expected if the user
             actually logged in again.

     If the group operand is present, a new shell is started with the specified effective and real group
     IDs.  The user will be prompted for a password if they are not a member of the specified group.

     Otherwise, the real, effective, and supplementary group IDs are restored to those from the current
     user's password database entry.

DIAGNOSTICS
     The newgrp utility attempts to start the shell regardless of whether group IDs were successfully
     changed.

     If an error occurs and the shell cannot be started, newgrp exits >0.  Otherwise, the exit status of
     newgrp is the exit status of the shell.

SEE ALSO
     csh(1), groups(1), login(1), sh(1), su(1), umask(1), group(5), passwd(5), environ(7)

STANDARDS
     The newgrp utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

HISTORY
     A newgrp utility appeared in Version 6 AT&T UNIX.

BUGS
     Group passwords are inherently insecure, as there is no way to stop users obtaining the encrypted pass-words passwords
     words from the group database.  Their use is discouraged.

BSD                              May 23, 2002                              BSD

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.