Quick and Dirty Samba FAQ/Howto
The Quick and Dirty Samba FAQ/Howto

What this document covers:

Please note that every bit of this information is available in the docs/ directory of the Samba distribution. I am attempting to make life easier for those new to installing Samba, but not new to Unix, and possibly the MS world.

What this document does *not* cover:


How to setup Samba, quickly and easily

After you have built the source, and installed it somewhere (/usr/local/samba) you will need to edit the file /usr/local/samba/lib/smb.conf. This file contains all of the relevant information pertaining to your site's setup. There are multiple sections to this, indicated with a [ section ].

First, the [global] section:

[global]

# The default items Samba comes with work okay, remember to modify:

guest account = pcguest  (I suggest nobody for security reasons)
printing = bsd  (or: sysv, aix)

[homes]

# This section creates the default shares of: \\machinename\username
The rest of the smb.conf file is self-explanitory.
Dealing with Win98/95

The biggest problem introduced by the advent of Win95/OSR2, and all known releases of Win98, are the clear-text vs. encrypted-text password issue.
Without the use of:
  encrypt passwords = yes
  smb passwd file = /etc/smbpasswd # or wherever

It simply will not work. To create this file, after you have set the option within your smb.conf file, but before you have restarted the smb server:

cat /etc/passwd | mksmbpasswd.sh > /tmp/smbpass.tmp
Then, remove all system users, such as: Essentially, if the username does not look like a normal username, be safe and remove access. After the file is cleaned up, you must move this file into place, restart Samba, and set the password for each account, using the binary program smbpasswd.
smbpasswd username
Once this is set up, the user will be able to login to your domain and proceed as permitted.

How to make Samba the Browse Master on a network

First, some background on 'Browse Masters' and what determines who gets to be one. A value called the 'OS level' must be set high enough to ensure that the proper machine will win the election amongst other NT machines, or even Windows95 machines. An NT domain controller uses an OS level of 32. In order for your Samba machine to beat this during the election process, it's OS level must be higher than this. I have had good luck with setting the OS level to 34 previously. The OS level can go up to 255, but Microsoft machines will not look above 32. Setting it above 32 is only useful for other Samba servers.

Actual Execution:

[global]
os level = 34  (or whatever number, up to 255)

How to make Samba work with multiple interfaces

The machine must actually have these interfaces, whether they be virtual or actual interfaces. This will not create those interfaces for you. This will allow clients coming across any of the specified interfaces to have access to the Samba server, even if they are on completely different subnets (assuming everything else is in order, like routing and such).

Very simple:

[global]
interfaces = 192.168.2.10/24 192.168.3.10/24
Or:

interfaces = 192.168.2.10/255.255.255.0
192.168.3.10/255.255.255.0

How to make Samba an Application Server

There are a number of caveats in using Samba as an actual DOS/Windows application server. The most notable would have to be the way Samba handles the file permissions. Be sure to use the fields:

share modes = yes
locking = yes

However, if users are simply launching applications from the server, or retrieving data such as MS Office modules (Book Shelf, Encarta, etc) instead of housing all of the executables on the local PC, Samba will perform very well. There are a number of methods to install various applications both on the server and on the PC, please familiarize yourself with these before attempting to load the entire thing on the server.

Some potential applications:
File Sharing
Program Installation base
Launching programs directly from the server
An example:

[OFFICE]
  path = /path/to/office
  comment = "Microsoft Office Version X.x"
  read only = no
  available = yes
  share modes = yes (to allow real file share modes)
  locking = yes   (to perform actual locking)
.
.
.
Accessing this volume would look like:
\\server\OFFICE\office\msoffice.exe

The above would launch the Office toolbar.
Random Explanations