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

I’m not sure I understand you…
in my case whitelisting the folder containing the shares like in the example above, did the trick.
the old config for example is working again without changing anything.

smbclient -L localhost -U%

not showing shares is normal I think under these circumstances,
as is not being able to directly access smb://hostname/ since a couple of major updates ago
but being ignorant, I leave this up to the more experts here to shed some light on this matter.

by specifying hostname and share name explicitly I’m able to access all configured shares
smb://hostname/sharename

this works for me on the Linux box and from any other windows10/11 machines on our lan.

woho it start working for me too but in my case I had to completely disable AppArmor
I hope it’s not some crucial config file and hopefully my system wouldn’t broke

Thank you everyone!

solution for me

Attempt all upgrades that exclude apparmor.
Do not upgrade to disable apparmor. use 3.0.4-2.
do not use 3.0.7.

This is working perfectly for now.

1 Like

I took some screenshots and wrote a description on them.
However, I seem to have restrictions on posting pictures,
I hope I conveyed my intentions well.

provisionally,

  1. Don’t upgrade apparmor.
  2. Everything else, upgrade.
  3. No need to edit smb.conf
  4. No need to edit apparmor settings.
  5. Use apparmor with 3.0.4-2.

Sorry for my bad English. I only know my native language, Japanese.

My share is below.

  1. xfs
  2. zfs
  3. btrfs
  4. ext4 (/home)

from iOS, XPERIA, GALAXy is Okay.
Sharing from kvm(w10,ubuntu) is also no problem.

It now seems to be working exactly as it has for years.

1 Like

Please do not advise to not update packages and bring systems to an (unsupported) partial update state.

I know!! thank you.
If I can find a way to make it work in 24 hours, I will.

Thanks again.
I don’t want to do that either. Of course.

Thank you for posting this solution @TheInvisible. I’m close to the fix but don’t seem to have the correct pathname. Desired folders are on a network NAS that Dolphin has worked with for months.

“smb://bigmamou.local/” is the path in the “File or folder…does not exist.” message and that’s what I tried in usr.sbin.smbd with the two lines:

 "smb://bigmamou.local/" rk,
 "smb://bigmamou.local/**" lrwk

Normally, in Dolphin, I would browse Network > Shared Folders (SMB) > BigMamou

Switched to Linux a few short months ago and am a total Noob when it comes to solving these situations.

Disabling AppArmor did the trick for me. My Samba shares are including symlinks, mounted directories from veracrypt and other specialties and I just for the love of god could not make AppArmor accept these shares as exception in usr.sbin.smbd. Not the ideal solution, but at least a workaround for now.

I installed a fresh copy of Manjaro (manjaro-kde-21.3.7-220816-linux515.iso), which doesn’t come with apparmor by default (not in /etc/default/grub or systemctl), and I’m getting the same issue when adding users to shares within Dolphin:

net usershare add: cannont convert name “my_username” to a SID. The transport connection is now disconnected.

1 Like

Hi!!
I’ve found this:
https://bbs.archlinux.org/viewtopic.php?id=276044

It seems a bug upstream…

1 Like

I’m having the same problem, and whitelisting the paths didn’t seem to solve it. Had to temporarily disable apparmor. Is apparmor useful anyway? I’ve been using Manjaro for years and never know its existence

Modifying apparmor policy file for smbd didn’t fix the problem (even after restarting computer). I also needed to disable apparmor…

None of the suggestions here are working.

[global]
   workgroup = WORKGROUP
   netbios name = manj-073021
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   min protocol = SMB2
   max protocol = SMB3
   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
   name resolve order = lmhosts bcast host wins
   security = user
   map to guest = bad user
   guest account = guest
   usershare path = /var/lib/samba/usershare
   usershare max shares = 100
   usershare owner only = yes
   usershare allow guests = 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
   follow symlinks = yes
   wide links = yes
   unix extensions = 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

[guest]
   comment = guest
   path = /tmp/
   public = yes
   only guest = yes
   writable = yes
   printable = no

and tried whitelisting suggestion and disabling apparmor…

~ sudo systemctl stop apparmor 

I’m just trying to share a folder in home directory: clicking in Dolphin and in cli.

~ net usershare add share /home/me/share comment Everyone:R guest_ok=y
net usershare add: cannot convert name "Everyone" to a SID. The transport connection is now disconnected..

8 posts were merged into an existing topic: [root tip] [How To] Basic Samba Setup and Troubleshooting

Stopping apparmor is not enough, you need to disable it (systemctl disable apparmor) and then restart computer.

1 Like

I see you said that up there. Thanks for checking back, it works.

I’m curious to see where this is at. I ran into it today and the only way to get around it was to disable apparmor.

You could put apparmor in complain mode:

sudo aa-complain /usr/bin/smbd

sudo aa-complain samba-dcerpcd samba-bgqd samba-rpcd samba-rpcd-classic samba-rpcd-spoolss

reboot and check status with sudo aa-status

Check out the section on apparmor here:

Yep, that seem to do it. Thank you again and take care.

1 Like

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