Commit | Line | Data |
---|---|---|
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 | 10 | su \- 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 |
16 | requests the password for |
17 | .I login | |
18 | (or for ``root'', if no login is provided), changes to that user and | |
19 | group ID and invokes another instance of your login shell. | |
20 | The environment is unmodified. | |
21 | .PP | |
22 | If the invoked shell is | |
23 | .IR csh , | |
24 | the | |
25 | .I -f | |
26 | option prevents it from reading your | |
27 | .I .cshrc | |
28 | file. Otherwise, the | |
29 | .I -f | |
30 | option is ignored. | |
31 | .PP | |
32 | The | |
33 | .I -l | |
34 | option simulates a full login; the environment is discarded except for | |
35 | HOME, SHELL, TERM, and USER. HOME, SHELL, and USER are taken from the | |
36 | password file for the user being substituted. TERM is copied from | |
37 | your environment. The invoked shell is the substituted user's, not | |
38 | yours. | |
39 | .PP | |
a5e53e16 | 40 | The new user ID stays in force until the shell exits. |
7d4168b6 | 41 | .PP |
a8d8c335 KB |
42 | If the substituted user has no password, their login shell is invoked |
43 | rather than yours. | |
44 | .PP | |
45 | Only users in group 0 (normally ``wheel'') can | |
c2d8aed9 KM |
46 | .I su |
47 | to ``root'', even with the root password. | |
a8d8c335 | 48 | .PP |
a5e53e16 KB |
49 | To remind the super-user of his responsibilities, by default, |
50 | the shell substitutes ``#'' for its usual prompt. | |
7d4168b6 | 51 | .SH "SEE ALSO" |
a8d8c335 | 52 | csh(1), login(1), sh(1), environ(7) |