Forum

Full Version: Samba: No shares available after bullseye update
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After the bullseye update, I have no samba shares available anymore.

testparm on smb.conf gives the following:
Terminal
xbian@xbian /etc/samba $ testparm
Load smb config files from /etc/samba/smb.conf
lpcfg_do_global_parameter: WARNING: The "syslog" option is deprecated
lpcfg_do_global_parameter: WARNING: The "encrypt passwords" option is deprecated
regdb_init: Failed to open registry /var/lib/samba/registry.tdb (Permission denied)
Failed to initialize the registry: WERR_ACCESS_DENIED
error initializing registry configuration: SBC_ERR_BADFILE
Error loading services.

I can't enter the folder /var/log/samba (it's rights are root:adm, but even after changing that to root:root I can't get in there)

While checking on apt-get update & upgrade, it gives the following message:

Terminal
The following packages have been kept back:
elogind libelogind0

smb.conf:
Terminal
# DO NOT EDIT THIS FILE. FOR ADDITIONAL SETTINGS OR SHARES DEFINITION
# USE 'net' (man net).

[global]
server string = XBIAN
guest ok = yes
security = user
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
registry shares = yes
syslog = 0
map to guest = bad user
workgroup = WORKGROUP
bind interfaces only = No
encrypt passwords = true
log level = 0
# smb ports = 445
unix extensions = No
wide links = yes

# Some routers requires following performance tweaks
# (see http://forum.xbian.org/thread-3851.html)
# Uncomment following 3 lines if necessary

# aio read size = 2048
# aio write size = 2048
# socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

include = /etc/samba/user.conf
include = /etc/samba/shares.conf

Even when i comment the shares.conf, the service won't start.
When I run the service status cmd, it returns:
Terminal
xbian@xbian ~ $ sudo service smbd restart
stop: Unknown instance:
smbd stop/pre-start, process 6369
xbian@xbian ~ $ sudo service smbd status
smbd stop/waiting
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.
(14th Sep, 2021 04:59 PM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.
Thanks. However, I followed your tip and removed this line in smb.conf, but to no avail.
@jakenl

Usually smbd service is not necessary because smb process will lauched via inetd daemon

See /etc/default/samba

Terminal

cat /etc/default/samba
#
# Run mode of Samba (smbd) process. If set to 'inetd', smbd is
# being spawned by inetd daemon on request, otherwise smbd is
# started as daemon via smbd upstart job. After changing this
# variable, you have to run 'sudo xbian-config services select'
# or reboot system
#
RUN_MODE=daemon

I have just the last few days again intensively busy with Samba (integration of the wsdd daemon so that win10 clients XBian also finally see), I can not find any problem with Samba.
Currently I have samba as a service in use

Maybe it is a good idea to get rid of elogind
see my post here:
http://forum.xbian.org/thread-4129-post-37157.html#pid37157

But I can't imagine that this is the reason for your samba problems

If you can't change to a directory, it sounds to me like a filesystem problem, maybe the sd-card is broken.

What says sudo btrfs scrub start /
and then watch btrfs scrub status /
@Zarquon, for me it doesn't matter if wide links are set or not. Samba always works here
(14th Sep, 2021 05:05 PM)jakenl Wrote: [ -> ]
(14th Sep, 2021 04:59 PM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.
Thanks. However, I followed your tip and removed this line in smb.conf, but to no avail.

Have you tried turning logging on? Any errors?
(15th Sep, 2021 05:09 AM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 05:05 PM)jakenl Wrote: [ -> ]
(14th Sep, 2021 04:59 PM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.
Thanks. However, I followed your tip and removed this line in smb.conf, but to no avail.

Have you tried turning logging on? Any errors?

He can't get into /var/log/samba, How should he be able to look at logfiles there?
(15th Sep, 2021 03:16 AM)Nachteule Wrote: [ -> ]@jakenl

Usually smbd service is not necessary because smb process will lauched via inetd daemon

See /etc/default/samba

Terminal

cat /etc/default/samba
#
# Run mode of Samba (smbd) process. If set to 'inetd', smbd is
# being spawned by inetd daemon on request, otherwise smbd is
# started as daemon via smbd upstart job. After changing this
# variable, you have to run 'sudo xbian-config services select'
# or reboot system
#
RUN_MODE=daemon

I have just the last few days again intensively busy with Samba (integration of the wsdd daemon so that win10 clients XBian also finally see), I can not find any problem with Samba.
Currently I have samba as a service in use

Maybe it is a good idea to get rid of elogind
see my post here:
http://forum.xbian.org/thread-4129-post-37157.html#pid37157

But I can't imagine that this is the reason for your samba problems

If you can't change to a directory, it sounds to me like a filesystem problem, maybe the sd-card is broken.

What says sudo btrfs scrub start /
and then watch btrfs scrub status /
For me it was RUN_MODE=inetd. I changed to daemon and Samba can be seen running as a service now. No shares

I removed the elogind according your other posts. Rebooted: Samba running, no shares.

I did the scrub commands with this as a result:

Terminal
Every 2.0s: btrfs scrub status / xbian: Tue Sep 14 23:29:39 2021

ERROR: getting dev info for scrub failed: Operation not permitted

Well, I ran the watch command as sudo, that gives more information:
Terminal

UUID: e0d9ab5f-0fcc-43a2-a254-25b4dc3824c5
Scrub started: Tue Sep 14 23:32:57 2021
Status: running
Duration: 0:00:35
Time left: 0:02:13
ETA: Tue Sep 14 23:35:46 2021
Total to scrub: 4.06GiB
Bytes scrubbed: 861.62MiB (120.73)
Rate: 24.62MiB/s
Error summary: no errors found
I realized that it is a live 'watch', so I ran the watch command again and waited until finish:
Terminal
UUID: e0d9ab5f-0fcc-43a2-a254-25b4dc3824c5
Scrub started: Tue Sep 14 23:32:57 2021
Status: finished
Duration: 0:02:44
Total to scrub: 4.06GiB
Rate: 25.34MiB/s
Error summary: no errors found

(15th Sep, 2021 06:53 AM)Nachteule Wrote: [ -> ]
(15th Sep, 2021 05:09 AM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 05:05 PM)jakenl Wrote: [ -> ]
(14th Sep, 2021 04:59 PM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.
Thanks. However, I followed your tip and removed this line in smb.conf, but to no avail.

Have you tried turning logging on? Any errors?

He can't get into /var/log/samba, How should he be able to look at logfiles there?
in /var/log there are 2 folders with root:adm rights and both are not accessible (the second is named 'unattended upgrades'). I deleted the samba folder and recreated as root.
After restart of the smbd service, this is the llog file:
Terminal
xbian@xbian /var/log/samba $ cat log.smbd
[2021/09/14 23:39:05.247526, 0] ../../source3/smbd/server.c:1784(main)
smbd version 4.13.5-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/09/14 23:39:05.312899, 0] ../../lib/util/become_daemon.c:135(daemon_ready)
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/09/14 23:39:05.331094, 0] ../../source3/lib/util_sock.c:334(open_socket_in)
open_socket_in(): socket() call failed: Address family not supported by protocol
[2021/09/14 23:39:05.331394, 0] ../../source3/smbd/server.c:1076(smbd_open_one_socket)
smbd_open_one_socket: open_socket_in: Address family not supported by protocol
[2021/09/14 23:39:05.343131, 0] ../../source3/lib/util_sock.c:334(open_socket_in)
open_socket_in(): socket() call failed: Address family not supported by protocol
[2021/09/14 23:39:05.343423, 0] ../../source3/smbd/server.c:1076(smbd_open_one_socket)
smbd_open_one_socket: open_socket_in: Address family not supported by protocol
OK, this seems to be related to ipv-6, nothing to worry about.
Hmmm, the log file looks exactly the same for me. I'm slowly running out of ideas as to what else this could be.
the file /etc/samba/shares.conf is correct, right?

By the way, if "wide links = Yes" is set, smbd starts, but I can't access any share from client side. why I disabled wide links, I can't say anymore. Tested this with 2 total different XBian installations (one is RPi4, the other one is stone old RPi1)

I tested this on my last remaining Buster installation, there "wide links = Yes" still works. So it must be the newer Samba, I will probably have to adjust the smb.conf accordingly
(15th Sep, 2021 09:46 PM)Nachteule Wrote: [ -> ]Hmmm, the log file looks exactly the same for me. I'm slowly running out of ideas as to what else this could be.
the file /etc/samba/shares.conf is correct, right?

By the way, if "wide links = Yes" is set, smbd starts, but I can't access any share from client side. why I disabled wide links, I can't say anymore. Tested this with 2 total different XBian installations (one is RPi4, the other one is stone old RPi1)

I tested this on my last remaining Buster installation, there "wide links = Yes" still works. So it must be the newer Samba, I will probably have to adjust the smb.conf accordingly
running the testparm as normal user created those errors, including a remark 'Failed to open registry /var/lib/samba/registry.tdb'. Running the same command with sudo fixed that.
In the mean time i renamed the registry.tdb and restarted the service. the file was immediately recreated.

Funny enough, the existing shares I still couldn't reach on my chromebook, but when I added a new share, the available samba shares showed up in the options. I therefore deleted the existing shares on the chromebook and recreated them by adding them one by one.

Problem solved, I only don't know what triggered both the error and the solution.

Am I currently better of using the run_mode deamon or inetd? (sudo service smbd restart is a rather easy way of restarting samba after changes)
inetd is usually sufficient, and you never need to restart the smb, since it is automatically stopped by inetd after a few minutes of inactivity anyway. And you save a little bit of memory, but that should be secondary nowadays
(16th Sep, 2021 07:23 AM)Nachteule Wrote: [ -> ]inetd is usually sufficient, and you never need to restart the smb, since it is automatically stopped by inetd after a few minutes of inactivity anyway. And you save a little bit of memory, but that should be secondary nowadays
Ah, I see. Thanks for your help and suggestions!
(14th Sep, 2021 04:59 PM)Zarquon Wrote: [ -> ]
(14th Sep, 2021 06:17 AM)jakenl Wrote: [ -> ]After the bullseye update, I have no samba shares available anymore.
I had the same problem and noticed that in the following error
Terminal
Error loading module '/usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so': /usr/lib/arm-linux-gnueabihf/samba/vfs/widelinks.so: cannot open shared object file: No such file or directory
in the /var/logs/samba/[<CLIENTNAME> logfile.

I commented out the "wide links = yes" in the smb.conf file and it started working. Not the best fix but it worked.

Same problem:
But the solution is also in the error message. Samba can reload modules, here the widelinks module is needed. However, the package samba-vfs-modules is needed to reload the modules.
After apt-get install samba-vfs-modules, the Samba share worked again.
BTW, this can be a security problem, so only set wide links to yes if it is really needed.
(10th Dec, 2021 09:54 PM)ofJazz Wrote: [ -> ]Same problem:
But the solution is also in the error message. Samba can reload modules, here the widelinks module is needed. However, the package samba-vfs-modules is needed to reload the modules.
After apt-get install samba-vfs-modules, the Samba share worked again.
BTW, this can be a security problem, so only set wide links to yes if it is really needed.

Thanks for the hint. I have fixed this here
Reference URL's