samba-tool fsmo transfer - uncaught exception

Rowland penny rpenny at samba.org
Thu May 23 17:38:59 UTC 2019


On 23/05/2019 14:48, Julien Ropé via samba-technical wrote:
> Hi,
>
> I have been confronted to a problem with role transfers for forestdns 
> and domaindns.
> Using the command "samba-tool fsmo transfer [...]", I get an error :
>
> ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 
> 'module' object has no attribute 'drs_utils'
> File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 
> 177, in _run
> return self.run(*args, **kwargs)
> File "/usr/lib/python2.7/dist-packages/samba/netcmd/fsmo.py", line 
> 528, in run
> transfer_dns_role(self.outf, sambaopts, credopts, role, samdb)
> File "/usr/lib/python2.7/dist-packages/samba/netcmd/fsmo.py", line 
> 133, in transfer_dns_role
> except samba.drs_utils.drsException as e:
>
>
>
> This is using Samba 4.9.
>
> Looking on the net, I found several references of the same, dating as 
> far as 2016 :
>
> https://lists.samba.org/archive/samba/2016-September/203363.html
>
> https://lists.samba.org/archive/samba/2017-August/210120.html
>
> http://samba.2283325.n4.nabble.com/samba-4-7-0-AD-DC-FSMO-roles-transfer-error-td4725099.html 
>
>
>
>
> These show the error was found in 4.5, 4.6 and 4.7.
>
> Each time, the solution was to modify the file 
> "[samba]/lib/python27/site-packages/samba/netcmd/fsmo.py", by adding 
> the line "import samba.drs_utils".
> I have verified that this fixes the issue for me.
>
>
> I understand the problem is not seen in every environment, but it 
> still seems to be there for some users.
> If this issue is known and the fix is so easy, why isn't it applied?
> If this is because there is something wrong with the environments of 
> the people that see it, what should they (we) do to fix it? Is editing 
> the code ourselves a good solution, or does that hide something else 
> we should look at in our environment?
>
Can I ask just what is the exact command you are running ?

Rowland






More information about the samba-technical mailing list