Suffering the exact same error.
I'm setting up a second DC, have successfully joined it to the domain, but cannot complete the sysvol replication step.
Replication step:
Main DC::
cd /var/db/samba4/private
tdbbackup -s .bak /var/db/samba4/private/idmap.ldb
Produces idmap.ldb.bak, which I then copy to the second DC and rename it.
New Second DC::
cd /var/db/samba4/private
mv idmap.ldb.bak idmap.ldb
Clear the net cache
net cache flush
Synch the sysvol from the main DC to the second DC
rsync -XAavz -vvv --delete-after sysvol-replication@192.168.0.7::SysVol/ /var/db/samba4/sysvol/
This appears to work perfectly fine. Then the final step is where we get stuck
samba-tool ntacl sysvolreset
Produces
lp_load_ex: refreshing parameters
Initialising global parameters
Processing section "[global]"
Processing section "[sysvol]"
Processing section "[netlogon]"
ldb_wrap open of idmap.ldb
lp_load_ex: refreshing parameters
Processing section "[global]"
Processing section "[sysvol]"
Processing section "[netlogon]"
Initialising default vfs hooks
Initialising custom vfs hooks from [/[Default VFS]/]
Initialising custom vfs hooks from [acl_xattr]
load_module_absolute_path: Module '/usr/local/lib/samba4/modules/vfs/acl_xattr.so' loaded
Initialising custom vfs hooks from [dfs_samba4]
connect_acl_xattr: setting 'inherit acls = true' 'dos filemode = true' and 'force unknown acl user = true' for service Unknown Service (snum == -1)
Initialising default vfs hooks
Initialising custom vfs hooks from [/[Default VFS]/]
Initialising custom vfs hooks from [acl_xattr]
Initialising custom vfs hooks from [dfs_samba4]
connect_acl_xattr: setting 'inherit acls = true' 'dos filemode = true' and 'force unknown acl user = true' for service Unknown Service (snum == -1)
lp_load_ex: refreshing parameters
Processing section "[global]"
Processing section "[sysvol]"
Processing section "[netlogon]"
ldb_wrap open of idmap.ldb
ldb_wrap open of idmap.ldb
Initialising default vfs hooks
Initialising custom vfs hooks from [/[Default VFS]/]
Initialising custom vfs hooks from [acl_xattr]
Initialising custom vfs hooks from [dfs_samba4]
connect_acl_xattr: setting 'inherit acls = true' 'dos filemode = true' and 'force unknown acl user = true' for service sysvol
unpack_nt_owners: owner sid mapped to uid 0
unpack_nt_owners: group sid mapped to gid 3000000
set_nt_acl_no_snum: fset_nt_acl returned NT_STATUS_INVALID_PARAMETER.
ERROR(runtime): uncaught exception - (3221225485, 'An invalid parameter was passed to a service or function.')
File "/usr/local/lib/python3.6/site-packages/samba/netcmd/__init__.py", line 185, in _run
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/samba/netcmd/ntacl.py", line 283, in run
lp, use_ntvfs=use_ntvfs)
File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1735, in setsysvolacl
_setntacl(sysvol)
File "/usr/local/lib/python3.6/site-packages/samba/provision/__init__.py", line 1732, in _setntacl
service=SYSVOL_SERVICE, session_info=session_info)
File "/usr/local/lib/python3.6/site-packages/samba/ntacls.py", line 232, in setntacl
service=service, session_info=session_info)
It is unclear whether the problems start further up ('force unknown acl user = true' for service Unknown Service (snum == -1)) looks a bit strange, for example. But the error message is identical to previous posters.
A quick overview of our set up:
Main DC
- Samba Samba version 4.7.4
- FreeBSD 11.1 release p4 amd64
- Inside vmbhyve (RAM 8GB , CPU 3) in a ZVOL on ZFS
- FS is UFS with ACLs enabled
Domain member (fileserver)
- Samba 4.10.8 (was originally 4.7.x when it was joined to the domain without issue around two years ago)
- Samba was updated in place a few months ago - experienced zero errors.
- 11.2-RELEASE-p2 amd64
- ZFS
Second DC
- Samba 4.10.11
- 12.1-RELEASE r354233 GENERIC amd64
- FS is UFS with ACLs enabled
- Inside vmbhyve (RAM 8GB , CPU 3) in a ZVOL on ZFS (different physical host to main DC)
All of these were installed from packages, except the main DC which was originally compiled (but was later updated/replaced by a packaged version (couldn't get it to provision without compiling because there was something missing from the package of the time which was needed to be able to provision - sorry I don't recall the details).
I'm going to go looking through the python code to see if I can understand exactly where it is really getting stuck. Not sure if I will be able to find a solution though. Anyone else have some thoughts on this?
As for trying other versions of Samba
- Samba 4.8 is basically dead (it was discontinued 2019-09-17 and in it's current from packages (tested today) samba-tool is broken. See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239480
- Samba 4.11 is the current version (since 2019-09-17 - see
https://wiki.samba.org/index.php/Samba_Release_Planning)
This is my very first posting. Been lurking here for, um, years and years. Thanks.