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 synchronise SysVol folders to the other DCs after creating or editing GPOs.

However, there is no provision in Samba for synchronising SysVol folders between DCs, so these need to be synchronised to the other DCs on a regular basis (especially if you have created/edited/deleted GPOs).

See this for a better and longer explanation.

If you followed this notes from the beginning rsync will be installed. Otherwise please install rsync.

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

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

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

It's 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 else Main menu

samba/sync-sysvol.txt ยท Last modified: 2024/05/22 14:41 by caponato