svn commit: r222966 - stable/7/usr.bin/su

Glen Barber gjb at
Sat Jun 11 00:31:38 UTC 2011

Author: gjb (doc committer)
Date: Sat Jun 11 00:31:37 2011
New Revision: 222966

  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

Directory Properties:
  stable/7/usr.bin/su/   (props changed)

Modified: stable/7/usr.bin/su/su.1
--- stable/7/usr.bin/su/su.1	Sat Jun 11 00:30:56 2011	(r222965)
+++ stable/7/usr.bin/su/su.1	Sat Jun 11 00:31:37 2011	(r222966)
@@ -32,7 +32,7 @@
 .\"	@(#)su.1	8.2 (Berkeley) 4/18/94
 .\" $FreeBSD$
-.Dd July 1, 2008
+.Dd June 6, 2011
 .Dt SU 1
@@ -197,16 +197,22 @@ PAM configuration for
 .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-stable mailing list