[Samba] Provisioning fails - Codebase question

michael at chameleonoriginals.com michael at chameleonoriginals.com
Sun Feb 9 02:27:14 UTC 2020

I'm trying to configure an SoC system as an AD DC on Ubuntu 18.04.  I 
was successful on Ubuntu 16.04 a couple of years ago, and the script I 
used to configure the system from first boot to provisioned fails on 
18.04 and 16.04.

The failure is thus:
Setting up self join
set_nt_acl_no_snum: fset_nt_acl returned NT_STATUS_NOT_SUPPORTED.
ERROR(runtime): uncaught exception - (-1073741637, 'The request is not 
   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 
176, in _run
     return self.run(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 
474, in run
     nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
   File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", 
line 2175, in provision
   File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", 
line 1806, in provision_fill
     names.domaindn, lp, use_ntvfs)
   File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", 
line 1593, in setsysvolacl
   File "/usr/lib/python2.7/dist-packages/samba/ntacls.py", line 162, in 
     smbd.set_nt_acl(file, security.SECINFO_OWNER | 
security.SECINFO_GROUP | security.SECINFO_DACL | security.SECINFO_SACL, 
sd, service=service)

A couple of things stand out as possible sources, but I've been unable 
to get these questions answered with five weeks of searching:

Is Samba still using Python 2.7, or am I missing something to force it 
to use 3.x? Python 2.7 isn't even installed on the system until after 
Samba is installed.

I have traced the code that fails, and have identified that ntacls.py, 
the script which is failing the self join is using the function 
samba.samba3.smbd.set_nt_acl, but "apt install samba" installs samba 
version 4.7.6-Ubuntu. Is the use of samba3 python code related to the 
previous question (solve the former and it'll solve the latter)?

More information about the samba mailing list