samba-tool fsmo transfer - uncaught exception

Julien Ropé jrope at
Thu May 23 13:48:31 UTC 2019


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/", line 
177, in _run
return*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/", line 528, 
in run
transfer_dns_role(self.outf, sambaopts, credopts, role, samdb)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/", 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 :

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/", 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?

Best regards,

Message envoyé grâce à OBM, la Communication Libre par Linagora

More information about the samba-technical mailing list