Remember the furor in 1997 over the talking Barbie that said (among other things) “Math is hard”? I never understood why that was controversial; math is hard. If you don’t think so, maybe you can drop by sometime to help me with partial differential equations. But I digress…
I occasionally need to run various software development and EDA tools under Windows. My preferred method of doing that is to run Windows under VMware. Some months ago I changed several things about my desktop computer configuration, and the next time I tried to use Microchip‘s MPLAB development environment for their PIC microcontrollers, Windows wasn’t able to access my home directory.
Since the last time it had worked, I had installed a new pair of SATA drives in my desktop machine as a RAID 1 (mirroring), and moved my home directory, formerly on a file server, onto the local disk. At about the same time, I upgraded from Fedora Core 3 to Fedora Core 4.
Anyhow, I first discovered it was broken a few months ago, and have spent time trying to troubleshoot it off and on since then, with little progress to show for it until today. I’ve finally discovered that I had no less than four different problems, any one of which was sufficient to keep it from doing what I needed:
- The Fedora “targetted” policy for SELinux defaults to not allowing Samba to export user home directories as SMB shares. Solution: add the line “samba_enable_home_dirs=1″ to /etc/selinux/targetted/booleans.local (creating the file if it doesn’t already exist).
- In my smb.conf, the “hosts allow” directive was set wrong. At one point a few weeks back I had tried to fix it, but it didn’t help, so I’d changed it back.
- When I installed Fedora, I’m pretty sure I indicated that I did not want a firewall, since I have a separate firewall system. But iptables was in fact running, and the rules prevented aceess to Samba.
- I had it configured Samba for share-level security, but needed it to be user-level.
Once all four problems were fixed, it started working fine.
Traditionally Samba configuration has been one of the biggest sources of annoyance for me; I’m looking forward to the day that I don’t need Windows any more and can stop fighting it. The problem isn’t really anything wrong with Samba; it’s that it is a very powerful tool that has to be configurable to cope with Microsoft protocols that started out bad more than twenty years ago and have accumulated more and more cruft with each passing year and each new Windows version. It’s fairly amazing that Samba works so well, especially given how much Microsoft has tried to make it hard to interoperate in order to stifle competition.