Samba isn't working anymore

When the service times out there’s two options

  1. your config
  2. partially sync

Run the checkparm utility

testparm

Ensure you have an up-to-date mirror and do a full system sync.

sudo pacman-mirrors --continent && sudo pacman -Syyu

It didn’t work

Hey quick question what should be the output of following

ls -la /var/lib/samba/private/
ls -la /var/lib/samba/private/msg.sock/

Should it be same for everyone or is it depend from user to user

When I say config I mean of course smb.conf but also the permissions on the filesystem which are equally important as the smb service doen’t allow more than the filesystem allows for.

What are you sharing - from where?

If you are sharing folders inside your home - remember that on a Manjaro system a user’s home permissions is restricted to the user and the user’s own group. This effectively blocks any access to any folder inside the user’s home.


It may be useful to look at the journat

journalctl -xeu smb.service

I’m sharing from a directory which is not in home
and the output of the command which you posted

journalctl -xeu smb.service                                                                                                      1 ✘  1m 34s  
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has finished with a failure.
░░ 
░░ The job identifier is 1952 and the job result is failed.
Aug 14 14:26:42 shank systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smb.service has begun execution
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has begun execution.
░░ 
░░ The job identifier is 3148.
Aug 14 14:26:42 shank smbd[5401]: [2022/08/14 14:26:42.183883,  0] ../../source3/smbd/server.c:1741(main)
Aug 14 14:26:42 shank smbd[5401]:   smbd version 4.16.4 started.
Aug 14 14:26:42 shank smbd[5401]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 14 14:28:12 shank systemd[1]: smb.service: start operation timed out. Terminating.
Aug 14 14:28:12 shank systemd[1]: smb.service: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit smb.service has entered the 'failed' state with result 'timeout'.
Aug 14 14:28:12 shank systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smb.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has finished with a failure.
...skipping...
░░ 
░░ A start job for unit smb.service has finished with a failure.
░░ 
░░ The job identifier is 1952 and the job result is failed.
Aug 14 14:26:42 shank systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smb.service has begun execution
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has begun execution.
░░ 
░░ The job identifier is 3148.
Aug 14 14:26:42 shank smbd[5401]: [2022/08/14 14:26:42.183883,  0] ../../source3/smbd/server.c:1741(main)
Aug 14 14:26:42 shank smbd[5401]:   smbd version 4.16.4 started.
Aug 14 14:26:42 shank smbd[5401]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 14 14:28:12 shank systemd[1]: smb.service: start operation timed out. Terminating.
Aug 14 14:28:12 shank systemd[1]: smb.service: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit smb.service has entered the 'failed' state with result 'timeout'.
Aug 14 14:28:12 shank systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smb.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has finished with a failure.
░░ 
░░ The job identifier is 3148 and the job result is failed.
lines 81-110/110 (END)

and yes I did testparm for smb.conf file by

sudo testparm /etc/samba/smb.conf

Have you - by any chance - enabled the samba.service?

If yes - you must stop and disable it

systemctl disable --now samba.service

You can get more info from the journal be removing the error filter

journalctl -xu smb.service

Perhaps you should check the nmb.service as well

journalctl -xu nmb.service

Samba v4.16.4 work as expected - the services starts as expected and provides the expected answers when queried.

Server 1

$ inxi -S
System:
  Host: tiger Kernel: 5.15.60-1-MANJARO arch: x86_64 bits: 64 Console: pty pts/1
    Distro: Manjaro Linux

Server 2

$ inxi -S
System:
  Host: pw0 Kernel: 5.15.56-1-MANJARO-ARM-RPI arch: aarch64 bits: 64 Console: pty pts/0
    Distro: Manjaro ARM

I think I’m gonna start a new thread since after update, my samba service is able to start and working fine… But I can’t connect to samba service… that weird :face_with_raised_eyebrow:

No it’s not

samba service is an AD controller service - very few users need that service.

I’m created my own thread since my problem is not same as this thread, Thank you :heart:
(This thread samba service timeout, but my Samba service is running but I can’t connect to my Samba)

At the beginning of this thread I had this same issue where service was running but I was unable to connect it

I didn’t know this

I sometime use

python -m http.server

it’s good too for sharing file but if somehow I could use this in x-plore app I just don’t know if it’s LAN, or something else. I know samba act as LAN for exploring file over network but if I could use
python -m http.server the same way I would use it , it’s lot easier. There has to be another way to use it other than web browser

oh this was helpful
now I’m here

journalctl -xeu samba.service                                                                                              1 ✘  5s  
Aug 15 12:56:47 shank samba[6675]: [2022/08/15 12:56:47.488618,  0] ../../lib/util/become_daemon.c:150(daemon_status)
Aug 15 12:56:47 shank samba[6675]:   daemon_status: daemon 'samba' : Starting process...
Aug 15 12:56:47 shank samba[6675]: [2022/08/15 12:56:47.527221,  0] ../../source4/samba/server.c:851(binary_smbd_main)
Aug 15 12:56:47 shank samba[6675]:   At this time the 'samba' binary should only be used for either:
Aug 15 12:56:47 shank samba[6675]:   'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or >
Aug 15 12:56:47 shank samba[6675]:   You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Aug 15 12:56:47 shank samba[6675]: [2022/08/15 12:56:47.527375,  0] ../../lib/util/become_daemon.c:119(exit_daemon)
Aug 15 12:56:47 shank samba[6675]:   exit_daemon: daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, err>
Aug 15 12:56:47 shank systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ An ExecStart= process belonging to unit samba.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Aug 15 12:56:47 shank systemd[1]: samba.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit samba.service has entered the 'failed' state with result 'exit-code'.
Aug 15 12:56:47 shank systemd[1]: Failed to start Samba AD Daemon.
░░ Subject: A start job for unit samba.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit samba.service has finished with a failure.
░░ 
░░ The job identifier is 2771 and the job result is failed.
lines 53-82/82 (END

I just don’t know how to fix

samba.service: Failed with result 'exit-code

Hi!!
I think that, maybe, something has changed upstream and from then Samba sharing doesn’t work as used to do. Since the last two stable updates I’ve seen some similar threads reporting issues with Samba:

https://forum.manjaro.org/search?q=samba%20order%3Alatest

I also have this problems myself, with error messages like “net usershare add: malformed acl (missing ‘:’).” or “net usershare add: cannot convert name “Everyone” to a SID. The transport connection is now disconnected…” when I try to interact with my shared folder.

Just my 2¢.

Best regards!! :smiley::smiley:

2 Likes

I told you

I have successfully disabled samba.service since users don’t need it
but how do I fix smb.service I need this

journalctl -xeu smb.service                                                                                                      1 ✘  1m 30s  
Aug 15 14:14:18 shank smbd[2637]:   [0000] 2B C6 51 09 28 21 78 B4   04 70 61 C6 5E A7 A0 17   +.Q.(!x. .pa.^...
Aug 15 14:14:18 shank smbd[2637]: pam_unix(samba:session): session closed for user nobody
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.129041,  0] ../../libcli/smb/smb2_signing.c:722(smb2_signing_check_pdu)
Aug 15 14:14:20 shank smbd[2639]:   Bad SMB2 (sign_algo_id=0) signature for message
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.129341,  0] ../../lib/util/util.c:569(dump_data)
Aug 15 14:14:20 shank smbd[2639]:   [0000] DB 10 AE 86 5C 8A E8 B8   1D 0A 24 6D EF 79 BA 67   ....\... ..$m.y.g
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.129471,  0] ../../lib/util/util.c:569(dump_data)
Aug 15 14:14:20 shank smbd[2639]:   [0000] 25 0E F1 B4 18 7D 60 AF   CC 2C 59 C9 DD 89 A9 FD   %....}`. .,Y.....
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.139321,  0] ../../libcli/smb/smb2_signing.c:722(smb2_signing_check_pdu)
Aug 15 14:14:20 shank smbd[2639]:   Bad SMB2 (sign_algo_id=0) signature for message
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.139700,  0] ../../lib/util/util.c:569(dump_data)
Aug 15 14:14:20 shank smbd[2639]:   [0000] A5 44 35 7C 87 AD 77 36   A8 0D 39 C0 D0 49 4C 52   .D5|..w6 ..9..ILR
Aug 15 14:14:20 shank smbd[2639]: [2022/08/15 14:14:20.140137,  0] ../../lib/util/util.c:569(dump_data)
Aug 15 14:14:20 shank smbd[2639]:   [0000] B4 37 9A 98 0A 99 49 CB   40 C7 95 DA C4 B2 E8 79   .7....I. @......y
Aug 15 14:14:20 shank smbd[2639]: pam_unix(samba:session): session closed for user nobody
Aug 15 14:14:27 shank systemd[1]: smb.service: start operation timed out. Terminating.
Aug 15 14:14:27 shank systemd[1]: smb.service: Failed with result 'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ The unit smb.service has entered the 'failed' state with result 'timeout'.
Aug 15 14:14:27 shank systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smb.service has failed
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has finished with a failure.
░░ 
░░ The job identifier is 2158 and the job result is failed.
lines 114-143/143 (END)

and yes I did testparm on /etc/samba/smb.conf

I wonder why I can’t find a smb.conf in this thread. Do you have, by any chance, enabled mandatory smb signing? What OS are the clients?

I’m using my phone to access it there is an app called x-plore.

yes I do use username and password to access it

Guess your phone app only supplies SMB1 which newer samba releases have disabled.
You should add a ‘client min protocol=NT1’ to your smb.conf (global section). Also use IP addresses instead of names which probably will disappear since nmbd is a dead horse.

My samba start working again I disabled Apparmor by

sudo systemctl disable apparmor

I found solution on this thread for some user it’s working by editing apparmor in

/etc/apparmor.d/local/usr.sbin.smbd

but for me it worked by completely disabling it.

1 Like

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