How to enable Samba log

Andreas_E
Andreas_E Posts: 1  Freshman Member
edited July 2018 in Personal Cloud Storage
Hello,

how can i enable the SMB-Log on NAS540/542?
I have tried to edit the smb.conf under /etc/samba/ and add follow lines:
log file = /var/log/samba/%m.log
max log size = 10000
log level = 2 smb:4
With a restart from the NAS the smbd should now log the accesses from the Clients but the changes in smb.conf are undone. 

With friendy Greets from Germany.

#NAS_July
«1

Comments

  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    edited July 2018
    Maybe you can use the Samba tweak in Tweaks
  • Varfalamey
    Varfalamey Posts: 8  Freshman Member
    Up. Nas-Central down.
  • Alex M
    Alex M Posts: 5  Freshman Member
    what's the default password for Samba account?
  • Batou
    Batou Posts: 101  Ally Member
    Hi Alex M,

    what's the default password for Samba account?
    It depends on which user account you used, the password is the same as that account's setting.
  • Varfalamey
    Varfalamey Posts: 8  Freshman Member
    Mijzelf, is there any syslog-ng tweaks? Cause any reboot sets to default syslog-ng.conf.
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    No. But if you have a script which does the necessary adjustments, and you have RandomTools installed, you can put that script in
    /i-data/sysvol/.PKG/RandomTools/etc/custom_startscripts/
    to get it executed on boot.

  • Varfalamey
    Varfalamey Posts: 8  Freshman Member
    OK. I'll try. Thank you!

    And there is one problem at NAS542. After rebooting NAS smbd starts without using "smb.conf.Tweaks" config file. Process is "/usr/sbin/smbd -D" for each user.

    I reinstall Tweaks via AppCenter (when installing it lags at 98%; need to press cancel, reboot NAS and install Tweaks again) and enable Samba tweaks. After that smbd starts with a process "/usr/sbin/smbd -D --configfile=/etc/samba/smb.conf.Tweaks".

    Is there any way to solve that problem?

  • Varfalamey
    Varfalamey Posts: 8  Freshman Member
    Looks like after reboot samba.sh from /i-data/sysvlo/.PKG/Tweaks/gui/Tweaks/plugins doesn't exec at startup
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    The Samba tweak creates the file /etc/samba/smb.conf.Tweaks,  then patches /etc/init.d/samba.sh to add the configfile, and then calls '/etc/init.d/samba.sh restart', as you can read on line 108 of samba.sh. I don't see how that could fail (and it doesn't fail on my box)

    Looks like after reboot samba.sh from /i-data/sysvlo/.PKG/Tweaks/gui/Tweaks/plugins doesn't exec at startup
    Why do you think so? The script is sourced from /i-data/sysvol/.PKG/Tweaks/etc/init.d/Tweaks, starting at line 338. As you can see there is a log function, which can be activated by adding a line

    touch /tmp/${PKG_NAME}.log

    somewhere above 338. Does that give new insights?



Consumer Product Help Center