Tuesday, November 07, 2006

Irritations with Samba

I've been drinking less coffee lately, and that might go a long way towards explaining why I had such trouble trying to configure Samba last night. This should have been a trivial exercise, but my forehead is sore from banging it against the wall so much.

As a side note, I need to get softer walls.

The installation of Samba on FreeBSD is trivial. Just type:

cd /usr/ports/net/samba
make install clean

Wait a bit, and suddenly you have samba installed. The startup scripts are, as usual, in:


and the configuration files are in:


Nothing unusual there.

The next step is to modify the sample configuration file (smb.conf). I copied it (to save the original) and opened it up. Wow. There are a lot of options in there. I decided to try something simple at first, just to get it working. I had formatted the filesystem to leave a large (750 gig) partition mounted as /archive. That was where I planned to have rdiff-backup store everything. Why not make that mount as a Windows fileserver? That should be easy.

Using the existing smb.conf file as a starting point, I examined some of the sample entries. Here's the one I went with:

; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

This seemed simple enough, so I changed it to this (removing the semicolons, which are comment markers):

path = /archive
public = yes
writable = yes

That looked easy enough. I made the change, entered some simple stuff at the top (server name, etc.) and started the process. Typing ps ax | grep smb showed that the process was running, so I fired up a Windows laptop, typed this in the address bar of a window:


(trolius.local being the name of the box I am working on, obviously). Lo and behold, the server mounted! Great. Well, that was easy. Just to be sure that things were working as expected, I opened the "My Network Places" icon on my desktop, and browsed the local network.

No server.

And it's still not there. And I can't figure out why. I think I'll purchase some coffee and try again. Caffeine solves so many problems...