Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2011 00:31:37 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r222966 - stable/7/usr.bin/su
Message-ID:  <201106110031.p5B0VbVr050116@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb (doc committer)
Date: Sat Jun 11 00:31:37 2011
New Revision: 222966
URL: http://svn.freebsd.org/changeset/base/222966

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/7/usr.bin/su/su.1
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
 .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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106110031.p5B0VbVr050116>