svn commit: r222965 - stable/8/usr.bin/su
Glen Barber
gjb at FreeBSD.org
Sat Jun 11 00:30:56 UTC 2011
Author: gjb (doc committer)
Date: Sat Jun 11 00:30:56 2011
New Revision: 222965
URL: http://svn.freebsd.org/changeset/base/222965
Log:
MFC 222758, 222759, 222770:
- Document that when running 'su -m <user> -c <command>', <command> is
run within a shell as <user>.
- Bump date
- Attempt to clear up some confusion in the following example, by
stating the '-c' argument is passed to the shell, not to su(1), which
would indicate the login class.
'su -m <user> -c <command>'
PR: 157078
Modified:
stable/8/usr.bin/su/su.1
Directory Properties:
stable/8/usr.bin/su/ (props changed)
Modified: stable/8/usr.bin/su/su.1
==============================================================================
--- stable/8/usr.bin/su/su.1 Sat Jun 11 00:06:14 2011 (r222964)
+++ stable/8/usr.bin/su/su.1 Sat Jun 11 00:30:56 2011 (r222965)
@@ -32,7 +32,7 @@
.\" @(#)su.1 8.2 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd July 1, 2008
+.Dd June 6, 2011
.Dt SU 1
.Os
.Sh NAME
@@ -197,16 +197,22 @@ PAM configuration for
.Sh EXAMPLES
.Bl -tag -width 5n -compact
.It Li "su -m man -c catman"
-Runs the command
-.Li catman
-as user
-.Li man .
+Starts a shell as user
+.Li man ,
+and runs the command
+.Li catman .
You will be asked for man's password unless your real UID is 0.
Note that the
.Fl m
option is required since user
.Dq man
does not have a valid shell by default.
+In this example,
+.Fl c
+is passed to the shell of the user
+.Dq man ,
+and is not interpreted as an argument to
+.Nm .
.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
single word and hence is quoted for use with the
More information about the svn-src-all
mailing list