Installing SAMBA 3.0

SAMBA allows a Unix box to share directories and access other network shares in a similar way to MS Windows, using the Server Message Block protocol (SMB - hence SAMBA).

Today's recipe will be using samba-3.0.12.tar.gz [15MB] or grab another version from those rather fine people at samba.org.

We will also be downloading it to our /src directory, for short path typing which is much easier on the fingers.

If you use /usr/local/src, change these directions accordingly..

1. Installation

Installation is the same as ever..

cd /src

tar -zxvf samba-3.0.12.tar.gz

cd samba-3.0.12/source

./configure

make

make install

Be flexible with file locations
Note that different versions of Samba tend to install files in slightly different places. It doesn't really matter, as long as you know the important filenames (as shown in these instructions) and how to find them. Especially watch what goes in those /bin, /samba, /sbin, lib and /etc directories and note that /usr/local/samba has both /bin and /sbin subdirectories, so adjust your settings accordingly.

Samba will run according to what's in this file These settings are the equivalent to Windows Share Level Permissions. Additionally the permissions on the shared directories themselves will also influence what a user can do once they've mapped to these shares. These directory permissions, set using chmod, are the equivalent to Windows NTFS permissions...

Then you can more the testparm.copy file and read it at your leisure. The testparm command will tell you all about your Samba configuration. The first line indicates where to find the smb.conf file. Press enter when prompted to see a dump of the services you set up in the config file. If you get errors, fix the line the error points to.

Run a test mount..

I find this can be useful in troubleshooting the configuration setup. The samba services are specified as a UNC path: \\computername\sharename (aka service name). However, under Unix the \\ characters must be 'escaped' with two extra \\, as below. Make sure the format is correct:

Make SAMBA start automatically

It can be a bit of a drag manually starting smbd and nmbd every time the box boots up. You're a busy person with an uptight schedule, so why not enable the samba daemons (smbd and nmbd) to run from inetd.

Edit and enable inetd.conf - remove the # symbols in front of the two samba lines and modify the path as required..