Successfully able to build Samba 4.9.x on CentOS 6.x where python 2.6 is default, however when running the following command: sudo /usr/bin/samba-tool domain provision --domain=asdf --realm=localdomain.net --server-role=dc --adminpass=<redacted> --dns-backend=SAMBA_INTERNAL --use-rfc2307 --quiet the command fails and generates the following error: No IPv6 address will be assigned Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs ERROR(): uncaught exception - zero length field name in format File "/usr/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 177, in _run return self.run(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 538, in run backend_store=backend_store) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 2316, in provision backend_store=backend_store) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 1921, in provision_fill names.domaindn, lp, use_ntvfs) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 1693, in setsysvolacl userdn = ''.format(domainsid, security.DOMAIN_RID_ADMINISTRATOR)
File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 1693, in setsysvolacl userdn = ''.format(domainsid, security.DOMAIN_RID_ADMINISTRATOR) I can't find a line like that in the v4-9-{stable,test} branches. Instead there is this: userdn = '<SID={}-{}>'.format(domainsid, security.DOMAIN_RID_ADMINISTRATOR) which should work. Was this Samba compiled from source or is it from a package?
Created attachment 15042 [details] patch for 4.9 Andrew Bartlett has pointed out to me that your line userdn = ''.format(domainsid, security.DOMAIN_RID_ADMINISTRATOR) has probably been mangled by something trying to strip out HTML (the original line had angle brackets). The attached patch is probably the fix.
Created attachment 15043 [details] patch for 4.10 Same patch, for 4.10. Just the line numbers change.
Created attachment 15044 [details] Samba 4.9.4 Build Logs
Created attachment 15045 [details] python error
RPM's as installed on test system: [root@mynas-iso-test ~]# rpm -qa | grep samba samba-winbind-clients-4.9.4-3.el6.x86_64 samba-dc-libs-4.9.4-3.el6.x86_64 samba-client-4.9.4-3.el6.x86_64 samba-winbind-modules-4.9.4-3.el6.x86_64 samba-winbind-4.9.4-3.el6.x86_64 samba-dc-4.9.4-3.el6.x86_64 samba-libs-4.9.4-3.el6.x86_64 samba-common-4.9.4-3.el6.noarch samba-client-libs-4.9.4-3.el6.x86_64 samba-4.9.4-3.el6.x86_64 samba-python-4.9.4-3.el6.x86_64 samba-common-tools-4.9.4-3.el6.x86_64 samba-common-libs-4.9.4-3.el6.x86_64 [root@mynas-iso-test ~]# rpm -qa | grep python python-urlgrabber-3.9.1-11.el6.noarch python-2.6.6-66.el6_8.x86_64 python26-crcmod-1.7-1.el6.x86_64 python-argparse-1.2.1-2.1.el6.noarch python-six-1.9.0-2.el6.noarch python-IPy-0.75-1.el6.noarch python35-3.5.1-3.el6.x86_64 python35-setuptools-20.2.2-1.el6.noarch python35-funcsigs-1.0.2-1.el6.noarch setools-libs-python-3.3.7-6.el6.x86_64 python-pycurl-7.19.0-17.el6.x86_64 libsemanage-python-2.0.43-5.1.el6.x86_64 python-libs-2.6.6-66.el6_8.x86_64 python-crypto-2.0.1-22.el6.x86_64 python-tevent-0.9.37-2.el6.x86_64 python-iniparse-0.3.1-2.1.el6.noarch dbus-python-0.83.0-6.1.el6.x86_64 python-dateutil-1.4.1-7.el6.noarch audit-libs-python-2.4.5-6.el6.x86_64 libselinux-python-2.0.94-7.el6.x86_64 python35-libs-3.5.1-3.el6.x86_64 python35-six-1.10.0-1.el6.noarch python35-requests-2.9.2-1.el6.noarch python35-arrow-0.12.1-1.el6.noarch python35-logfury-0.1.2-1.el6.noarch policycoreutils-python-2.0.85-30.3.el6.x86_64 rpm-python-4.8.0-59.el6.x86_64 samba-python-4.9.4-3.el6.x86_64 python-tdb-1.3.16-1.el6.x86_64 python-lxml-2.2.3-1.1.el6.x86_64 python-magic-5.04-30.el6.x86_64 python35-tqdm-4.5.0-1.el6.noarch python35-python-dateutil-2.6.1-1.el6.noarch [root@mynas-iso-test ~]#
With Samba 4.9.5 + proposed patch, this still fails: ERROR(<type 'exceptions.IndexError'>): uncaught exception - tuple index out of range File "/usr/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 177, in _run return self.run(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 538, in run backend_store=backend_store) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 2316, in provision backend_store=backend_store) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 1921, in provision_fill names.domaindn, lp, use_ntvfs) File "/usr/lib64/python2.6/site-packages/samba/provision/__init__.py", line 1693, in setsysvolacl userdn = '<SID={1}-{2}>'.format(domainsid, security.DOMAIN_RID_ADMINISTRATOR)
Created attachment 15046 [details] patch for 4.9 v2 Oops. Try this patch.
Updated patch resolves issue
Comment on attachment 15046 [details] patch for 4.9 v2 Thanks Douglas. I'll be very glad when we stop having to support 2.6 or any 2.x for that matter, but this is good for the old releases.
Karolin, Please select for 4.9.next and 4.10.next!
(In reply to Andrew Bartlett from comment #11) Pushed to autobuild-v4-{10,9}-test.
(In reply to Karolin Seeger from comment #12) Pushed to both branches. Closing out bug report. Thanks!