Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2003 11:55:39 -0700 (PDT)
From:      Gregory Neil Shapiro <gshapiro@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/55613: su man page confusing, probably incorrect
Message-ID:  <200308151855.h7FItd1l096480@scooter.smi.sendmail.com>
Resent-Message-ID: <200308151900.h7FJ0Bgp014764@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         55613
>Category:       docs
>Synopsis:       su man page confusing, probably incorrect
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 15 12:00:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Gregory Neil Shapiro
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD scooter.smi.sendmail.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Wed Jul 2 11:53:30 PDT 2003 root@scooter.smi.sendmail.com:/usr/obj/usr/src/sys/SCOOTER i386

>Description:

The su man page describes -c as:

     -c class
             Use the settings of the specified login class.  Only allowed for
             the super-user.

Yet the examples say:

     su man -c catman
            Runs the command catman as user man.  You will be asked for man's
            password unless your real UID is 0.
     su man -c `catman /usr/share/man /usr/local/man /usr/X11R6/man'
            Same as above, but the target command consists of more than a sin-
            ...

Clearly the -c in these examples is not pointing at a login class.  It is
pointing at a command to run.  Sure a later example gives the even more
confusing:

     su -c staff man -c `catman /usr/share/man /usr/local/man /usr/X11R6/man'

However, -c is never documented in the man page as pointing to a command
to run, which it in fact does do.

Also note in the examples above that the quoting is wrong.  If someone
actually tries to run the given commands in the example, it will fail.
The first quote has to be a normal single quote, not a back quote.

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



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