[ Current Issue Home | Issue #5/6 Home | FAQ ]��

The FreeBSD 'zine
Featured Articles: Samba
## An Introduction
## Daniel Jung <>

This article is written in two parts. First, introduction to samba. The second one is on smb.conf parameters.

What is Samba?

Samba is a program that enables machines running Unix or Unix-like OS to talk to Microsoft networking protocol.

What can it do?

It allows Windows to access all or parts of Unix filesystem and printers.


You can do this two ways. You can install already compiled binaries or compile it yourself.

I choose the second since it gives me more flexibility. Uncompress it like so:

	tar xzf samba-version.tar.gz

You should have number of directories and files now.

In the examples directory, you should find numerous examples of config files. Make sure you look through them.

Compiling Options

By using your favorite editor, open the Makefile in the untarred samba directory.

You should consider the following options in the Makefile:

1. Where to put the base of samba installation?


		BASEDIR = /usr/local/samba

	* This defines where the components of Samba are stored

2. NT Domains or WorkGroups?

	If your network consists of NT Domains then you can specify
	like so:




3. GuestAccount?


		.GUESTACCOUNT = nobody

	* I suggest you create a user with minimal privileges just for
	  the samba account as security measure.

4. Authentication?

	LanManager Encrypted Password, PAM (Pluggable auth),
	Kerberos and so on...
	Each of these Authentication methods are supported, please
	read the docs to ensure which authentication suits you the

5. Which OS?

	Uncomment your OS options in Makefile.

6. More options?

	Refer to local.h, there are some things in it you might find
	useful; however, if you are not sure what you want, I suggest
	you do not touch it.

Starting the Samba Daemon

There are two ways of starting Samba daemon.

1. Using inetd.conf

	This is method I would prefer to use as it allows me to use
	tcpwrapper. (I will assume you know what tcpwrapper does.)
	Also, using inetd.conf to start samba may save you some 
	resources (if you know how inetd works, you'd know what I

		netbios-ssn stream tcp nowait root /usr/local/sbin/smbd smbd
		netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd

	* Note: The above is not yet configured for tcpwrapper.

2. Stand-alone daemon from startup-script.

	Put following lines in rc.local:

		echo -n "smbd and nmbd starting"
		/locationofyoursambadirectory/smbd -D
		/locationofyoursambadirectory/nmbd -D
		echo "running"

	* /locationofyoursambadirectory/ defaults
	  to /usr/local/samba/bin/

	* -D option runs daemons in the background.

- Daniel

Return to Issue #5

Contact: <>
Last modified: $Date: 1999/06/26 05:42:53 $
Copyright � 2023, The FreeBSD 'zine
All rights reserved.