| 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 |
| 10 | su \- substitute user id |
| 11 | .SH SYNOPSIS |
| 12 | .B su |
| 13 | [-fl] [login] |
| 14 | .SH DESCRIPTION |
| 15 | .I Su |
| 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 |
| 40 | The new user ID stays in force until the shell exits. |
| 41 | .PP |
| 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 |
| 46 | .I su |
| 47 | to ``root'', even with the root password. |
| 48 | .PP |
| 49 | To remind the super-user of his responsibilities, by default, |
| 50 | the shell substitutes ``#'' for its usual prompt. |
| 51 | .SH "SEE ALSO" |
| 52 | csh(1), login(1), sh(1), environ(7) |