I have samba failure message but it does work (ish)

I am very new to linux and decided to try Manjaro KDE Plasma. I have been watching this video youtube . com / watch?v=3BnHHP7Fmo0 to understand how to maintain arch base distro. In the video he recommends to run few commands in terminal to check for errors, so i run and got some failure with samba here

[moshe@tv ~]$ systemctl --failed
  UNIT          LOAD   ACTIVE SUB    DESCRIPTION    
● samba.service loaded failed failed Samba AD Daemon

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SU>
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed.


[moshe@tv ~]$ systemctl status samba.service                         
● samba.service - Samba AD Daemon
     Loaded: loaded (/usr/lib/systemd/system/samba.service; enabled; ven>
     Active: failed (Result: exit-code) since Sat 2020-10-10 10:28:24 ID>
       Docs: man:samba(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 831 ExecStart=/usr/bin/samba --foreground --no-process-grou>
   Main PID: 831 (code=exited, status=1/FAILURE)
     Status: "daemon failed to start: Samba detected misconfigured 'serv>
      Error: 22 (Invalid argument)

Oct 10 10:28:24 tv samba[831]:   Copyright Andrew Tridgell and the Samba>
Oct 10 10:28:24 tv samba[831]: [2020/10/10 10:28:24.929944,  0] ../../so>
Oct 10 10:28:24 tv samba[831]:   At this time the 'samba' binary should >
Oct 10 10:28:24 tv samba[831]:   'server role = active directory domain >
Oct 10 10:28:24 tv samba[831]:   You should start smbd/nmbd/winbindd ins>
Oct 10 10:28:24 tv samba[831]: [2020/10/10 10:28:24.930745,  0] ../../li>
Oct 10 10:28:24 tv samba[831]:   exit_daemon: daemon failed to start: Sa>
Oct 10 10:28:24 tv systemd[1]: samba.service: Main process exited, code=>
Oct 10 10:28:24 tv systemd[1]: samba.service: Failed with result 'exit-c>
lines 1-20

and here:

[moshe@tv ~]$ sudo journalctl -p 3 -xb
[sudo] password for moshe: 
-- Logs begin at Mon 2020-09-21 11:10:40 IDT, end at Sat 2020-10-10 11:0>
Oct 10 10:28:21 tv kwin_x11[662]: kwin_xkbcommon: XKB: couldn't find a C>
Oct 10 10:28:24 tv samba[831]: [2020/10/10 10:28:24.775027,  0] ../../so>
Oct 10 10:28:24 tv samba[831]:   samba version 4.12.6 started.
Oct 10 10:28:24 tv samba[831]:   Copyright Andrew Tridgell and the Samba>
Oct 10 10:28:24 tv samba[831]: [2020/10/10 10:28:24.929944,  0] ../../so>
Oct 10 10:28:24 tv samba[831]:   At this time the 'samba' binary should >
Oct 10 10:28:24 tv samba[831]:   'server role = active directory domain >
Oct 10 10:28:24 tv samba[831]:   You should start smbd/nmbd/winbindd ins>
Oct 10 10:28:24 tv samba[831]: [2020/10/10 10:28:24.930745,  0] ../../li>
Oct 10 10:28:24 tv samba[831]:   exit_daemon: daemon failed to start: Sa>
Oct 10 10:28:24 tv 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 98 and the job result is failed.
Oct 10 10:28:28 tv bluetoothd[538]: src/profile.c:ext_start_servers() RF>
lines 1-20

The thing is samba network is kinda working. I can connect to other computers and they can connect to me. Although the only option for them to connect to me is by using the admin username and password. They can’t connect as Guest even though i configure that they would.

What should i do?

:+1: Welcome to Manjaro! :+1:

  1. Your output is cut off at the 80th column, so we can’t read everything.
  2. Don’t follow YouTube videos, because most of them are outdated whereas the textual documentation is constantly updated.
  3. For samba documentation, read this and definitely this!

:wink:

Try systemctl status smb.service

This is what i get:

[moshe@tv samba]$ systemctl status smb.service
● smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disab>
     Active: active (running) since Sat 2020-10-10 16:31:06 IDT; 5min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 6154 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 5 (limit: 4533)
     Memory: 10.6M
     CGroup: /system.slice/smb.service
             ├─6154 /usr/bin/smbd --foreground --no-process-group
             ├─6157 /usr/bin/smbd --foreground --no-process-group
             ├─6158 /usr/bin/smbd --foreground --no-process-group
             ├─6159 /usr/bin/smbd --foreground --no-process-group
             └─6161 /usr/bin/smbd --foreground --no-process-group

Oct 10 16:31:05 tv systemd[1]: Starting Samba SMB Daemon...
Oct 10 16:31:06 tv smbd[6154]: [2020/10/10 16:31:06.171015,  0] ../../lib/util/become_da>
Oct 10 16:31:06 tv smbd[6154]:   daemon_ready: daemon 'smbd' finished starting up and re>
Oct 10 16:31:06 tv systemd[1]: Started Samba SMB Daemon.
Oct 10 16:31:07 tv smbd[6161]: pam_unix(samba:session): session opened for user moshe(ui>
Oct 10 16:32:52 tv smbd[6507]: pam_unix(samba:session): session closed for user nobody
Oct 10 16:33:07 tv smbd[6531]: pam_unix(samba:session): session closed for user nobody
Oct 10 16:33:17 tv smbd[6554]: pam_unix(samba:session): session closed for user nobody
lines 2-25/25 (END)

Your output is cut off at the 80th column again. Please maximize your terminal window before copy-pasting…

:pray:

Sorry for that, didn’t notice that. So i saved the output file from terminal and then copied the text. If you know a better way i’ll be glad to hear.

I can’t put the logs here because it thinks there are urls inside so I put it on pastebin.

First a warning of questionable or offensive content ahead, then:

Bad Request (#400)
Unable to verify your data submission.

Please use this instead of pastebin:

:wink:

P.S. Have you already read the server and client documentation mentioned before and verified that all basic settings (like workgroup / domain / … are correct?)

I am not that good with understanding everything about manual configuration but from what i can tell the smb.conf on /etc/samba with default settings are ok:

[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   client 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 User
   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 = no
   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

here is a one folder that i have shared that inside /var/lib/samba/usershare

#VERSION 2
path=/home/moshe/Downloads
comment=
usershare_acl=S-1-1-0:f,S-1-5-21-1457072759-1477583976-4050980693-1000:f
guest_ok=y
sharename=Downloads

The weird thing is putting the error message a side, even when enabling guest permission i do able to enter as a guest, i do see the folder that i have shared but not able to get access to it unless i use my admin username and password.

Is the guest account on the server activated?

:grin:

Sorry i don’t really understand your question about how to know if the guest account is activated on the server.

I can show you that on my mac for example it does connect as Guest
https://paste.pics/39cfe889b3bd50aa6ac043dc71477cbe

when trying access it it exit the window and leave a message:
https://paste.pics/70980b6e8bb797467ee238abd7fbcfad

Yup, you’re missing basic knowledge and information.

Please Read The Fine Manual and start from scratch. Samba is a great piece of software to make Windows and Linux work together but you need to be an expert at both Windows and Linux to make it work reliably with security.

Some last tips:

  • Just use FAT32 for the share (no security from a FS perspective)
  • give full control to everyone on Samba, and it’ll just work. (one big FS and everyone can see everything)

Good luck! (You’ll need it and you’ll need a lot of reading up if you’re a Mac user)

:+1:

1 Like

Thanks i accept the challenge :wink:

1 Like