[sudo-users] sudo -i <command> results in "cannot execute binary file"
Todd C. Miller
Todd.Miller at courtesan.com
Thu Sep 2 07:35:21 EDT 2010
In message <C38CA28ABBAA8F4B83E76AD8E02EDBE40E07509F0F at SEMALEXC03.intra.atea.se
so spake Nilsson Marcus (marcus.nilsson):
> I'm having a problem running commands with roots (or any other users) environ
> ment using Sudo version 1.6.9p17 on SLES 11.
> sevmani> sudo -i id
> /usr/bin/id: /usr/bin/id: cannot execute binary file
Running a command (and not just a shell) via "sudo -i" is only
supported starting with sudo 1.7.0. Basically, "sudo -i" is just
shorthand for running the shell with the first character of the
argument vector set to '-' (indicating a login shell). So what is
being run in your case is "bash /usr/bin/id". For sudo 1.7.0 and
higher it will be converter to "bash -c /usr/bin/id".
More information about the sudo-users