date and time created 88/09/26 15:06:04 by bostic
[unix-history] / usr / src / usr.bin / su / su.1
CommitLineData
a8d8c335 1.\" Copyright (c) 1980, 1988 Regents of the University of California.
7d4168b6
KM
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
a8d8c335 5.\" @(#)su.1 6.4 (Berkeley) %G%
7d4168b6 6.\"
d9fd65e7 7.TH SU 1 ""
7d4168b6
KM
8.UC
9.SH NAME
a8d8c335 10su \- substitute user id
7d4168b6
KM
11.SH SYNOPSIS
12.B su
a8d8c335 13[-fl] [login]
7d4168b6
KM
14.SH DESCRIPTION
15.I Su
a8d8c335
KB
16requests the password for
17.I login
18(or for ``root'', if no login is provided), changes to that user and
19group ID and invokes another instance of your login shell.
20The environment is unmodified.
21.PP
22If the invoked shell is
23.IR csh ,
24the
25.I -f
26option prevents it from reading your
27.I .cshrc
28file. Otherwise, the
29.I -f
30option is ignored.
31.PP
32The
33.I -l
34option simulates a full login; the environment is discarded except for
35HOME, SHELL, TERM, and USER. HOME, SHELL, and USER are taken from the
36password file for the user being substituted. TERM is copied from
37your environment. The invoked shell is the substituted user's, not
38yours.
39.PP
a5e53e16 40The new user ID stays in force until the shell exits.
7d4168b6 41.PP
a8d8c335
KB
42If the substituted user has no password, their login shell is invoked
43rather than yours.
44.PP
45Only users in group 0 (normally ``wheel'') can
c2d8aed9
KM
46.I su
47to ``root'', even with the root password.
a8d8c335 48.PP
a5e53e16
KB
49To remind the super-user of his responsibilities, by default,
50the shell substitutes ``#'' for its usual prompt.
7d4168b6 51.SH "SEE ALSO"
a8d8c335 52csh(1), login(1), sh(1), environ(7)