# Nagios smb  warning The "syslog" option is deprecated



## netaccs (Feb 12, 2018)

Hello !
Having some issue after upgrading server from 9 to 11.1
Server -> Freebsd 11.1, Nagios server 3.5.1, nrpe 2.15
Clients ->Freebsd 11.1, samba 4.7.4 installed, nrpe 3.2.1
Have another "clients" with freebsd9 and nrpe 2.1.5 installed. 
Everything works ok, except check_smb command. The error is:

```
CRITICAL SMB anon access: WARNING: The "syslog" option is deprecated
```
Config file of samba4 server, where I am trying to check smb

```
Global parameters
[global]
        workgroup = serve
        server string = storage
        interfaces = 192.168.1.11
        syslog = 0
        log file = /var/log/samba/%U.%m.log
        name resolve order = wins bcast host
        lpq cache time = 10
#       socket options = TCP_NODELAY, SO_RCVBUF=8192 SO_SNDBUF=8192
        load printers = No
        printcap name = /etc/printcap
        show add printer wizard = No
        os level = 35
        local master = No
        domain master = No
        dns proxy = No
        admin users = netaccs, root
        read only = No
        acl map full control = No
        create mask = 0777
        directory mask = 0777
[netaccs]
        admin users = root netaccs
        comment = netaccs personal folder
        path = /home/netaccs
        read list = root netaccs
        write list = root netaccs
```

When runing check_smb on nagios sever log

```
[1518428821] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;storage;samba;1518428820
```

What I should change to make work check_smb ?


----------



## SirDice (Feb 12, 2018)

Remove the syslog line from smb4.conf.


----------



## netaccs (Feb 12, 2018)

I was trying that (comment it) - same result.

Also try several mix of these line 
	
	



```
#       client min protocol = smb2
#       client max protocol = smb3
#       max protocol = SMB3
#       client use spnego = no
#       client ntlmv2 auth = no
#       client ipc max protocol = NT1
```


----------



## SirDice (Feb 12, 2018)

None of them have anything to do with the warning. 

It's this line that needs to be removed:

```
syslog = 0
```


----------



## netaccs (Feb 12, 2018)

Yes I remove it.

```
[global]
        dns proxy = No
        domain master = No
        interfaces = 192.168.1.11
        load printers = No
        local master = No
        log file = /var/log/samba/%U.%m.log
        lpq cache time = 10
        name resolve order = wins bcast host
        os level = 35
        printcap name = /etc/printcap
        server string = storage
        show add printer wizard = No
        workgroup = serve
        idmap config * : backend = tdb
        acl map full control = No
        admin users = netaccs root
        create mask = 0777
        directory mask = 0777
        read only = No
```
On Nagios server

```
[1518443014] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;storage;samba;1518443012
```
On Nagios web server:

```
CRITICAL SMB anon access: WARNING: The "syslog" option is deprecated
```

In storage server /var/log/messages - nothing, after remove syslog from smb4.conf and restarting samba server.

When running smbclient -L 192.168.1.11 from nagios server  got this message

```
smbclient -L 192.168.1.11
WARNING: The "syslog" option is deprecated
Enter SERVE\root's password:
```
When enter password, shares are listed.

Isn't that something about anonymous access ?


----------



## SirDice (Feb 12, 2018)

Check the smb4.conf of the Nagios server, not the one on the clients.


----------



## netaccs (Feb 12, 2018)

Error changed to:

```
CRITICAL SMB anon access: session setup failed: NT_STATUS_LOGON_FAILURE
```
I should enable guest account or add nagios user to smb4.conf (which one - on client or Nagios sever) ?

On samba3 there were no that kind of errors.
In check_smb, this line should be changed (user and password are examples)
from 
	
	



```
#stdout=`/usr/local/bin/smbclient -U guest -N -L "$host" 2>&1`
to
stdout=`/usr/local/bin/smbclient -U nagios%nagios -N -L "$host" 2>&1`
```


----------

