samba-tool fsmo transfer - uncaught exception

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


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?


Best regards,
Julien

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



More information about the samba-technical mailing list