Are there any forums specific to Pi 64 bit problems? Samba worked perfectly with the Raspberry Pi OS, but refuses to start on both my Pi 4 and Pi 5 under Tumbleweed.
As always, this might give people the idea that it hurls itself screaming and kicking to the ground. SHOW messages, loggings etc. All what you have that brought you to the conclusion of “refusal”.
Actually, I was asking where to find the proper forum, since this seems to be architecture related more than Samba related. I’ll post back here when I get a chance to start those machines.
This category is appropriate for this topic, but otherwise you could consider posting at the platform-specific forum perhaps
https://forums.raspberrypi.com/
Some more details would be good.
@purevw There is the ARM Mailing List, Matrix and IRC channels… But also holiday time for folks. Perhaps @Guillaume_G can comment.
The messages are less than helpful. When I try to start smb I get
Terminal Command: /bin/systemctl restart smb.service
Job for smb.service failed because the control process exited with error code.
See "systemctl status smb.service" and "journalctl -xeu smb.service" for details
When I access journalctl, I get:
PI4:/home/ronnie # journalctl -xeu smb.service
â–‘â–‘ The job identifier is 3435.
Dec 25 02:18:51 PI4 systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ An ExecStart= process belonging to unit smb.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
Dec 25 02:18:51 PI4 systemd[1]: smb.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ The unit smb.service has entered the 'failed' state with result 'exit-code'.
Dec 25 02:18:51 PI4 systemd[1]: Failed to start Samba SMB Daemon.
â–‘â–‘ Subject: A start job for unit smb.service has failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘
â–‘â–‘ A start job for unit smb.service has finished with a failure.
â–‘â–‘
â–‘â–‘ The job identifier is 3435 and the job result is failed.
The messages for nmb are identical.
I also occasionally get:
Failed to add a watch for /run/user/1000/systemd/ask-password: No such file or directory
That output just confirms the service failed; it doesn’t include the underlying error. Show us the results from testparm and
sudo journalctl -u smb -b --no-pager
Hello,
Check if firewalld is active. If yes do you have configured it for samba?
if you didn’t configure it the best is to stop firewalld (systemctl stop firewalld) and the disable it.
Regards
Philippe
I received approximately the same output. My smb.conf is identical (other than machine name) between 6 Tumbleweed machines in my house, so the warning about the encrypt password is irrelevant as only my 2 Raspberry Pi machines have the smb problem. Here is the output of both commands:
ronnie@PI4:/> testparm
Load smb config files from /etc/samba/smb.conf
lpcfg_do_global_parameter: WARNING: The "encrypt passwords" option is deprecated
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
ronnie@PI4:/> sudo journalctl -u smb -b --no-pager
[sudo] password for root:
Sep 16 10:33:40 PI4 systemd[1]: Starting Samba SMB Daemon...
Sep 16 10:33:41 PI4 systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Sep 16 10:33:41 PI4 systemd[1]: smb.service: Failed with result 'exit-code'.
Sep 16 10:33:41 PI4 systemd[1]: Failed to start Samba SMB Daemon.
Just to verify, I did remove the “encrypt passwords” option from the smb.conf of this machine, with no change in behaviour.
Yes, the Firewall is correctly configured for Samba services. I would never disable a firewall for anything other than testing. I find it hard to believe that a firewall could prevent smb from starting. All it would do is to block communication.
Yes, the Firewall is correctly configured for Samba services. I would never disable a firewall for anything other than testingI find it hard to believe that a firewall could prevent smb from starting. All it would do is to block communication.
ok, then it is not a firewalld problem.
you can add debug verbosity in smb.conf: add “log level = 10” and see if this shows something more.
Regards
Philippe
Run smbd by hand from a root terminal
smbd -i -d 3
Observe/capture the output. That should help pinpoint the failure more explicitly.
You can stop it with CTRL+C.
The output was short. It claimed that it can’t open smb.conf, yet testparm shows it’s there and available. Here is the total output:
PI4:/etc/samba # smbd -i -d 3
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Can't load /etc/samba/smb.conf - run testparm to debug it
smbd - Failed to load config file!
Hmmm…testparm showed no critical issues with reading/processing smb.conf. Please run under strace…
sudo strace -f -e open,access /usr/sbin/smbd -i -d 3
…and see if any permissions issues evident.
Also, check for missing libraries…
ldd /usr/sbin/smbd
Another thought… if these are recent TW installs, then SELinux may be enforcing access controls that are preventing smbd from starting.
Check with
sudo ausearch -m AVC -ts recent | grep smbd
As a temporary measure you could stop enforcement and try restarting smb.service…
sudo setenforce 0
sudo systemctl restart smb
sudo systemctl status smb
If smbd starts successfully after that, then SELinux is the issue. Report back
Re-enable enforcement with
sudo setenforce 1
It is an selinux issue. Both smb and nmb started without issue with it disabled. I know very little concerning selinux. What would be the next steps? Is this a bug or simply a configuration issue?
I modified my selinux “config” file to read:
# This file controls the state of SELinux on the system.
# SELinux can be completly disabled with the "selinux=0" kernel
# commandline option.
#
# SELINUX= can take one of these two values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# Previously SELinux could be disabled by changing the value to
# 'disabled'. This is deprecated and should not be used anymore.
# If you want to disable SELinux add 'selinux=0' to the kernel
# command line. For details see
# https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-runtime-disable
SELINUX=permissive
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
SELINUXTYPE=targeted
Samba works correctly under these settings. Please let me know if that config is appropriate or not. I do not conside a Raspberry Pi to be a high risk machine.