Bug 12795 - su -c is broken
su -c is broken
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Depends On:
  Show dependency treegraph
Reported: 2000-06-21 17:52 EDT by Michael S. Fischer
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-21 17:52:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael S. Fischer 2000-06-21 17:52:45 EDT
Apparently the su(1) program in the fileutils package cannot handle
multiple-length -c arguments.  (The -c argument is used by su(1) to execute
a program or script other than a shell as a different user.)

For example, I cannot get this to work, although the man page says it
should, and it works correctly in other su(1) implementations:

su user -c /path/to/exec argument argument ...

I've also tried this form:

su -c "/path/to/exec argument argument" user

and it doesn't work either.
Comment 1 Bernhard Rosenkraenzer 2000-06-23 07:29:00 EDT
Both su username -c "/path/program arguments" and su -c "/path/program
arguments" username work for me...
Try reinstalling the sh-utils package (rpm -Uvh --force
/mnt/cdrom/RedHat/RPMS/sh-utils*), maybe someone messed up your installation.

Note You need to log in before you can comment on or make changes to this bug.