Samba-tool ntacl sysvolcheck Problem [Solved]



Can someone help me to fix this:

samba-tool ntacl sysvolcheck returned a problem with the sysvol ACLs.

ERROR(): uncaught exception - ‘NoneType’ object has no attribute ‘endswith’
File “/usr/lib/python2.7/dist-packages/samba/netcmd/”, line 176, in _run
return*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/samba/netcmd/”, line 270, in run
File “/usr/lib/python2.7/dist-packages/samba/provision/”, line 1776, in checksysvolacl
for dir_path in [os.path.join(sysvol, dnsdomain)]:
File “/usr/lib/python2.7/”, line 77, in join
elif path == ‘’ or path.endswith(’/’):

You can run samba-tool ntacl sysvolreset to fix the issue.



Did you try the solution suggested by the command?


Yep, then, same:

root@linux:~# samba-tool ntacl sysvolreset
ERROR(<type ‘exceptions.AttributeError’>): uncaught exception - ‘NoneType’ object has no attribute ‘startswith’
File “/usr/lib/python2.7/dist-packages/samba/netcmd/”, line 176, in _run
return*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/samba/netcmd/”, line 239, in run
File “/usr/lib/python2.7/dist-packages/samba/provision/”, line 1575, in setsysvolacl
file = tempfile.NamedTemporaryFile(dir=os.path.abspath(sysvol))
File “/usr/lib/python2.7/”, line 367, in abspath
if not isabs(path):
File “/usr/lib/python2.7/”, line 61, in isabs
return s.startswith(’/’)



that’s an interesting error. After looking at the source code, I’ve whipped up the following small Python script which may give us some more insight into what might be wrong. Please save the following to e.g., run it with python2.7 and paste its output here.


import optparse
import samba.getopt as options
import pprint

parser    = optparse.OptionParser(" [options]")
sambaopts = options.SambaOptions(parser)
lp        = sambaopts.get_loadparm()
pp        = pprint.PrettyPrinter(indent=4)

pp.pprint([ lp.get("path", "sysvol"), lp.get("realm") ])

The output should look similar to this:

['/var/lib/samba/sysvol', 'MBU-TEST.INTRANET']

Kind regards,


mosu, I got:

root@linux:~# python2.7



OK, that None is the culprit. Please verify that /etc/samba/smb.conf contains a section called [sysvol] and that its path setting is present and set to /var/lib/samba/sysvol. In fact, please post the output of running the testparm and univention-check-templates commands.

Kind regards,


You right bro, now I have:

        path = /var/lib/samba/sysvol
        public = no 
        preserve case = yes
        case sensitive = no
        vfs objects = dfs_samba4 acl_xattr
        read only = no
        browseable = no
        acl xattr update mtime = yes

Then works.

Thanks a lot :slight_smile: You save me!


Great! :+1: And you’re welcome.