Set samba logging for machines



dear univention team,

i would like to enable logging per machine. how would i enable this log mechanism?

thanks and kind regards,



Hello and welcome! :slight_smile:

Could you please give us some basic information about your environment? At least the UCS version would be great:

univention-app info

Then: I’m not quite sure what kind of machines you are referring to, servers or clients or both? Should those log in separate log files on the UCS system or do you want a central logging service?

Best regards,
Michael Grandjean



unfortunately “log file = /var/log/samba/log.%m” is in Samba4 upstream not possible anymore. So on a samba4 server that cannot be configured. Though you can use a memberserver with the installed “univention-samba” package.

# univention-install univention-samba
# vim /etc/samba/local.conf
log file = /var/log/samba/log.%m
logging = yes
ucr commit /etc/samba/*
service samba restart
testparm -sv
root@ucs-8180:/var/log/samba# ls -lah
insgesamt 24K
drwxr-x---  3 root root 4,0K Jan 26 09:44 .
drwxr-xr-x 13 root root 4,0K Jan 25 15:12 ..
drwx------  5 root root 4,0K Jan 26 09:44 cores
-rw-r--r--  1 root root    0 Jan 26 09:44 log.wb-UCS-8180

kind regards,
Jens Thorp-Hansen


Thank You.

We are running a distributed samba4 domain and one domain member client did not apply GPOs. We recreated the machine account and now the policies are pulled from the local sysvol share again. Verbose logging for all clients was activated easily, but having been able to use the old school logging per machine would have been helpful.

Your answer was very informative and gave an alternative solution for my requirement.

Kind regards,