[Samba] Zabbix + samba4

Rowland Penny rowlandpenny at googlemail.com
Wed Nov 27 09:35:50 MST 2013


On 27/11/13 16:24, Gian Henriques wrote:
> 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"
>
>  All my samba4 directory (/usr/local/samba) have as owner the user and 
> group 'root'. I try to change the owner user and group of all files to 
> my user zabbix but it not work's. I need to give permission to my 
> zabbix user in some files/directories?
>
>
>
> Em 27-11-2013 08:34, Niels Dettenbach escreveu:
>> Am Mittwoch, 27. November 2013, 08:25:41 schrieb Gian Henriques:
>>>> I'd like to know if there are some way to gather statistics from
>>>> samba4, like quantities of active users and other things that it can
>>>> offer then use it in zabbix to generate some graphs and triggers.
>>>>
>>>> I can do somethings in smbstatus of samba3, but i couldn't find
>>>> anything like this in samba4.
>> Take a look at i.e. the
>>
>>     net
>> or
>>
>>     net status
>>
>> command (should be on board with samba4 too i assume - not tried it 
>> so far).
>>
>>
>>>> is there anybody here who could do it?
>> Some years ago i've fiddeled with zabbix. I remember that i've worked 
>> mainly
>> with nagios plugins within zabbix for functionality zabbix did not 
>> has "on
>> board" byself.
>>
>> Take a look at nagios plugins like i.e.:
>>
>>     check_smb_share
>>     check_smb
>>
>> zabbix allows easily to create own commands - i.e. if you want to get 
>> the
>> active samba sessions you may use something like:
>>
>>     net status sessions | wc -l
>>
>> (gives the amount of active sessions as an integer)
>>
>>
>> hth at least a little...
>>
>> best regards,
>>
>>
>> Niels.
>>
>>
>
>

Can you not run the command with sudo?

Doesn't Zabbix have the ability to run commands as root via sudo?

Don't alter ownership of files & directories unless you know what you 
are doing, you are likely to break something else.

Rowland


More information about the samba mailing list