OMV - SMB/CIFS - Redirect LOGs to /var/log/samba

  • I want to send SMB logs to /var/log/samba one file for each user / computer.


    Actually all SAMBA related logs are sent to /var/log/syslog


    Samba log configuration is :


    log level = 2
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes


    Is it possible to redirect logs to /var/log/samba and separate them per user / per computer ?


    Regards,


    Ricardo Jorge

  • Doing more tests I found this on the Internet :


    https://wiki.samba.org/index.p…Logging_on_a_Samba_Server


    After that I manually changed /etc/samba/smb.conf


    Reloaded configuration and LOG files appear on /var/log/samba as I expected them to be.


    My current smb.conf configuration is :


    root@openmediavault:~# grep log /etc/samba/smb.conf
    ##log file = /var/log/samba/log.%m
    log file = /var/log/samba/%m.log
    max log size = 1000
    log level = 2
    #syslog only = yes


    Please noticed that log file line is now :


    log file = /var/log/samba/%m.log


    As per Samba documentation example.


    I hope this can help someone else.


    Regards,


    Ricardo Jorge

    • Offizieller Beitrag

    After that I manually changed /etc/samba/smb.conf

    You don't have to manually edit the config file. You can put it in the extra options box in the samba settings tab. Even if that setting already exists, samba will use the last one specified and stuff in the extra options box is last.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I did a test putting those parameters in Extra options but if I do not remove "syslog only" from /etc/samba/smb.conf", all the LOG in /var/log/samba are empty ( zero bytes ).


    I did this test on two different OMV installs one as VM and the other one physical.


    Can someone else confirm this ?


    Regards,


    Ricardo Jorge

    • Offizieller Beitrag

    Can someone else confirm this ?

    Yes, this is correct. This is issue will need to be re-opened. https://github.com/openmediavault/openmediavault/issues/139

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!