Can't connect to samba after update; Service is running (2022-08-13++)

believing this to be the culprit, I tried every possible combo, but still no joy.

my shares are mounted in /run/media/grendelx through fstab
I tried to mount them as root and as a user with all permissions drwxrwxrwx
I added myself to the samba users
in every case, the resources are accessible through filemanager, just not through the network,
doesn’t matter if using the windows client or the host machine itself.

I tried arch wiki, manjaro how-to, and all the recent tutorials I could find, and i can’t get samba shares to work on the last system update.

I don’t think I have enough know-how to solve this issue by myself.

but if I may suggest…
if you “linus-aarhus” are running the latest release of manjaro
if you could try to mount a second drive under /run/media/youraccount through fstab
and try to mount it as a share with samba and browse it through a file manager or windows client
just to confirm if it works or not

1 Like

I am - and no I wont use /run/media in /etc/fstab

But that is where you make a huge mistake - you cannot use /run - it is volatile an recreated on each boot.

If you wanna make sure your shares are consistent - use a predicatable - non system mountpoint.

NEVER use

  • /run/..... bla
  • /mnt/.....bla

Create your own predictable structure - I really don’t care what you call it - I always use /data/…bla or as I have lately been doing /a/…bla

1 Like

/ media / dev1
/ mount / drive1

won’t work, I tried

permission changes, i tried, doesn’t work

I just managed to get it to share

smb: // host / home_dir /

and nothing else could be accessed

later only detection works on smb: // ip / homedir /

and nothing but the home directory could be shared

I don’t know what to advise - Linux is not Windows

Linux requires a thought through setup when it comes to sharing - and quite frankly there is a huge diffference between being a server or a client - samba wise.

You cannot use LInux as you use Windows because Linux is a born networked system - Windows network sharing has always been an afterthought.

I remember Window 3.11 - workgroups edition - the worst network client ever invented.

I created peer-to-peer sharing using Novell networking client using token ring networking back in late 80’ies

ok, that is maybe not the proper place to mount stuff
this solution came up years ago following howtos and tutorials on arch & manjaro forums
so I will mount them somewhere else.

but if you could try it your way whatever it is, to see if we are dealing with a samba problem or our incompetence, I think it would go a long way…

It appears you are having an xyproblem

you are mounting shares based on external device using a volatile location

That is going to create unpredictable issues with samba filesharing and as you don’t what you doing so you blame samba which is not your root cause

Your root cause is ignorance and windows expactations

I don’t know what to sadvise - Linux is not Windows

Linux requires a thought through setup when it comes to sharing - and quite frankly there is a huge diffference between being a server or a client - samba wise.

Cytat

You cannot use LInux as you use Windows because Linux is a born networked system - Windows network sharing has always been an afterthought.

I remember Window 3.11 - workgroups edition - the worst network client ever invented.

I created peer-to-peer shareing using Novell networking client using token ring networking back in late 80’ies

Cytat
You write generics, we know it, linux is not windows.

The problem is that a clean fresh install of the system and updating samba to 4.16.4-3 works fine. And when there is some time the system on the disk and you are doing the update, samba crashes. Have you seen a system that does this?
changing permissions, writing, reading resources does not change anything after such a strange update.

And here everything has fallen apart, so we are looking for a solution. The np file of my samba configuration is the same as it was. Resource permissions have always been and I have been fine. After the last update, the only resource I can share is the home / public directory.

[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
   disable netbios = no
   dns proxy = no
   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 owner only = false
   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
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   show add printer wizard = no

[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

[mp3]
   comment =  mp3
   path = /media/work/mp3/
   public = yes
   writable = yes
   browsable = yes
   read only = no
   available = yes
   guest ok = yes
   create mask = 0777
   directory mask = 0777

[filmy]
   comment =  filmy
   path = /media/work/Filmy/
   public = yes
   writable = yes
   browsable = yes
   read only = no
   available = yes
   guest ok = yes
   create mask = 0777
   directory mask = 0777

[yarass]
   comment =  yarass
   path = /home/yarass/
   public = yes  
   writable = yes
   browsable = yes
   read only = no
   available = yes
   guest ok = yes
   create mask = 0777
   directory mask = 0777

This configuration on a fresh install + update works fine.

On old installation + update only works

[yarass]
   comment =  yarass
   path = /home/yarass/
   public = yes  
   writable = yes
   browsable = yes
   read only = no
   available = yes
   guest ok = yes
   create mask = 0777
   directory mask = 0777

you are so completely messing system permissions

what do you think you are doing?

making everything inside your home world read/write?

No matter what you tell samba to do here your effecitive filesystem permission prevents it.

Samba will never exceed actual filesytem permissions - no matter what you tell it to do.

This is what it is supposed to be, this is my internal home network, it is used by 2 users and they are both supposed to have access to this place.
I might as well provide a public directory.

  path = /user/public
   public = yes  
   writable = yes
   browsable = yes
   read only = no
   available = yes
   guest ok = yes
   create mask = 0777
   directory mask = 0777

The majority of issues regarding samba is the ignorance surrounding windows file sharing - which is not samba. Samba is an implementation using the Windows filesharing protocols and thus needs to be setup correctly. It is not like Windows → rightclick → share → done

Even if the file manager pretents to be able to do it - a lot of setup is assumed for this to work.

Then what are your effective filesystem permissions on the folder?
And did you create a priviliged group?
And did you assign the relevant users as members of group?

Yea I’m now having the same problem.
The latest version of SAMBA will NOT allow shares the 2nd disk on my system mounted at /mnt/blah. This HAS been working fine for the last 2+ year though…

1 Like

Possible dupilcate:

I am facing the same problem.

I configured my system from the arch wiki instructions Samba - ArchWiki

My config

[global]
        workgroup = Beast
        server role = standalone server
        server string = %h server (Samba %v)
        invalid users = root
        security = user
        usershare path = /var/lib/samba/usershares
        usershare max shares = 100
        usershare allow guests = yes
        usershare owner only = yes
[homes]
        comment = Home Directories
        browseable = no
        valid users = %S
        writable = yes

Samba status

❯ systemctl status smb
● smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
     Active: active (running) since Tue 2022-08-16 06:40:27 AEST; 22min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 1326 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 4 (limit: 38407)
     Memory: 31.3M
        CPU: 193ms
     CGroup: /system.slice/smb.service
             ├─1326 /usr/bin/smbd --foreground --no-process-group
             ├─1333 /usr/bin/smbd --foreground --no-process-group
             ├─1334 /usr/bin/smbd --foreground --no-process-group
             └─9352 /usr/bin/smbd --foreground --no-process-group

Aug 16 06:40:27 Manjaro systemd[1]: Starting Samba SMB Daemon...
Aug 16 06:40:27 Manjaro smbd[1326]: [2022/08/16 06:40:27.380204,  0] ../../source3/smbd/server.c:1741(main)
Aug 16 06:40:27 Manjaro smbd[1326]:   smbd version 4.16.4 started.
Aug 16 06:40:27 Manjaro smbd[1326]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 16 06:40:27 Manjaro systemd[1]: Started Samba SMB Daemon.

Adding a share with samba user does not work

net usershare add share_name_here /mnt/Data/share_folder "Comment" "my_host\samba_user:f"
net usershare add: cannot convert name "my_host\samba_user" to a SID. The transport connection is now disconnected..

It works if I use the user’s SID but I still cannot access the share.

I configured mine using the following Manjaro Wiki article:

hi, I tried your way, I created my own predictable structure data/…bla**, stock, with changed permission, ownership, and all possible combos, but it does not work.

Hello, Manjaro Users

I still have a problem with Samba on Manjaro 21.3.7 (2022-08-16)

Can someone confirm that Samba issues are still present and not being fixed in this version?

Thank you
Apidech T.

Facing that issue too, thanks for a topic.

1 Like

Still a problem, I even reverted to 4.16.2-1 of smb and smbclient but same problem. It must be related to something else in the recent update.

I can see shares using net usershare list

But cannot access or see it using smbclient -L or a Windows network map from explorer.

Here are some results from investigations:

❯ cat /etc/samba/smb.conf
[global]
        workgroup = MyWorkgroup
        server role = standalone server
        server string = %h server (Samba %v)
        invalid users = root
        security = user
        usershare path = /var/lib/samba/usershares
        usershare max shares = 100
        usershare allow guests = yes
        usershare owner only = yes

[homes]
        comment = Home Directories
        browseable = no
        valid users = %S
        writable = yes

❯ net usershare list
Min
❯ smbclient -L 192.168.1.100 -U smb_user
Password for [.....]:

        Sharename       Type      Comment
        ---------       ----      -------
SMB1 disabled -- no workgroup available

❯ systemctl status smb
● smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
     Active: active (running) since Wed 2022-08-17 06:53:17 AEST; 2h 2min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 1353 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 3 (limit: 38407)
     Memory: 30.5M
        CPU: 567ms
     CGroup: /system.slice/smb.service
             ├─1353 /usr/bin/smbd --foreground --no-process-group
             ├─1360 /usr/bin/smbd --foreground --no-process-group
             └─1361 /usr/bin/smbd --foreground --no-process-group

Aug 17 06:53:17 Manjaro systemd[1]: Starting Samba SMB Daemon...
Aug 17 06:53:17 Manjaro smbd[1353]: [2022/08/17 06:53:17.519333,  0] ../../source3/smbd/server.c:1741(main)
Aug 17 06:53:17 Manjaro smbd[1353]:   smbd version 4.16.4 started.
Aug 17 06:53:17 Manjaro smbd[1353]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 17 06:53:17 Manjaro systemd[1]: Started Samba SMB Daemon.
❯ journalctl -S "6 hour ago" -xu smb.service
Aug 17 06:53:17 Manjaro 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 97.
Aug 17 06:53:17 Manjaro smbd[1353]: [2022/08/17 06:53:17.519333,  0] ../../source3/smbd/server.c:1741(main)
Aug 17 06:53:17 Manjaro smbd[1353]:   smbd version 4.16.4 started.
Aug 17 06:53:17 Manjaro smbd[1353]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 17 06:53:17 Manjaro systemd[1]: Started Samba SMB Daemon.
░░ Subject: A start job for unit smb.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://forum.manjaro.org/c/support
░░ 
░░ A start job for unit smb.service has finished successfully.
░░ 
░░ The job identifier is 97.                                                                                               ✔ 


1 Like

For me, this was an AppArmor issue. My shares are located outside of my home directory and i had to whitelist them in /etc/apparmor.d/local/usr.sbin.smbd.

https://wiki.archlinux.org/title/samba#Permission_issues_on_AppArmor

8 Likes

Thanks ! That made the trick for me!