"sh: ifconfig: command not found"


I receive the following via email every time the cron job runs:

Subject: Cron <root@arial> /etc/webmin/virtual-server/
sh: ifconfig: command not found

Of course, ifconfig is "found" and can be run at the command line.

I decided to replace the "ifconfig" command in with /sbin/ifconfig as a temporary (possible) fix, and searched through both instance of found through "locate" on my system:


but could not find any reference to "ifconfig" in either of them.

This is Virtualmin GPL 1.472 (which still shows up as 1.470) running on a CentOS 5.3 Minimial VMWare appliance. I installed using the script, then restored a Virtualmin servers backup from my crashed stand alone server. I went immediately from the install to the restore, so I don’t know if I was receiving the error prior to the restore or not. I do know that the error did not occur on the stand-alone server.

I have temporarily disabled the cron job so I won’t receive error emails every 5 minutes, but any thoughts on what is wrong and how to fix it?


I don’t see a response to this issue, but I am having the same problem. Is there a solution somewhere that I haven’t run across?


That can occur if Webmin’s $PATH is wrong.

If you go into Webmin -> Webmin Configuration -> Operating System and Environment, make sure that the ‘Program search path’ includes /sbin .

If it doesn’t, go ahead and add it then click Save.


Thanks Eric, that worked wonders.

I accidentally “yum remove(d)” something that took virtualmin-base out with it. When I re-ran (since I had backups of everything, and this was just on a backup server anyway), it didn’t fill the program search path back in. For future reference (and anyone else who has this problem), my CentOS 5.4 program search path should have included the following:


I know you’re not supposed to re-run, but not sure what else to do when virtualmin-base gets removed (for whatever reason). Does the fact that a re-run of doesn’t re-populate the “program search path” raise to the level/need for a bug report, or not?

  • Acorp