[Samba] Syncing Sysvol

Rowland penny
Tue, 16 Jul 2019 17:08:12 -0000

On 16/07/2019 17:44, Joachim Lindenberg via samba wrote:
> Jonathon suggested in
https://lists.samba.org/archive/samba/2019-July/224347.html to set non PDCs to
readonly. Actually this could be done automatically set when generating smb.conf
during join as (secondary) DC. Then the script could also just exit if sysvol is
not readonly.
Not sure how easy this would be, '--option' will only add lines to
[global], so the 'join' code would have to be
changed.
> w.r.t. to my initial script:
>
> - you fixed the issue of that I used $pdc and $peer inconsistently,
>
> - because of https://lists.samba.org/archive/samba/2019-July/224354.html it
does not work in my network. I suggest to either stick to my variant of
identifying the PDC or adding a check as well,

I think adding something to check that only one PDC Emulator is returned
is the way to go.

Let me think about your problem, you should be able to remove the old
record with samba-tool, you probably just need the correct 'incantation'
;-)

>
> - writing about error checks: what about testing availability of smbclient
and other prerequesites if any,
This is fairly easy, use 'which' or 'type' to check if
'smbclient' is
installed.
>
> - I had to add --- | grep -v " blocks of size " --- after
smbclient? dir *? because replication was triggered due to other file system
activity,
Hmm, never got that
> Nevertheless you write scripts better than I do, appreciated!
>
>
I have probably been at it longer than you, there has to be some benefit
in getting old ;-)

Rowland