Skip to content

Instantly share code, notes, and snippets.

@Alexey-Tsarev
Last active January 11, 2026 19:28
Show Gist options
  • Select an option

  • Save Alexey-Tsarev/caf93f7e6fd8e4aeca7db16bc58b1adc to your computer and use it in GitHub Desktop.

Select an option

Save Alexey-Tsarev/caf93f7e6fd8e4aeca7db16bc58b1adc to your computer and use it in GitHub Desktop.
Samba in Docker: enable audit
# Tested on Debian 13
services:
# https://github.com/ServerContainers/samba
samba:
image: ghcr.io/servercontainers/samba:a3.23.2-s4.22.6-r0 # https://github.com/servercontainers/samba/pkgs/container/samba/versions
# ...
environment:
SAMBA_GLOBAL_CONFIG_vfs_SPACE_objects: full_audit
SAMBA_GLOBAL_CONFIG_full_audit_COLON_prefix: "%u|%I|%S"
SAMBA_GLOBAL_CONFIG_full_audit_COLON_failure: none
SAMBA_GLOBAL_CONFIG_full_audit_COLON_success: fdopendir, pread_recv, pwrite_recv, create_file, unlinkat, connect
# SAMBA_GLOBAL_CONFIG_full_audit_COLON_success: all
# ...
volumes:
- /etc/avahi/services/:/external/avahi
- /dev/log:/dev/log # this is required
# end of docker-compose.yml
# docker compose up samba
# check audit logs on host machine via:
# sudo journalctl -f | grep smbd_audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment