]> granicus.if.org Git - shadow/blob - man/su.1.xml
[svn-upgrade] Integrating new upstream version, shadow (4.0.13)
[shadow] / man / su.1.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
4 <refentry id='su.1'>
5   <!--  $Id: su.1.xml,v 1.15 2005/10/01 15:01:45 kloczek Exp $ -->
6   <refmeta>
7     <refentrytitle>su</refentrytitle>
8     <manvolnum>1</manvolnum>
9     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
10   </refmeta>
11   <refnamediv id='name'>
12     <refname>su</refname>
13     <refpurpose>change user ID or become super-user</refpurpose>
14   </refnamediv>
15   <refsynopsisdiv id='synopsis'>
16     <cmdsynopsis>
17       <command>su</command>
18       <arg choice='opt'>- </arg>
19       <arg choice='opt'>
20         <arg choice='plain'>
21           <replaceable>username</replaceable>
22         </arg>
23         <arg choice='opt'>
24           <replaceable>args</replaceable>
25         </arg>
26       </arg>
27     </cmdsynopsis>
28   </refsynopsisdiv>
29
30   <refsect1 id='description'>
31     <title>DESCRIPTION</title>
32     <para>
33       <command>su</command> is used to become another user during a login
34       session. Invoked without a username, <command>su</command> defaults to
35       becoming the super user. The optional argument <option>-</option> may
36       be used to provide an environment similar to what the user would
37       expect had the user logged in directly.
38     </para>
39
40     <para>
41       Additional arguments may be provided after the username, in which case
42       they are supplied to the user&acute;s login shell. In particular, an
43       argument of <option>-c</option> will cause the next argument to be
44       treated as a command by most command interpreters. The command will be
45       executed by the shell specified in <filename>/etc/passwd</filename>
46       for the target user.
47     </para>
48
49     <para>The user will be prompted for a password, if appropriate. Invalid
50       passwords will produce an error message. All attempts, both valid and
51       invalid, are logged to detect abuses of the system.
52     </para>
53
54     <para>
55       The current environment is passed to the new shell. The value of
56       <emphasis>$PATH</emphasis> is reset to
57       <filename>/bin:/usr/bin</filename> for normal users, or
58       <filename>/sbin:/bin:/usr/sbin:/usr/bin</filename> for the super user. 
59       This may be changed with the <emphasis>ENV_PATH</emphasis> and
60       <emphasis>ENV_SUPATH</emphasis> definitions in
61       <filename>/etc/login.defs</filename>.
62     </para>
63
64     <para>
65       A subsystem login is indicated by the presence of a "*" as the first
66       character of the login shell. The given home directory will be used as
67       the root of a new file system which the user is actually logged into.
68     </para>
69   </refsect1>
70
71   <refsect1 id='caveats'>
72     <title>CAVEATS</title>
73     <para>
74       This version of <command>su</command> has many compilation options,
75       only some of which may be in use at any particular site.
76     </para>
77   </refsect1>
78
79   <refsect1 id='files'>
80     <title>FILES</title>
81     <variablelist>
82       <varlistentry>
83         <term><filename>/etc/passwd</filename></term>
84         <listitem>
85           <para>user account information</para>
86         </listitem>
87       </varlistentry>
88       <varlistentry>
89         <term><filename>/etc/shadow</filename></term>
90         <listitem>
91           <para>secure user account information</para>
92         </listitem>
93       </varlistentry>
94     </variablelist>
95   </refsect1>
96
97   <refsect1 id='see_also'>
98     <title>SEE ALSO</title>
99     <para><citerefentry>
100         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
101       </citerefentry>,
102       <citerefentry>
103         <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
104       </citerefentry>,
105       <citerefentry>
106         <refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
107       </citerefentry>,
108       <citerefentry>
109         <refentrytitle>suauth</refentrytitle><manvolnum>5</manvolnum>
110       </citerefentry>.
111     </para>
112   </refsect1>
113
114   <refsect1 id='author'>
115     <title>AUTHOR</title>
116     <para>Julianne Frances Haugh &lt;jockgrrl@ix.netcom.com&gt;</para>
117   </refsect1>
118 </refentry>