<abstract> This is the Frequently Asked Questions (FAQ) document for
Samba, the free and very popular SMB server product. An SMB server
allows file and printer connections from clients such as Windows,
OS/2, Linux and others. Current to version 1.9.17. Please send any
corrections to the author.
</abstract>
<toc>
<sect> General Information<p> <label id="general_info">
All about Samba - what it is, how to get it, related sources of
information, how to understand the version numbering scheme, pizza
details
<sect1> What is Samba? <p> <label id="introduction">
Samba is a suite of programs which work together to allow clients to
access to a server's filespace and printers via the SMB (Server
Message Block) protocol. Initially written for Unix, Samba now also
runs on Netware, OS/2 and VMS.
In practice, this means that you can redirect disks and printers to
Unix disks and printers from Lan Manager clients, Windows for
Workgroups 3.11 clients, Windows NT clients, Linux clients and OS/2
clients. There is also a generic Unix client program supplied as part
of the suite which allows Unix users to use an ftp-like interface to
access filespace and printers on any other SMB servers. This gives the
capability for these operating systems to behave much like a LAN
Server or Windows NT Server machine, only with added functionality and
flexibility designed to make life easier for administrators.
The components of the suite are (in summary):
<itemize>
<item><bf>smbd</bf>, the SMB server. This handles actual connections from clients, doing all the file, permission and username work
<item><bf>nmbd</bf>, the Netbios name server, which helps clients locate servers, doing the browsing work and managing domains as this capability is being built into Samba
<item><bf>smbclient</bf>, the Unix-hosted client program
<item><bf>smbrun</bf>, a little 'glue' program to help the server run external programs
<item><bf>testprns</bf>, a program to test server access to printers
<item><bf>testparms</bf>, a program to test the Samba configuration file for correctness
<item><bf>smb.conf</bf>, the Samba configuration file
<item><bf>smbprint</bf>, a sample script to allow a Unix host to use smbclient to print to an SMB server
<item><bf>Documentation!</bf> DON'T neglect to read it - you will save a great deal of time!
</itemize>
The suite is supplied with full source (of course!) and is GPLed.
The primary creator of the Samba suite is Andrew Tridgell. Later
versions incorporate much effort by many net.helpers. The man pages
and this FAQ were originally written by Karl Auer.
<sect1> What is the current version of Samba? <p><label id="current_version">
At time of writing, the current version was 1.9.17. If you want to be
sure check the bottom of the change-log file. <url url="ftp://samba.anu.edu.au/pub/samba/alpha/change-log">
For more information see <ref id="version_nums" name="What do the
version numbers mean?">
<sect1> Where can I get it? <p> <label id="where">
The Samba suite is available via anonymous ftp from
samba.anu.edu.au. The latest and greatest versions of the suite are in
the directory:
/pub/samba/
Development (read "alpha") versions, which are NOT necessarily stable
and which do NOT necessarily have accurate documentation, are
available in the directory:
/pub/samba/alpha
Note that binaries are NOT included in any of the above. Samba is
distributed ONLY in source form, though binaries may be available from
other sites. Recent versions of some Linux distributions, for example,
do contain Samba binaries for that platform.
<sect1> What do the version numbers mean? <p> <label id="version_nums">
It is not recommended that you run a version of Samba with the word
"alpha" in its name unless you know what you are doing and are willing
to do some debugging. Many, many people just get the latest
recommended stable release version and are happy. If you are brave, by
all means take the plunge and help with the testing and development -
but don't install it on your departmental server. Samba is typically
very stable and safe, and this is mostly due to the policy of many
public releases.
How the scheme works:
<enum>
<item>When major changes are made the version number is increased. For
example, the transition from 1.9.15 to 1.9.16. However, this version
number will not appear immediately and people should continue to use
1.9.15 for production systems (see next point.)
<item>Just after major changes are made the software is considered
unstable, and a series of alpha releases are distributed, for example
1.9.16alpha1. These are for testing by those who know what they are
doing. The "alpha" in the filename will hopefully scare off those who
are just looking for the latest version to install.
<item>When Andrew thinks that the alphas have stabilised to the point
where he would recommend new users install it, he renames it to the
same version number without the alpha, for example 1.9.16.
<item>Inevitably bugs are found in the "stable" releases and minor patch
levels are released which give us the pXX series, for example 1.9.16p2.
</enum>
So the progression goes:
<verb>
1.9.15p7 (production)
1.9.15p8 (production)
1.9.16alpha1 (test sites only)
:
1.9.16alpha20 (test sites only)
1.9.16 (production)
1.9.16p1 (production)
</verb>
The above system means that whenever someone looks at the samba ftp
site they will be able to grab the highest numbered release without an
alpha in the name and be sure of getting the current recommended
version.
<sect1> What platforms are supported? <p> <label id="platforms">
Many different platforms have run Samba successfully. The platforms
most widely used and thus best tested are Linux and SunOS.
At time of writing, the Makefile claimed support for:
<itemize>
<item> A/UX 3.0
<item> AIX
<item> Altos Series 386/1000
<item> Amiga
<item> Apollo Domain/OS sr10.3
<item> BSDI
<item> B.O.S. (Bull Operating System)
<item> Cray, Unicos 8.0
<item> Convex
<item> DGUX.
<item> DNIX.
<item> FreeBSD
<item> HP-UX
<item> Intergraph.
<item> Linux with/without shadow passwords and quota
<item> LYNX 2.3.0
<item> MachTen (a unix like system for Macintoshes)
<item> Motorola 88xxx/9xx range of machines
<item> NetBSD
<item> NEXTSTEP Release 2.X, 3.0 and greater (including OPENSTEP for Mach).
<item> OS/2 using EMX 0.9b
<item> OSF1
<item> QNX 4.22
<item> RiscIX.
<item> RISCOs 5.0B
<item> SEQUENT.
<item> SCO (including: 3.2v2, European dist., OpenServer 5)
<item> SGI.
<item> SMP_DC.OSx v1.1-94c079 on Pyramid S series
<item> SONY NEWS, NEWS-OS (4.2.x and 6.1.x)
<item> SUNOS 4
<item> SUNOS 5.2, 5.3, and 5.4 (Solaris 2.2, 2.3, and '2.4 and later')
<item> Sunsoft ISC SVR3V4
<item> SVR4
<item> System V with some berkely extensions (Motorola 88k R32V3.2).
<item> ULTRIX.
<item> UNIXWARE
<item> UXP/DS
</itemize>
<sect1> How can I find out more about Samba? <p> <label id="more">
There are a number of places to look for more information on Samba, including:
<itemize>
<item>Two mailing lists devoted to discussion of Samba-related matters.
<item>The newsgroup, comp.protocols.smb, which has a great deal of discussion on Samba.
<item>The WWW site 'SAMBA Web Pages' at <url url="http://samba.canberra.edu.au/pub/samba/samba.html"> includes:
<itemize>
<item>Links to man pages and documentation, including this FAQ
<item>A comprehensive survey of Samba users.
<item>A searchable hypertext archive of the Samba mailing list.
<item>Links to Samba source code, binaries, and mirrors of both.
</itemize>
<item>The long list of topic documentation. These files can be found in the 'docs' directory of the Samba source, or at <url url="ftp://samba.anu.edu.au/pub/samba/docs/">
<item> Add timesync.pif to your 'Start Up' group/folder
<item> Open the properties dialog box for the program/icon
<item> Make sure the 'Run Minimized' option is set in program 'Properties'
<iteM> Change the command line section that reads [\\sambahost] to reflect the name of your server.
<item> Close the properties dialog box by choosing 'OK'
</itemize>
Each time you start your computer (or login for Win95) your PC will
synchronize it's clock with your Samba server.
Alternativley, if you clients support Domain Logons, you can setup Domain Logons with Samba
- see: <url url="ftp://samba.anu.edu.au/pub/samba/docs/BROWSING.txt" name="BROWSING.txt"> *** for more information.
<p>Then add
<tscreen><verb>
NET TIME \\%L /SET /YES
</verb></tscreen>
as one of the lines in the logon script.
<sect1>Problems with WinDD, NTrigue, WinCenterPro etc<p>
<label id="multiple_session_clients">
All of the above programs are applications that sit on an NT box and
allow multiple users to access the NT GUI applications from remote
workstations (often over X).
What has this got to do with Samba? The problem comes when these users
use filemanager to mount shares from a Samba server. The most common
symptom is that the first user to connect get correct file permissions
and has a nice day, but subsequent connections get logged in as the
same user as the first person to login. They find that they cannot
access files in their own home directory, but that they can access
files in the first users home directory (maybe not such a nice day
after all?)
Why does this happen? The above products all share a common heritage
(and code base I believe). They all open just a single TCP based SMB
connection to the Samba server, and requests from all users are piped
over this connection. This is unfortunate, but not fatal.
It means that if you run your Samba server in share level security
(the default) then things will definately break as described
above. The share level SMB security model has no provision for
multiple user IDs on the one SMB connection. See <url url="ftp://samba.anu.edu.au/pub/samba/docs/security_level.txt" name="security_level.txt"> in
the docs for more info on share/user/server level security.
If you run in user or server level security then you have a chance,
but only if you have a recent version of Samba (at least 1.9.15p6). In
older versions bugs in Samba meant you still would have had problems.
If you have a trapdoor uid system in your OS then it will never work
properly. Samba needs to be able to switch uids on the connection and
it can't if your OS has a trapdoor uid system. You'll know this
because Samba will note it in your logs.
Also note that you should not use the magic "homes" share name with
products like these, as otherwise all users will end up with the same
home directory. Use [\\server\username] instead.
<sect1>Problem with printers under NT<p> <label id="nt_printers">
This info from Stefan Hergeth
hergeth@f7axp1.informatik.fh-muenchen.de may be useful:
A network-printer (with ethernetcard) is connected to the NT-Clients
via our UNIX-Fileserver (SAMBA-Server), like the configuration told by
Matthew Harrell harrell@leech.nrl.navy.mil (see WinNT.txt)
<enum>
<item>If a user has choosen this printer as the default printer in his
NT-Session and this printer is not connected to the network
(e.g. switched off) than this user has a problem with the SAMBA-
connection of his filesystems. It's very slow.
<item>If the printer is connected to the network everything works fine.
<item>When the smbd ist started with debug level 3, you can see that the
NT spooling system try to connect to the printer many times. If the
printer ist not connected to the network this request fails and the
NT spooler is wasting a lot of time to connect to the printer service.
This seems to be the reason for the slow network connection.
<item>Maybe it's possible to change this behaviour by setting different
printer properties in the Print-Manager-Menu of NT, but i didn't try it yet.
</enum>
<sect1>Why are my file's timestamps off by an hour, or by a few hours?<p><label id="dst_bugs">
This is from Paul Eggert eggert@twinsun.com.
Most likely it's a problem with your time zone settings.
Internally, Samba maintains time in traditional Unix format,
namely, the number of seconds since 1970-01-01 00:00:00 Universal Time
(or ``GMT''), not counting leap seconds.
On the server side, Samba uses the Unix TZ variable to convert
internal timestamps to and from local time. So on the server side, there are
two things to get right.
<enum>
<item>The Unix system clock must have the correct Universal time.
Use the shell command "sh -c 'TZ=UTC0 date'" to check this.
<item>The TZ environment variable must be set on the server
before Samba is invoked. The details of this depend on the
server OS, but typically you must edit a file whose name is
/etc/TIMEZONE or /etc/default/init, or run the command `zic -l'.
<item>TZ must have the correct value.
<enum>
<item>If possible, use geographical time zone settings
(e.g. TZ='America/Los_Angeles' or perhaps
TZ=':US/Pacific'). These are supported by most
popular Unix OSes, are easier to get right, and are
more accurate for historical timestamps. If your
operating system has out-of-date tables, you should be
able to update them from the public domain time zone
tables at <url url="ftp://elsie.nci.nih.gov/pub/">.
<item>If your system does not support geographical timezone
settings, you must use a Posix-style TZ strings, e.g.
TZ='PST8PDT,M4.1.0/2,M10.5.0/2' for US Pacific time.
Posix TZ strings can take the following form (with optional
items in brackets):
<verb>
StdOffset[Dst[Offset],Date/Time,Date/Time]
</verb>
where:
<itemize>
<item> `Std' is the standard time designation (e.g. `PST').
<item> `Offset' is the number of hours behind UTC (e.g. `8').
Prepend a `-' if you are ahead of UTC, and
append `:30' if you are at a half-hour offset.
Omit all the remaining items if you do not use
daylight-saving time.
<item> `Dst' is the daylight-saving time designation
(e.g. `PDT').
The optional second `Offset' is the number of
hours that daylight-saving time is behind UTC.
The default is 1 hour ahead of standard time.
<item> `Date/Time,Date/Time' specify when daylight-saving
time starts and ends. The format for a date is
`Mm.n.d', which specifies the dth day (0 is Sunday)
of the nth week of the mth month, where week 5 means
the last such day in the month. The format for a
time is [h]h[:mm[:ss]], using a 24-hour clock.
</itemize>
Other Posix string formats are allowed but you don't want
to know about them.
</enum>
</enum>
On the client side, you must make sure that your client's clock and
time zone is also set appropriately. [[I don't know how to do this.]]
Samba traditionally has had many problems dealing with time zones, due
to the bizarre ways that Microsoft network protocols handle time
zones. A common symptom is for file timestamps to be off by an hour.
To work around the problem, try disconnecting from your Samba server
and then reconnecting to it; or upgrade your Samba server to
1.9.16alpha10 or later.
<sect1> How do I set the printer driver name correctly? <p><label id="printer_driver_name">
Question:
On NT, I opened "Printer Manager" and "Connect to Printer".
Enter ["\\ptdi270\ps1"] in the box of printer. I got the
following error message:
<tscreen><verb>
You do not have sufficient access to your machine
to connect to the selected printer, since a driver
needs to be installed locally.
</verb></tscreen>
Answer:
In the more recent versions of Samba you can now set the "printer
driver" in smb.conf. This tells the client what driver to use. For
example:
<tscreen><verb>
printer driver = HP LaserJet 4L
</verb></tscreen>
with this, NT knows to use the right driver. You have to get this string
exactly right.
To find the exact string to use, you need to get to the dialog box in
your client where you select which printer driver to install. The
correct strings for all the different printers are shown in a listbox
in that dialog box.
You could also try setting the driver to NULL like this:
<tscreen><verb>
printer driver = NULL
</verb></tscreen>
this is effectively what older versions of Samba did, so if that
worked for you then give it a go. If this does work then let us know via <htmlurl url="mailto:samba-bugs@samba.anu.edu.au" name="samba-bugs@samba.anu.edu.au">,
and we'll make it the default. Currently the default is a 0 length
string.
<sect1>I've applied NT 4.0 SP3, and now I can't access Samba shares, Why?<p><label id="NT_SP3_FIX">
As of SP3, Microsoft has decided that they will no longer default to
passing clear text passwords over the network. To enable access to
Samba shares from NT 4.0 SP3, you must do <bf>ONE</bf> of two things:
<enum>
<item> Set the Samba configuration option 'security = user' and implement all of the stuff detailed in <url url="ftp://samba.anu.edu.au/pub/samba/docs/ENCRYPTION.txt" name="ENCRYPTION.txt">.
<item> Follow Microsoft's directions for setting your NT box to allow plain text passwords. see <url url="http://www.microsoft.com/kb/articles/q166/7/30.htm" name="Knowledge Base Article Q166730">