[PATCH] samba-tool throws error if there is an empty FSMO role

Rowland Penny repenny241155 at gmail.com
Fri Apr 8 09:58:48 UTC 2016


On 08/04/16 07:09, Andrew Bartlett wrote:
> On Tue, 2016-04-05 at 11:18 -0700, Jeremy Allison wrote:
>> On Thu, Mar 31, 2016 at 01:23:43PM +0100, Rowland Penny wrote:
>>>
>>> Hi, if there are any empty FSMO roles in AD, 'samba-tool fsmo'
>>> throws an error, this happens if you try to show or transfer an
>>> empty role.
>>>
>>> The attached patch will cure this, if you run 'samba-tool fsmo
>>> show'
>>> any empty roles will be shown similar to this:
>>>
>>>   DomainDnsZonesMasterRole owner: * The 'domaindns' role does not
>>> have an FSMO roleowner
>>>
>>> If you try to transfer an empty role, rather than throwing an
>>> error,
>>> it will now tell you the role as no owner i.e.
>>>
>>> samba-tool fsmo transfer --role=pdc
>>> * The 'pdc' role does not have an FSMO roleowner
>>>
>>> You will then be able to seize the role.
>> Ping. Can we get a second Team reviewer for Rowland for this ?
>>
>> My python is too weak to do a good job here, so someone with
>> more python experience would be appreciated.
> A test on such a domain would be really nice.  I suspect the fl2000
> environment in selftest won't have the DNS fsmo roles for example.
>
> Otherwise it looks reasonable, but I'll look again when it has the
> test.
>
> Andrew Bartlett
>

OK, what do you expect the test to do ?
What language do you expect it to be written in, I could attempt python, 
but I am going to need help here, if 'C', then somebody else is going to 
have to write it.

Also would this be a good time to start discussing dropping support for 
'2000', Microsoft dropped support for it nearly 6yrs ago, you have to 
actively select the 2000 function level at provision and who is likely 
to do that ?

I tested my changes, they work and remove a problem that has come up on 
the samba mailing list a few times recently.

I would also like to point out that I cannot seem to find any tests for 
'samba-tool fsmo'

Rowland



More information about the samba-technical mailing list