[Samba] Can't create users?
rpenny at samba.org
Sat Nov 21 12:03:29 UTC 2020
On 20/11/2020 23:40, Dan Egli wrote:
> Thanks for pointing that one out. I wasn't sure where it was looking
> for the config file. Oh, that particular file does not exist, even
> though I did make install.
The smb.conf file is created by the provision command if this is the
first DC, or the join command if it any subsequent DC.
>> Have you set the PATH to use your new Samba files before any possible
>> Samba files installed elsewhere ?
> I don't have any other samba on here. I can reset the path so that
> /usr/local/samba is first. Don't know what difference that will make
> for samba-tool, but I'll try.
If you have any distro Samba packages installed, then they will be used
before the Samba files you have compiled, so if there isn't any other
Samba installed, then you do not need to alter your PATH.
> I did some experimenting and it seems that configure dies if you use
> --prefix=/usr or --prefix=/usr/local and don't use --enable-fhs.
> Here's what it said:
> Don't install directly under /usr or /usr/local without using the FHS
> option (--enable-fhs)
> ERROR: invalid --prefix=/usr/local value
>>> So I just did:
>>> ./configure --enable-fhs
>>> make && make install
>> That should have worked, have you installed the required dependencies
>> to build Samba ?
> Yes, and samba BUILT fine. It's just giving me issues trying to add
> the user. And putting the samba path first didn't help.
> # samba-tool user create dan
> New Password:
> Retype Password:
> ERROR(<class 'ValueError'>): Failed to add user 'dan': - unable to
> parse dn string
> line 395, in run
> File "/usr/local/samba/lib/python3.7/site-packages/samba/samdb.py",
> line 458, in newuser
> dnsdomain = ldb.Dn(self,
> self.domain_dn()).canonical_str().replace("/", "")
> # echo $PATH
> I'm still open to ideas. I don't know what to think about this error.
I have just built Samba 4.13.2 on Debian 10:
Provisioned a new domain, altered samba-ad-dc.service to point to the
new Samba files in /usr/local/samba, started Samba and added users
If you are still using './configure --enable-fhs' then this could be
your problem, or you may not have all the required dependencies
installed. Unfortunately the Samba wikipage:
doesn't mention Gentoo, so you will need to work out just what you need
yourself from the info on that page.
Sorry, but I cannot really help further, it has been years since I used
More information about the samba