version 1.3, 1996/06/26 05:39:34 |
version 1.4, 1996/10/12 20:40:38 |
|
|
.Nm Su |
.Nm Su |
will resort to the local password file to find the password for |
will resort to the local password file to find the password for |
.Ar login |
.Ar login |
if there is a Kerberos error. |
if there is a Kerberos error or if Kerberos is not installed. |
If |
If |
.Nm su |
.Nm su |
is executed by root, no password is requested and a shell |
is executed by root, no password is requested and a shell |
|
|
is set to the target login. |
is set to the target login. |
.Ev PATH |
.Ev PATH |
is set to |
is set to |
.Dq Pa /bin:/usr/bin . |
.Dq Pa /usr/bin:/bin . |
.Ev TERM |
.Ev TERM |
is imported from your current environment. |
is imported from your current environment. |
The invoked shell is the target login's, and |
The invoked shell is the target login's, and |
|
|
.Fl m |
.Fl m |
options are mutually exclusive; the last one specified |
options are mutually exclusive; the last one specified |
overrides any previous ones. |
overrides any previous ones. |
|
.Pp |
|
If the optional |
|
.Ar "shell arguments" |
|
are provided on the command line, they are passed to the login shell of |
|
the target login. This allows it to pass arbitrary commands via |
|
the |
|
.Fl c |
|
option as understood by most shells. Note that |
|
.Fl c |
|
usually expects a single argument only; you have to quote it when |
|
passing multiple words. |
.Pp |
.Pp |
If group 0 (normally |
If group 0 (normally |
.Dq wheel ) |
.Dq wheel ) |
|
|
prompt is set to |
prompt is set to |
.Dq Sy \&# |
.Dq Sy \&# |
to remind one of its awesome power. |
to remind one of its awesome power. |
|
.Sh EXAMPLES |
|
.Bl -tag -width 5n -compact |
|
.It Li "su bin -c makewhatis" |
|
Runs the command |
|
.Li makewhatis |
|
as user |
|
.Li bin . |
|
You will be asked for bin's password unless your real UID is 0. |
|
.Pp |
|
.It Li "su bin -c 'makewhatis /usr/local/man'" |
|
Same as above, but the target command consists of more than a |
|
single word. |
|
.Pp |
|
.It Li "su -l foo" |
|
Pretend a login for user |
|
.Li foo . |
|
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr csh 1 , |
.Xr csh 1 , |
.Xr login 1 , |
.Xr login 1 , |