On Thu, Dec 29, 2011 at 11:15 AM, Steve Kreyer <steve.kre...@web.de> wrote: > > after an update of my Debian system some time ago I've encountered some > problems with sudo. In particular sudo doesn't seem to recognize any > commands located in /sbin or /usr/sbin. For example the command useradd is > located in /usr/sbin and sudo fails: > redwing@platon:~$ sudo useradd > sudo: useradd: command not found > Another example is ifconfig which is located in /sbin: > redwing@platon:~$ sudo ifconfig > sudo: ifconfig: command not found > > What could be wrong here? Can I somehow see the content of $PATH within the > sudo environment? AFAIK "sudo echo $PATH" fails because $PATH is evaluated > by the shell before sudo is called.
You have to set an explicit "secure_path" in "/etc/sudoers". You can display sudo's "$PATH" with: echo 'echo $PATH' | sudo sh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sxoxwc1gu3wfpdqqzpn2ovomz_x585syfbxxbvhutf...@mail.gmail.com