Bug 12795 - su -c is broken
Summary: su -c is broken
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-06-21 21:52 UTC by Michael S. Fischer
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-06-21 21:52:47 UTC

Attachments (Terms of Use)

Description Michael S. Fischer 2000-06-21 21:52:45 UTC
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 11:29:00 UTC
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.