Page 1 of 1

check_disk_smb not working

Posted: Tue Apr 22, 2025 11:24 am
by TheidenHD
I'm trying to monitor some SMB shares, but I run into a weird problem.
If I run the plugin in the console, it works, but if Nagios runs it, I get the "Result from smbclient not suitable" message.
I modified it so I can see the actual return message from smbclient :

Code: Select all

/usr/bin/smbclient //192.168.1.10/Drive -U user%password -m SMB3 -c du
Can't load /etc/samba/smb.conf - run testparm to debug it
ERROR: Could not determine network interfaces, you must use a interfaces config line
Result from smbclient not suitable
UNKNOWN

Re: check_disk_smb not working

Posted: Wed Apr 23, 2025 7:33 am
by TheidenHD
I did some more experimenting, and it seems to be a permission problem.
I tried with a custom file location, and it always says "Unable to read config file".
I tried multiple locations and double-checked the file and folder permissions; it should be able to read it.

Code: Select all

./check_disk_smb -H 192.168.1.10 -s Drive -u user -p password -m SMB3 -C /tmp/smb.conf

namei -l /tmp/smb.conf
f: /tmp/smb.conf
dr-xr-xr-x root root /
drwxrwxrwt root root tmp
-rwxr-xr-x root root smb.conf