collectinfo.pl sh: ifconfig: command not found

Hello,

Could someone provide some impute on this http://www.virtualmin.com/index.php?option=com_flyspray&do=details&task_id=5881?

Any help will be greatly appreciated.

Howdy,

I’d also recommend posting a followup in your Bug Report stating that you’re still seeing the problem.

In the meantime – this is largely just a shot in the dark, but until they come up with a fix, you could try adding this to your /var/spool/cron/crontab/root file at the top:

[code:1]PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin[/code:1]

If it’s purely a path issue, that might help.
-Eric

Eric, thank you.

Your solution resolved the issue. I will also post an update on the bug report.

I have this issue too on Debian Lenny and virtualmin 3.74.gpl.
It has appear after I reinstalling mysql and on removing it the virtualmin-base was been removed too. After that I installs the mysql and virtualmin-base package back. And now I got the error descibed above every 5 minutes on cron job.

I have found in the file /usr/share/webmin/virtual-server/collect-lib.pl the strings:

foreach my $iname (@ifaces) {
local $out = &backquote_command(
“LC_ALL=’’ LANG=’’ ifconfig “.
quotemeta($iname).” 2>/dev/null”);

I think in this file there are must be a full path to ifconfig, for example like this:

foreach my $iname (@ifaces) {
local $out = &backquote_command(
“LC_ALL=’’ LANG=’’ /sbin/ifconfig “.
quotemeta($iname).” 2>/dev/null”);

But better is to set fill path to the ifconfig in the variable at start of the script or any config file, and use this variable later.
I will try to do this changes on my server.

I have compare the webmin config from my other server, and found that on normal working server in webmin there are settings in Webmin Configuration > Operating System and Environment:
Program search path:
/bin
/usr/bin
/sbin
/usr/sbin
/usr/local/bin

This strings was added automatically at install, I didn’t post it manually. And on second server after reinstalling virtualmin this strings gone away, this field is empty!

I copy the content to it, save and problem gone away.