sudo on CT0

gm2x

New Member
Mar 5, 2009
13
0
1
I've installed sudo on proxmox hardware node. Now i'm getting error messages when trying to use it.
Code:
$ sudo ifconfig 
sudo: ifconfig: command not found
Meanwhile the next command is perfectly working.
Code:
$ sudo /sbin/ifconfig
I understand that this is a $PATH issue. Trying to troubleshoot more:
Code:
$ env | grep PATH
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games

$ sudo env | grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
The same output on regular Debian installation. Checked ~/.bashrc, /root/.bashrc, /etc/bash.bashrc files on both systems, they are all the same. What can i check else?
 
already tried 'sudo -i' ?
Already. Running 'ifconfig' inside root shell works.

So /sbin is already in PATH?
It is for root accout, but running 'sudo ifconfig' as a regular user isn't working. I have no ideas why... And i have no ideas what makes it work in regular debian installation. How 'sudo <command>' finds the command that isn't in path.
 
Last edited: