Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

## An Introduction
## Daniel Jung
mimiandi@bh.mbn.or.jp

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

 

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.