[PATCH] fix samba-tool gpo backup syntax in WHATSNEW.txt

Garming Sam garming at catalyst.net.nz
Wed Feb 27 01:58:56 UTC 2019


Hi Denis,

I think I noticed that the displayName is never used as well. I couldn't
figure out what it was actually used for.

I have a new branch with what I think should be all the fixes. For the
encoding issue, I think there's not really much choice but to parse the
file anyways and have a iso-8859 fallback because you don't know whether
or not you must ignore the file until you've already opened it. But in
the restore, what I've done is that I've left the blank GPT.INI that
samba-tool gpo create makes initially (which was what restore is built
on). I think that's probably the best behaviour, and I've just had to
add an extra option to be able to flip this behaviour so that our tests
still work as expected.

Can you check that this branch behaves as you would expect? I'm still
curious as to what Microsoft has to say on the subject, but there's not
really any fixing the iso-8859 oddities probably.

https://gitlab.com/catalyst-samba/samba.git

garming-gpo-fixes


Cheers,

Garming

On 19/02/19 12:43 AM, Denis Cardon wrote:
> Hi Garming,
>
> Le 02/17/2019 à 11:07 PM, Garming Sam a écrit :
>> That sounds like Microsoft might have made an error somewhere. Perhaps I
>> should send an email to Microsoft dochelp and see what their response
>> is.
>
> digging a little bit more, it seems that the displayName key in the
> GPT.INI file is actually not used. When the GPO is initially created
> with French locale RSAT on win7 (tested on differents VMs on different
> domains), you get a file like this:
>
> # more "{34D4830E-27AC-49DF-BCD2-E3340B9A79B8}/GPT.INI"
> [General]
> Version=0
> displayName=Nouvel objet Strat�gie de groupe
>
> Encoding is iso8859
>
> If I rename that GPO, it does rename the displayName attribute in the
> LDAP
> (CN={34D4830E-27AC-49DF-BCD2-E3340B9A79B8},CN=Policies,CN=System,DC=mydomain,DC=lan).
> But it does not change the value of the displayName key in GPT.INI
> file (which still has its encoding issue).
>
> Actually the "samba-tool gpo create" command does not even add the
> displayName key in the GPT.INI file. And it is neither added when
> changing the GPO name afterward.
>
> So my conclusion is that displayName key in GPT.INI file should be
> simply ignored (and not recreated during restore), and that data
> should be retrieved from the displayName LDAP attribute.
>
> Actually "samba-tool gpo show" and other similar commands get
> displayName from LDAP only.
>
> Cheers,
>
> Denis
>
>>
>> Cheers,
>>
>> Garming
>>
>> On 16/02/19 5:03 AM, Denis Cardon via samba-technical wrote:
>>> Hi Andreas, everyone,
>>>
>>> galvanized with a first contribution (thanks Andreas and Rowland), I'm
>>> sending another very very modest one correcting syntax in WHATSNEW
>>> (samba-tool gpo export vs samba-tool gpo backup).
>>>
>>> Actually I am playing with the gpo import export script. There is some
>>> encoding issues with French accents in the GPT.INI. Looking at some
>>> specs it should be UTF-8 (which is the expected encoding in the gpo
>>> export script), but using French RSAT, it is generated in iso-8859...
>>> I Still trying to figure that out...
>>>
>>> If someone has RSAT with another locale handy, could you please check
>>> what encoding it is using for GPT.INI file using accents in GPO name
>>> (so that accentuated char gets saved into the displayName key of
>>> GPT.INI file)?
>>>
>>> Cheers,
>>>
>>> Denis
>>>
>>>
>



More information about the samba-technical mailing list