Samba 3 to Samba 4 Migration.

Lukasz Zalewski lukas at eecs.qmul.ac.uk
Sat Oct 30 11:59:25 MDT 2010


On 29/10/2010 13:45, Matthias Dieter Wallnöfer wrote:
Matthias, all
> Lukasz,
>
> no chance to make it also Python 2.4 compatible? I think it shouldn't be
> too hard to test that. Since that would be a criteria to add it to our
> source tree.
I have made he script python 2.4 compatible, but before i send a patch i 
have three questions:
1. The script throws an error on the following line of code in 2.4 (2.6 
is fine)
	zeros = b'\x00' * 16
is it safe to remove the string literal, i.e.
	zeros = '\x00' * 16

the results seem to be the same but want to check

2. The getpass module in 2.4 does not play well with redirected output
: when the output is redirected to the file and getpass("Enter LDAP 
Password:") invoked, the prompt string is redirected too. This has two 
negative side effects: users are left wondering what is going on as the 
script seems to be hanging, Enter LDAP Password: becomes part of the 
ldif. This works fine in 2.6

3. the script seems to allow import of only sambaGroupType's of 2 and 4, 
i.e.

  if sgt == SID_NAME_DOM_GRP:
                         gt = GTYPE_SECURITY_GLOBAL_GROUP
                 elif sgt == SID_NAME_ALIAS:
                         #gt = GTYPE_SECURITY_BUILTIN_LOCAL_GROUP
                         gt = GTYPE_SECURITY_DOMAIN_LOCAL_GROUP
                 else:
                         assert False, "sgt[%r]" % (sgt)

I have found an old post 
(http://lists.samba.org/archive/samba-technical/2009-March/063905.html) 
where Volker mentions that s3 supports 2, 4 and 5. Mark is running the 
script and seems to have type 5 in his ldap which stops the script 
execution. Can type 5 be mapped to anything in s4 or is it just 
incompatible?

Thx

Luk
>
> Greets and thanks for your hard work on this,
> Matthias
>
> Lukasz Zalewski wrote:
>>> please use attached script which has a small bugfix applied to it. Note,
>>> that trusts import is not implemented yet (maybe we should remove it
>>> from the list of available options). Also the script is not python 2.4
>>> friendly so please use 2.6 version
>>>
>>> Michael, all,
>>> I will send another diff file with the fix applied to it tomorrow
>>>
>>> Regards
>>>
>>> Luk
>>
>



More information about the samba-technical mailing list