r/samba-dc: sysvolsync: Remove winbind cache file

The `net cache flush` command does not seem to always work to clear the
identity mapping cache used by winbind.  Explicitly moving the file
does, though.
chrony
Dustin 2023-10-28 09:56:44 -05:00
parent 3e70600691
commit f334363aab
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@
SYSVOL=/var/lib/samba/sysvol
IDMAP_LDB=/var/lib/samba/private/idmap.ldb
WINBIND_CACHE=/var/lib/samba/winbind_cache.tdb
case "${DEBUG}" in
yes|YES|y|Y|on|ON|1|true|TRUE|t|T)
@ -71,6 +72,7 @@ if [ -z "${st_cur}" ] || [ "${st_new}" != "${st_cur}" ]; then
mv "${IDMAP_LDB}.new" "${IDMAP_LDB}"
info 'Flushing idmap cache'
net cache flush
rm -f "${WINBIND_CACHE}"
info 'Restarting Samba service'
systemctl start samba || exit
info 'Resetting SYSVOL ACLs'