logs in samba server

  • i try to fix some omv errors and want to read samba logs.. - as defined in smb.conf -> log file = /var/log/samba/log.%m
    but samba create files in /var/log/samba/log.ipaddress with a leght of 0
    i found that there is a buggy entry "logging=syslog" which depends on that.


    You can use syslog... or logfiles like these in /var/log/samba/ ... but if you set both, that will go wrong!
    the problem is..."logging=syslog" and the logs are hardcoded strings in /usr/share/openmediavault/mkconf/samba.d/10global
    Now i removed the buggy "logging=syslog" and all things fine. so please - on the next omv4 update, fix that.
    i don't want to fear the next update... and do it all again...

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • Might have better luck filing an issue on github - https://github.com/OpenMediaVault/openmediavault/issues.


    If it was a buggy entry, testparm would detect it as invalid config. Logging to files doesn't work very well with OMV's log viewer as well.


    And if you really want to change it, put logging = file in the extra options box in the samba settings tab. Samba uses the last value it reads. So, it would read this after logging = syslog and do what you want.

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • The main logging backend used by OMV is syslog, defined via logging = syslog. The log file=foo entry is only to allow users to easily customize the settings via OMV_FOO_BAR environment variables. Don't know why samba creates those empty log files, but IMO this is not an OMV issue because the config looks correct and consistent.

  • logging=syslog is simply wrong!
    please show me only one official link to samba doku which describe a config item and parameter as "logging=syslog" and i never more complain about this.
    Yes, there are parameters like syslog=0 ... but this is not logging=syslog.
    And no, i will not do discussions about this on github! Its your job to rtfm sambadocus because you build configs by your design!
    And even no, i don't know why testparm do not compalin about the config/parameter logging=, but i see testparm complaining on very old obsoletet config entrys in smb.conf made by omv4! But Testparm is not the omniscient garbage dump!
    if this all is no reason to take a look for you ... then even github will not help you.

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

    Edited 2 times, last by Rd65: typo ().

  • Chill out. Not sure why you are so angry about this.

    please show me only one official link to samba doku which describe a config item and parameter as "logging=syslog" and i never more complain about this.

    I can't deep link to it but search for the string "overall list of logging backends" on https://www.samba.org/samba/do…/man-html/smb.conf.5.html

    And no, i will not do discussions about this on github! Its your job to rtfm sambadocus because you build configs by your design!

    You are confusing who can make the change and who told you to file an issue on github. I told you to file the issue because I CAN'T change OMV. Only Volker (votdev) can.

    i see testparm complaining on very old obsoletet config entrys in smb.conf made by omv4

    Yes, you see testparm complain about deprecated entries. These are not gone yet. There was a github issue about this and it was decided to leave them since they will never be removed from the version of samba on Debian Stretch and OMV has already moved on to OMV 5.x on Buster. There were removed from OMV 5.x. I mentioned testparm because you said invalid entry not deprecated or old.

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • slowly....
    logging= is invalid. they speak about logging in the docu but there was and there is no parameter "logging=" inside!
    printer admin is deprecated since samba 3.6 and it was anounced as dead earlier.
    thats what i told.
    maybe the omv 5 as officialy called "beta" may have'nt these problems - but omv4 is the stable release.
    but i don't want to talk about update and release politics or how riding a dead horse (saltstack), i want to complain about a wrong, not documented and missleading parameter "logging=" in smb.conf. And its not a theoretical discussion, it manifests on wrong logs or better 0-logs. everyone cant try on its own system! this is what i described and you and Volker can do what ever you want with this proven info... fixing this isue is one of lot's of possibilitys.
    maybe you can't fix this isue because of Volker... whyever.. maybe he is the biggest linux guru on earth.. but you can build your own Opinion about that and check/proven my arguments.


    And now again... logging= is not a valid config entry. show it in the docu.. or remove it from the /usr/share/openmediavault/mkconf/samba.d/10global!


    If you (or Volker) show me a valid reference for logging=syslog or whatever it takes as parameter, i will immediately stop complaining and ask the guys from samba, why they dont support doccumented parameters... but now it's on OMV.

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

    Edited once, last by Rd65 ().

  • logging= is invalid. they speak about logging in the docu but there was and there is no parameter "logging=" inside!

    If you show me a valid reference for logging=syslog or whatever it takes as parameter, i will immediately stop complaining and ask the guys from samba, why they dont support doccumented parameters.

    I just linked to it. Did you even look? Not sure what else you want.logging.JPG

    but you can build your own Opinion about that and check/proven my arguments.

    I have an opinion and I am fine with my samba logs (which I barely use) going to syslog. When I enable logging above the "none" level in the web interface and check the audit button for the share, I see audit logs in syslog. That is a working feature regardless of whether you say it isn't a valid parameter. If you want something else, that is a feature not a bug fix and last I knew, Volker was not adding new features to 4.x.


    I tried to help but this is just turning unpleasant. I'm done wasting your time with my worthless posts...

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I tried to help but this is just turning unpleasant. I'm done wasting your time with my worthless posts...

    ok i didn't found them... but you show me the reference... thats ok. its not worthless.
    As i say... i stop complaining.
    thank you

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

    Edited once, last by Rd65 ().

  • Well, I wanted to use omv to save time ... in the meantime, I'll spend more time getting it right as I need it. That bothers me. Yes I missed the parameter in the Docu, you can now make fun of it for days and laugh. If I have more time, I might really sit down and try to write something for omv - but I already know what I'll hear ... "that's not the design goal of omv".


    But if i ask a precise question and get fray Bullshit as Answer...that realy annoys me. Sorry. Simply ask ryecoaaron how long and how many posts does it takes to get a simple info about "omv-mkonf mdadm".


    Because of salt, I think this software is more suitable for configuring server farms (cluster management) than controlling local daemons with simple textfiles. It may work, but it does not make things any easier and is incomprehensible like the Windows registry in conjunction with AD servers. Something like that does not need a Nas and that is not Linux philosophy too.


    Maybe i'm wrong about Salt... but: https://en.wikipedia.org/wiki/KISS_principle


    its not my job to decide which software or scripts is used in omv, but its my decission to use it or not. So i will not update to and even not develop on omv5. You say, there is no more development on omv4.. ok.. all things told.
    And yes, maybe it was not a good idea to use omv for my needs... maybe i do it in the future by hand again.. as in the last 30 Years! I do not complain about that.

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • ok now i found a easy way to manage alternate configs via default and env-vars.
    but why nobody hints about this if someone asked for?
    i think my problems are fixed now.. or made by myself :) maybe possible the omv4 and I still find together at the future.

    Equipment: a few Computers, lot's of waste heat, little time and a Pile of work.


    When solving problems, dig at the root instead of hacking at the leaves.

  • i have the same issue after upgrading to OMV5 in that the audit log shows nothing and the var/log/samba/files are created but all 0

    Seems the issue is related to permissions

  • Audit log problem is solved.

    Not sure if it is what i added below, or the 5.4.5 update that just came out.

    but it is working now....and i say, if it ain't broke, don't fix it - so i will leave as is.


    i do wonder though, the default config has "logging = syslog" - which i believe is no longer valid


    - i added the folowing to the samba extra options page.

    Code
    full_audit:prefix = %u|%I|%m|%S
    full_audit:failure = connect
    full_audit:success = mkdir rename unlink rmdir pwrite
    full_audit:facility = LOCAL5
    full_audit:priority = NOTICE
    logging = syslog@1 /var/log/samba/log.%m


    - on each of the shares, i entered the following in the extra options

    Code
    vfs objects = recycle full_audit

    votdev is that something that should be added to the openmediavault config when the audit option is selected, or at least should the logging = syslog be updated?

  • i do wonder though, the default config has "logging = syslog" - which i believe is no longer valid

    This is incorrect. There was a discussion some time ago in the forum or on github.

    votdev is that something that should be added to the openmediavault config when the audit option is selected, or at least should the logging = syslog be updated?

    No, this is already done when you check the 'Audit' checkbox in the share configuration page.

  • No, this is already done when you check the 'Audit' checkbox in the share configuration page.

    that's weird. it was never working. even under OMV4 nor after the upgrade. And it started working after the last OMV update 2.4.5, or from when i entered the above settings. not 100% which. i suppose i should probably try to back those settings out and see if it breaks.


    ups log doesn't work though.... never ending saga.....

  • that doesn't me a lot to me m8.


    what are you saying?

    is journald stored in flash then? if the system hasn't been restarted, why would it be effected.


    it is strange that i had audit logs from yesterday and this morning, until i tried to back out those parameters.

    Even though i have put them back, i am back to no audit log again.


    isn't there a way that flash and auditing can work together properly.

  • Your setting logging = syslog@1 /var/log/samba/log.%m is the root of the problem. OMV uses syslog as logging backend in SMB (which finally results in using systemd journald) and uses journalctl to extract the SMB audits. If you force SMB to log everything to somewhere else you shouldn't wonder that other things do not work anymore.


    isn't there a way that flash and auditing can work together properly.

    I am not the maintainer of the flash memory plugin, thus i can not say anything about that.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!