mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 08:33:24 +00:00
Reword to remove confusion between su(1)'s "-c" option and that of the shell
being invoked. Add example that clarifies usage of "-c". PR: 6859
This commit is contained in:
parent
7ebee558ec
commit
5a41edb419
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36750
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)su.1 8.2 (Berkeley) 4/18/94
|
||||
.\" $Id: su.1,v 1.12 1997/10/27 22:05:05 guido Exp $
|
||||
.\" $Id: su.1,v 1.13 1998/05/25 03:34:52 steve Exp $
|
||||
.\"
|
||||
.\" this is for hilit19's braindeadness: "
|
||||
.Dd April 18, 1994
|
||||
@ -144,13 +144,7 @@ overrides any previous ones.
|
||||
If the optional
|
||||
.Ar args
|
||||
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.
|
||||
the target login.
|
||||
.Pp
|
||||
Only users who are a member of group 0 (normally
|
||||
.Dq wheel )
|
||||
@ -204,7 +198,20 @@ as user
|
||||
You will be asked for man's password unless your real UID is 0.
|
||||
.It Li "su man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'"
|
||||
Same as above, but the target command constitutes of more than a
|
||||
single word.
|
||||
single word and hence is quoted for use with the
|
||||
.Fl c
|
||||
option being passed to the shell. (Most shells expect the argument to
|
||||
.Fl c
|
||||
to be a single word).
|
||||
.It Li "su -c staff man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'"
|
||||
Same as above, but the target command is run with the resource limits of
|
||||
the login class
|
||||
.Dq staff .
|
||||
Note: in this example, the first
|
||||
.Fl c
|
||||
option applies to
|
||||
.Nm
|
||||
while the second is an argument to the shell being invoked.
|
||||
.It Li "su -l foo"
|
||||
Pretend a login for user
|
||||
.Li foo .
|
||||
|
Loading…
Reference in New Issue
Block a user