- add the -m option to the example commands because they would fail w/o it
as the ``man'' user does not have a valid shell by default. PR: docs/121713 Approved by: trhodes MFC after: 3 days
This commit is contained in:
parent
6f8f0226ed
commit
9ea29562d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180155
@ -32,7 +32,7 @@
|
|||||||
.\" @(#)su.1 8.2 (Berkeley) 4/18/94
|
.\" @(#)su.1 8.2 (Berkeley) 4/18/94
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 13, 2006
|
.Dd July 1, 2008
|
||||||
.Dt SU 1
|
.Dt SU 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -196,13 +196,18 @@ PAM configuration for
|
|||||||
.El
|
.El
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
.Bl -tag -width 5n -compact
|
.Bl -tag -width 5n -compact
|
||||||
.It Li "su man -c catman"
|
.It Li "su -m man -c catman"
|
||||||
Runs the command
|
Runs the command
|
||||||
.Li catman
|
.Li catman
|
||||||
as user
|
as user
|
||||||
.Li man .
|
.Li man .
|
||||||
You will be asked for man's password unless your real UID is 0.
|
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'"
|
Note that the
|
||||||
|
.Fl m
|
||||||
|
option is required since user
|
||||||
|
.Dq man
|
||||||
|
does not have a valid shell by default.
|
||||||
|
.It Li "su -m man -c 'catman /usr/share/man /usr/local/man'"
|
||||||
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 and hence is quoted for use with the
|
single word and hence is quoted for use with the
|
||||||
.Fl c
|
.Fl c
|
||||||
@ -210,7 +215,7 @@ option being passed to the shell.
|
|||||||
(Most shells expect the argument to
|
(Most shells expect the argument to
|
||||||
.Fl c
|
.Fl c
|
||||||
to be a single word).
|
to be a single word).
|
||||||
.It Li "su -c staff man -c 'catman /usr/share/man /usr/local/man'"
|
.It Li "su -m -c staff man -c 'catman /usr/share/man /usr/local/man'"
|
||||||
Same as above, but the target command is run with the resource limits of
|
Same as above, but the target command is run with the resource limits of
|
||||||
the login class
|
the login class
|
||||||
.Dq staff .
|
.Dq staff .
|
||||||
|
Loading…
Reference in New Issue
Block a user