> Dear mantainer,

Not the maintainer but another list denizen.

> Running 
>       su -c echo davide -norc
> with su (in sh-utils 2.0) under linux I receive the following
> 
>       su: invalid option -- n
>       Try `su --help' for more information.
> 
> is this correct?
> Reading the usage it seemed (to me) that the -norc option went to the
> shell, instead here it is parsed by getopt.

The -c option takes a single argument.  Here you have given it more
than that.  You should quote the -c argument so that it is all
recieved as one option.

  su -c 'echo davide -norc'

For compatibility with traditional UNIX su commands you might want to
include the defaulted 'root' id.

  su root -c 'echo davide -norc'

Bob

Reply via email to