Problem:
You want to remove a file from sysvol, but it is replicated every time.
Environment
Samba AD environment
Solution
If you have only a few DC (Primary, Backup, Replica) in your domain open a ssh session to all of the an put
rm /var/lib/samba/sysvol/<REALM>/<Path>/<NameOfFile>
in your clipboard and fire it as fast as you can in all of the sessions.
The default sync interval is 5 minutes
If you have to many DC’s in your environment, you need to stop the sync for the time you delete the file(s). The easiest way is to move the cron config file for the job:
mv /etc/cron.d/sysvol-sync /root/
on all DC’s. Then you can delete the file like given above and when done, you move the cron config file back.
mv /root/sysvol-sync /etc/cron.d/