Python version and the AD DC

Andrew Bartlett abartlet at
Wed Dec 19 17:09:57 UTC 2018

On Wed, 2018-12-19 at 17:16 +0100, Ralph Böhme wrote:
> Hi folks,
> it seems since a19d5bd771c1727b037d28d24af0b85e49bdafb2 samba-tool
> and therefor 
> the AD DC requires Python 3, is this correct?
> Is this intentional? With all the recent good work on the Python
> stuff it was a 
> little hard to keep up with mails and follow on the trail, so I
> assume I missed 
> some relevant mails. :)
> WHATSNEW only mentions that the default changes to Python 3.
> *scratches head*

It is supported for installed use.  For in-tree development you need to
set PYTHON=python2

$ PYTHON=python2 ./configure --prefix=/tmp/prefx && PYTHON=python2 make
-j && PYTHON=python2 make install 

$ /tmp/prefx/bin/samba-tool 
Usage: samba-tool <subcommand>

Main samba administration tool.

$ head /tmp/prefx/bin/samba-tool -n 3
#!/usr/bin/env python2

# Unix SMB/CIFS implementation.

I hope this clarifies things.  It certainly wasn't intended to be
'easy' to stay on python2, as a developer, but for end-users with no
other options it should remain possible.  However this is a really good
example of why we should switch as soon as possible to just one Python


Andrew Bartlett

Andrew Bartlett             
Authentication Developer, Samba Team
Samba Developer, Catalyst IT

More information about the samba-technical mailing list