Skip to content

Independent notes on FreeBSD · published since 1999

The FreeBSD 'zine Features, news and community notes for FreeBSD

Issue 6 · July 2000

Reader written notes on FreeBSD, from the command line to the server room.

Open the current issue

June 1999 · Featured article

Samba

An Introduction

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.

Installation

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?

 default: 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: WORKGROUP = MYNTDOMAINNAME default: WORKGROUP = MYGROUP 

3. GuestAccount?

 default: .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 best. 

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 mean). 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

On the web

Further reading from the FreeBSD community and the projects named in this article.

Issue contents

Issue 5/6 · Jun 1999

Samba

Setting up smb.conf

By Daniel Jung

Now you know how to start samba , but before you actually start the samba daemons you need to set up smb.conf. We need smb.conf (man 5 smb.conf)...

Read the article

Issue 5/6 · Jun 1999

Advocacy

FreeBSD Advocacy in a Linux centric Environment

By Lou Rinaldi

Nate Smith and I created The Connecticut Free Unix Group in late 1996. At the time, there were no unix users' groups in the area, much less any...

Read the article

Issue 5/6 · Jun 1999

Editorial

Cha Cha Cha Changes

By Jim Mock

Before getting into this month's editorial, let me first apologize for the lack of a new issue last month. I had a lot going on between work, the new...

Read the article