2007-10-07 17:17:01 +05:30
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<refentry id='newgrp.1'>
|
2007-10-07 20:06:51 +05:30
|
|
|
<!-- $Id: newgrp.1.xml,v 1.16 2006/10/28 12:29:04 kloczek Exp $ -->
|
2007-10-07 17:17:01 +05:30
|
|
|
<refmeta>
|
2007-10-07 17:17:11 +05:30
|
|
|
<refentrytitle>newgrp</refentrytitle>
|
2007-10-07 17:17:01 +05:30
|
|
|
<manvolnum>1</manvolnum>
|
2007-10-07 17:17:11 +05:30
|
|
|
<refmiscinfo class="sectdesc">User Commands</refmiscinfo>
|
2007-10-07 17:17:01 +05:30
|
|
|
</refmeta>
|
|
|
|
<refnamediv id='name'>
|
|
|
|
<refname>newgrp</refname>
|
|
|
|
<refpurpose>log in to a new group</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<!-- body begins here -->
|
|
|
|
<refsynopsisdiv id='synopsis'>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>newgrp</command> <arg choice='opt'>- </arg>
|
|
|
|
<arg choice='opt'><replaceable>group</replaceable></arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1 id='description'>
|
|
|
|
<title>DESCRIPTION</title>
|
|
|
|
<para>
|
2007-10-07 20:06:51 +05:30
|
|
|
The <command>newgrp</command> command is used to change the current
|
|
|
|
group ID during a login session. If the optional <option>-</option>
|
|
|
|
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.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>newgrp</command> changes the current real group ID to the
|
|
|
|
named group, or to the default group listed in
|
2007-10-07 17:17:33 +05:30
|
|
|
<filename>/etc/passwd</filename> if no group name is given.
|
2007-10-07 17:17:01 +05:30
|
|
|
<command>newgrp</command> 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 <filename>/etc/shadow</filename> if this
|
|
|
|
user has an entry in the shadowed password file, or in
|
2007-10-07 17:17:33 +05:30
|
|
|
<filename>/etc/passwd</filename> 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.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If there is an entry for this group in
|
|
|
|
<filename>/etc/gshadow</filename>, then the list of members and the
|
|
|
|
password of this group will be taken from this file, otherwise, the
|
|
|
|
entry in <filename>/etc/group</filename> is considered.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id='files'>
|
|
|
|
<title>FILES</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>/etc/passwd</filename></term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>User account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>/etc/shadow</filename></term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>Secure user account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>/etc/group</filename></term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>Group account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename>/etc/gshadow</filename></term>
|
|
|
|
<listitem>
|
2007-10-07 17:17:33 +05:30
|
|
|
<para>Secure group account information.</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id='see_also'>
|
|
|
|
<title>SEE ALSO</title>
|
|
|
|
<para>
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>id</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>gpasswd</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
|
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
|
|
|
|
</citerefentry>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|