Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Checks if a specific SMB share exists. Can be used to check for printer shares as well. Uses an anonymous login if no username or password is supplied. If your share has spaces in its name make sure you "quote" it in the command argument -s.
Current Version
1.0
Last Release Date
2013-04-12
Owner
Michael Hodges
License
GPL
Compatible With
Usage: check_smb_share -H [host] -s ["sharename"] -u [username] -p [password]
Works fine when I run it from the nagos plugin folder and when I test the service in Op5. But when I save it in Op5, the next scheduled service fails: CRITICAL SMB Sharename: SHARENAME session setup failed: NT_STATUS_LOGON_FAILURE
Hello, If you enter: ./check_smb_share xx.xx.xx.xx -H -u -p ***** ***** so I get the answer: OK SMB Sharename: Domain = [TEST] OS = [Windows Server 2012 Standard 9200] Server = [Windows Server 2012 Standard 6.2] It's alright. If you enter the wrong IP guest, so I get the answer: OK SMB Sharename: Connection to 172.17.40.155 failed (Error NT_STATUS_IO_TIMEOUT) It should be CRITICAL think. If Notification to come. If specify a paramater -s: ./check_smb_share H xx.xx.xx.xx appl -s -u -p ***** ***** so I get the answer: CRITICAL SMB Sharename: appl Domain = [TEST] OS = [Windows Server 2012 Standard 9200] Server = [Windows Server 2012 Standard 6.2] Does anyone know why? If you enter: smbclient -U username //xx.xx.xx.xx/appl thus the connection is OK
Can someone tell me if you succeed to make it work with *****$ sharename Ex: ./check_smb_share -H xx.xx.xx.xx -s test$ -u ***** -p ***** I have this message: CRITICAL SMB Sharename: test$ Thank you for your answer because it would be very usefull for me to make it work on my plateform.
The dollar sign is not really part of the share name. It's there to signal to Windows clients that it is a hidden share. Smbclient doesn't really pay attention to this so dropping the "$" from the end of share name will fix your problem. mh
I can test it fine (manuel check) and get OK result for share, but when I create a service and with same details in check it fails. CRITICAL SMB Sharename: xml session setup failed: NT_STATUS_LOGON_FAILURE
in line 64 change to stdout=`smbclient -N -L "$host" -U"$user"%"$password" 2>&1` to use with username/password
./check_smb_share: line 11: ./utils.sh: No such file or directory
Are you running this from the nagios plugin directory.
simple, fast , no pass ... perfect for me. thanks a lot
Works perfectly. Thank you.
checks as promises except i thought i could check directly from nagios but it turned out to work only through nrpe from the remote samba server. example: ./check_smb_share -H 10.1.1.11 -s install where install is the name of the folder.
You must be logged in to submit a review.
To:
From: