File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ # Configuring SysVol replication
2+
3+ Configure SSH keys so we can rsync automatically without any user interference. _ ** Do not use a passphrase** _
4+
5+ Create the key on the _ primary_ domain controller
6+ ```
7+ ssh-keygen -t RSA
8+ ```
9+
10+ Copy the key to the secondary domain controller
11+ ```
12+ ssh-copy-id root@tobiasdc02
13+ ```
14+
15+ Just SSH in to make sure it's working correctly
16+ ```
17+ ssh tobiasdc02
18+ ```
19+
20+ Once we're in and confirmed the key is working we can log back out.
21+ ```
22+ exit
23+ ```
24+
25+ On our primary domain controller we can run the below command as a dry run to make sure that we're able to copy the sysvol folder.
26+ ```
27+ rsync --dry-run -XAavz --chmod=775 --delete-after --progress --stats /usr/local/samba/var/locks/sysvol/ root@tobiasdc02:/usr/local/samba/var/locks/sysvol/
28+ ```
29+
30+ If this looks correct then remove the --dry-run part
31+ ```
32+ rsync -XAavz --chmod=775 --delete-after --progress --stats /usr/local/samba/var/locks/sysvol/ root@tobiasdc02:/usr/local/samba/var/locks/sysvol/
33+ ```
34+
35+ Finally add an edit the crontab
36+ ```
37+ crontab -e
38+ ```
39+
40+ Paste in the following to sync every 5 minutes
41+ ```
42+ */5 * * * * rsync -XAavz --chmod=775 --delete-after --progress --stats /usr/local/samba/var/locks/sysvol/ root@tobiasdc02:/usr/local/samba/var/locks/sysvol/ > /var/log/sysvol-replication.log 2>&1
43+ ```
44+
You can’t perform that action at this time.
0 commit comments