The samba-tool command is failing with "ERROR(class 'ModuleNotFoundError'): uncaught exception - No module named 'samba.samdb'"

Solution Verified - Updated -

Issue

  • The samba-tool command is failing with ERROR(<class 'ModuleNotFoundError'>): uncaught exception - No module named 'samba.samdb'. i.e:
# samba-tool domain join example.com DC --use-krb5-ccache=/tmp/krb5cc_0
ERROR(<class 'ModuleNotFoundError'>): uncaught exception - No module named 'samba.samdb'
  File "/usr/bin/samba-tool", line 44, in <module>
    retval = cmd._run("samba-tool", subcommand, *args)
  File "/usr/lib64/python3.6/site-packages/samba/netcmd/__init__.py", line 235, in _run
    return self.subcommands[subcommand]._run(
  File "/usr/lib64/python3.6/site-packages/samba/netcmd/main.py", line 36, in __getitem__
    fromlist=['cmd_%s' % attr]),
  File "/usr/lib64/python3.6/site-packages/samba/netcmd/domain.py", line 43, in <module>
    from samba.join import join_RODC, join_DC
  File "/usr/lib64/python3.6/site-packages/samba/join.py", line 22, in <module>
    from samba.samdb import SamDB

Environment

  • Red Hat Enterprise Linux 8.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content