# Samba share names not working

I want to share music & video folders so that various devices/OS’s on my home network can access it for file sharing.
I have done this with raspberrypi & it was quite easy & working well.

I repeated the process with Manjaro so I installed samba & manjaro-settings-samba
I checked the Samba section of Archwiki & also the samba setup help on this forum, I also set a samba user with the same user/pass as my system for convenience ~ but I’m at a loss why none of the shares (even the default print one) do not show up in smbclient.

Samba is running, I set up the share folder, but it seems no shares are listed. What might I have missed out?

My computer hostname is Sulaco

systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disa>
Active: active (running) since Wed 2022-10-12 22:31:58 BST; 14h ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 3423 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 7 (limit: 23825)
Memory: 11.4M
CPU: 3.463s


Final lines from /etc/samba/smb.conf

[sulaco_music]
comment=Sulaco Music
path=/mnt/SSD500/rico/Music
browseable=Yes
writeable=No
only guest=no
guest ok=yes
create mask=0777
directory mask=0777
public=yes


No shares are shown? but it does show in testparm

smbclient -L 192.168.1.10
Password for [WORKGROUP\rico]:

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



Create bookmarks / shortcuts that point to the shares.

There’s a lot of previous discussion on this very topic and why it behaves this way. Long story short, it’s for security reasons.

Theres no share though. None of my devices can connect & smbclient lists no shares. It should because I compared the same tool on Raspbian & that does list the shares.

Here is the same situation on Samba for Raspberrypi. The shares are listed.

pi@rpi2:~ $smbclient -L 192.168.1.102 Enter WORKGROUP\pi's password: Sharename Type Comment --------- ---- ------- print$          Disk      Printer Drivers
Phobos          Disk      RPi Share3
Deimos          Disk      RPi Share4
IPC$IPC IPC Service (Samba 4.13.13-Debian) SMB1 disabled -- no workgroup available  I believe this is why I cannot access the Manjaro Samba shares, they are not working somehow. Hi @Riquez, Check/compare your /etc/samba/smb.conf’s [global] section. Ensure their client min protocol values are the same, they should be SMB2 IIRC: client min protocol = SMB2  Well, that’s how I’ve got it. At least make sure they’re the same. Yes, it is SMB2 Hers the whole thing: /etc/samba/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 = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *pass> 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

[sulaco_music]
comment=Sulaco Music
path=/mnt/SSD500/rico/Music
browseable=Yes
writeable=No
only guest=no
guest ok=yes
create mask=0777
directory mask=0777
public=yes



Ensure the [global] settings are the same on the non-working one as on the working one.

### Edit:

Ensure the permissions are also correct on the directories, as well as their contents. IIRC it should be readable to everyone:

chmod -R o+r /path/to/directory


unfortunately after systemctl restart smb.service its the same result for smbclient, no shares.

There wasn’t a huge difference in conf, but I copied the entire [global] section anyway.

Please provide the output of:

systemctl status nmb


Did you try to manually connect to a specific share (regardless whether or not it’s “listed” by smbclient -L)?

I haven’t done this, & will if needed, but I don’t think it explains why the default [print] share isn’t working - nothing is showing for the shares & something should never mind permissions.

YES! this was actually the first thing, I tried everything. But after no success I then began to dig deeper & this is the difference I found between the RPI samba (working) & Manjaro (not working)
But of course, maybe its not the issue, idk.

True. OK - my limited knowledge has reached it’s…limit

Exploring this issue further. I decided to install samba on my Archcraft partition alongside Manjaro.
I installed samba smbclient gvfs gvfs-smb
I copied the RPi smb.conf & edited the [share] to be my music folder.
I changed the share folder permissions -R o+r as suggested.
After restarting the smb.service smbclient correctly reports the MUSIC share I created.

Its the same few simple steps I did with manjaro, so I’m still at a loss why its not working the same way as the other 2 distros.

ARCHCRAFT

smbclient -L 192.168.1.10
Password for [WORKGROUP\rico]:

Sharename       Type      Comment
---------       ----      -------
print$Disk Printer Drivers sulaco_music Disk Sulaco music IPC$            IPC       IPC Service (Samba 4.17.0)



Even so, I cannot connect to this samba instance in Win11 using \192.168.1.10\sulaco_music even though that does work with the Rpi Share. This is a separate issue of course.

This is one of the most common mistakes one can make when sharing. /mnt is a mountpoint for temporary mounts and should never be populated with permanent mounts.

Always use a separate structure starting at / (root) e.g.

sudo mkdir -p /a/local/ssd500


Set permissions on the mount point

sudo chmod ugo+rwx /a/local/ssd500


Mount the partition (use either fstab or systemd mount unit)

mount /dev/sdYx /a/local


Create a folder in /srv for your samba share - the /srv tree is there for exposing various services like smb shares

sudo mkdir -p /srv/samba/ssd500


Set permissions on the share point of write access is required

sudo chmod ugo+rwx /srv/samba/ssd500


Bind the local mountpont to the sharepoint (using fstab)

$cat /etc/fstab ..... /a/local/ssd500 /srv/samba/ssd500 none bind 0 0 ....  Then point your share definition to the folder [sulaco_music] .... path=/srv/samba/ssd500/rico/music ....  After changes to your smb.conf always restart smb.service sudo systemctl restart smb.service  Thanks @linux-aarhus , this is great info & explained clearly. I should note though that this doesn’t really explain why samba isn’t showing the default [print] share which is nothing to do with mounts. & also, I’ve made the exact /mnt/ mistake on my RPi & that works fine. Even without any custom shares, samba should still show the default with smbclient, but its all empty. Changing the /mnt/SSD500 is a little disruptive right now as that is my HOME folder locations on 2 distros. So that’s why I feel a little reluctant to dive into that as I’m sure there’s a lot to consider such as backups, media servers & whatever else uses that path. But I absolutely will correct this on your advice when I have time. I don’t tell you to change your setup - if it works - it works - I am merely pointing out where there is room for improvement. As you referenced Basic setup and troubleshooting topic I assume you have seen the recommendations That is why you cannot see the print share When you read online about smb.conf - use the info to understand how it works - don’t copy/paste as they may not work for your use case. Only add configuration entries you know will be different from default. 1 Like Right. Actually, I replaced the entire smb.conf with the Rpi one. That doesn’t have load printers = no. but I can switch back to the original & change it to yes … I restored the std manjaro-settings smb.conf, as posted above, changed load printers = yes Manajaro doesn’t have the /var/lib/samba/printers folder, so I took that from Rpi. restart smb, still no shares, hmmm According to the Basic setup tuitorial I should see at least the following: $ smbclient -L {host|ip} -U%

Sharename       Type      Comment
---------       ----      -------
public          Disk
IPC\$            IPC       IPC Service (Manjaro Samba Server)
SMB1 disabled -- no workgroup available


& on both my raspberrypi & Archcraft, I see something similar to this, plus my custom share.
But on Manjaro, even though I followed the same steps, which is really very little, it just doesnt seem to work.
Looking back at my OP at the top, it seems to me the below is still the issue, unless anyone knows why it should be blank?

smbclient -L 192.168.1.10 -U%                        ✔  7m 25s 

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



Have you put in the correct IP address? (Strike 1 from Capt Obvious)

Is there a firewall running, that needs holes for SMB2 / SMB3 ports?