On Tue, 14 Oct 2014 20:58:56 +0200, Alessandro DE LAURENZIS wrote:

> Now, launching sudo that way returns an error:
> 
> just22@poseidon:[xfe]> sudo su -c ls
> su: no such login class: ls
> 
> so basically sudo is parsing the "-c" option instead of passing it to
> su. Probably this is just a bad practice in sudo usage, nevertheless I
> never encountered such a problem in the Linux world...

No, su is parsing the "-c" option instead of passing it to the
shell.  It should be running:

    su root -c ls

or:

    su -- -c ls

This really has nothing to do with sudo.

 - todd

Reply via email to