Problem:
A new schoolslave cannot resync his sysvol. The slave was deleted before and readded and rejoined.
Solution:
Step 1
Check /var/cache/univention-samba4/sysvol-sync/.trigger for correct ownership
:/var/cache/univention-samba4/sysvol-sync/.trigger# ls -lahrt
insgesamt 8,0K
drwxr-xr-x 3 root root 4,0K Jan 24 2018 ..
-rw-r--r-- 1 11956 DC Slave Hosts 0 Okt 14 2020 demo1
-rw-r--r-- 1 schnuckiucs$ DC Slave Hosts 0 Feb 1 07:20 schnuckiucs
drwxrwxr-x 2 root DC Slave Hosts 4,0K Feb 3 12:36 .
-rw-r--r-- 1 18948 DC Slave Hosts 0 Feb 4 12:40 lieblingsucs
-rw-r--r-- 1 erstslave$ DC Slave Hosts 0 Feb 8 11:10 erstslave
-rw-r--r-- 1 zweitslave$ DC Slave Hosts 0 Feb 8 11:10 zweitslave
You have to correct the ownership to the new host
Step 2
Or in /var/cache/univention-samba4/sysvol-sync
the old serverfolder is still there and the new one is not added.
To repair this and readd the new server you can try the following. This procedure also fits for new synchronisation from the master.
On all systems:
ucr unset samba4/sysvol/sync/cron
cp -a /var/cache/univention-samba4/sysvol-sync /var/cache/univention-samba4/sysvol-sync_bak_univention-support
rm -rf /var/cache/univention-samba4/sysvol-sync/*
On all systems except the master
cp -a /var/lib/samba/sysvol /var/lib/samba/sysvol_bak_univention-support
rm -rf /var/lib/samba/sysvol/*
/usr/share/univention-samba4/scripts/sysvol-sync.sh
samba-tool ntacl sysvolcheck
ucr set samba4/sysvol/sync/cron="*/5 * * * *"
On the master
/usr/share/univention-samba4/scripts/sysvol-sync.sh
samba-tool ntacl sysvolcheck
ucr set samba4/sysvol/sync/cron="*/5 * * * *"
see also: