On 11/20/2020 3:35 PM, Rowland penny via samba wrote:> On 20/11/2020 22:22, Dan Egli via samba wrote:
>> Okay, I re-downloaded the Samba source and recompiled it. It started
>> giving me fits until I modified the samba.service file to point to
>> /etc/samba/smb.conf instead of whatever the default was. Then it
>> started fine. But when I go to add a user via samba-tool, I get an
>> error:
>
> Why do move smb.conf ?
>
> If you run <samba -b | grep 'CONFIGFILE'> does the output
show
> /etc/samba/smb.conf ?
>
?? CONFIGFILE: /usr/local/samba/etc/samba/smb.conf
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.
> 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.
>>
>> samba-tool user create dan
>> New Password:
>> Retype Password:
>> ERROR(<class 'ValueError'>): Failed to add user
'dan':? - unable to
>> parse dn string
>> ? File
>>
"/usr/local/samba/lib/python3.7/site-packages/samba/netcmd/user.py",
>> line 395, in run
>> ??? smartcard_required=smartcard_required)
>> ? 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("/", "")
>>
>>
>> How do I fix this? Everthing is using the default path
>> (/usr/local/samba). The only paramater I passed to configure was
>> --enable-fhs since I remember that it croaks without that.
> It shouldn't 'croak' without '--enable-fhs'
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
? File
"/usr/local/samba/lib/python3.7/site-packages/samba/netcmd/user.py",
line 395, in run
??? smartcard_required=smartcard_required)
? 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
/usr/local/samba/bin:/usr/local/samba/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
I'm still open to ideas. I don't know what to think about this error.
--
This email has been checked for viruses by AVG.
https://www.avg.com