Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ newgrp(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

group(F)

ksh(C)

sg(C)

login(M)


 newgrp(C)                       19 June 1992                       newgrp(C)


 Name

    newgrp - log user into a new group

 Syntax

    newgrp [-] group

 Description

    The newgrp command changes the effective group identification of its
    caller.  The same person remains logged in, and the current directory is
    unchanged, but calculations of access permissions to files are performed
    with respect to the new group ID.

    newgrp without an argument changes the group identification to the group
    in the password file.

    If the first argument to newgrp is a hyphen (-), the user will actually
    be logged in again as a member of the new group, group.

    If the first argument to newgrp is a hyphen, but group is not specified,
    the user will be logged in again as a member of the caller's original
    group identification according to the password file.

 Files

    /etc/group
    /etc/passwd

 See also

    group(F), ksh(C), sg(C), login(M)

 Notes

    The newgrp command executes, but does not fork, a new shell. If your log-
    in shell is a C shell and you invoke newgrp, you will have to press
    <Ctrl>d when you wish to log out.  Typing the csh(C) logout command will
    result in an error message.  Note also that the newgrp command causes the
    csh history list to start again at 1.

    A version of newgrp is built into the Korn shell (ksh(C)).  Please refer
    to the ksh(C) entry for details.  This command has been effectively
    superseded by the newer command sg(C), which should be used in preference
    to newgrp wherever possible.

 Standards conformance

    newgrp is conformant with:

    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026