[Samba] clients not connecting to samba shares

Gary Dale gary at extremeground.com
Wed Mar 29 03:34:31 UTC 2023


On 2023-03-28 16:26, Rowland Penny via samba wrote:
>
>
> On 28/03/2023 20:34, Gary Dale via samba wrote:
>
>>>
>> I tried as best I could to remove the old installation with apt purge 
>> samba  && apt autoremove followed by a reboot. When that didn't quite 
>> do the job, I tried apt purge python3-samba && apt autoremove, That 
>> seemed to be a little more thorough. For good measure I also removed 
>> smbclient.
>
> Well that is strange, I normally just remove the smb.conf and run the 
> samba-tool provision command, this should create a new database and 
> smb.conf
>
>>
>> That left me with an apt install samba failing to --configure.
>
> What exactly do you mean by '--configure', I normally connect that 
> with compiling Samba, not with provisioning a new domain.
>
>  It seemed
>> to want an smb.conf file that didn't exist yet. 
>
> If you removed the smb.conf, there wouldn't be one, unless you had 
> re-installed the Samba packages and you would then probably have one 
> for a standalone server, but you say it wanted a smb.conf ????
>
> Running samba-tool
>> domain provision --use-rfc2307 --interactive created one but I noted 
>> that it was picking up the previous values from somewhere... Anyway, 
>> I could then dpkg --configure samba.
>
> Ah, that is where '--configure' is coming from.
> Never run that command, what does it do ?
That configures a partially installed package (one that was downloaded 
but not configured)
>
>>
>> So now I should have a working samba - except I don't.
>>
>> The /var/log/samba/log.samba shows:
>> [2023/03/28 14:56:10.498342,  0] 
>> ../../source4/smbd/server.c:644(binary_smbd_main)
>>    samba version 4.13.13-Debian started.
>>    Copyright Andrew Tridgell and the Samba Team 1992-2020
>> [2023/03/28 14:56:10.498471,  0] 
>> ../../lib/util/become_daemon.c:147(daemon_status)
>>    daemon_status: daemon 'samba' : Starting process...
>> [2023/03/28 14:56:10.596364,  0] 
>> ../../source4/smbd/server.c:920(binary_smbd_main)
>>    binary_smbd_main: samba: using 'prefork' process model
>> [2023/03/28 14:56:10.632970,  0] 
>> ../../source4/smbd/service_task.c:36(task_server_terminate)
>>    task_server_terminate: task_server_terminate: [kdc: 
>> hdb_samba4_create_kdc (setup KDC database) failed]
>> [2023/03/28 14:56:10.641278,  0] 
>> ../../source4/smbd/service_task.c:36(task_server_terminate)
>>    task_server_terminate: task_server_terminate: [kdc: 
>> hdb_samba4_create_kdc (setup KDC database) failed]
>> [2023/03/28 14:56:10.641744,  0] 
>> ../../lib/util/util_runcmd.c:352(samba_runcmd_io_handler)
>>    /usr/sbin/winbindd: Failed to exec child - No such file or directory
>> [2023/03/28 14:56:10.646204,  0] 
>> ../../source4/winbind/winbindd.c:46(winbindd_done)
>>    winbindd daemon died with exit status 255
>> [2023/03/28 14:56:10.646289,  0] 
>> ../../source4/smbd/service_task.c:36(task_server_terminate)
>>    task_server_terminate: task_server_terminate: [winbindd child 
>> process exited]
>> [2023/03/28 14:56:10.648218,  0] 
>> ../../source4/smbd/service_task.c:36(task_server_terminate)
>>    task_server_terminate: task_server_terminate: [kdc: 
>> hdb_samba4_create_kdc (setup KDC database) failed]
>> [2023/03/28 14:56:10.654829,  0] 
>> ../../source4/smbd/service_task.c:36(task_server_terminate)
>>    task_server_terminate: task_server_terminate: [kdc: 
>> hdb_samba4_create_kdc (setup KDC database) failed]
>> [2023/03/28 14:56:10.655864,  0] 
>> ../../lib/util/become_daemon.c:135(daemon_ready)
>>    daemon_ready: daemon 'samba' finished starting up and ready to 
>> serve connections
>> [2023/03/28 14:56:10.656084,  0] 
>> ../../source4/smbd/server.c:391(samba_terminate)
>>    samba_terminate: samba_terminate of samba 3918: kdc: 
>> hdb_samba4_create_kdc (setup KDC database) failed
>
> Did you re-install winbind ?


Here's the install dialog:

# apt install samba
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   attr libcephfs2 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 
libgpgme11 python3-dnspython python3-gpg python3-ldb
   python3-markdown python3-pygments python3-samba python3-talloc 
python3-tdb python3-yaml samba-common
   samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules 
tdb-tools
Suggested packages:
   python3-sniffio python3-trio python-markdown-doc python-pygments-doc 
ttf-bitstream-vera bind9 bind9utils ctdb
   smbldap-tools ufw winbind heimdal-clients
The following NEW packages will be installed:
   attr libcephfs2 libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 
libgpgme11 python3-dnspython python3-gpg python3-ldb
   python3-markdown python3-pygments python3-samba python3-talloc 
python3-tdb python3-yaml samba samba-common
   samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules 
tdb-tools
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/26.1 MB of archives.
After this operation, 91.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y


I'm not sure what the current relationship is between samba and winbind. 
The wiki installation talks about it. I'd have to go back to see whether 
it needs to be installed. I only use samba for some virtual machines so 
I haven't kept pace with the changes...


>
>>
>>
>> Anyway, I purged again and tried reinstalling after removing the 
>> /etc/samba directory - on the theory that it may have been preventing 
>> apt from seeing this as a clean install. However I got the same 
>> errors again. Either there is a flaw in the samba package or there is 
>> something that is making it think it's a reinstall.
>
> From the sound of it, you are re-installing Samba.
>
>>
>> Any idea on how I can completely purge samba from the server?
>>
>>
>
> I see that someone has already posted the 'recipe' whilst I was 
> writing this.
>
> I would ensure that you have these packages installed:
>
> acl attr samba smbclient winbind libnss-winbind libpam-winbind ntp 
> ldb-tools krb5-user python3-setproctitle
>
> Ensure that there is no smb.conf
>
> Then provision Samba with:
>
> samba-tool domain provision --use-rfc2307 --interactive
>
> Answer the questions, if unsure of the answers, please ask.
>
> Rowland
>
Back at it tomorrow. Will keep you posted.



More information about the samba mailing list