It looks above command is somehow broken # samba-tool ntacl set <file-name> Step-1: Gets object of 'type <samba.netcmd.ntacl.cmd_ntacl_set>' and calls _run method on it # vim ./samba/netcmd/__init__.py class SuperCommand(Command): def _run(self, myname, subcommand=None, *args): if subcommand in self.subcommands: self.subcommands[subcommand]._run() Step-2: But 'class cmd_ntacl_set(Command):' samba/netcmd/ntacl.py does not have _run() method rather it has 'run()'. So call never goes inside _run() def run(self, acl, file, use_ntvfs=False, use_s3fs=False, quiet=False, xattr_backend=None, eadb_file=None,credopts=None, sambaopts=None, versionopts=None, service=None): Step-3: Even though if I tried changing function name to _run(). sambaopts is always None. get_loadparm() cannot be called over None type. "sambaopts": options.SambaOptions lp = sambaopts.get_loadparm()