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
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.
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.
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)
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.
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