Samba cannot share folders after recent update

The recent update that included samba 4.16.4-1 → 4.16.4-2 and smbclient 4.16.4-1 → 4.16.4-2 seems to have given me a problem when trying to share a folder. It gives the error, ‘net usershare add: cannot convert name “Everyone” to a SID. The transport connection is now disconnected.’

smb.service and nmb.service both show as active. And no changes to smb.conf.

I was able to repeat this error on another machine. Sharing folders was working properly on 4.16.4-1 and then produces the error after updating to 4.16.4-2.

2 Likes

This sounds like a Windows error message - there is no default on Manjaro which includes Everyone group or userid.

So my guess is you are trying to connect to a share without supplying a username.

Appreciate the help. I am merely trying to share a folder in Manjaro. Right click a folder like ‘documents’, click properties, click share, click share this folder with other computers on the local network, then you can select access rights Read only or Full control. When I select ok, that is when I get the cannot convert name “Everyone” to a SID. Prior to that update, it would have just worked and put a share icon on the folder.

Open a terminal - and enter this command (the & leaves service running in the background)

python -m http.server -d ~/path/to/share  8080 &

Anyone knowing the IP:PORT address can use their webbrowser to fetch files.


Another possible cause is lack of permissions.

You will have to allow the group users to access your home

Here is the output:

python -m http.server -d ~/path/to/share  8080 &                                                                            ✔ 
[1] 2915
    ~  Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...

Here is my smb.conf

[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 = NewUNIXpassword %n\n ReTypenewUNIXpassword* %n\n passwd:allauthenticationtokensupdatedsuccessfully*
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
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

I ran these commands:

sudo mkdir /var/lib/samba/usershare
sudo groupadd -r sambashare
sudo chown root:sambashare /var/lib/samba/usershare
sudo chmod 1770 /var/lib/samba/usershare
sudo gpasswd sambashare -a your_username
sudo systemctl restart smb.service
sudo systemctl restart nmb.service

Still get the error.

but you didn’t understand and you are blind to the fact that you need to replace the path to the actual folder shared.

the python server is a replacement for the smb service - there is nothing related - so you cannot mix this

inxi -Fazy
System:
  Kernel: 5.18.17-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.18-x86_64
    root=UUID=89ff8654-80a1-4d48-acd5-9d3633b7b80c rw rootflags=subvol=@ quiet
    apparmor=1 security=apparmor
    resume=UUID=e9f66162-09d0-4f45-a676-e40ee7f9675a udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.6 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: MSI product: MS-7922 v: 2.0
    serial: <superuser required>
  Mobo: MSI model: Z97S SLI Krait Edition (MS-7922) v: 2.0
    serial: <superuser required> UEFI: American Megatrends v: 10.7
    date: 02/16/2016
Battery:
  Device-1: hid-98:5a:eb:bf:ae:bd-battery model: Apple Keyboard serial: N/A
    charge: N/A status: discharging
  Device-2: hidpp_battery_0 model: Logitech Wireless Mouse M325
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: Intel Core i5-4690K bits: 64 type: MCP arch: Haswell
    gen: core 4 built: 2013-15 process: Intel 22nm family: 6 model-id: 0x3C (60)
    stepping: 3 microcode: 0x28
  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: 4000 min/max: 800/4000 scaling: driver: intel_cpufreq
    governor: schedutil cores: 1: 4000 2: 4000 3: 4000 4: 4000 bogomips: 28008
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GM206 [GeForce GTX 960] vendor: ASUSTeK driver: nvidia
    v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current
    (as of 2022-07) arch: Maxwell code: GMxxx process: TSMC 28nm
    built: 2014-19 pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:1401 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 93 s-size: 524x292mm (20.63x11.50")
    s-diag: 600mm (23.62")
  Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 94
    size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
  OpenGL: renderer: NVIDIA GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA
    515.65.01 direct render: Yes
Audio:
  Device-1: Intel 9 Series Family HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0
    class-ID: 0403
  Device-2: NVIDIA GM206 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:0fba class-ID: 0403
  Sound Server-1: ALSA v: k5.18.17-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.21 running: no
  Sound Server-4: PulseAudio v: 16.1 running: yes
  Sound Server-5: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 05:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8
    bus-ID: 3-6:3 chip-ID: 0a5c:21e8 class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 2.49 TiB used: 1.03 TiB (41.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO Plus
    1TB size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 2B2QEXM7
    temp: 37.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD5000BEKT-00KA9T0 size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: 1A01 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37240G
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: B1D2 scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 type: USB vendor: Western Digital model: WD
    My Passport 0820 size: 931.48 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1007 scheme: MBR
Partition:
  ID-1: / raw-size: 915.01 GiB size: 915.01 GiB (100.00%) used: 176.74 GiB
    (19.3%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%) used: 568 KiB
    (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 915.01 GiB size: 915.01 GiB (100.00%) used: 176.74
    GiB (19.3%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-4: /var/log raw-size: 915.01 GiB size: 915.01 GiB (100.00%) used: 176.74
    GiB (19.3%) fs: btrfs dev: /dev/nvme0n1p3 maj-min: 259:3
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2
Sensors:
  System Temperatures: cpu: 43.0 C mobo: N/A gpu: nvidia temp: 48 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 11%
Info:
  Processes: 299 Uptime: 48m wakeups: 5 Memory: 15.58 GiB used: 4.58 GiB
  (29.4%) Init: systemd v: 251 default: graphical tool: systemctl Compilers:
  gcc: 12.1.1 clang: 14.0.6 Packages: 1594 pacman: 1582 lib: 410 flatpak: 12
  Shell: Zsh v: 5.9 running-in: yakuake inxi: 3.3.20

Although I can’t see if Samba was working before any upgrades, as I only installed and set it up yesterday, I too am receiving this error when in Dolphin, when I try to share a folder (right click folder, share tab, check the box to share the folder and set the permissions for my user and Everyone to Full Control.)

net usershare add: cannot convert name "[myusername/Everyone]" to a SID. The transport connection is now disconnected.


sudo systemctl status nmb 
● nmb.service - Samba NMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; preset: disabled)
     Active: active (running) since Mon 2022-08-15 12:27:22 PDT; 6s ago
       Docs: man:nmbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 4117 (nmbd)
     Status: "nmbd: ready to serve connections..."
      Tasks: 1 (limit: 19120)
     Memory: 2.9M
        CPU: 25ms
     CGroup: /system.slice/nmb.service
             └─4117 /usr/bin/nmbd --foreground --no-process-group

Aug 15 12:27:22 nate systemd[1]: Starting Samba NMB Daemon...
Aug 15 12:27:22 nate nmbd[4117]: [2022/08/15 12:27:22.484348,  0] ../../source3/nmbd/nmbd.c:901(main)
Aug 15 12:27:22 nate nmbd[4117]:   nmbd version 4.16.4 started.
Aug 15 12:27:22 nate nmbd[4117]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Aug 15 12:27:22 nate systemd[1]: Started Samba NMB Daemon.
    ~ ········································································································ 12:27:29 PM  
❯ sudo systemctl status smb
● smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
     Active: active (running) since Mon 2022-08-15 12:27:14 PDT; 28s ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 4106 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 3 (limit: 19120)
     Memory: 5.8M
        CPU: 40ms
     CGroup: /system.slice/smb.service
             ├─4106 /usr/bin/smbd --foreground --no-process-group
             ├─4108 /usr/bin/smbd --foreground --no-process-group
             └─4109 /usr/bin/smbd --foreground --no-process-group

Aug 15 12:27:14 nate systemd[1]: Starting Samba SMB Daemon...
Aug 15 12:27:14 nate smbd[4106]: [2022/08/15 12:27:14.799283,  0] ../../source3/smbd/server.c:1741(main)
Aug 15 12:27:14 nate smbd[4106]:   smbd version 4.16.4 started.
Aug 15 12:27:14 nate smbd[4106]:   Copyright Andrew Tridgell and the Samba Team 1992-2022

I’ll update if I find a solution…

Possible duplicate: