User Tools

Site Tools


samba:sync-sysvol

Sync Domain Controller's SysVol Folder (SysVol Replication)

The SysVol share on domain controllers holds GPOs and other scripts for clients.

When you create or edit GPOs in AD, the GPO RSAT tool connects by default to the DC that holds the PDC Emulator role. You will need to manually synchronise SysVol folders to the other DCs after creating or editing GPOs, because there is no provision in Samba for synchronising SysVol folders between DCs.

See this for a more complete explanation.

If you followed these notes from the beginning, rsync will already be installed. Otherwise, please install rsync.

Let's assume DC1 (`192.168.0.2`) has the PDC Emulator role.

Run this on DC2 (and any other DC in the AD infrastructure):

rsync -XAa --delete-after dc1:/var/lib/samba/sysvol /var/lib/samba/

It is even better to have this as a cron job (you want to have your public key in all servers so rsync does not ask for passwords):

# Sync SYSVOL
0 9-17 * * * rsync -XAa --delete-after dc1:/var/lib/samba/sysvol /var/lib/samba/ >/dev/null 2>&1

Caponato's Samba notebook. Start here or return to Main menu.

samba/sync-sysvol.txt ยท Last modified: by caponato