[Samba] Zabbix + samba4

Jean Dias jean.ti at viareal.com.br
Wed Nov 27 10:34:34 MST 2013


Em 27-11-2013 15:03, Rowland Penny escreveu:
> On 27/11/13 16:52, Niels Dettenbach (Syndicat IT&Internet) wrote:
>>
>> Gian Henriques <gian.ti at viareal.com.br> schrieb:
>>> Thanks!
>>>
>>> Now I'm trying to run 'net status' with my zabbix user but it fails.
>>>
>>> "Failed to initialize session_global: NT_STATUS_ACCESS_DENIED"
>> You have at least two options:
>>
>>   - give zabbix user proper administrator access in samba
> Please don't do this, do you really want the zabbix user to have that 
> much power just to run 'net' ?
>> or
>>   - use sudo with a passwordless config for zabbix user
> Better idea, this is not a samba problem really, but you could try 
> adding the zabbix user to /etc/sudoers (via visudo)  with a line 
> similar to this:
>
> zabbix ALL=(ALL) NOPASSWD: /path/to/net
>
> Rowland
>>
>> hth,
>> best regards,
>>
>>
>> Niels.


Hey All,

I and Gian are colleagues and Thanks  for the replies.

Although I think it's not a secure way, We had already granted sudo 
permissions for zabbix user but the same error message was returned.

I've done this way now:

in crontab, I scheduled to run the command and then redirect the result 
for a file in /tmp.
Then the zabbix daemon get the result in this file.

Its working fine, but I think its not the best way yet. But the zabbix 
user can only read the file, turning into more secure.


More information about the samba mailing list