If you run 'samba-tool -V' it returns 'samba-tool: no such subcommand: -V' '-V' is a valid subcommand The fix is: in samba/netcmd/__init__.py at line 352, replace: continue With: return (self, deferred_args) Without the 'return' it falls down into: # We didn't find a subcommand, but maybe we found e.g. --version print("%s: missing subcommand\n" % (path), file=self.outf) return (self, deferred_args) There is probably a better way of fixing it, but it works for me.
This bug was referenced in samba master: fd59b316b80eac6fc1c2e62193995adc09d099cd 3a408f06aeaceb22ea23f6f6e8118fb8e0490591 8aec198306ed005a815220e6ca3dfed6774290b2 a61e192f25c61fc4f464585f6d4153c26aece352 6f7bc5cb12a687a8851f07788700fb44e134f894