version 1.22, 2005/04/18 21:13:36 |
version 1.23, 2005/04/18 21:23:24 |
|
|
.Ev LOGNAME . |
.Ev LOGNAME . |
.El |
.El |
.Sh EXAMPLES |
.Sh EXAMPLES |
.Bl -tag -width 5n -compact |
Run the command |
.It Li "$ su bin -c makewhatis" |
.Dq makewhatis |
Runs the command |
|
.Li makewhatis |
|
as user |
as user |
.Li bin . |
.Dq bin . |
You will be asked for bin's password unless your real UID is 0. |
You will be asked for bin's password unless your real UID is 0. |
.Pp |
.Pp |
.It Li "$ su bin -c 'makewhatis /usr/local/man'" |
.Dl $ su bin -c makewhatis |
|
.Pp |
Same as above, but the target command consists of more than a |
Same as above, but the target command consists of more than a |
single word. |
single word: |
.Pp |
.Pp |
.It Li "$ su -c staff bin -c 'makewhatis /usr/local/man'" |
.Dl $ su bin -c 'makewhatis /usr/local/man' |
|
.Pp |
Same as above, but the target command is run with the resource |
Same as above, but the target command is run with the resource |
limits of the login class |
limits of the login class |
.Dq staff . |
.Dq staff . |
|
|
.Nm |
.Nm |
while the second is an argument to the shell. |
while the second is an argument to the shell. |
.Pp |
.Pp |
.It Li "$ su -l foo" |
.Dl $ su -c staff bin -c 'makewhatis /usr/local/man' |
|
.Pp |
Pretend a login for user |
Pretend a login for user |
.Li foo . |
.Dq foo : |
.Pp |
.Pp |
.It Li "$ su -a skey -l foo" |
.Dl $ su -l foo |
Same as above, but use S/Key for authentication. |
.Pp |
.El |
Same as above, but use S/Key for authentication: |
|
.Pp |
|
.Dl $ su -a skey -l foo |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr csh 1 , |
.Xr csh 1 , |
.Xr kinit 1 , |
.Xr kinit 1 , |