File Sharing

So I had quite a few problems in getting a new Raspberry Pi box to be a server for my files, even copying all of the settings from one /etc/samba/smb.conf file to the other. The exact same file worked great on the Raspberry Pi 1B that it was hooked to, but it failed to respond at all when I put the file onto a Raspberry Pi 3 and tried to get it running. I had to go through quite a few steps to figure it out, but I finally managed to get it to respond. At the moment I’m locked into using Windows 10 on a couple laptops, so I need to get Samba working on the file server. With my Linux computers being able to browse to the box using SFTP or NFS was no problem, but I only have Windows 10 Home, and apparently they are only willing to support NFS on the Enterprise edition.

Here are the steps I went through that finally resulted in a working system. I won’t go into detail into all of the dead-ends I ran into along the way. (There were many, and most likely I’d have problems even remembering them all, but I don’t think they add any value here.)

To see the logs and try to do some troubleshooting, I came across this page that showed me how to do the first step:

sudo systemctl status smbd.service
sudo journalctl -xn

I also ran ps aux|grep mbd to see whether nmbd and smbd (for the NetBIOS daemon and Samba daemon, respectively) were running. Nmbd was going, but not smbd. In looking at the logs, at /var/log/samba/log.nmbd and /var/log/samba/log.smbd, there were also some error messages. At least in my case, it boiled down to Samba complaining that it couldn’t start up the print service, even though I thought I had told it to not bother with that. Well, turns out there was more to stopping the service than just telling it no printers. I found this page which states that the following needs to be in the /etc/samba/smb.conf file in order for printing connections to really not be attempted by Samba. All four of the lines need to be added.

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

And just as they point out on that site, the ‘spoolss’ is not a typo in that last line. Once I entered all of those into my configuration file and restarted the box, all was well with it and I was able to browse the files from my Windows 10 laptop happily.

As a side note, things have been busy here and I’ve been neglecting making any updates. I hope to do better now, but life always seems to get in the way… 🙂

Leave a Reply