Smb could not start?

Hello Everyone

I Need Help with smb and nmb

╰─λ garuda-inxi
System:
Kernel: 6.8.9-zen1-2-zen arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=b72cd600-d0b8-4182-a6d2-451d0c3294ef rw rootflags=subvol=@
quiet loglevel=3 ibt=off
Desktop: KDE Plasma v: 6.0.4 tk: Qt v: N/A info: frameworks v: 6.2.0
wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Desktop Mobo: MSI model: B150 GAMING M3 (MS-7978) v: 2.0
serial: <superuser required> uuid: <superuser required>
UEFI-[Legacy]: American Megatrends v: B.10 date: 09/06/2015
CPU:
Info: model: Intel Core i5-6500 bits: 64 type: MCP arch: Skylake-S
gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
model-id: 0x5E (94) stepping: 3 microcode: 0xF0
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
desc: 1x6 MiB
Speed (MHz): avg: 2843 high: 3527 min/max: 800/3600 scaling:
driver: intel_pstate governor: performance cores: 1: 3523 2: 3524 3: 800
4: 3527 bogomips: 25599
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: Micro-Star MSI
driver: nvidia v: 550.78 alternate: nouveau,nvidia_drm non-free: 545.xx+
status: current (as of 2024-04; EOL~2026-12-xx) arch: Maxwell code: GMxxx
process: TSMC 28nm built: 2014-2019 pcie: gen: 3 speed: 8 GT/s lanes: 16
ports: active: none off: DP-1,HDMI-A-1 empty: DVI-D-1,DVI-I-1
bus-ID: 01:00.0 chip-ID: 10de:13c2 class-ID: 0300
Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 23.2.6
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1600x900 s-dpi: 91 s-size: 446x251mm (17.56x9.88")
s-diag: 512mm (20.15")
Monitor-1: DP-1 mapped: DP-0 note: disabled pos: primary
model: Dell P2010H serial: <filter> built: 2010 res: 1600x900 hz: 60 dpi: 92
gamma: 1.2 size: 443x249mm (17.44x9.8") diag: 508mm (20") ratio: 16:9
modes: max: 1600x900 min: 640x480
Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled model: HDTV built: 2014
res: 1600x900 size: 575x323mm (22.64x12.72") modes: max: 1366x768
min: 640x480
API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
inactive: wayland,device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.78
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
memory: 3.91 GiB
API: Vulkan v: 1.3.279 layers: 7 device: 0 type: discrete-gpu
name: NVIDIA GeForce GTX 970 driver: nvidia v: 550.78 device-ID: 10de:13c2
surfaces: xcb,xlib
Audio:
Device-1: Intel 100 Series/C230 Series Family HD Audio
vendor: Micro-Star MSI driver: snd_hda_intel v: kernel
alternate: snd_soc_avs bus-ID: 00:1f.3 chip-ID: 8086:a170 class-ID: 0403
Device-2: NVIDIA GM204 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:0fbb class-ID: 0403
API: ALSA v: k6.8.9-zen1-2-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.0.6 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Qualcomm Atheros Killer E2400 Gigabit Ethernet
vendor: Micro-Star MSI driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: d000 bus-ID: 05:00.0 chip-ID: 1969:e0a1 class-ID: 0200
IF: enp5s0 state: down mac: <filter>
Device-2: Realtek RTL8188FTV 802.11b/g/n 1T1R 2.4G WLAN Adapter
driver: rtl8xxxu type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0
bus-ID: 1-4:2 chip-ID: 0bda:f179 class-ID: 0000 serial: <filter>
IF: wlp0s20f0u4 state: up mac: <filter>
IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter>
IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter>
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-7:3
chip-ID: 0a12:0001 class-ID: fe01
Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 2.0
lmp-v: 3 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
Local Storage: total: 2.29 TiB used: 1.49 TiB (65.0%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: TeamGroup model: T253X2512G
size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 2A0 scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD1002FBYS-18W8B0 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 3.0 Gb/s tech: HDD rpm: 7200 serial: <filter>
fw-rev: 0C09 scheme: MBR
ID-3: /dev/sdc maj-min: 8:32 vendor: Toshiba model: MQ04UBF100
size: 931.51 GiB block-size: physical: 512 B logical: 512 B type: USB
rev: 2.1 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: HDD rpm: 5400
serial: <filter> fw-rev: 5438 scheme: MBR
Partition:
ID-1: / raw-size: 118.04 GiB size: 118.04 GiB (100.00%)
used: 20.63 GiB (17.5%) fs: btrfs dev: /dev/sda7 maj-min: 8:7
ID-2: /home raw-size: 233.4 GiB size: 233.4 GiB (100.00%)
used: 85.82 GiB (36.8%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
ID-3: /var/log raw-size: 118.04 GiB size: 118.04 GiB (100.00%)
used: 20.63 GiB (17.5%) fs: btrfs dev: /dev/sda7 maj-min: 8:7
ID-4: /var/tmp raw-size: 118.04 GiB size: 118.04 GiB (100.00%)
used: 20.63 GiB (17.5%) fs: btrfs dev: /dev/sda7 maj-min: 8:7
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 15.56 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 30.8 C pch: 32.5 C mobo: N/A gpu: nvidia
temp: 33 C
Fan Speeds (rpm): N/A gpu: nvidia fan: 36%
Info:
Memory: total: 16 GiB available: 15.56 GiB used: 4.15 GiB (26.7%)
Processes: 347 Power: uptime: 24m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 6.18 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 255 default: graphical
tool: systemctl
Packages: 1934 pm: pacman pkgs: 1928 libs: 574 tools: octopi,paru
pm: flatpak pkgs: 6 Compilers: gcc: 14.1.1 Shell: garuda-inxi default: fish
v: 3.7.1 running-in: konsole inxi: 3.3.34
Garuda (2.6.26-1):
System install date:     2024-04-26
Last full system update: 2024-05-15 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       <superuser required>
Failed units:            nmb.service smb.service

######################################################
all permissions are given to the active user but smb still wouldn’t start
do I have a missing file from samba

╰─λ whereis samba
samba: /usr/bin/samba /usr/lib/samba /etc/samba /usr/share/samba /usr/share/man/man7/samba.7.gz /usr/share/man
/man8/samba.8.gz
journalctl -xeu nmb.service
ماي 15 10:27:18 mrwan-ms7978 nmbd[101202]: [2024/05/15 10:27:18.632915,  0] ../../source3/nmbd/nmbd.c:901(mai>
ماي 15 10:27:18 mrwan-ms7978 nmbd[101202]:   nmbd version 4.20.1 started.
ماي 15 10:27:18 mrwan-ms7978 nmbd[101202]:   Copyright Andrew Tridgell and the Samba Team 1992-2024
ماي 15 10:27:18 mrwan-ms7978 nmbd[101202]: [2024/05/15 10:27:18.633076,  0] ../../source3/nmbd/nmbd.c:921(mai>
ماي 15 10:27:18 mrwan-ms7978 nmbd[101202]:   main: Failed to init messaging context!
ماي 15 10:27:18 mrwan-ms7978 systemd[1]: nmb.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 nmb.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
ماي 15 10:27:18 mrwan-ms7978 systemd[1]: nmb.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit nmb.service has entered the 'failed' state with result 'exit-code'.
ماي 15 10:27:18 mrwan-ms7978 systemd[1]: Failed to start Samba NMB Daemon.
░░ Subject: A start job for unit nmb.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit nmb.service has finished with a failure.
░░
░░ The job identifier is 4510 and the job result is failed.
lines 79-105/105 (END)

First of all, this means that a reboot is pending. You never can say…
Maybe check the Arch wiki, e.g.
https://wiki.archlinux.org/title/Samba#Failed_to_start_Samba_SMB/CIFS_server

sudo chmod 0755 /var/cache/samba/msg

and restart service?

2 Likes

the system has rebooted 3 times .

╰─λ sudo chmod 0755 /var/cache/samba/msg
[sudo] password for mrwan:
chmod: cannot access '/var/cache/samba/msg': No such file or directory

should i create msg file ?

# Global parameters
[global]
client min protocol = SMB2
dns proxy = No
log file = /var/log/samba/%m.log
map to guest = Bad Password
max log size = 1000
name resolve order = lmhosts bcast host wins
obey pam restrictions = Yes
pam password change = Yes
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
passwd program = /usr/bin/passwd %u
security = USER
server min protocol = SMB2
server role = standalone server
unix password sync = Yes
usershare allow guests = Yes
usershare max shares = 100
usershare path = /var/lib/samba/usershare
idmap config * : backend = tdb
force create mode = 0070
force directory mode = 0070


[homes]
browseable = No
comment = Home Directories
create mask = 0700
directory mask = 0700
valid users = %S


[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers


[Public]
comment = public share
guest ok = Yes
path = /samba/public
read only = Yes

I Checked but still cant find the problem .

╰─λ systemctl status smb.service
× smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-05-15 12:18:06 EET; 52s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 589026 (code=exited, status=1/FAILURE)
CPU: 44ms

ماي 15 12:18:06 mrwan-ms7978 systemd[1]: Starting Samba SMB Daemon...
ماي 15 12:18:06 mrwan-ms7978 smbd[589026]: [2024/05/15 12:18:06.533623,  0] ../../source3/smbd/server.c:1746(>
ماي 15 12:18:06 mrwan-ms7978 smbd[589026]:   smbd version 4.20.1 started.
ماي 15 12:18:06 mrwan-ms7978 smbd[589026]:   Copyright Andrew Tridgell and the Samba Team 1992-2024
ماي 15 12:18:06 mrwan-ms7978 systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
ماي 15 12:18:06 mrwan-ms7978 systemd[1]: smb.service: Failed with result 'exit-code'.
ماي 15 12:18:06 mrwan-ms7978 systemd[1]: Failed to start Samba SMB Daemon.

Try reinstalling samba:

sudo pacman -S samba samba-support

and reboot.

Then check the status:

systemctl status smb.service

and:

systemctl status nmb.service
3 Likes

thanks but re installing samba was the first thing i tried unless there is a way to start from scratch without reinstalling the entire system
reinstalling and rebooting will not be the answer .

sudo systemctl start smb.service
sudo systemctl start nmb.service
sudo systemctl enable smb.service
sudo systemctl enable nmb.service
  1. reboot and check the status again.
sudo systemctl start smb.service
[sudo] password for mrwan:
Failed to start smb.service: Unit smb.service not found.
╭─mrwan@mrwan in ~ as 🧙 took 5s
[🔴] × sudo systemctl enable smb.service
Failed to enable unit: Unit file smb.service does not exist.
╭─mrwan@mrwan in ~ as 🧙 took 366ms
╰─λ sudo systemctl start 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.
╭─mrwan@mrwan in ~ as 🧙 took 85ms
[🔴] × journalctl -xeu smb.service
░░
░░ The job identifier is 3834.
ماي 15 20:22:46 mrwan-ms7978 smbd[161447]: [2024/05/15 20:22:46.737577,  0] ../../source3/smbd/server.c:1746(>
ماي 15 20:22:46 mrwan-ms7978 smbd[161447]:   smbd version 4.20.1 started.
ماي 15 20:22:46 mrwan-ms7978 smbd[161447]:   Copyright Andrew Tridgell and the Samba Team 1992-2024
ماي 15 20:22:46 mrwan-ms7978 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.
ماي 15 20:22:46 mrwan-ms7978 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'.
ماي 15 20:22:46 mrwan-ms7978 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 3834 and the job result is failed.

Did you trying this : testparm - check ?

an smb.conf configuration file for internal correctness

https://www.samba.org/samba/docs/current/man-html/testparm.1.html

yes its here

so it look near mine but i dont have the [Public] Section .
did you trying after the test config to start the smb and nmb.service again?

mine is working . Ive installed a fresh samba for testing it but dont have the errors.

i know if you have a little mistake in your config file it cause the exit code 1 or disable or commenting out samba-ad-ac thats what i had last year=)

Everything fails then. And even though you reinstalled samba, the services don’t exist. That’s why samba doesn’t start.
I’ve also just tested it to rule out that it’s a general problem: everything runs smoothly.

The steps you have already tried during troubleshooting belong in the starting post :wink:

Since when have you had the problem?
Is the Samba installation fresh or did the issue occur while Samba was already installed?
What happened before, a system update? Anything installed? Anything else changed?

Have you searched the internet to see if anyone has the same problem?

Just to be sure, you have samba-support installed?

4 Likes

can I have a copy of the default config file .

It was ruining before system cleaning I ran remove orphans from garuda welcome app
KDE windows shares no longer appear in the settings .

yes of course here my config

[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
client min protocol = SMB2
server min protocol = SMB2
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
map to guest = Bad Password
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = nobody
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare owner only = yes
force create mode = 0070
force directory mode = 0070

[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

hope it will work on yours too =)

its saved in /etc/samba/smb.conf

3 Likes

That explains a lot. If you remove orphaned-packages, you should first check whether they are not still needed by other packages.

Do you mean smb4k?

It would be easiest if you could load and restore a snapshot from before you cleaned the orphans.

If that doesn’t work, we’ll have to look at your pacman.log and find out what was uninstalled on the date in question.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.