date and time created 88/09/26 15:06:04 by bostic
[unix-history] / usr / src / usr.bin / su / su.1
... / ...
CommitLineData
1.\" Copyright (c) 1980, 1988 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)su.1 6.4 (Berkeley) %G%
6.\"
7.TH SU 1 ""
8.UC
9.SH NAME
10su \- substitute user id
11.SH SYNOPSIS
12.B su
13[-fl] [login]
14.SH DESCRIPTION
15.I Su
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
40The new user ID stays in force until the shell exits.
41.PP
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
46.I su
47to ``root'', even with the root password.
48.PP
49To remind the super-user of his responsibilities, by default,
50the shell substitutes ``#'' for its usual prompt.
51.SH "SEE ALSO"
52csh(1), login(1), sh(1), environ(7)