[Samba] Sysvol issues after DC migration

Rowland penny rpenny at samba.org
Tue Mar 16 16:11:07 UTC 2021


On 16/03/2021 15:41, Oleg Blyahher via samba wrote:
> Yup, you are absolutely right, in both GPO management and 'samba-tool 
> gpo listall' I get 4 GPOs, but only 3 are listed in 
> /var/lib/samba/sysvol/domain.com/Policies
>
> The one missing there is "*Default Domain Controllers Policy*", aka 
> {6AC1786C-016F-11D2-945F-00C04FB984F9}
>
> Should I delete this policy from AD? Or maybe recreate the internal 
> structure somehow? 'samba-tool gpo create ....'?


No, it is one of the default GPO's and is basically empty, so should be 
easy to recreate, try these commands:

mkdir /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}
chown 'domain admins:'domain admins' /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}

mkdir /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/MACHINE
chown 'domain admins:'domain admins' /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/MACHINE

mkdir /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/USER
chown 'domain admins:'domain admins' /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/USER

printf "[General]\nVersion=0\n" > /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/GPT.INI
unix2dos /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/GPT.INI
chown 'domain admins:'domain admins' /var/lib/samba/sysvol/$(hostname 
-d)/Policies/\{6AC1786C-016F-11D2-945F-00C04FB984F9\}/GPT.INI

Rowland





More information about the samba mailing list