man-pages/man1/newgrp.1.html
2021-03-31 01:06:50 +01:00

146 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of NEWGRP</TITLE>
</HEAD><BODY>
<H1>NEWGRP</H1>
Section: User Commands (1)<BR>Updated: 05/28/2020<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
newgrp - log in to a new group
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>newgrp</B> [-] [<I>group</I>]
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<DD>The
<B>newgrp</B>
command is used to change the current group ID during a login session. If the optional
<B>-</B>
flag is given, the user's environment will be reinitialized as though the user had logged in, otherwise the current environment, including current working directory, remains unchanged.
<P>
<B>newgrp</B>
changes the current real group ID to the named group, or to the default group listed in
/etc/passwd
if no group name is given.
<B>newgrp</B>
also tries to add the group to the user groupset. If not root, the user will be prompted for a password if she does not have a password (in
/etc/shadow
if this user has an entry in the shadowed password file, or in
/etc/passwd
otherwise) and the group does, or if the user is not listed as a member and the group has a password. The user will be denied access if the group password is empty and the user is not listed as a member.
<P>
If there is an entry for this group in
/etc/gshadow, then the list of members and the password of this group will be taken from this file, otherwise, the entry in
/etc/group
is considered.
<A NAME="lbAE">&nbsp;</A>
<H2>CONFIGURATION</H2>
<P>
The following configuration variables in
/etc/login.defs
change the behavior of this tool:
<P>
<B>SYSLOG_SG_ENAB</B> (boolean)
<DL COMPACT><DT id="2"><DD>
Enable &quot;syslog&quot; logging of
<B>sg</B>
activity.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>FILES</H2>
<P>
/etc/passwd
<DL COMPACT><DT id="3"><DD>
User account information.
</DL>
<P>
/etc/shadow
<DL COMPACT><DT id="4"><DD>
Secure user account information.
</DL>
<P>
/etc/group
<DL COMPACT><DT id="5"><DD>
Group account information.
</DL>
<P>
/etc/gshadow
<DL COMPACT><DT id="6"><DD>
Secure group account information.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+id">id</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+login">login</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+su">su</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+sg">sg</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+gpasswd">gpasswd</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+group">group</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?5+gshadow">gshadow</A></B>(5).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">CONFIGURATION</A><DD>
<DT id="11"><A HREF="#lbAF">FILES</A><DD>
<DT id="12"><A HREF="#lbAG">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:20 GMT, March 31, 2021
</BODY>
</HTML>