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">
5 <!-- $Id: su.1.xml,v 1.15 2005/10/01 15:01:45 kloczek Exp $ -->
7 <refentrytitle>su</refentrytitle>
8 <manvolnum>1</manvolnum>
9 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
11 <refnamediv id='name'>
13 <refpurpose>change user ID or become super-user</refpurpose>
15 <refsynopsisdiv id='synopsis'>
18 <arg choice='opt'>- </arg>
21 <replaceable>username</replaceable>
24 <replaceable>args</replaceable>
30 <refsect1 id='description'>
31 <title>DESCRIPTION</title>
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.
41 Additional arguments may be provided after the username, in which case
42 they are supplied to the user´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>
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.
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>.
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.
71 <refsect1 id='caveats'>
72 <title>CAVEATS</title>
74 This version of <command>su</command> has many compilation options,
75 only some of which may be in use at any particular site.
83 <term><filename>/etc/passwd</filename></term>
85 <para>user account information</para>
89 <term><filename>/etc/shadow</filename></term>
91 <para>secure user account information</para>
97 <refsect1 id='see_also'>
98 <title>SEE ALSO</title>
100 <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
103 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
106 <refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
109 <refentrytitle>suauth</refentrytitle><manvolnum>5</manvolnum>
114 <refsect1 id='author'>
115 <title>AUTHOR</title>
116 <para>Julianne Frances Haugh <jockgrrl@ix.netcom.com></para>