Samba-tool error

I get the following error when using samba-tool ntacl set -h:

ERROR(<class ‘ModuleNotFoundError’>): uncaught exception - No module named ‘samba.samdb’

I made sure python3-samba was installed. I tried using pip3 install samba , but that threw up errors about the wheel package which seems to be install already … I’m a bit lost.

Any guidance?

I thought I should add that I want to use the samba-tool to setup permissions on the files such the translation works back. Right now if I just use setfacl I can only set permissions that apply to “this folder only” and not “this folder sub-folders and files”.

Or maybe that just doesn’t matter and I shouldn’t worry about it?

I usually just use the group stickybit, so if I have a group called sambagroup, I can do something like this:

mkdir dir01
chown :sambagroup dir01
chmod g+s dir01

then every new file or directory created inside dir01 will automatically have the sambagroup assigned. The sambagroup you can use in the samba.conf file.

Thank you for this. It is very helpful.

I assume you compiled from source, because the repo don’t give you a version of samba that is compatible with Domain. If you built from source then you need to add the /user/local/samba/bin to the path.

export PATH=/usr/local/samba/bin/:/usr/local/samba/sbin/:$PATH

you can add the line to your bash profile as well


I didn’t compile from source. I learned that repos do provide a samba-tool binary, but don’t provide a working samba-tool. The server I am setting up is a domain member.

I know that when a windows PC applies NTFS permissions to files and directories in a Samba share, Samba uses a combo of ACLs and attributes to store “NTFS permissions”. I was hoping there was a tool in Linux I could use to read and apply those. Seemed like samab-tool may do that, but can’t investigate that as a working samba-tool is not in the repos.