2007-10-07 17:16:16 +05:30
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
* man/login.defs.d/CONSOLE_GROUPS.xml,
man/login.defs.d/CONSOLE.xml, man/login.defs.d/DEFAULT_HOME.xml,
man/login.defs.d/ENV_HZ.xml, man/login.defs.d/ENVIRON_FILE.xml,
man/login.defs.d/ENV_PATH.xml, man/login.defs.d/ENV_SUPATH.xml,
man/login.defs.d/ENV_TZ.xml, man/login.defs.d/ERASECHAR.xml,
man/login.defs.d/FAIL_DELAY.xml,
man/login.defs.d/FAILLOG_ENAB.xml,
man/login.defs.d/FAKE_SHELL.xml, man/login.defs.d/FTMP_FILE.xml,
man/login.defs.d/HUSHLOGIN_FILE.xml,
man/login.defs.d/ISSUE_FILE.xml, man/login.defs.d/KILLCHAR.xml,
man/login.defs.d/LASTLOG_ENAB.xml, man/login.defs.d/LOGIN_RETRIES.xml,
man/login.defs.d/LOGIN_TIMEOUT.xml, man/login.defs.d/LOG_OK_LOGINS.xml,
man/login.defs.d/LOG_UNKFAIL_ENAB.xml,
man/login.defs.d/MAIL_CHECK_ENAB.xml, man/login.defs.d/MOTD_FILE.xml,
man/login.defs.d/NOLOGINS_FILE.xml,
man/login.defs.d/OBSCURE_CHECKS_ENAB.xml,
man/login.defs.d/PASS_ALWAYS_WARN.xml,
man/login.defs.d/PASS_CHANGE_TRIES.xml,
man/login.defs.d/PASS_MAX_LEN.xml,
man/login.defs.d/PORTTIME_CHECKS_ENAB.xml,
man/login.defs.d/QUOTAS_ENAB.xml, man/login.defs.d/SULOG_FILE.xml,
man/login.defs.d/SU_NAME.xml, man/login.defs.d/SU_WHEEL_ONLY.xml,
man/login.defs.d/SYSLOG_SG_ENAB.xml,
man/login.defs.d/SYSLOG_SU_ENAB.xml,
man/login.defs.d/TTYGROUP.xml, man/login.defs.d/TTYTYPE_FILE.xml,
man/login.defs.d/ULIMIT.xml, man/login.defs.d/USERGROUPS_ENAB.xml:
New documentation of login.defs variables.
* man/login.defs.d/MAIL_DIR.xml: Updated. It now contains the
MAIL_FILE documentation.
* man/login.defs.d/LOGIN_STRING.xml: Updated. Mentions %s.
* man/pwconv.8.xml, man/groupmems.8.xml, man/groupdel.8.xml,
man/useradd.8.xml, man/pwck.8.xml, man/groupadd.8.xml,
man/sulogin.8.xml, man/newgrp.1.xml, man/usermod.8.xml,
man/su.1.xml, man/vipw.8.xml, man/passwd.1.xml,
man/groupmod.8.xml, man/login.1.xml, man/userdel.8.xml,
man/grpck.8.xml: Added CONFIGURATION section.
* man/generate_mans.mak: The generations of manpages depends on
the variables from the Makefiles. Add the dependency on Makefile.
* man/login.defs.5.xml: New login.defs variable documented.
* man/Makefile.am: Added XML variable documentation to the
distributed files.
2007-12-09 04:54:40 +05:30
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY CONSOLE SYSTEM "login.defs.d/CONSOLE.xml">
|
|
|
|
<!ENTITY CONSOLE_GROUPS SYSTEM "login.defs.d/CONSOLE_GROUPS.xml">
|
|
|
|
<!ENTITY DEFAULT_HOME SYSTEM "login.defs.d/DEFAULT_HOME.xml">
|
|
|
|
<!ENTITY ENV_HZ SYSTEM "login.defs.d/ENV_HZ.xml">
|
|
|
|
<!ENTITY ENVIRON_FILE SYSTEM "login.defs.d/ENVIRON_FILE.xml">
|
|
|
|
<!ENTITY ENV_PATH SYSTEM "login.defs.d/ENV_PATH.xml">
|
|
|
|
<!ENTITY ENV_SUPATH SYSTEM "login.defs.d/ENV_SUPATH.xml">
|
|
|
|
<!ENTITY ENV_TZ SYSTEM "login.defs.d/ENV_TZ.xml">
|
|
|
|
<!ENTITY LOGIN_STRING SYSTEM "login.defs.d/LOGIN_STRING.xml">
|
|
|
|
<!ENTITY MAIL_CHECK_ENAB SYSTEM "login.defs.d/MAIL_CHECK_ENAB.xml">
|
|
|
|
<!ENTITY MAIL_DIR SYSTEM "login.defs.d/MAIL_DIR.xml">
|
|
|
|
<!ENTITY QUOTAS_ENAB SYSTEM "login.defs.d/QUOTAS_ENAB.xml">
|
|
|
|
<!ENTITY SULOG_FILE SYSTEM "login.defs.d/SULOG_FILE.xml">
|
|
|
|
<!ENTITY SU_NAME SYSTEM "login.defs.d/SU_NAME.xml">
|
|
|
|
<!ENTITY SU_WHEEL_ONLY SYSTEM "login.defs.d/SU_WHEEL_ONLY.xml">
|
|
|
|
<!ENTITY SYSLOG_SU_ENAB SYSTEM "login.defs.d/SYSLOG_SU_ENAB.xml">
|
|
|
|
<!ENTITY USERGROUPS_ENAB SYSTEM "login.defs.d/USERGROUPS_ENAB.xml">
|
|
|
|
]>
|
2007-10-07 17:16:16 +05:30
|
|
|
<refentry id='su.1'>
|
2007-11-11 05:16:11 +05:30
|
|
|
<!-- $Id$ -->
|
2007-10-07 17:16:16 +05:30
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>su</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
<refmiscinfo class="sectdesc">User Commands</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
<refnamediv id='name'>
|
|
|
|
<refname>su</refname>
|
2007-10-07 20:06:51 +05:30
|
|
|
<refpurpose>change user ID or become superuser</refpurpose>
|
2007-10-07 17:16:16 +05:30
|
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv id='synopsis'>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>su</command>
|
2007-10-07 17:17:11 +05:30
|
|
|
<arg choice='opt'>
|
|
|
|
<replaceable>options</replaceable>
|
|
|
|
</arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>
|
2007-10-07 17:17:57 +05:30
|
|
|
<replaceable>LOGIN</replaceable>
|
2007-10-07 17:17:01 +05:30
|
|
|
</arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='description'>
|
|
|
|
<title>DESCRIPTION</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
2007-10-07 20:06:51 +05:30
|
|
|
The <command>su</command> command is used to become another user during
|
|
|
|
a login session. Invoked without a <option>username</option>,
|
2007-10-07 17:17:33 +05:30
|
|
|
<command>su</command> defaults to
|
2007-10-07 20:06:51 +05:30
|
|
|
becoming the superuser. The optional argument <option>-</option> may
|
2007-10-07 17:16:16 +05:30
|
|
|
be used to provide an environment similar to what the user would
|
|
|
|
expect had the user logged in directly.
|
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<para>
|
|
|
|
Additional arguments may be provided after the username, in which case
|
2007-10-07 17:17:22 +05:30
|
|
|
they are supplied to the user's login shell. In particular, an
|
2007-10-07 17:17:01 +05:30
|
|
|
argument of <option>-c</option> will cause the next argument to be
|
2007-10-07 17:16:16 +05:30
|
|
|
treated as a command by most command interpreters. The command will be
|
|
|
|
executed by the shell specified in <filename>/etc/passwd</filename>
|
|
|
|
for the target user.
|
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:17:11 +05:30
|
|
|
<para>
|
|
|
|
You can use the <option>--</option> argument to separate
|
|
|
|
<command>su</command> options from the arguments supplied to the shell.
|
|
|
|
</para>
|
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<para>The user will be prompted for a password, if appropriate. Invalid
|
|
|
|
passwords will produce an error message. All attempts, both valid and
|
2007-10-07 17:17:22 +05:30
|
|
|
invalid, are logged to detect abuse of the system.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<para>
|
|
|
|
The current environment is passed to the new shell. The value of
|
2007-10-07 17:17:11 +05:30
|
|
|
<envar>$PATH</envar> is reset to <filename>/bin:/usr/bin</filename>
|
|
|
|
for normal users, or <filename>/sbin:/bin:/usr/sbin:/usr/bin</filename>
|
2007-10-07 20:06:51 +05:30
|
|
|
for the superuser. This may be changed with the
|
2007-10-07 17:17:11 +05:30
|
|
|
<emphasis>ENV_PATH</emphasis> and <emphasis>ENV_SUPATH</emphasis>
|
|
|
|
definitions in <filename>/etc/login.defs</filename>.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<para>
|
|
|
|
A subsystem login is indicated by the presence of a "*" as the first
|
|
|
|
character of the login shell. The given home directory will be used as
|
|
|
|
the root of a new file system which the user is actually logged into.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:17:11 +05:30
|
|
|
<refsect1 id='options'>
|
|
|
|
<title>OPTIONS</title>
|
|
|
|
<para>The options which apply to the <command>su</command> command are:
|
|
|
|
</para>
|
|
|
|
<variablelist remap='IP'>
|
2007-10-07 17:17:22 +05:30
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>-c</option>, <option>--command</option>
|
2007-10-07 20:06:51 +05:30
|
|
|
<replaceable>COMMAND</replaceable>
|
2007-10-07 17:17:22 +05:30
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specify a command that will be invoked by the shell using its
|
|
|
|
<option>-c</option>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-10-07 17:17:11 +05:30
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>-</option>, <option>-l</option>, <option>--login</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Provide an environment similar to what the user would expect had
|
|
|
|
the user logged in directly.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
When <option>-</option> is used, it must be specified as the last
|
|
|
|
<command>su</command> option.
|
|
|
|
The other forms (<option>-l</option> and <option>--login</option>)
|
|
|
|
do not have this restriction.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>-s</option>, <option>--shell</option>
|
|
|
|
<replaceable>SHELL</replaceable>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>The shell that will be invoked.</para>
|
|
|
|
<para>
|
2007-10-07 20:06:51 +05:30
|
|
|
The invoked shell is chosen from (highest priority first):
|
2007-10-07 17:17:11 +05:30
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
2007-10-07 20:06:51 +05:30
|
|
|
<para>The shell specified with --shell.</para>
|
2007-10-07 17:17:11 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
If <option>--preserve-environment</option> is used, the
|
|
|
|
shell specified by the <envar>$SHELL</envar> environment
|
|
|
|
variable.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:33 +05:30
|
|
|
The shell indicated in the <filename>/etc/passwd</filename>
|
|
|
|
entry for the target user.
|
2007-10-07 17:17:11 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:33 +05:30
|
|
|
<filename>/bin/sh</filename> if a shell could not be
|
|
|
|
found by any above method.
|
2007-10-07 17:17:11 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If the target user has a restricted shell (i.e. the shell field of
|
|
|
|
this user's entry in <filename>/etc/passwd</filename> is not
|
2007-10-07 20:06:51 +05:30
|
|
|
listed in <filename>/etc/shell</filename>), then the
|
2007-10-07 17:17:11 +05:30
|
|
|
<option>--shell</option> option or the <envar>$SHELL</envar>
|
2007-10-07 20:06:51 +05:30
|
|
|
environment variable won't be taken into account, unless
|
|
|
|
<command>su</command> is called by root.
|
2007-10-07 17:17:11 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<option>-m</option>, <option>-p</option>,
|
|
|
|
<option>--preserve-environment</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>Preserve the current environment.</para>
|
|
|
|
<para>
|
|
|
|
If the target user has a restricted shell, this option has no
|
|
|
|
effect (unless <command>su</command> is called by root).
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='caveats'>
|
|
|
|
<title>CAVEATS</title>
|
|
|
|
<para>
|
|
|
|
This version of <command>su</command> has many compilation options,
|
|
|
|
only some of which may be in use at any particular site.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
* man/login.defs.d/CONSOLE_GROUPS.xml,
man/login.defs.d/CONSOLE.xml, man/login.defs.d/DEFAULT_HOME.xml,
man/login.defs.d/ENV_HZ.xml, man/login.defs.d/ENVIRON_FILE.xml,
man/login.defs.d/ENV_PATH.xml, man/login.defs.d/ENV_SUPATH.xml,
man/login.defs.d/ENV_TZ.xml, man/login.defs.d/ERASECHAR.xml,
man/login.defs.d/FAIL_DELAY.xml,
man/login.defs.d/FAILLOG_ENAB.xml,
man/login.defs.d/FAKE_SHELL.xml, man/login.defs.d/FTMP_FILE.xml,
man/login.defs.d/HUSHLOGIN_FILE.xml,
man/login.defs.d/ISSUE_FILE.xml, man/login.defs.d/KILLCHAR.xml,
man/login.defs.d/LASTLOG_ENAB.xml, man/login.defs.d/LOGIN_RETRIES.xml,
man/login.defs.d/LOGIN_TIMEOUT.xml, man/login.defs.d/LOG_OK_LOGINS.xml,
man/login.defs.d/LOG_UNKFAIL_ENAB.xml,
man/login.defs.d/MAIL_CHECK_ENAB.xml, man/login.defs.d/MOTD_FILE.xml,
man/login.defs.d/NOLOGINS_FILE.xml,
man/login.defs.d/OBSCURE_CHECKS_ENAB.xml,
man/login.defs.d/PASS_ALWAYS_WARN.xml,
man/login.defs.d/PASS_CHANGE_TRIES.xml,
man/login.defs.d/PASS_MAX_LEN.xml,
man/login.defs.d/PORTTIME_CHECKS_ENAB.xml,
man/login.defs.d/QUOTAS_ENAB.xml, man/login.defs.d/SULOG_FILE.xml,
man/login.defs.d/SU_NAME.xml, man/login.defs.d/SU_WHEEL_ONLY.xml,
man/login.defs.d/SYSLOG_SG_ENAB.xml,
man/login.defs.d/SYSLOG_SU_ENAB.xml,
man/login.defs.d/TTYGROUP.xml, man/login.defs.d/TTYTYPE_FILE.xml,
man/login.defs.d/ULIMIT.xml, man/login.defs.d/USERGROUPS_ENAB.xml:
New documentation of login.defs variables.
* man/login.defs.d/MAIL_DIR.xml: Updated. It now contains the
MAIL_FILE documentation.
* man/login.defs.d/LOGIN_STRING.xml: Updated. Mentions %s.
* man/pwconv.8.xml, man/groupmems.8.xml, man/groupdel.8.xml,
man/useradd.8.xml, man/pwck.8.xml, man/groupadd.8.xml,
man/sulogin.8.xml, man/newgrp.1.xml, man/usermod.8.xml,
man/su.1.xml, man/vipw.8.xml, man/passwd.1.xml,
man/groupmod.8.xml, man/login.1.xml, man/userdel.8.xml,
man/grpck.8.xml: Added CONFIGURATION section.
* man/generate_mans.mak: The generations of manpages depends on
the variables from the Makefiles. Add the dependency on Makefile.
* man/login.defs.5.xml: New login.defs variable documented.
* man/Makefile.am: Added XML variable documentation to the
distributed files.
2007-12-09 04:54:40 +05:30
|
|
|
<refsect1 id='configuration'>
|
|
|
|
<title>CONFIGURATION</title>
|
|
|
|
<para>
|
|
|
|
The following configuration variables in
|
|
|
|
<filename>/etc/login.defs</filename> change the behavior of this
|
|
|
|
tool:
|
|
|
|
</para>
|
|
|
|
<variablelist>
|
|
|
|
&CONSOLE;
|
|
|
|
&CONSOLE_GROUPS;
|
|
|
|
&DEFAULT_HOME;
|
|
|
|
&ENV_HZ;
|
|
|
|
&ENVIRON_FILE;
|
|
|
|
&ENV_PATH;
|
|
|
|
&ENV_SUPATH;
|
|
|
|
&ENV_TZ;
|
|
|
|
&LOGIN_STRING;
|
|
|
|
&MAIL_CHECK_ENAB;
|
|
|
|
&MAIL_DIR;
|
|
|
|
"AS_ENAB;
|
|
|
|
&SULOG_FILE;
|
|
|
|
&SU_NAME;
|
|
|
|
&SU_WHEEL_ONLY;
|
|
|
|
&SYSLOG_SU_ENAB;
|
|
|
|
&USERGROUPS_ENAB;
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='files'>
|
|
|
|
<title>FILES</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<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>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<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>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='see_also'>
|
|
|
|
<title>SEE ALSO</title>
|
2007-10-07 17:16:25 +05:30
|
|
|
<para><citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
2007-10-07 20:06:51 +05:30
|
|
|
<citerefentry>
|
|
|
|
<refentrytitle>sg</refentrytitle><manvolnum>1</manvolnum>
|
|
|
|
</citerefentry>,
|
2007-10-07 17:16:16 +05:30
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
|
2007-10-07 17:17:11 +05:30
|
|
|
</citerefentry>
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|