1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

large set of updates converting some of the textdocs to SGML/DocBook.

I think these were originally from Jelmer, but I've lost
the original message.

Also had some syntax errors in the manpages (does no one regenerate
after making changes to the SGML source?)

Still have some developer specific docs to add from Jelmer in the next
go around....
This commit is contained in:
Gerald Carter -
parent cb72eead70
commit 5f673b7883
29 changed files with 11428 additions and 3536 deletions

Binary file not shown.

View File

@ -61,7 +61,9 @@ HOWTOSRC=projdoc/DOMAIN_MEMBER.sgml projdoc/NT_Security.sgml \
projdoc/Samba-PDC-HOWTO.sgml projdoc/ENCRYPTION.sgml \
projdoc/CVS-Access.sgml projdoc/Integrating-with-Windows.sgml \
projdoc/PAM-Authentication-And-Samba.sgml projdoc/Samba-LDAP-HOWTO.sgml \
projdoc/Samba-BDC-HOWTO.sgml
projdoc/Samba-BDC-HOWTO.sgml projdoc/Printing.sgml projdoc/Diagnosis.sgml \
projdoc/security_level.sgml projdoc/Browsing.sgml projdoc/Bugs.sgml \
projdoc/Speed.sgml

View File

@ -728,7 +728,7 @@
<listitem><para><link linkend="SOCKETADDRESS"><parameter>socket address</parameter></link></para></listitem>
<listitem><para><link linkend="SOCKETOPTIONS"><parameter>socket options</parameter></link></para></listitem>
<listitem><para><link linkend="SOURCEENVIRONMENT"><parameter>source environment</parameter></link></para></listitem>
<listitem><para><link linkend="SPNEGO"><parameter>use spnego</parameter></link></para></listitem>
<listitem><para><link linkend="STATCACHE"><parameter>stat cache</parameter></link></para></listitem>
<listitem><para><link linkend="STATCACHESIZE"><parameter>stat cache size</parameter></link></para></listitem>
<listitem><para><link linkend="STRIPDOT"><parameter>strip dot</parameter></link></para></listitem>
@ -1102,7 +1102,13 @@
%u</command></para>
</listitem>
</varlistentry>
<varlistentry><term><anchor id="ADDGROUPSCRIPT">add group script (G)</term>
<listitem><para>This is the full pathname to a script that will
be run <emphasis>AS ROOT</emphasis> by <ulink url="smbd.8.html">smbd(8) when a new group is requested. It will expand any <parameter>%g</parameter> to the group name passed. This script is only useful for installations using the Windows NT domain administration tools.
</ulink>
</para></listitem>
</varlistentry>
<varlistentry>
@ -1910,6 +1916,7 @@
<para>This script is called when a remote client removes a user
from the server, normally using 'User Manager for Domains' or
<command>rpcclient</command>.
</para>
<para>This script should delete the given UNIX username.
</para>
@ -3281,10 +3288,9 @@
<varlistentry>
<term><anchor id="LDAPADMINDN">ldap admin dn (G)</term>
<para>
The <parameter>ldap admin dn</parameter> defines the Distinguished
Name (DN) name used by Samba to contact the <link linkend="LDAPSERVER">ldap
server</link> when retreiving user account information. The <parameter>ldap
<listitem><para> The <parameter>ldap admin dn</parameter> defines the Distinguished
Name (DN) name used by Samba to contact the ldap server when retreiving
user account information. The <parameter>ldap
admin dn</parameter> is used in conjunction with the admin dn password
stored in the <filename>private/secrets.tdb</filename> file. See the
<ulink url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink> man
@ -3301,8 +3307,7 @@
<varlistentry>
<term><anchor id="LDAPFILTER">ldap filter (G)</term>
<para>
This parameter specifies the RFC 2254 compliant LDAP search filter.
<listitem><para>This parameter specifies the RFC 2254 compliant LDAP search filter.
The default is to match the login name with the <constant>uid</constant>
attribute for all entries matching the <constant>sambaAccount</constant>
objectclass. Note that this filter should only return one entry.
@ -3316,10 +3321,9 @@
<varlistentry>
<term><anchor id="LDAPSSL">ldap ssl (G)</term>
<para>
This option is used to define whether or not Samba should
use SSL when connecting to the <link linkend="LDAPSERVER"><parameter>ldap
server</parameter></link>. This is <emphasis>NOT</emphasis> related to
<listitem><para>This option is used to define whether or not Samba should
use SSL when connecting to the ldap server
This is <emphasis>NOT</emphasis> related to
Samba's previous SSL support which was enabled by specifying the
<command>--with-ssl</command> option to the <filename>configure</filename>
script.
@ -3365,7 +3369,7 @@
<varlistentry>
<term><anchor id="LDAPSUFFIX">ldap machine suffix (G)</term>
<term><anchor id="LDAPMACHINESUFFIX">ldap machine suffix (G)</term>
<listitem><para>It specifies where machines should be
added to the ldap tree.
</para>
@ -6962,7 +6966,12 @@
/usr/local/smb_env_vars</command></para>
</listitem>
</varlistentry>
<varlistentry>
<term><anchor id="SPNEGO">use spnego (G)</term>
<listitem><para> This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000sp2 clients to agree upon an authentication mechanism. As of samba 3.0alpha it must be set to "no" for these clients to join a samba domain controller. It can be set to "yes" to allow samba to participate in an AD domain controlled by a Windows2000 domain controller.</para>
<para>Default: <emphasis>use spnego = yes</emphasis></para>
</listitem>
</varlistentry>
<varlistentry>
<term><anchor id="STATCACHE">stat cache (G)</term>

View File

@ -0,0 +1,800 @@
<chapter id="improved-browsing">
<chapterinfo>
<author>
<affiliation>
<orgname>Samba Team</orgname>
</affiliation>
</author>
<pubdate> (5 July 1998) </pubdate>
</chapterinfo>
<title>Improved browsing in samba</title>
<sect1>
<title>Overview of browsing</title>
<para>
SMB networking provides a mechanism by which clients can access a list
of machines in a network, a so-called "browse list". This list
contains machines that are ready to offer file and/or print services
to other machines within the network. Thus it does not include
machines which aren't currently able to do server tasks. The browse
list is heavily used by all SMB clients. Configuration of SMB
browsing has been problematic for some Samba users, hence this
document.
</para>
<para>
Browsing will NOT work if name resolution from NetBIOS names to IP
addresses does not function correctly. Use of a WINS server is highly
recommended to aid the resolution of NetBIOS (SMB) names to IP addresses.
WINS allows remote segment clients to obtain NetBIOS name_type information
that can NOT be provided by any other means of name resolution.
</para>
</sect1>
<sect1>
<title>Browsing support in samba</title>
<para>
Samba now fully supports browsing. The browsing is supported by nmbd
and is also controlled by options in the smb.conf file (see smb.conf(5)).
</para>
<para>
Samba can act as a local browse master for a workgroup and the ability
for samba to support domain logons and scripts is now available. See
DOMAIN.txt for more information on domain logons.
</para>
<para>
Samba can also act as a domain master browser for a workgroup. This
means that it will collate lists from local browse masters into a
wide area network server list. In order for browse clients to
resolve the names they may find in this list, it is recommended that
both samba and your clients use a WINS server.
</para>
<para>
Note that you should NOT set Samba to be the domain master for a
workgroup that has the same name as an NT Domain: on each wide area
network, you must only ever have one domain master browser per workgroup,
regardless of whether it is NT, Samba or any other type of domain master
that is providing this service.
</para>
<para>
[Note that nmbd can be configured as a WINS server, but it is not
necessary to specifically use samba as your WINS server. NTAS can
be configured as your WINS server. In a mixed NT server and
samba environment on a Wide Area Network, it is recommended that
you use the NT server's WINS server capabilities. In a samba-only
environment, it is recommended that you use one and only one nmbd
as your WINS server].
</para>
<para>
To get browsing to work you need to run nmbd as usual, but will need
to use the "workgroup" option in smb.conf to control what workgroup
Samba becomes a part of.
</para>
<para>
Samba also has a useful option for a Samba server to offer itself for
browsing on another subnet. It is recommended that this option is only
used for 'unusual' purposes: announcements over the internet, for
example. See "remote announce" in the smb.conf man page.
</para>
</sect1>
<sect1>
<title>Problem resolution</title>
<para>
If something doesn't work then hopefully the log.nmb file will help
you track down the problem. Try a debug level of 2 or 3 for finding
problems. Also note that the current browse list usually gets stored
in text form in a file called browse.dat.
</para>
<para>
Note that if it doesn't work for you, then you should still be able to
type the server name as \\SERVER in filemanager then hit enter and
filemanager should display the list of available shares.
</para>
<para>
Some people find browsing fails because they don't have the global
"guest account" set to a valid account. Remember that the IPC$
connection that lists the shares is done as guest, and thus you must
have a valid guest account.
</para>
<para>
Also, a lot of people are getting bitten by the problem of too many
parameters on the command line of nmbd in inetd.conf. This trick is to
not use spaces between the option and the parameter (eg: -d2 instead
of -d 2), and to not use the -B and -N options. New versions of nmbd
are now far more likely to correctly find your broadcast and network
address, so in most cases these aren't needed.
</para>
<para>
The other big problem people have is that their broadcast address,
netmask or IP address is wrong (specified with the "interfaces" option
in smb.conf)
</para>
</sect1>
<sect1>
<title>Browsing across subnets</title>
<para>
With the release of Samba 1.9.17(alpha1 and above) Samba has been
updated to enable it to support the replication of browse lists
across subnet boundaries. New code and options have been added to
achieve this. This section describes how to set this feature up
in different settings.
</para>
<para>
To see browse lists that span TCP/IP subnets (ie. networks separated
by routers that don't pass broadcast traffic) you must set up at least
one WINS server. The WINS server acts as a DNS for NetBIOS names, allowing
NetBIOS name to IP address translation to be done by doing a direct
query of the WINS server. This is done via a directed UDP packet on
port 137 to the WINS server machine. The reason for a WINS server is
that by default, all NetBIOS name to IP address translation is done
by broadcasts from the querying machine. This means that machines
on one subnet will not be able to resolve the names of machines on
another subnet without using a WINS server.
</para>
<para>
Remember, for browsing across subnets to work correctly, all machines,
be they Windows 95, Windows NT, or Samba servers must have the IP address
of a WINS server given to them by a DHCP server, or by manual configuration
(for Win95 and WinNT, this is in the TCP/IP Properties, under Network
settings) for Samba this is in the smb.conf file.
</para>
<sect2>
<title>How does cross subnet browsing work ?</title>
<para>
Cross subnet browsing is a complicated dance, containing multiple
moving parts. It has taken Microsoft several years to get the code
that achieves this correct, and Samba lags behind in some areas.
However, with the 1.9.17 release, Samba is capable of cross subnet
browsing when configured correctly.
</para>
<para>
Consider a network set up as follows :
</para>
<para>
<programlisting>
(DMB)
N1_A N1_B N1_C N1_D N1_E
| | | | |
-------------------------------------------------------
| subnet 1 |
+---+ +---+
|R1 | Router 1 Router 2 |R2 |
+---+ +---+
| |
| subnet 2 subnet 3 |
-------------------------- ------------------------------------
| | | | | | | |
N2_A N2_B N2_C N2_D N3_A N3_B N3_C N3_D
(WINS)
</programlisting>
</para>
<para>
Consisting of 3 subnets (1, 2, 3) connected by two routers
(R1, R2) - these do not pass broadcasts. Subnet 1 has 5 machines
on it, subnet 2 has 4 machines, subnet 3 has 4 machines. Assume
for the moment that all these machines are configured to be in the
same workgroup (for simplicities sake). Machine N1_C on subnet 1
is configured as Domain Master Browser (ie. it will collate the
browse lists for the workgroup). Machine N2_D is configured as
WINS server and all the other machines are configured to register
their NetBIOS names with it.
</para>
<para>
As all these machines are booted up, elections for master browsers
will take place on each of the three subnets. Assume that machine
N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on
subnet 3 - these machines are known as local master browsers for
their particular subnet. N1_C has an advantage in winning as the
local master browser on subnet 1 as it is set up as Domain Master
Browser.
</para>
<para>
On each of the three networks, machines that are configured to
offer sharing services will broadcast that they are offering
these services. The local master browser on each subnet will
receive these broadcasts and keep a record of the fact that
the machine is offering a service. This list of records is
the basis of the browse list. For this case, assume that
all the machines are configured to offer services so all machines
will be on the browse list.
</para>
<para>
For each network, the local master browser on that network is
considered 'authoritative' for all the names it receives via
local broadcast. This is because a machine seen by the local
master browser via a local broadcast must be on the same
network as the local master browser and thus is a 'trusted'
and 'verifiable' resource. Machines on other networks that
the local master browsers learn about when collating their
browse lists have not been directly seen - these records are
called 'non-authoritative'.
</para>
<para>
At this point the browse lists look as follows (these are
the machines you would see in your network neighborhood if
you looked in it on a particular network right now).
</para>
<para>
<programlisting>
Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
</programlisting>
</para>
<para>
Note that at this point all the subnets are separate, no
machine is seen across any of the subnets.
</para>
<para>
Now examine subnet 2. As soon as N2_B has become the local
master browser it looks for a Domain master browser to synchronize
its browse list with. It does this by querying the WINS server
(N2_D) for the IP address associated with the NetBIOS name
WORKGROUP&gt;1B&lt;. This name was registerd by the Domain master
browser (N1_C) with the WINS server as soon as it was booted.
</para>
<para>
Once N2_B knows the address of the Domain master browser it
tells it that is the local master browser for subnet 2 by
sending a MasterAnnouncement packet as a UDP port 138 packet.
It then synchronizes with it by doing a NetServerEnum2 call. This
tells the Domain Master Browser to send it all the server
names it knows about. Once the domain master browser receives
the MasterAnnouncement packet it schedules a synchronization
request to the sender of that packet. After both synchronizations
are done the browse lists look like :
</para>
<para>
<programlisting>
Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
Servers with a (*) after them are non-authoritative names.
</programlisting>
</para>
<para>
At this point users looking in their network neighborhood on
subnets 1 or 2 will see all the servers on both, users on
subnet 3 will still only see the servers on their own subnet.
</para>
<para>
The same sequence of events that occured for N2_B now occurs
for the local master browser on subnet 3 (N3_D). When it
synchronizes browse lists with the domain master browser (N1_A)
it gets both the server entries on subnet 1, and those on
subnet 2. After N3_D has synchronized with N1_C and vica-versa
the browse lists look like.
</para>
<para>
<programlisting>
Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*),
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Servers with a (*) after them are non-authoritative names.
</programlisting>
</para>
<para>
At this point users looking in their network neighborhood on
subnets 1 or 3 will see all the servers on all sunbets, users on
subnet 2 will still only see the servers on subnets 1 and 2, but not 3.
</para>
<para>
Finally, the local master browser for subnet 2 (N2_B) will sync again
with the domain master browser (N1_C) and will recieve the missing
server entries. Finally - and as a steady state (if no machines
are removed or shut off) the browse lists will look like :
</para>
<para>
<programlisting>
Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*),
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Servers with a (*) after them are non-authoritative names.
</programlisting>
</para>
<para>
Synchronizations between the domain master browser and local
master browsers will continue to occur, but this should be a
steady state situation.
</para>
<para>
If either router R1 or R2 fails the following will occur:
</para>
<orderedlist>
<listitem>
<para>
Names of computers on each side of the inaccessible network fragments
will be maintained for as long as 36 minutes, in the network neighbourhood
lists.
</para>
</listitem>
<listitem>
<para>
Attempts to connect to these inaccessible computers will fail, but the
names will not be removed from the network neighbourhood lists.
</para>
</listitem>
<listitem>
<para>
If one of the fragments is cut off from the WINS server, it will only
be able to access servers on its local subnet, by using subnet-isolated
broadcast NetBIOS name resolution. The effects are similar to that of
losing access to a DNS server.
</para>
</listitem>
</orderedlist>
</sect2>
</sect1>
<sect1>
<title>Setting up a WINS server</title>
<para>
Either a Samba machine or a Windows NT Server machine may be set up
as a WINS server. To set a Samba machine to be a WINS server you must
add the following option to the smb.conf file on the selected machine :
in the [globals] section add the line
</para>
<para>
<command> wins support = yes</command>
</para>
<para>
Versions of Samba previous to 1.9.17 had this parameter default to
yes. If you have any older versions of Samba on your network it is
strongly suggested you upgrade to 1.9.17 or above, or at the very
least set the parameter to 'no' on all these machines.
</para>
<para>
Machines with "<command>wins support = yes</command>" will keep a list of
all NetBIOS names registered with them, acting as a DNS for NetBIOS names.
</para>
<para>
You should set up only ONE wins server. Do NOT set the
"<command>wins support = yes</command>" option on more than one Samba
server.
</para>
<para>
To set up a Windows NT Server as a WINS server you need to set up
the WINS service - see your NT documentation for details. Note that
Windows NT WINS Servers can replicate to each other, allowing more
than one to be set up in a complex subnet environment. As Microsoft
refuse to document these replication protocols Samba cannot currently
participate in these replications. It is possible in the future that
a Samba->Samba WINS replication protocol may be defined, in which
case more than one Samba machine could be set up as a WINS server
but currently only one Samba server should have the "wins support = yes"
parameter set.
</para>
<para>
After the WINS server has been configured you must ensure that all
machines participating on the network are configured with the address
of this WINS server. If your WINS server is a Samba machine, fill in
the Samba machine IP address in the "Primary WINS Server" field of
the "Control Panel->Network->Protocols->TCP->WINS Server" dialogs
in Windows 95 or Windows NT. To tell a Samba server the IP address
of the WINS server add the following line to the [global] section of
all smb.conf files :
</para>
<para>
<command> wins server = &gt;name or IP address&lt;</command>
</para>
<para>
where &gt;name or IP address&lt; is either the DNS name of the WINS server
machine or its IP address.
</para>
<para>
Note that this line MUST NOT BE SET in the smb.conf file of the Samba
server acting as the WINS server itself. If you set both the
"<command>wins support = yes</command>" option and the
"<command>wins server = &gt;name&lt;</command>" option then
nmbd will fail to start.
</para>
<para>
There are two possible scenarios for setting up cross subnet browsing.
The first details setting up cross subnet browsing on a network containing
Windows 95, Samba and Windows NT machines that are not configured as
part of a Windows NT Domain. The second details setting up cross subnet
browsing on networks that contain NT Domains.
</para>
</sect1>
<sect1>
<title>Setting up Browsing in a WORKGROUP</title>
<para>
To set up cross subnet browsing on a network containing machines
in up to be in a WORKGROUP, not an NT Domain you need to set up one
Samba server to be the Domain Master Browser (note that this is *NOT*
the same as a Primary Domain Controller, although in an NT Domain the
same machine plays both roles). The role of a Domain master browser is
to collate the browse lists from local master browsers on all the
subnets that have a machine participating in the workgroup. Without
one machine configured as a domain master browser each subnet would
be an isolated workgroup, unable to see any machines on any other
subnet. It is the presense of a domain master browser that makes
cross subnet browsing possible for a workgroup.
</para>
<para>
In an WORKGROUP environment the domain master browser must be a
Samba server, and there must only be one domain master browser per
workgroup name. To set up a Samba server as a domain master browser,
set the following option in the [global] section of the smb.conf file :
</para>
<para>
<command> domain master = yes</command>
</para>
<para>
The domain master browser should also preferrably be the local master
browser for its own subnet. In order to achieve this set the following
options in the [global] section of the smb.conf file :
</para>
<para>
<programlisting>
domain master = yes
local master = yes
preferred master = yes
os level = 65
</programlisting>
</para>
<para>
The domain master browser may be the same machine as the WINS
server, if you require.
</para>
<para>
Next, you should ensure that each of the subnets contains a
machine that can act as a local master browser for the
workgroup. Any NT machine should be able to do this, as will
Windows 95 machines (although these tend to get rebooted more
often, so it's not such a good idea to use these). To make a
Samba server a local master browser set the following
options in the [global] section of the smb.conf file :
</para>
<para>
<programlisting>
domain master = no
local master = yes
preferred master = yes
os level = 65
</programlisting>
</para>
<para>
Do not do this for more than one Samba server on each subnet,
or they will war with each other over which is to be the local
master browser.
</para>
<para>
The "local master" parameter allows Samba to act as a local master
browser. The "preferred master" causes nmbd to force a browser
election on startup and the "os level" parameter sets Samba high
enough so that it should win any browser elections.
</para>
<para>
If you have an NT machine on the subnet that you wish to
be the local master browser then you can disable Samba from
becoming a local master browser by setting the following
options in the [global] section of the smb.conf file :
</para>
<para>
<programlisting>
domain master = no
local master = no
preferred master = no
os level = 0
</programlisting>
</para>
</sect1>
<sect1>
<title>Setting up Browsing in a DOMAIN</title>
<para>
If you are adding Samba servers to a Windows NT Domain then
you must not set up a Samba server as a domain master browser.
By default, a Windows NT Primary Domain Controller for a Domain
name is also the Domain master browser for that name, and many
things will break if a Samba server registers the Domain master
browser NetBIOS name (DOMAIN&gt;1B&lt;) with WINS instead of the PDC.
</para>
<para>
For subnets other than the one containing the Windows NT PDC
you may set up Samba servers as local master browsers as
described. To make a Samba server a local master browser set
the following options in the [global] section of the smb.conf
file :
</para>
<para>
<programlisting>
domain master = no
local master = yes
preferred master = yes
os level = 65
</programlisting>
</para>
<para>
If you wish to have a Samba server fight the election with machines
on the same subnet you may set the "os level" parameter to lower
levels. By doing this you can tune the order of machines that
will become local master browsers if they are running. For
more details on this see the section "FORCING SAMBA TO BE THE MASTER"
below.
</para>
<para>
If you have Windows NT machines that are members of the domain
on all subnets, and you are sure they will always be running then
you can disable Samba from taking part in browser elections and
ever becoming a local master browser by setting following options
in the [global] section of the smb.conf file :
</para>
<para>
<command>
domain master = no
local master = no
preferred master = no
os level = 0
</command>
</para>
</sect1>
<sect1>
<title>Forcing samba to be the master</title>
<para>
Who becomes the "master browser" is determined by an election process
using broadcasts. Each election packet contains a number of parameters
which determine what precedence (bias) a host should have in the
election. By default Samba uses a very low precedence and thus loses
elections to just about anyone else.
</para>
<para>
If you want Samba to win elections then just set the "os level" global
option in smb.conf to a higher number. It defaults to 0. Using 34
would make it win all elections over every other system (except other
samba systems!)
</para>
<para>
A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A
NTAS domain controller uses level 32.
</para>
<para>The maximum os level is 255</para>
<para>
If you want samba to force an election on startup, then set the
"preferred master" global option in smb.conf to "yes". Samba will
then have a slight advantage over other potential master browsers
that are not preferred master browsers. Use this parameter with
care, as if you have two hosts (whether they are windows 95 or NT or
samba) on the same local subnet both set with "preferred master" to
"yes", then periodically and continually they will force an election
in order to become the local master browser.
</para>
<para>
If you want samba to be a "domain master browser", then it is
recommended that you also set "preferred master" to "yes", because
samba will not become a domain master browser for the whole of your
LAN or WAN if it is not also a local master browser on its own
broadcast isolated subnet.
</para>
<para>
It is possible to configure two samba servers to attempt to become
the domain master browser for a domain. The first server that comes
up will be the domain master browser. All other samba servers will
attempt to become the domain master browser every 5 minutes. They
will find that another samba server is already the domain master
browser and will fail. This provides automatic redundancy, should
the current domain master browser fail.
</para>
</sect1>
<sect1>
<title>Making samba the domain master</title>
<para>
The domain master is responsible for collating the browse lists of
multiple subnets so that browsing can occur between subnets. You can
make samba act as the domain master by setting "domain master = yes"
in smb.conf. By default it will not be a domain master.
</para>
<para>
Note that you should NOT set Samba to be the domain master for a
workgroup that has the same name as an NT Domain.
</para>
<para>
When samba is the domain master and the master browser it will listen
for master announcements (made roughly every twelve minutes) from local
master browsers on other subnets and then contact them to synchronise
browse lists.
</para>
<para>
If you want samba to be the domain master then I suggest you also set
the "os level" high enough to make sure it wins elections, and set
"preferred master" to "yes", to get samba to force an election on
startup.
</para>
<para>
Note that all your servers (including samba) and clients should be
using a WINS server to resolve NetBIOS names. If your clients are only
using broadcasting to resolve NetBIOS names, then two things will occur:
</para>
<orderedlist>
<listitem>
<para>
your local master browsers will be unable to find a domain master
browser, as it will only be looking on the local subnet.
</para>
</listitem>
<listitem>
<para>
if a client happens to get hold of a domain-wide browse list, and
a user attempts to access a host in that list, it will be unable to
resolve the NetBIOS name of that host.
</para>
</listitem>
</orderedlist>
<para>
If, however, both samba and your clients are using a WINS server, then:
</para>
<orderedlist>
<listitem>
<para>
your local master browsers will contact the WINS server and, as long as
samba has registered that it is a domain master browser with the WINS
server, your local master browser will receive samba's ip address
as its domain master browser.
</para>
</listitem>
<listitem>
<para>
when a client receives a domain-wide browse list, and a user attempts
to access a host in that list, it will contact the WINS server to
resolve the NetBIOS name of that host. as long as that host has
registered its NetBIOS name with the same WINS server, the user will
be able to see that host.
</para>
</listitem>
</orderedlist>
</sect1>
<sect1>
<title>Note about broadcast addresses</title>
<para>
If your network uses a "0" based broadcast address (for example if it
ends in a 0) then you will strike problems. Windows for Workgroups
does not seem to support a 0's broadcast and you will probably find
that browsing and name lookups won't work.
</para>
</sect1>
<sect1>
<title>Multiple interfaces</title>
<para>
Samba now supports machines with multiple network interfaces. If you
have multiple interfaces then you will need to use the "interfaces"
option in smb.conf to configure them. See smb.conf(5) for details.
</para>
</sect1>
</chapter>

View File

@ -0,0 +1,202 @@
<chapter id="bugreport">
<chapterinfo>
<author>
<affiliation>
<orgname>Samba Team</orgname>
</affiliation>
</author>
<pubdate> 27 June 1997 </pubdate>
</chapterinfo>
<title>Reporting Bugs</title>
<sect1>
<title>Introduction</title>
<para>
The email address for bug reports is samba@samba.org
</para>
<para>
Please take the time to read this file before you submit a bug
report. Also, please see if it has changed between releases, as we
may be changing the bug reporting mechanism at some time.
</para>
<para>
Please also do as much as you can yourself to help track down the
bug. Samba is maintained by a dedicated group of people who volunteer
their time, skills and efforts. We receive far more mail about it than
we can possibly answer, so you have a much higher chance of an answer
and a fix if you send us a "developer friendly" bug report that lets
us fix it fast.
</para>
<para>
Do not assume that if you post the bug to the comp.protocols.smb
newsgroup or the mailing list that we will read it. If you suspect that your
problem is not a bug but a configuration problem then it is better to send
it to the Samba mailing list, as there are (at last count) 5000 other users on
that list that may be able to help you.
</para>
<para>
You may also like to look though the recent mailing list archives,
which are conveniently accessible on the Samba web pages
at http://samba.org/samba/
</para>
</sect1>
<sect1>
<title>General info</title>
<para>
Before submitting a bug report check your config for silly
errors. Look in your log files for obvious messages that tell you that
you've misconfigured something and run testparm to test your config
file for correct syntax.
</para>
<para>
Have you run through the <ulink url="Diagnosis.html">diagnosis</ulink>?
This is very important.
</para>
<para>
If you include part of a log file with your bug report then be sure to
annotate it with exactly what you were doing on the client at the
time, and exactly what the results were.
</para>
</sect1>
<sect1>
<title>Debug levels</title>
<para>
If the bug has anything to do with Samba behaving incorrectly as a
server (like refusing to open a file) then the log files will probably
be very useful. Depending on the problem a log level of between 3 and
10 showing the problem may be appropriate. A higher level givesmore
detail, but may use too much disk space.
</para>
<para>
To set the debug level use <command>log level =</command> in your
<filename>smb.conf</filename>. You may also find it useful to set the log
level higher for just one machine and keep separate logs for each machine.
To do this use:
</para>
<para><programlisting>
log level = 10
log file = /usr/local/samba/lib/log.%m
include = /usr/local/samba/lib/smb.conf.%m
</programlisting></para>
<para>
then create a file
<filename>/usr/local/samba/lib/smb.conf.machine</filename> where
"machine" is the name of the client you wish to debug. In that file
put any smb.conf commands you want, for example
<command>log level=</command> may be useful. This also allows you to
experiment with different security systems, protocol levels etc on just
one machine.
</para>
<para>
The <filename>smb.conf</filename> entry <command>log level =</command>
is synonymous with the entry <command>debuglevel =</command> that has been
used in older versions of Samba and is being retained for backwards
compatibility of smb.conf files.
</para>
<para>
As the <command>log level =</command> value is increased you will record
a significantly increasing level of debugging information. For most
debugging operations you may not need a setting higher than 3. Nearly
all bugs can be tracked at a setting of 10, but be prepared for a VERY
large volume of log data.
</para>
</sect1>
<sect1>
<title>Internal errors</title>
<para>
If you get a "INTERNAL ERROR" message in your log files it means that
Samba got an unexpected signal while running. It is probably a
segmentation fault and almost certainly means a bug in Samba (unless
you have faulty hardware or system software)
</para>
<para>
If the message came from smbd then it will probably be accompanied by
a message which details the last SMB message received by smbd. This
info is often very useful in tracking down the problem so please
include it in your bug report.
</para>
<para>
You should also detail how to reproduce the problem, if
possible. Please make this reasonably detailed.
</para>
<para>
You may also find that a core file appeared in a "corefiles"
subdirectory of the directory where you keep your samba log
files. This file is the most useful tool for tracking down the bug. To
use it you do this:
</para>
<para><command>gdb smbd core</command></para>
<para>
adding appropriate paths to smbd and core so gdb can find them. If you
don't have gdb then try "dbx". Then within the debugger use the
command "where" to give a stack trace of where the problem
occurred. Include this in your mail.
</para>
<para>
If you known any assembly language then do a "disass" of the routine
where the problem occurred (if its in a library routine then
disassemble the routine that called it) and try to work out exactly
where the problem is by looking at the surrounding code. Even if you
don't know assembly then incuding this info in the bug report can be
useful.
</para>
</sect1>
<sect1>
<title>Attaching to a running process</title>
<para>
Unfortunately some unixes (in particular some recent linux kernels)
refuse to dump a core file if the task has changed uid (which smbd
does often). To debug with this sort of system you could try to attach
to the running process using "gdb smbd PID" where you get PID from
smbstatus. Then use "c" to continue and try to cause the core dump
using the client. The debugger should catch the fault and tell you
where it occurred.
</para>
</sect1>
<sect1>
<title>Patches</title>
<para>
The best sort of bug report is one that includes a fix! If you send us
patches please use <command>diff -u</command> format if your version of
diff supports it, otherwise use <command>diff -c4</command>. Make sure
your do the diff against a clean version of the source and let me know
exactly what version you used.
</para>
</sect1>
</chapter>

View File

@ -0,0 +1,509 @@
<chapter id="diagnosis">
<chapterinfo>
<author>
<firstname>Andrew</firstname><surname>Tridgell</surname>
<affiliation>
<orgname>Samba Team</orgname>
<address><email>tridge@samba.org</email></address>
</affiliation>
</author>
<pubdate> 1 November 1999</pubdate>
</chapterinfo>
<title>Diagnosing your samba server</title>
<sect1>
<title>Introduction</title>
<para>
This file contains a list of tests you can perform to validate your
Samba server. It also tells you what the likely cause of the problem
is if it fails any one of these steps. If it passes all these tests
then it is probably working fine.
</para>
<para>
You should do ALL the tests, in the order shown. I have tried to
carefully choose them so later tests only use capabilities verified in
the earlier tests.
</para>
<para>
If you send me an email saying "it doesn't work" and you have not
followed this test procedure then you should not be surprised if I
ignore your email.
</para>
</sect1>
<sect1>
<title>Assumptions</title>
<para>
In all of the tests I assume you have a Samba server called BIGSERVER
and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the
PC is running windows for workgroups with a recent copy of the
microsoft tcp/ip stack. Alternatively, your PC may be running Windows
95 or Windows NT (Workstation or Server).
</para>
<para>
The procedure is similar for other types of clients.
</para>
<para>
I also assume you know the name of an available share in your
smb.conf. I will assume this share is called "tmp". You can add a
"tmp" share like by adding the following to smb.conf:
</para>
<para><programlisting>
[tmp]
comment = temporary files
path = /tmp
read only = yes
</programlisting>
</para>
<para>
THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME
COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS
</para>
<para>
Please pay attention to the error messages you receive. If any error message
reports that your server is being unfriendly you should first check that you
IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf
file points to name servers that really do exist.
</para>
<para>
Also, if you do not have DNS server access for name resolution please check
that the settings for your smb.conf file results in "dns proxy = no". The
best way to check this is with "testparm smb.conf"
</para>
</sect1>
<sect1>
<title>Tests</title>
<sect2>
<title>Test 1</title>
<para>
In the directory in which you store your smb.conf file, run the command
"testparm smb.conf". If it reports any errors then your smb.conf
configuration file is faulty.
</para>
<para>
Note: Your smb.conf file may be located in: <filename>/etc</filename>
Or in: <filename>/usr/local/samba/lib</filename>
</para>
</sect2>
<sect2>
<title>Test 2</title>
<para>
Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from
the unix box. If you don't get a valid response then your TCP/IP
software is not correctly installed.
</para>
<para>
Note that you will need to start a "dos prompt" window on the PC to
run ping.
</para>
<para>
If you get a message saying "host not found" or similar then your DNS
software or /etc/hosts file is not correctly setup. It is possible to
run samba without DNS entries for the server and client, but I assume
you do have correct entries for the remainder of these tests.
</para>
<para>
Another reason why ping might fail is if your host is running firewall
software. You will need to relax the rules to let in the workstation
in question, perhaps by allowing access from another subnet (on Linux
this is done via the ipfwadm program.)
</para>
</sect2>
<sect2>
<title>Test 3</title>
<para>
Run the command "smbclient -L BIGSERVER" on the unix box. You
should get a list of available shares back.
</para>
<para>
If you get a error message containing the string "Bad password" then
you probably have either an incorrect "hosts allow", "hosts deny" or
"valid users" line in your smb.conf, or your guest account is not
valid. Check what your guest account is using "testparm" and
temporarily remove any "hosts allow", "hosts deny", "valid users" or
"invalid users" lines.
</para>
<para>
If you get a "connection refused" response then the smbd server may
not be running. If you installed it in inetd.conf then you probably edited
that file incorrectly. If you installed it as a daemon then check that
it is running, and check that the netbios-ssn port is in a LISTEN
state using "netstat -a".
</para>
<para>
If you get a "session request failed" then the server refused the
connection. If it says "Your server software is being unfriendly" then
its probably because you have invalid command line parameters to smbd,
or a similar fatal problem with the initial startup of smbd. Also
check your config file (smb.conf) for syntax errors with "testparm"
and that the various directories where samba keeps its log and lock
files exist.
</para>
<para>
There are a number of reasons for which smbd may refuse or decline
a session request. The most common of these involve one or more of
the following smb.conf file entries:
</para>
<para><programlisting>
hosts deny = ALL
hosts allow = xxx.xxx.xxx.xxx/yy
bind interfaces only = Yes
</programlisting></para>
<para>
In the above, no allowance has been made for any session requests that
will automatically translate to the loopback adaptor address 127.0.0.1.
To solve this problem change these lines to:
</para>
<para><programlisting>
hosts deny = ALL
hosts allow = xxx.xxx.xxx.xxx/yy 127.
</programlisting></para>
<para>
Do NOT use the "bind interfaces only" parameter where you may wish to
use the samba password change facility, or where smbclient may need to
access local service for name resolution or for local resource
connections. (Note: the "bind interfaces only" parameter deficiency
where it will not allow connections to the loopback address will be
fixed soon).
</para>
<para>
Another common cause of these two errors is having something already running
on port 139, such as Samba (ie: smbd is running from inetd already) or
something like Digital's Pathworks. Check your inetd.conf file before trying
to start smbd as a daemon, it can avoid a lot of frustration!
</para>
<para>
And yet another possible cause for failure of TEST 3 is when the subnet mask
and / or broadcast address settings are incorrect. Please check that the
network interface IP Address / Broadcast Address / Subnet Mask settings are
correct and that Samba has correctly noted these in the log.nmb file.
</para>
</sect2>
<sect2>
<title>Test 4</title>
<para>
Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the
IP address of your Samba server back.
</para>
<para>
If you don't then nmbd is incorrectly installed. Check your inetd.conf
if you run it from there, or that the daemon is running and listening
to udp port 137.
</para>
<para>
One common problem is that many inetd implementations can't take many
parameters on the command line. If this is the case then create a
one-line script that contains the right parameters and run that from
inetd.
</para>
</sect2>
<sect2>
<title>Test 5</title>
<para>run the command <command>nmblookup -B ACLIENT '*'</command></para>
<para>
You should get the PCs IP address back. If you don't then the client
software on the PC isn't installed correctly, or isn't started, or you
got the name of the PC wrong.
</para>
<para>
If ACLIENT doesn't resolve via DNS then use the IP address of the
client in the above test.
</para>
</sect2>
<sect2>
<title>Test 6</title>
<para>
Run the command <command>nmblookup -d 2 '*'</command>
</para>
<para>
This time we are trying the same as the previous test but are trying
it via a broadcast to the default broadcast address. A number of
Netbios/TCPIP hosts on the network should respond, although Samba may
not catch all of the responses in the short time it listens. You
should see "got a positive name query response" messages from several
hosts.
</para>
<para>
If this doesn't give a similar result to the previous test then
nmblookup isn't correctly getting your broadcast address through its
automatic mechanism. In this case you should experiment use the
"interfaces" option in smb.conf to manually configure your IP
address, broadcast and netmask.
</para>
<para>
If your PC and server aren't on the same subnet then you will need to
use the -B option to set the broadcast address to the that of the PCs
subnet.
</para>
<para>
This test will probably fail if your subnet mask and broadcast address are
not correct. (Refer to TEST 3 notes above).
</para>
</sect2>
<sect2>
<title>Test 7</title>
<para>
Run the command <command>smbclient //BIGSERVER/TMP</command>. You should
then be prompted for a password. You should use the password of the account
you are logged into the unix box with. If you want to test with
another account then add the -U &gt;accountname&lt; option to the end of
the command line. eg:
<command>smbclient //bigserver/tmp -Ujohndoe</command>
</para>
<para>
Note: It is possible to specify the password along with the username
as follows:
<command>smbclient //bigserver/tmp -Ujohndoe%secret</command>
</para>
<para>
Once you enter the password you should get the "smb>" prompt. If you
don't then look at the error message. If it says "invalid network
name" then the service "tmp" is not correctly setup in your smb.conf.
</para>
<para>
If it says "bad password" then the likely causes are:
</para>
<orderedlist>
<listitem>
<para>
you have shadow passords (or some other password system) but didn't
compile in support for them in smbd
</para>
</listitem>
<listitem>
<para>
your "valid users" configuration is incorrect
</para>
</listitem>
<listitem>
<para>
you have a mixed case password and you haven't enabled the "password
level" option at a high enough level
</para>
</listitem>
<listitem>
<para>
the "path =" line in smb.conf is incorrect. Check it with testparm
</para>
</listitem>
<listitem>
<para>
you enabled password encryption but didn't create the SMB encrypted
password file
</para>
</listitem>
</orderedlist>
<para>
Once connected you should be able to use the commands
<command>dir</command> <command>get</command> <command>put</command> etc.
Type <command>help &gt;command&lt;</command> for instructions. You should
especially check that the amount of free disk space shown is correct
when you type <command>dir</command>.
</para>
</sect2>
<sect2>
<title>Test 8</title>
<para>
On the PC type the command <command>net view \\BIGSERVER</command>. You will
need to do this from within a "dos prompt" window. You should get back a
list of available shares on the server.
</para>
<para>
If you get a "network name not found" or similar error then netbios
name resolution is not working. This is usually caused by a problem in
nmbd. To overcome it you could do one of the following (you only need
to choose one of them):
</para>
<orderedlist>
<listitem><para>
fixup the nmbd installation
</para></listitem>
<listitem><para>
add the IP address of BIGSERVER to the "wins server" box in the
advanced tcp/ip setup on the PC.
</para></listitem>
<listitem><para>
enable windows name resolution via DNS in the advanced section of
the tcp/ip setup
</para></listitem>
<listitem><para>
add BIGSERVER to your lmhosts file on the PC.
</para></listitem>
</orderedlist>
<para>
If you get a "invalid network name" or "bad password error" then the
same fixes apply as they did for the "smbclient -L" test above. In
particular, make sure your "hosts allow" line is correct (see the man
pages)
</para>
<para>
Also, do not overlook that fact that when the workstation requests the
connection to the samba server it will attempt to connect using the
name with which you logged onto your Windows machine. You need to make
sure that an account exists on your Samba server with that exact same
name and password.
</para>
<para>
If you get "specified computer is not receiving requests" or similar
it probably means that the host is not contactable via tcp services.
Check to see if the host is running tcp wrappers, and if so add an entry in
the hosts.allow file for your client (or subnet, etc.)
</para>
</sect2>
<sect2>
<title>Test 9</title>
<para>
Run the command <command>net use x: \\BIGSERVER\TMP</command>. You should
be prompted for a password then you should get a "command completed
successfully" message. If not then your PC software is incorrectly
installed or your smb.conf is incorrect. make sure your "hosts allow"
and other config lines in smb.conf are correct.
</para>
<para>
It's also possible that the server can't work out what user name to
connect you as. To see if this is the problem add the line "user =
USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the
username corresponding to the password you typed. If you find this
fixes things you may need the username mapping option.
</para>
</sect2>
<sect2>
<title>Test 10</title>
<para>
Run the command <command>nmblookup -M TESTGROUP</command> where
TESTGROUP is the name of the workgroup that your Samba server and
Windows PCs belong to. You should get back the IP address of the
master browser for that workgroup.
</para>
<para>
If you don't then the election process has failed. Wait a minute to
see if it is just being slow then try again. If it still fails after
that then look at the browsing options you have set in smb.conf. Make
sure you have <command>preferred master = yes</command> to ensure that
an election is held at startup.
</para>
</sect2>
<sect2>
<title>Test 11</title>
<para>
From file manager try to browse the server. Your samba server should
appear in the browse list of your local workgroup (or the one you
specified in smb.conf). You should be able to double click on the name
of the server and get a list of shares. If you get a "invalid
password" error when you do then you are probably running WinNT and it
is refusing to browse a server that has no encrypted password
capability and is in user level security mode. In this case either set
<command>security = server</command> AND
<command>password server = Windows_NT_Machine</command> in your
smb.conf file, or enable encrypted passwords AFTER compiling in support
for encrypted passwords (refer to the Makefile).
</para>
</sect2>
</sect1>
<sect1>
<title>Still having troubles?</title>
<para>
Try the mailing list or newsgroup, or use the ethereal utility to
sniff the problem. The official samba mailing list can be reached at
<ulink url="mailto:samba@samba.org">samba@samba.org</ulink>. To find
out more about samba and how to subscribe to the mailing list check
out the samba web page at
<ulink url="http://samba.org/samba">http://samba.org/samba</ulink>
</para>
<para>
Also look at the other docs in the Samba package!
</para>
</sect1>
</chapter>

View File

@ -0,0 +1,398 @@
<chapter id="printing_debug">
<chapterinfo>
<author>
<firstname>Patrick</firstname><surname>Powell</surname>
<affiliation>
<address><email>papowell@lprng.org</email></address>
</affiliation>
</author>
<pubdate>11 August 2000</pubdate>
</chapterinfo>
<title>Debugging Printing Problems</title>
<sect1>
<title>Introduction</title>
<para>
This is a short description of how to debug printing problems with
Samba. This describes how to debug problems with printing from a SMB
client to a Samba server, not the other way around. For the reverse
see the examples/printing directory.
</para>
<para>
Ok, so you want to print to a Samba server from your PC. The first
thing you need to understand is that Samba does not actually do any
printing itself, it just acts as a middleman between your PC client
and your Unix printing subsystem. Samba receives the file from the PC
then passes the file to a external "print command". What print command
you use is up to you.
</para>
<para>
The whole things is controlled using options in smb.conf. The most
relevant options (which you should look up in the smb.conf man page)
are:
</para>
<para><programlisting>
[global]
print command - send a file to a spooler
lpq command - get spool queue status
lprm command - remove a job
[printers]
path = /var/spool/lpd/samba
</programlisting></para>
<para>
The following are nice to know about:
</para>
<para><programlisting>
queuepause command - stop a printer or print queue
queueresume command - start a printer or print queue
</programlisting></para>
<para>
Example:
</para>
<para><programlisting>
print command = /usr/bin/lpr -r -P%p %s
lpq command = /usr/bin/lpq -P%p %s
lprm command = /usr/bin/lprm -P%p %j
queuepause command = /usr/sbin/lpc -P%p stop
queuepause command = /usr/sbin/lpc -P%p start
</programlisting></para>
<para>
Samba should set reasonable defaults for these depending on your
system type, but it isn't clairvoyant. It is not uncommon that you
have to tweak these for local conditions. The commands should
always have fully specified pathnames, as the smdb may not have
the correct PATH values.
</para>
<para>
When you send a job to Samba to be printed, it will make a temporary
copy of it in the directory specified in the [printers] section.
and it should be periodically cleaned out. The lpr -r option
requests that the temporary copy be removed after printing; If
printing fails then you might find leftover files in this directory,
and it should be periodically cleaned out. Samba used the lpq
command to determine the "job number" assigned to your print job
by the spooler.
</para>
<para>
The %&gt;letter&lt; are "macros" that get dynamically replaced with appropriate
values when they are used. The %s gets replaced with the name of the spool
file that Samba creates and the %p gets replaced with the name of the
printer. The %j gets replaced with the "job number" which comes from
the lpq output.
</para>
</sect1>
<sect1>
<title>Debugging printer problems</title>
<para>
One way to debug printing problems is to start by replacing these
command with shell scripts that record the arguments and the contents
of the print file. A simple example of this kind of things might
be:
</para>
<para><programlisting>
print command = /tmp/saveprint %p %s
#!/bin/saveprint
# we make sure that we are the right user
/usr/bin/id -p >/tmp/tmp.print
# we run the command and save the error messages
# replace the command with the one appropriate for your system
/usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print
</programlisting></para>
<para>
Then you print a file and try removing it. You may find that the
print queue needs to be stopped in order to see the queue status
and remove the job:
</para>
<para><programlisting>
h4: {42} % echo hi >/tmp/hi
h4: {43} % smbclient //localhost/lw4
added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
Password:
Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
smb: \> print /tmp/hi
putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
smb: \> queue
1049 3 hi-17534
smb: \> cancel 1049
Error cancelling job 1049 : code 0
smb: \> cancel 1049
Job 1049 cancelled
smb: \> queue
smb: \> exit
</programlisting></para>
<para>
The 'code 0' indicates that the job was removed. The comment
by the smbclient is a bit misleading on this.
You can observe the command output and then and look at the
/tmp/tmp.print file to see what the results are. You can quickly
find out if the problem is with your printing system. Often people
have problems with their /etc/printcap file or permissions on
various print queues.
</para>
</sect1>
<sect1>
<title>What printers do I have?</title>
<para>
You can use the 'testprns' program to check to see if the printer
name you are using is recognized by Samba. For example, you can
use:
</para>
<para><programlisting>
testprns printer /etc/printcap
</programlisting></para>
<para>
Samba can get its printcap information from a file or from a program.
You can try the following to see the format of the extracted
information:
</para>
<para><programlisting>
testprns -a printer /etc/printcap
testprns -a printer '|/bin/cat printcap'
</programlisting></para>
</sect1>
<sect1>
<title>Setting up printcap and print servers</title>
<para>
You may need to set up some printcaps for your Samba system to use.
It is strongly recommended that you use the facilities provided by
the print spooler to set up queues and printcap information.
</para>
<para>
Samba requires either a printcap or program to deliver printcap
information. This printcap information has the format:
</para>
<para><programlisting>
name|alias1|alias2...:option=value:...
</programlisting></para>
<para>
For almost all printing systems, the printer 'name' must be composed
only of alphanumeric or underscore '_' characters. Some systems also
allow hyphens ('-') as well. An alias is an alternative name for the
printer, and an alias with a space in it is used as a 'comment'
about the printer. The printcap format optionally uses a \ at the end of lines
to extend the printcap to multiple lines.
</para>
<para>
Here are some examples of printcap files:
</para>
<para>
<orderedlist>
<listitem><para>
pr just printer name
</para></listitem>
<listitem><para>
pr|alias printer name and alias
</para></listitem>
<listitem><para>
pr|My Printer printer name, alias used as comment
</para></listitem>
<listitem><para>
pr:sh:\ Same as pr:sh:cm= testing
:cm= \
testing
</para></listitem>
<listitem><para>
pr:sh Same as pr:sh:cm= testing
:cm= testing
</para></listitem>
</orderedlist>
</para>
<para>
Samba reads the printcap information when first started. If you make
changes in the printcap information, then you must do the following:
</para>
<orderedlist>
<listitem><para>
make sure that the print spooler is aware of these changes.
The LPRng system uses the 'lpc reread' command to do this.
</para></listitem>
<listitem><para>
make sure that the spool queues, etc., exist and have the
correct permissions. The LPRng system uses the 'checkpc -f'
command to do this.
</para></listitem>
<listitem><para>
You now should send a SIGHUP signal to the smbd server to have
it reread the printcap information.
</para></listitem>
</orderedlist>
</sect1>
<sect1>
<title>Job sent, no output</title>
<para>
This is the most frustrating part of printing. You may have sent the
job, verified that the job was forwarded, set up a wrapper around
the command to send the file, but there was no output from the printer.
</para>
<para>
First, check to make sure that the job REALLY is getting to the
right print queue. If you are using a BSD or LPRng print spooler,
you can temporarily stop the printing of jobs. Jobs can still be
submitted, but they will not be printed. Use:
</para>
<para><programlisting>
lpc -Pprinter stop
</programlisting></para>
<para>
Now submit a print job and then use 'lpq -Pprinter' to see if the
job is in the print queue. If it is not in the print queue then
you will have to find out why it is not being accepted for printing.
</para>
<para>
Next, you may want to check to see what the format of the job really
was. With the assistance of the system administrator you can view
the submitted jobs files. You may be surprised to find that these
are not in what you would expect to call a printable format.
You can use the UNIX 'file' utitily to determine what the job
format actually is:
</para>
<para><programlisting>
cd /var/spool/lpd/printer # spool directory of print jobs
ls # find job files
file dfA001myhost
</programlisting></para>
<para>
You should make sure that your printer supports this format OR that
your system administrator has installed a 'print filter' that will
convert the file to a format appropriate for your printer.
</para>
</sect1>
<sect1>
<title>Job sent, strange output</title>
<para>
Once you have the job printing, you can then start worrying about
making it print nicely.
</para>
<para>
The most common problem is extra pages of output: banner pages
OR blank pages at the end.
</para>
<para>
If you are getting banner pages, check and make sure that the
printcap option or printer option is configured for no banners.
If you have a printcap, this is the :sh (suppress header or banner
page) option. You should have the following in your printer.
</para>
<para><programlisting>
printer: ... :sh
</programlisting></para>
<para>
If you have this option and are still getting banner pages, there
is a strong chance that your printer is generating them for you
automatically. You should make sure that banner printing is disabled
for the printer. This usually requires using the printer setup software
or procedures supplied by the printer manufacturer.
</para>
<para>
If you get an extra page of output, this could be due to problems
with your job format, or if you are generating PostScript jobs,
incorrect setting on your printer driver on the MicroSoft client.
For example, under Win95 there is a option:
</para>
<para><programlisting>
Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|
</programlisting></para>
<para>
that allows you to choose if a Ctrl-D is appended to all jobs.
This is a very bad thing to do, as most spooling systems will
automatically add a ^D to the end of the job if it is detected as
PostScript. The multiple ^D may cause an additional page of output.
</para>
</sect1>
<sect1>
<title>Raw PostScript printed</title>
<para>
This is a problem that is usually caused by either the print spooling
system putting information at the start of the print job that makes
the printer think the job is a text file, or your printer simply
does not support PostScript. You may need to enable 'Automatic
Format Detection' on your printer.
</para>
</sect1>
<sect1>
<title>Advanced Printing</title>
<para>
Note that you can do some pretty magic things by using your
imagination with the "print command" option and some shell scripts.
Doing print accounting is easy by passing the %U option to a print
command shell script. You could even make the print command detect
the type of output and its size and send it to an appropriate
printer.
</para>
</sect1>
<sect1>
<title>Real debugging</title>
<para>
If the above debug tips don't help, then maybe you need to bring in
the bug guns, system tracing. See Tracing.txt in this directory.
</para>
</sect1>
</chapter>

View File

@ -0,0 +1,578 @@
<chapter id="speed">
<chapterinfo>
<author>
<affiliation>
<orgname>Samba Team</orgname>
<address><email>samba@samba.org</email></address>
</affiliation>
</author>
<author>
<firstname>Paul</firstname><surname>Cochrane</surname>
<affiliation>
<orgname>Dundee Limb Fitting Centre</orgname>
<address><email>paulc@dth.scot.nhs.uk</email></address>
</affiliation>
</author>
</chapterinfo>
<title>Samba performance issues</title>
<sect1>
<title>Comparisons</title>
<para>
The Samba server uses TCP to talk to the client. Thus if you are
trying to see if it performs well you should really compare it to
programs that use the same protocol. The most readily available
programs for file transfer that use TCP are ftp or another TCP based
SMB server.
</para>
<para>
If you want to test against something like a NT or WfWg server then
you will have to disable all but TCP on either the client or
server. Otherwise you may well be using a totally different protocol
(such as Netbeui) and comparisons may not be valid.
</para>
<para>
Generally you should find that Samba performs similarly to ftp at raw
transfer speed. It should perform quite a bit faster than NFS,
although this very much depends on your system.
</para>
<para>
Several people have done comparisons between Samba and Novell, NFS or
WinNT. In some cases Samba performed the best, in others the worst. I
suspect the biggest factor is not Samba vs some other system but the
hardware and drivers used on the various systems. Given similar
hardware Samba should certainly be competitive in speed with other
systems.
</para>
</sect1>
<sect1>
<title>Oplocks</title>
<sect2>
<title>Overview</title>
<para>
Oplocks are the way that SMB clients get permission from a server to
locally cache file operations. If a server grants an oplock
(opportunistic lock) then the client is free to assume that it is the
only one accessing the file and it will agressively cache file
data. With some oplock types the client may even cache file open/close
operations. This can give enormous performance benefits.
</para>
<para>
With the release of Samba 1.9.18 we now correctly support opportunistic
locks. This is turned on by default, and can be turned off on a share-
by-share basis by setting the parameter :
</para>
<para>
<command>oplocks = False</command>
</para>
<para>
We recommend that you leave oplocks on however, as current benchmark
tests with NetBench seem to give approximately a 30% improvement in
speed with them on. This is on average however, and the actual
improvement seen can be orders of magnitude greater, depending on
what the client redirector is doing.
</para>
<para>
Previous to Samba 1.9.18 there was a 'fake oplocks' option. This
option has been left in the code for backwards compatibility reasons
but it's use is now deprecated. A short summary of what the old
code did follows.
</para>
</sect2>
<sect2>
<title>Level2 Oplocks</title>
<para>
With Samba 2.0.5 a new capability - level2 (read only) oplocks is
supported (although the option is off by default - see the smb.conf
man page for details). Turning on level2 oplocks (on a share-by-share basis)
by setting the parameter :
</para>
<para>
<command>level2 oplocks = true</command>
</para>
<para>
should speed concurrent access to files that are not commonly written
to, such as application serving shares (ie. shares that contain common
.EXE files - such as a Microsoft Office share) as it allows clients to
read-ahread cache copies of these files.
</para>
</sect2>
<sect2>
<title>Old 'fake oplocks' option - deprecated</title>
<para>
Samba can also fake oplocks, by granting a oplock whenever a client
asks for one. This is controlled using the smb.conf option "fake
oplocks". If you set "fake oplocks = yes" then you are telling the
client that it may agressively cache the file data for all opens.
</para>
<para>
Enabling 'fake oplocks' on all read-only shares or shares that you know
will only be accessed from one client at a time you will see a big
performance improvement on many operations. If you enable this option
on shares where multiple clients may be accessing the files read-write
at the same time you can get data corruption.
</para>
</sect2>
</sect1>
<sect1>
<title>Socket options</title>
<para>
There are a number of socket options that can greatly affect the
performance of a TCP based server like Samba.
</para>
<para>
The socket options that Samba uses are settable both on the command
line with the -O option, or in the smb.conf file.
</para>
<para>
The "socket options" section of the smb.conf manual page describes how
to set these and gives recommendations.
</para>
<para>
Getting the socket options right can make a big difference to your
performance, but getting them wrong can degrade it by just as
much. The correct settings are very dependent on your local network.
</para>
<para>
The socket option TCP_NODELAY is the one that seems to make the
biggest single difference for most networks. Many people report that
adding "socket options = TCP_NODELAY" doubles the read performance of
a Samba drive. The best explanation I have seen for this is that the
Microsoft TCP/IP stack is slow in sending tcp ACKs.
</para>
</sect1>
<sect1>
<title>Read size</title>
<para>
The option "read size" affects the overlap of disk reads/writes with
network reads/writes. If the amount of data being transferred in
several of the SMB commands (currently SMBwrite, SMBwriteX and
SMBreadbraw) is larger than this value then the server begins writing
the data before it has received the whole packet from the network, or
in the case of SMBreadbraw, it begins writing to the network before
all the data has been read from disk.
</para>
<para>
This overlapping works best when the speeds of disk and network access
are similar, having very little effect when the speed of one is much
greater than the other.
</para>
<para>
The default value is 16384, but very little experimentation has been
done yet to determine the optimal value, and it is likely that the best
value will vary greatly between systems anyway. A value over 65536 is
pointless and will cause you to allocate memory unnecessarily.
</para>
</sect1>
<sect1>
<title>Max xmit</title>
<para>
At startup the client and server negotiate a "maximum transmit" size,
which limits the size of nearly all SMB commands. You can set the
maximum size that Samba will negotiate using the "max xmit = " option
in smb.conf. Note that this is the maximum size of SMB request that
Samba will accept, but not the maximum size that the *client* will accept.
The client maximum receive size is sent to Samba by the client and Samba
honours this limit.
</para>
<para>
It defaults to 65536 bytes (the maximum), but it is possible that some
clients may perform better with a smaller transmit unit. Trying values
of less than 2048 is likely to cause severe problems.
</para>
<para>
In most cases the default is the best option.
</para>
</sect1>
<sect1>
<title>Locking</title>
<para>
By default Samba does not implement strict locking on each read/write
call (although it did in previous versions). If you enable strict
locking (using "strict locking = yes") then you may find that you
suffer a severe performance hit on some systems.
</para>
<para>
The performance hit will probably be greater on NFS mounted
filesystems, but could be quite high even on local disks.
</para>
</sect1>
<sect1>
<title>Share modes</title>
<para>
Some people find that opening files is very slow. This is often
because of the "share modes" code needed to fully implement the dos
share modes stuff. You can disable this code using "share modes =
no". This will gain you a lot in opening and closing files but will
mean that (in some cases) the system won't force a second user of a
file to open the file read-only if the first has it open
read-write. For many applications that do their own locking this
doesn't matter, but for some it may. Most Windows applications
depend heavily on "share modes" working correctly and it is
recommended that the Samba share mode support be left at the
default of "on".
</para>
<para>
The share mode code in Samba has been re-written in the 1.9.17
release following tests with the Ziff-Davis NetBench PC Benchmarking
tool. It is now believed that Samba 1.9.17 implements share modes
similarly to Windows NT.
</para>
<para>
NOTE: In the most recent versions of Samba there is an option to use
shared memory via mmap() to implement the share modes. This makes
things much faster. See the Makefile for how to enable this.
</para>
</sect1>
<sect1>
<title>Log level</title>
<para>
If you set the log level (also known as "debug level") higher than 2
then you may suffer a large drop in performance. This is because the
server flushes the log file after each operation, which can be very
expensive.
</para>
</sect1>
<sect1>
<title>Wide lines</title>
<para>
The "wide links" option is now enabled by default, but if you disable
it (for better security) then you may suffer a performance hit in
resolving filenames. The performance loss is lessened if you have
"getwd cache = yes", which is now the default.
</para>
</sect1>
<sect1>
<title>Read raw</title>
<para>
The "read raw" operation is designed to be an optimised, low-latency
file read operation. A server may choose to not support it,
however. and Samba makes support for "read raw" optional, with it
being enabled by default.
</para>
<para>
In some cases clients don't handle "read raw" very well and actually
get lower performance using it than they get using the conventional
read operations.
</para>
<para>
So you might like to try "read raw = no" and see what happens on your
network. It might lower, raise or not affect your performance. Only
testing can really tell.
</para>
</sect1>
<sect1>
<title>Write raw</title>
<para>
The "write raw" operation is designed to be an optimised, low-latency
file write operation. A server may choose to not support it,
however. and Samba makes support for "write raw" optional, with it
being enabled by default.
</para>
<para>
Some machines may find "write raw" slower than normal write, in which
case you may wish to change this option.
</para>
</sect1>
<sect1>
<title>Read prediction</title>
<para>
Samba can do read prediction on some of the SMB commands. Read
prediction means that Samba reads some extra data on the last file it
read while waiting for the next SMB command to arrive. It can then
respond more quickly when the next read request arrives.
</para>
<para>
This is disabled by default. You can enable it by using "read
prediction = yes".
</para>
<para>
Note that read prediction is only used on files that were opened read
only.
</para>
<para>
Read prediction should particularly help for those silly clients (such
as "Write" under NT) which do lots of very small reads on a file.
</para>
<para>
Samba will not read ahead more data than the amount specified in the
"read size" option. It always reads ahead on 1k block boundaries.
</para>
</sect1>
<sect1>
<title>Memory mapping</title>
<para>
Samba supports reading files via memory mapping them. One some
machines this can give a large boost to performance, on others it
makes not difference at all, and on some it may reduce performance.
</para>
<para>
To enable you you have to recompile Samba with the -DUSE_MMAP option
on the FLAGS line of the Makefile.
</para>
<para>
Note that memory mapping is only used on files opened read only, and
is not used by the "read raw" operation. Thus you may find memory
mapping is more effective if you disable "read raw" using "read raw =
no".
</para>
</sect1>
<sect1>
<title>Slow Clients</title>
<para>
One person has reported that setting the protocol to COREPLUS rather
than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).
</para>
<para>
I suspect that his PC's (386sx16 based) were asking for more data than
they could chew. I suspect a similar speed could be had by setting
"read raw = no" and "max xmit = 2048", instead of changing the
protocol. Lowering the "read size" might also help.
</para>
</sect1>
<sect1>
<title>Slow Logins</title>
<para>
Slow logins are almost always due to the password checking time. Using
the lowest practical "password level" will improve things a lot. You
could also enable the "UFC crypt" option in the Makefile.
</para>
</sect1>
<sect1>
<title>Client tuning</title>
<para>
Often a speed problem can be traced to the client. The client (for
example Windows for Workgroups) can often be tuned for better TCP
performance.
</para>
<para>
See your client docs for details. In particular, I have heard rumours
that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a
large impact on performance.
</para>
<para>
Also note that some people have found that setting DefaultRcvWindow in
the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a
big improvement. I don't know why.
</para>
<para>
My own experience wth DefaultRcvWindow is that I get much better
performance with a large value (16384 or larger). Other people have
reported that anything over 3072 slows things down enourmously. One
person even reported a speed drop of a factor of 30 when he went from
3072 to 8192. I don't know why.
</para>
<para>
It probably depends a lot on your hardware, and the type of unix box
you have at the other end of the link.
</para>
<para>
Paul Cochrane has done some testing on client side tuning and come
to the following conclusions:
</para>
<para>
Install the W2setup.exe file from www.microsoft.com. This is an
update for the winsock stack and utilities which improve performance.
</para>
<para>
Configure the win95 TCPIP registry settings to give better
perfomance. I use a program called MTUSPEED.exe which I got off the
net. There are various other utilities of this type freely available.
The setting which give the best performance for me are:
</para>
<orderedlist>
<listitem><para>
MaxMTU Remove
</para></listitem>
<listitem><para>
RWIN Remove
</para></listitem>
<listitem><para>
MTUAutoDiscover Disable
</para></listitem>
<listitem><para>
MTUBlackHoleDetect Disable
</para></listitem>
<listitem><para>
Time To Live Enabled
</para></listitem>
<listitem><para>
Time To Live - HOPS 32
</para></listitem>
<listitem><para>
NDI Cache Size 0
</para></listitem>
</orderedlist>
<para>
I tried virtually all of the items mentioned in the document and
the only one which made a difference to me was the socket options. It
turned out I was better off without any!!!!!
</para>
<para>
In terms of overall speed of transfer, between various win95 clients
and a DX2-66 20MB server with a crappy NE2000 compatible and old IDE
drive (Kernel 2.0.30). The transfer rate was reasonable for 10 baseT.
</para>
<para>
FIXME
The figures are: Put Get
P166 client 3Com card: 420-440kB/s 500-520kB/s
P100 client 3Com card: 390-410kB/s 490-510kB/s
DX4-75 client NE2000: 370-380kB/s 330-350kB/s
</para>
<para>
I based these test on transfer two files a 4.5MB text file and a 15MB
textfile. The results arn't bad considering the hardware Samba is
running on. It's a crap machine!!!!
</para>
<para>
The updates mentioned in 1 and 2 brought up the transfer rates from
just over 100kB/s in some clients.
</para>
<para>
A new client is a P333 connected via a 100MB/s card and hub. The
transfer rates from this were good: 450-500kB/s on put and 600+kB/s
on get.
</para>
<para>
Looking at standard FTP throughput, Samba is a bit slower (100kB/s
upwards). I suppose there is more going on in the samba protocol, but
if it could get up to the rate of FTP the perfomance would be quite
staggering.
</para>
</sect1>
<sect1>
<title>My Results</title>
<para>
Some people want to see real numbers in a document like this, so here
they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b
tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC
Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to
set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My
server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC
Elite-16 card. You can see my server config in the examples/tridge/
subdirectory of the distribution.
</para>
<para>
I get 490k/s on reading a 8Mb file with copy.
I get 441k/s writing the same file to the samba server.
</para>
<para>
Of course, there's a lot more to benchmarks than 2 raw throughput
figures, but it gives you a ballpark figure.
</para>
<para>
I've also tested Win95 and WinNT, and found WinNT gave me the best
speed as a samba client. The fastest client of all (for me) is
smbclient running on another linux box. Maybe I'll add those results
here someday ...
</para>
</sect1>
</chapter>

View File

@ -13,6 +13,12 @@
<!ENTITY IntegratingWithWindows SYSTEM "Integrating-with-Windows.sgml">
<!ENTITY Samba-PAM SYSTEM "PAM-Authentication-And-Samba.sgml">
<!ENTITY Samba-LDAP SYSTEM "Samba-LDAP-HOWTO.sgml">
<!ENTITY Diagnosis SYSTEM "Diagnosis.sgml">
<!ENTITY PRINTING SYSTEM "Printing.sgml">
<!ENTITY BUGS SYSTEM "Bugs.sgml">
<!ENTITY SECURITY-LEVEL SYSTEM "security_level.sgml">
<!ENTITY SPEED SYSTEM "Speed.sgml">
<!ENTITY BROWSING SYSTEM "Browsing.sgml">
<!ENTITY INDEX-FILE SYSTEM "index.sgml">
]>
@ -31,7 +37,7 @@
<title>Abstract</title>
<para>
<emphasis>Last Update</emphasis> : Mon Apr 1 08:47:26 CST 2002
<emphasis>Last Update</emphasis> : Thu Aug 15 12:48:45 CDT 2002
</para>
<para>
@ -58,18 +64,24 @@ Cheers, jerry
<!-- Chapters -->
&UNIX-INSTALL;
&Diagnosis;
&IntegratingWithWindows;
&Samba-PAM;
&MS-Dfs-Setup;
&NT-Security;
&PRINTER-DRIVER2;
&PRINTING;
&SECURITY-LEVEL;
&DOMAIN-MEMBER;
&WINBIND;
&Samba-PDC-HOWTO;
&Samba-BDC-HOWTO;
&Samba-LDAP;
&WINBIND;
&BROWSING;
&SPEED;
&OS2-Client;
&CVS-Access;
&BUGS;
<!-- Autogenerated Index -->
&INDEX-FILE;

View File

@ -0,0 +1,140 @@
<chapter id="security_levels">
<chapterinfo>
<author>
<firstname>Andrew</firstname><surname>Tridgell</surname>
<affiliation>
<orgname>Samba Team</orgname>
<address><email>samba@samba.org</email></address>
</affiliation>
</author>
</chapterinfo>
<title>Security levels</title>
<sect1>
<title>Introduction</title>
<para>
Samba supports the following options to the global smb.conf parameter
</para>
<para><programlisting>
[global]
<ulink url="smb.conf.5.html#SECURITY"><parameter>security</parameter></ulink> = [share|user(default)|domain|ads]
</programlisting></para>
<para>
Please refer to the smb.conf man page for usage information and to the document
<ulink url="DOMAIN_MEMBER.html">DOMAIN_MEMBER.html</ulink> for further background details
on domain mode security. The Windows 2000 Kerberos domain security model
(security = ads) is described in the <ulink url="ADS-HOWTO.html">ADS-HOWTO.html</ulink>.
</para>
<para>
Of the above, "security = server" means that Samba reports to clients that
it is running in "user mode" but actually passes off all authentication
requests to another "user mode" server. This requires an additional
parameter "password server =" that points to the real authentication server.
That real authentication server can be another Samba server or can be a
Windows NT server, the later natively capable of encrypted password support.
</para>
</sect1>
<sect1>
<title>More complete description of security levels</title>
<para>
A SMB server tells the client at startup what "security level" it is
running. There are two options "share level" and "user level". Which
of these two the client receives affects the way the client then tries
to authenticate itself. It does not directly affect (to any great
extent) the way the Samba server does security. I know this is
strange, but it fits in with the client/server approach of SMB. In SMB
everything is initiated and controlled by the client, and the server
can only tell the client what is available and whether an action is
allowed.
</para>
<para>
I'll describe user level security first, as its simpler. In user level
security the client will send a "session setup" command directly after
the protocol negotiation. This contains a username and password. The
server can either accept or reject that username/password
combination. Note that at this stage the server has no idea what
share the client will eventually try to connect to, so it can't base
the "accept/reject" on anything other than:
</para>
<orderedlist>
<listitem><para>the username/password</para></listitem>
<listitem><para>the machine that the client is coming from</para></listitem>
</orderedlist>
<para>
If the server accepts the username/password then the client expects to
be able to mount any share (using a "tree connection") without
specifying a password. It expects that all access rights will be as
the username/password specified in the "session setup".
</para>
<para>
It is also possible for a client to send multiple "session setup"
requests. When the server responds it gives the client a "uid" to use
as an authentication tag for that username/password. The client can
maintain multiple authentication contexts in this way (WinDD is an
example of an application that does this)
</para>
<para>
Ok, now for share level security. In share level security the client
authenticates itself separately for each share. It will send a
password along with each "tree connection" (share mount). It does not
explicitly send a username with this operation. The client is
expecting a password to be associated with each share, independent of
the user. This means that samba has to work out what username the
client probably wants to use. It is never explicitly sent the
username. Some commercial SMB servers such as NT actually associate
passwords directly with shares in share level security, but samba
always uses the unix authentication scheme where it is a
username/password that is authenticated, not a "share/password".
</para>
<para>
Many clients send a "session setup" even if the server is in share
level security. They normally send a valid username but no
password. Samba records this username in a list of "possible
usernames". When the client then does a "tree connection" it also adds
to this list the name of the share they try to connect to (useful for
home directories) and any users listed in the "user =" smb.conf
line. The password is then checked in turn against these "possible
usernames". If a match is found then the client is authenticated as
that user.
</para>
<para>
Finally "server level" security. In server level security the samba
server reports to the client that it is in user level security. The
client then does a "session setup" as described earlier. The samba
server takes the username/password that the client sends and attempts
to login to the "password server" by sending exactly the same
username/password that it got from the client. If that server is in
user level security and accepts the password then samba accepts the
clients connection. This allows the samba server to use another SMB
server as the "password server".
</para>
<para>
You should also note that at the very start of all this, where the
server tells the client what security level it is in, it also tells
the client if it supports encryption. If it does then it supplies the
client with a random "cryptkey". The client will then send all
passwords in encrypted form. You have to compile samba with encryption
enabled to support this feature, and you have to maintain a separate
smbpasswd file with SMB style encrypted passwords. It is
cryptographically impossible to translate from unix style encryption
to SMB style encryption, although there are some fairly simple management
schemes by which the two could be kept in sync.
</para>
</sect1>
</chapter>

View File

@ -23,9 +23,19 @@
<address><email>jtrostel@snapserver.com</email></address>
</affiliation>
</author>
<pubdate>16 Oct 2000</pubdate>
<author>
<firstname>Naag</firstname><surname>Mummaneni</surname>
<affiliation>
<address><email>getnag@rediffmail.com</email></address>
</affiliation>
</author>
<author>
<firstname>Jelmer</firstname><surname>Vernooij</surname>
<affiliation>
<address><email>jelmer@nl.linux.org</email></address>
</affiliation>
</author>
<pubdate>27 June 2002</pubdate>
</chapterinfo>
<title>Unified Logons between Windows NT and UNIX using Winbind</title>
@ -489,6 +499,13 @@ I also found it necessary to make the following symbolic link:
<prompt>root#</prompt> <command>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</command>
</para>
<para>And, in the case of Sun solaris:</para>
<para>
<prompt>root#</prompt> <command>ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</command>
<prompt>root#</prompt> <command>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</command>
<prompt>root#</prompt> <command>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</command>
</para>
<para>
Now, as root you need to edit <filename>/etc/nsswitch.conf</filename> to
allow user and group entries to be visible from the <command>winbindd</command>
@ -682,14 +699,18 @@ The same thing can be done for groups with the command
<sect3>
<title>Fix the <filename>/etc/rc.d/init.d/smb</filename> startup files</title>
<title>Fix the init.d startup scripts</title>
<sect4>
<title>Linux</title>
<para>
The <command>winbindd</command> daemon needs to start up after the
<command>smbd</command> and <command>nmbd</command> daemons are running.
To accomplish this task, you need to modify the <filename>/etc/init.d/smb</filename>
To accomplish this task, you need to modify the startup scripts of your system. They are located at <filename>/etc/init.d/smb</filename> in RedHat and
<filename>/etc/init.d/samba</filename> in Debian.
script to add commands to invoke this daemon in the proper sequence. My
<filename>/etc/init.d/smb</filename> file starts up <command>smbd</command>,
startup script starts up <command>smbd</command>,
<command>nmbd</command>, and <command>winbindd</command> from the
<filename>/usr/local/samba/bin</filename> directory directly. The 'start'
function in the script looks like this:
@ -744,18 +765,79 @@ stop() {
return $RETVAL
}
</programlisting></para>
</sect4>
<sect4>
<title>Solaris</title>
<para>On solaris, you need to modify the
<filename>/etc/init.d/samba.server</filename> startup script. It usually
only starts smbd and nmbd but should now start winbindd too. If you
have samba installed in <filename>/usr/local/samba/bin</filename>,
the file could contains something like this:
</para>
<para><programlisting>
##
## samba.server
##
if [ ! -d /usr/bin ]
then # /usr not mounted
exit
fi
killproc() { # kill the named process(es)
pid=`/usr/bin/ps -e |
/usr/bin/grep -w $1 |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && kill $pid
}
# Start/stop processes required for samba server
case "$1" in
'start')
#
# Edit these lines to suit your installation (paths, workgroup, host)
#
echo Starting SMBD
/usr/local/samba/bin/smbd -D -s \
/usr/local/samba/smb.conf
echo Starting NMBD
/usr/local/samba/bin/nmbd -D -l \
/usr/local/samba/var/log -s /usr/local/samba/smb.conf
echo Starting Winbind Daemon
/usr/local/samba/bin/winbindd
;;
'stop')
killproc nmbd
killproc smbd
killproc winbindd
;;
*)
echo "Usage: /etc/init.d/samba.server { start | stop }"
;;
esac
</programlisting></para>
</sect4>
<sect4>
<title>Restarting</title>
<para>
If you restart the <command>smbd</command>, <command>nmbd</command>,
and <command>winbindd</command> daemons at this point, you
should be able to connect to the samba server as a domain member just as
if you were a local user.
</para>
</sect4>
</sect3>
<sect3>
<title>Configure Winbind and PAM</title>
@ -781,13 +863,17 @@ by invoking the command
from the <filename>../source</filename> directory. The
<filename>pam_winbind.so</filename> file should be copied to the location of
your other pam security modules. On my RedHat system, this was the
<filename>/lib/security</filename> directory.
<filename>/lib/security</filename> directory. On Solaris, the pam security
modules reside in <filename>/usr/lib/security</filename>.
</para>
<para>
<prompt>root#</prompt> <command>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</command>
</para>
<sect4>
<title>Linux/FreeBSD-specific PAM configuration</title>
<para>
The <filename>/etc/pam.d/samba</filename> file does not need to be changed. I
just left this fileas it was:
@ -875,6 +961,92 @@ line after the <command>winbind.so</command> line to get rid of annoying
double prompts for passwords.
</para>
</sect4>
<sect4>
<title>Solaris-specific configuration</title>
<para>
The /etc/pam.conf needs to be changed. I changed this file so that my Domain
users can logon both locally as well as telnet.The following are the changes
that I made.You can customize the pam.conf file as per your requirements,but
be sure of those changes because in the worst case it will leave your system
nearly impossible to boot.
</para>
<para><programlisting>
#
#ident "@(#)pam.conf 1.14 99/09/16 SMI"
#
# Copyright (c) 1996-1999, Sun Microsystems, Inc.
# All Rights Reserved.
#
# PAM configuration
#
# Authentication management
#
login auth required /usr/lib/security/pam_winbind.so
login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass
#
rlogin auth sufficient /usr/lib/security/pam_winbind.so
rlogin auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
rlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
dtlogin auth sufficient /usr/lib/security/pam_winbind.so
dtlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
rsh auth required /usr/lib/security/$ISA/pam_rhosts_auth.so.1
other auth sufficient /usr/lib/security/pam_winbind.so
other auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
# Account management
#
login account sufficient /usr/lib/security/pam_winbind.so
login account requisite /usr/lib/security/$ISA/pam_roles.so.1
login account required /usr/lib/security/$ISA/pam_unix.so.1
#
dtlogin account sufficient /usr/lib/security/pam_winbind.so
dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1
dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1
#
other account sufficient /usr/lib/security/pam_winbind.so
other account requisite /usr/lib/security/$ISA/pam_roles.so.1
other account required /usr/lib/security/$ISA/pam_unix.so.1
#
# Session management
#
other session required /usr/lib/security/$ISA/pam_unix.so.1
#
# Password management
#
#other password sufficient /usr/lib/security/pam_winbind.so
other password required /usr/lib/security/$ISA/pam_unix.so.1
dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1
#
# Support for Kerberos V5 authentication (uncomment to use Kerberos)
#
#rlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#login auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#dtlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#other auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#dtlogin account optional /usr/lib/security/$ISA/pam_krb5.so.1
#other account optional /usr/lib/security/$ISA/pam_krb5.so.1
#other session optional /usr/lib/security/$ISA/pam_krb5.so.1
#other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
</programlisting></para>
<para>
I also added a try_first_pass line after the winbind.so line to get rid of
annoying double prompts for passwords.
</para>
<para>
Now restart your Samba & try connecting through your application that you
configured in the pam.conf.
</para>
</sect4>
</sect3>

741
docs/htmldocs/Browsing.html Normal file
View File

@ -0,0 +1,741 @@
<HTML
><HEAD
><TITLE
>Improved browsing in samba</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="IMPROVED-BROWSING"
>Improved browsing in samba</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Overview of browsing</A
></H1
><P
>SMB networking provides a mechanism by which clients can access a list
of machines in a network, a so-called "browse list". This list
contains machines that are ready to offer file and/or print services
to other machines within the network. Thus it does not include
machines which aren't currently able to do server tasks. The browse
list is heavily used by all SMB clients. Configuration of SMB
browsing has been problematic for some Samba users, hence this
document.</P
><P
>Browsing will NOT work if name resolution from NetBIOS names to IP
addresses does not function correctly. Use of a WINS server is highly
recommended to aid the resolution of NetBIOS (SMB) names to IP addresses.
WINS allows remote segment clients to obtain NetBIOS name_type information
that can NOT be provided by any other means of name resolution.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN7"
>Browsing support in samba</A
></H1
><P
>Samba now fully supports browsing. The browsing is supported by nmbd
and is also controlled by options in the smb.conf file (see smb.conf(5)).</P
><P
>Samba can act as a local browse master for a workgroup and the ability
for samba to support domain logons and scripts is now available. See
DOMAIN.txt for more information on domain logons.</P
><P
>Samba can also act as a domain master browser for a workgroup. This
means that it will collate lists from local browse masters into a
wide area network server list. In order for browse clients to
resolve the names they may find in this list, it is recommended that
both samba and your clients use a WINS server.</P
><P
>Note that you should NOT set Samba to be the domain master for a
workgroup that has the same name as an NT Domain: on each wide area
network, you must only ever have one domain master browser per workgroup,
regardless of whether it is NT, Samba or any other type of domain master
that is providing this service.</P
><P
>[Note that nmbd can be configured as a WINS server, but it is not
necessary to specifically use samba as your WINS server. NTAS can
be configured as your WINS server. In a mixed NT server and
samba environment on a Wide Area Network, it is recommended that
you use the NT server's WINS server capabilities. In a samba-only
environment, it is recommended that you use one and only one nmbd
as your WINS server].</P
><P
>To get browsing to work you need to run nmbd as usual, but will need
to use the "workgroup" option in smb.conf to control what workgroup
Samba becomes a part of.</P
><P
>Samba also has a useful option for a Samba server to offer itself for
browsing on another subnet. It is recommended that this option is only
used for 'unusual' purposes: announcements over the internet, for
example. See "remote announce" in the smb.conf man page. </P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN16"
>Problem resolution</A
></H1
><P
>If something doesn't work then hopefully the log.nmb file will help
you track down the problem. Try a debug level of 2 or 3 for finding
problems. Also note that the current browse list usually gets stored
in text form in a file called browse.dat.</P
><P
>Note that if it doesn't work for you, then you should still be able to
type the server name as \\SERVER in filemanager then hit enter and
filemanager should display the list of available shares.</P
><P
>Some people find browsing fails because they don't have the global
"guest account" set to a valid account. Remember that the IPC$
connection that lists the shares is done as guest, and thus you must
have a valid guest account.</P
><P
>Also, a lot of people are getting bitten by the problem of too many
parameters on the command line of nmbd in inetd.conf. This trick is to
not use spaces between the option and the parameter (eg: -d2 instead
of -d 2), and to not use the -B and -N options. New versions of nmbd
are now far more likely to correctly find your broadcast and network
address, so in most cases these aren't needed.</P
><P
>The other big problem people have is that their broadcast address,
netmask or IP address is wrong (specified with the "interfaces" option
in smb.conf)</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN23"
>Browsing across subnets</A
></H1
><P
>With the release of Samba 1.9.17(alpha1 and above) Samba has been
updated to enable it to support the replication of browse lists
across subnet boundaries. New code and options have been added to
achieve this. This section describes how to set this feature up
in different settings.</P
><P
>To see browse lists that span TCP/IP subnets (ie. networks separated
by routers that don't pass broadcast traffic) you must set up at least
one WINS server. The WINS server acts as a DNS for NetBIOS names, allowing
NetBIOS name to IP address translation to be done by doing a direct
query of the WINS server. This is done via a directed UDP packet on
port 137 to the WINS server machine. The reason for a WINS server is
that by default, all NetBIOS name to IP address translation is done
by broadcasts from the querying machine. This means that machines
on one subnet will not be able to resolve the names of machines on
another subnet without using a WINS server.</P
><P
>Remember, for browsing across subnets to work correctly, all machines,
be they Windows 95, Windows NT, or Samba servers must have the IP address
of a WINS server given to them by a DHCP server, or by manual configuration
(for Win95 and WinNT, this is in the TCP/IP Properties, under Network
settings) for Samba this is in the smb.conf file.</P
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN28"
>How does cross subnet browsing work ?</A
></H2
><P
>Cross subnet browsing is a complicated dance, containing multiple
moving parts. It has taken Microsoft several years to get the code
that achieves this correct, and Samba lags behind in some areas.
However, with the 1.9.17 release, Samba is capable of cross subnet
browsing when configured correctly.</P
><P
>Consider a network set up as follows :</P
><P
><PRE
CLASS="PROGRAMLISTING"
> (DMB)
N1_A N1_B N1_C N1_D N1_E
| | | | |
-------------------------------------------------------
| subnet 1 |
+---+ +---+
|R1 | Router 1 Router 2 |R2 |
+---+ +---+
| |
| subnet 2 subnet 3 |
-------------------------- ------------------------------------
| | | | | | | |
N2_A N2_B N2_C N2_D N3_A N3_B N3_C N3_D
(WINS)</PRE
></P
><P
>Consisting of 3 subnets (1, 2, 3) connected by two routers
(R1, R2) - these do not pass broadcasts. Subnet 1 has 5 machines
on it, subnet 2 has 4 machines, subnet 3 has 4 machines. Assume
for the moment that all these machines are configured to be in the
same workgroup (for simplicities sake). Machine N1_C on subnet 1
is configured as Domain Master Browser (ie. it will collate the
browse lists for the workgroup). Machine N2_D is configured as
WINS server and all the other machines are configured to register
their NetBIOS names with it.</P
><P
>As all these machines are booted up, elections for master browsers
will take place on each of the three subnets. Assume that machine
N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on
subnet 3 - these machines are known as local master browsers for
their particular subnet. N1_C has an advantage in winning as the
local master browser on subnet 1 as it is set up as Domain Master
Browser.</P
><P
>On each of the three networks, machines that are configured to
offer sharing services will broadcast that they are offering
these services. The local master browser on each subnet will
receive these broadcasts and keep a record of the fact that
the machine is offering a service. This list of records is
the basis of the browse list. For this case, assume that
all the machines are configured to offer services so all machines
will be on the browse list.</P
><P
>For each network, the local master browser on that network is
considered 'authoritative' for all the names it receives via
local broadcast. This is because a machine seen by the local
master browser via a local broadcast must be on the same
network as the local master browser and thus is a 'trusted'
and 'verifiable' resource. Machines on other networks that
the local master browsers learn about when collating their
browse lists have not been directly seen - these records are
called 'non-authoritative'.</P
><P
>At this point the browse lists look as follows (these are
the machines you would see in your network neighborhood if
you looked in it on a particular network right now).</P
><P
><PRE
CLASS="PROGRAMLISTING"
>Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D</PRE
></P
><P
>Note that at this point all the subnets are separate, no
machine is seen across any of the subnets.</P
><P
>Now examine subnet 2. As soon as N2_B has become the local
master browser it looks for a Domain master browser to synchronize
its browse list with. It does this by querying the WINS server
(N2_D) for the IP address associated with the NetBIOS name
WORKGROUP&gt;1B&lt;. This name was registerd by the Domain master
browser (N1_C) with the WINS server as soon as it was booted.</P
><P
>Once N2_B knows the address of the Domain master browser it
tells it that is the local master browser for subnet 2 by
sending a MasterAnnouncement packet as a UDP port 138 packet.
It then synchronizes with it by doing a NetServerEnum2 call. This
tells the Domain Master Browser to send it all the server
names it knows about. Once the domain master browser receives
the MasterAnnouncement packet it schedules a synchronization
request to the sender of that packet. After both synchronizations
are done the browse lists look like :</P
><P
><PRE
CLASS="PROGRAMLISTING"
>Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
Servers with a (*) after them are non-authoritative names.</PRE
></P
><P
>At this point users looking in their network neighborhood on
subnets 1 or 2 will see all the servers on both, users on
subnet 3 will still only see the servers on their own subnet.</P
><P
>The same sequence of events that occured for N2_B now occurs
for the local master browser on subnet 3 (N3_D). When it
synchronizes browse lists with the domain master browser (N1_A)
it gets both the server entries on subnet 1, and those on
subnet 2. After N3_D has synchronized with N1_C and vica-versa
the browse lists look like.</P
><P
><PRE
CLASS="PROGRAMLISTING"
>Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*),
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Servers with a (*) after them are non-authoritative names.</PRE
></P
><P
>At this point users looking in their network neighborhood on
subnets 1 or 3 will see all the servers on all sunbets, users on
subnet 2 will still only see the servers on subnets 1 and 2, but not 3.</P
><P
>Finally, the local master browser for subnet 2 (N2_B) will sync again
with the domain master browser (N1_C) and will recieve the missing
server entries. Finally - and as a steady state (if no machines
are removed or shut off) the browse lists will look like :</P
><P
><PRE
CLASS="PROGRAMLISTING"
>Subnet Browse Master List
------ ------------- ----
Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
N2_A(*), N2_B(*), N2_C(*), N2_D(*),
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
N3_A(*), N3_B(*), N3_C(*), N3_D(*)
Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
N2_A(*), N2_B(*), N2_C(*), N2_D(*)
Servers with a (*) after them are non-authoritative names.</PRE
></P
><P
>Synchronizations between the domain master browser and local
master browsers will continue to occur, but this should be a
steady state situation.</P
><P
>If either router R1 or R2 fails the following will occur:</P
><P
></P
><OL
TYPE="1"
><LI
><P
> Names of computers on each side of the inaccessible network fragments
will be maintained for as long as 36 minutes, in the network neighbourhood
lists.
</P
></LI
><LI
><P
> Attempts to connect to these inaccessible computers will fail, but the
names will not be removed from the network neighbourhood lists.
</P
></LI
><LI
><P
> If one of the fragments is cut off from the WINS server, it will only
be able to access servers on its local subnet, by using subnet-isolated
broadcast NetBIOS name resolution. The effects are similar to that of
losing access to a DNS server.
</P
></LI
></OL
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN63"
>Setting up a WINS server</A
></H1
><P
>Either a Samba machine or a Windows NT Server machine may be set up
as a WINS server. To set a Samba machine to be a WINS server you must
add the following option to the smb.conf file on the selected machine :
in the [globals] section add the line </P
><P
><B
CLASS="COMMAND"
> wins support = yes</B
></P
><P
>Versions of Samba previous to 1.9.17 had this parameter default to
yes. If you have any older versions of Samba on your network it is
strongly suggested you upgrade to 1.9.17 or above, or at the very
least set the parameter to 'no' on all these machines.</P
><P
>Machines with "<B
CLASS="COMMAND"
>wins support = yes</B
>" will keep a list of
all NetBIOS names registered with them, acting as a DNS for NetBIOS names.</P
><P
>You should set up only ONE wins server. Do NOT set the
"<B
CLASS="COMMAND"
>wins support = yes</B
>" option on more than one Samba
server.</P
><P
>To set up a Windows NT Server as a WINS server you need to set up
the WINS service - see your NT documentation for details. Note that
Windows NT WINS Servers can replicate to each other, allowing more
than one to be set up in a complex subnet environment. As Microsoft
refuse to document these replication protocols Samba cannot currently
participate in these replications. It is possible in the future that
a Samba-&#62;Samba WINS replication protocol may be defined, in which
case more than one Samba machine could be set up as a WINS server
but currently only one Samba server should have the "wins support = yes"
parameter set.</P
><P
>After the WINS server has been configured you must ensure that all
machines participating on the network are configured with the address
of this WINS server. If your WINS server is a Samba machine, fill in
the Samba machine IP address in the "Primary WINS Server" field of
the "Control Panel-&#62;Network-&#62;Protocols-&#62;TCP-&#62;WINS Server" dialogs
in Windows 95 or Windows NT. To tell a Samba server the IP address
of the WINS server add the following line to the [global] section of
all smb.conf files :</P
><P
><B
CLASS="COMMAND"
> wins server = &gt;name or IP address&lt;</B
></P
><P
>where &gt;name or IP address&lt; is either the DNS name of the WINS server
machine or its IP address.</P
><P
>Note that this line MUST NOT BE SET in the smb.conf file of the Samba
server acting as the WINS server itself. If you set both the
"<B
CLASS="COMMAND"
>wins support = yes</B
>" option and the
"<B
CLASS="COMMAND"
>wins server = &gt;name&lt;</B
>" option then
nmbd will fail to start.</P
><P
>There are two possible scenarios for setting up cross subnet browsing.
The first details setting up cross subnet browsing on a network containing
Windows 95, Samba and Windows NT machines that are not configured as
part of a Windows NT Domain. The second details setting up cross subnet
browsing on networks that contain NT Domains.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN82"
>Setting up Browsing in a WORKGROUP</A
></H1
><P
>To set up cross subnet browsing on a network containing machines
in up to be in a WORKGROUP, not an NT Domain you need to set up one
Samba server to be the Domain Master Browser (note that this is *NOT*
the same as a Primary Domain Controller, although in an NT Domain the
same machine plays both roles). The role of a Domain master browser is
to collate the browse lists from local master browsers on all the
subnets that have a machine participating in the workgroup. Without
one machine configured as a domain master browser each subnet would
be an isolated workgroup, unable to see any machines on any other
subnet. It is the presense of a domain master browser that makes
cross subnet browsing possible for a workgroup.</P
><P
>In an WORKGROUP environment the domain master browser must be a
Samba server, and there must only be one domain master browser per
workgroup name. To set up a Samba server as a domain master browser,
set the following option in the [global] section of the smb.conf file :</P
><P
><B
CLASS="COMMAND"
> domain master = yes</B
></P
><P
>The domain master browser should also preferrably be the local master
browser for its own subnet. In order to achieve this set the following
options in the [global] section of the smb.conf file :</P
><P
><PRE
CLASS="PROGRAMLISTING"
> domain master = yes
local master = yes
preferred master = yes
os level = 65</PRE
></P
><P
>The domain master browser may be the same machine as the WINS
server, if you require.</P
><P
>Next, you should ensure that each of the subnets contains a
machine that can act as a local master browser for the
workgroup. Any NT machine should be able to do this, as will
Windows 95 machines (although these tend to get rebooted more
often, so it's not such a good idea to use these). To make a
Samba server a local master browser set the following
options in the [global] section of the smb.conf file :</P
><P
><PRE
CLASS="PROGRAMLISTING"
> domain master = no
local master = yes
preferred master = yes
os level = 65</PRE
></P
><P
>Do not do this for more than one Samba server on each subnet,
or they will war with each other over which is to be the local
master browser.</P
><P
>The "local master" parameter allows Samba to act as a local master
browser. The "preferred master" causes nmbd to force a browser
election on startup and the "os level" parameter sets Samba high
enough so that it should win any browser elections.</P
><P
>If you have an NT machine on the subnet that you wish to
be the local master browser then you can disable Samba from
becoming a local master browser by setting the following
options in the [global] section of the smb.conf file :</P
><P
><PRE
CLASS="PROGRAMLISTING"
> domain master = no
local master = no
preferred master = no
os level = 0</PRE
></P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN100"
>Setting up Browsing in a DOMAIN</A
></H1
><P
>If you are adding Samba servers to a Windows NT Domain then
you must not set up a Samba server as a domain master browser.
By default, a Windows NT Primary Domain Controller for a Domain
name is also the Domain master browser for that name, and many
things will break if a Samba server registers the Domain master
browser NetBIOS name (DOMAIN&gt;1B&lt;) with WINS instead of the PDC.</P
><P
>For subnets other than the one containing the Windows NT PDC
you may set up Samba servers as local master browsers as
described. To make a Samba server a local master browser set
the following options in the [global] section of the smb.conf
file :</P
><P
><PRE
CLASS="PROGRAMLISTING"
> domain master = no
local master = yes
preferred master = yes
os level = 65</PRE
></P
><P
>If you wish to have a Samba server fight the election with machines
on the same subnet you may set the "os level" parameter to lower
levels. By doing this you can tune the order of machines that
will become local master browsers if they are running. For
more details on this see the section "FORCING SAMBA TO BE THE MASTER"
below.</P
><P
>If you have Windows NT machines that are members of the domain
on all subnets, and you are sure they will always be running then
you can disable Samba from taking part in browser elections and
ever becoming a local master browser by setting following options
in the [global] section of the smb.conf file :</P
><P
><B
CLASS="COMMAND"
> domain master = no
local master = no
preferred master = no
os level = 0</B
></P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN110"
>Forcing samba to be the master</A
></H1
><P
>Who becomes the "master browser" is determined by an election process
using broadcasts. Each election packet contains a number of parameters
which determine what precedence (bias) a host should have in the
election. By default Samba uses a very low precedence and thus loses
elections to just about anyone else.</P
><P
>If you want Samba to win elections then just set the "os level" global
option in smb.conf to a higher number. It defaults to 0. Using 34
would make it win all elections over every other system (except other
samba systems!)</P
><P
>A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A
NTAS domain controller uses level 32.</P
><P
>The maximum os level is 255</P
><P
>If you want samba to force an election on startup, then set the
"preferred master" global option in smb.conf to "yes". Samba will
then have a slight advantage over other potential master browsers
that are not preferred master browsers. Use this parameter with
care, as if you have two hosts (whether they are windows 95 or NT or
samba) on the same local subnet both set with "preferred master" to
"yes", then periodically and continually they will force an election
in order to become the local master browser.</P
><P
>If you want samba to be a "domain master browser", then it is
recommended that you also set "preferred master" to "yes", because
samba will not become a domain master browser for the whole of your
LAN or WAN if it is not also a local master browser on its own
broadcast isolated subnet.</P
><P
>It is possible to configure two samba servers to attempt to become
the domain master browser for a domain. The first server that comes
up will be the domain master browser. All other samba servers will
attempt to become the domain master browser every 5 minutes. They
will find that another samba server is already the domain master
browser and will fail. This provides automatic redundancy, should
the current domain master browser fail.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN119"
>Making samba the domain master</A
></H1
><P
>The domain master is responsible for collating the browse lists of
multiple subnets so that browsing can occur between subnets. You can
make samba act as the domain master by setting "domain master = yes"
in smb.conf. By default it will not be a domain master.</P
><P
>Note that you should NOT set Samba to be the domain master for a
workgroup that has the same name as an NT Domain.</P
><P
>When samba is the domain master and the master browser it will listen
for master announcements (made roughly every twelve minutes) from local
master browsers on other subnets and then contact them to synchronise
browse lists.</P
><P
>If you want samba to be the domain master then I suggest you also set
the "os level" high enough to make sure it wins elections, and set
"preferred master" to "yes", to get samba to force an election on
startup.</P
><P
>Note that all your servers (including samba) and clients should be
using a WINS server to resolve NetBIOS names. If your clients are only
using broadcasting to resolve NetBIOS names, then two things will occur:</P
><P
></P
><OL
TYPE="1"
><LI
><P
> your local master browsers will be unable to find a domain master
browser, as it will only be looking on the local subnet.
</P
></LI
><LI
><P
> if a client happens to get hold of a domain-wide browse list, and
a user attempts to access a host in that list, it will be unable to
resolve the NetBIOS name of that host.
</P
></LI
></OL
><P
>If, however, both samba and your clients are using a WINS server, then:</P
><P
></P
><OL
TYPE="1"
><LI
><P
> your local master browsers will contact the WINS server and, as long as
samba has registered that it is a domain master browser with the WINS
server, your local master browser will receive samba's ip address
as its domain master browser.
</P
></LI
><LI
><P
> when a client receives a domain-wide browse list, and a user attempts
to access a host in that list, it will contact the WINS server to
resolve the NetBIOS name of that host. as long as that host has
registered its NetBIOS name with the same WINS server, the user will
be able to see that host.
</P
></LI
></OL
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN137"
>Note about broadcast addresses</A
></H1
><P
>If your network uses a "0" based broadcast address (for example if it
ends in a 0) then you will strike problems. Windows for Workgroups
does not seem to support a 0's broadcast and you will probably find
that browsing and name lookups won't work.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN140"
>Multiple interfaces</A
></H1
><P
>Samba now supports machines with multiple network interfaces. If you
have multiple interfaces then you will need to use the "interfaces"
option in smb.conf to configure them. See smb.conf(5) for details.</P
></DIV
></DIV
></BODY
></HTML
>

238
docs/htmldocs/Bugs.html Normal file
View File

@ -0,0 +1,238 @@
<HTML
><HEAD
><TITLE
>Reporting Bugs</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="BUGREPORT"
>Reporting Bugs</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Introduction</A
></H1
><P
>The email address for bug reports is samba@samba.org</P
><P
>Please take the time to read this file before you submit a bug
report. Also, please see if it has changed between releases, as we
may be changing the bug reporting mechanism at some time.</P
><P
>Please also do as much as you can yourself to help track down the
bug. Samba is maintained by a dedicated group of people who volunteer
their time, skills and efforts. We receive far more mail about it than
we can possibly answer, so you have a much higher chance of an answer
and a fix if you send us a "developer friendly" bug report that lets
us fix it fast. </P
><P
>Do not assume that if you post the bug to the comp.protocols.smb
newsgroup or the mailing list that we will read it. If you suspect that your
problem is not a bug but a configuration problem then it is better to send
it to the Samba mailing list, as there are (at last count) 5000 other users on
that list that may be able to help you.</P
><P
>You may also like to look though the recent mailing list archives,
which are conveniently accessible on the Samba web pages
at http://samba.org/samba/ </P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN10"
>General info</A
></H1
><P
>Before submitting a bug report check your config for silly
errors. Look in your log files for obvious messages that tell you that
you've misconfigured something and run testparm to test your config
file for correct syntax.</P
><P
>Have you run through the <A
HREF="Diagnosis.html"
TARGET="_top"
>diagnosis</A
>?
This is very important.</P
><P
>If you include part of a log file with your bug report then be sure to
annotate it with exactly what you were doing on the client at the
time, and exactly what the results were.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN16"
>Debug levels</A
></H1
><P
>If the bug has anything to do with Samba behaving incorrectly as a
server (like refusing to open a file) then the log files will probably
be very useful. Depending on the problem a log level of between 3 and
10 showing the problem may be appropriate. A higher level givesmore
detail, but may use too much disk space.</P
><P
>To set the debug level use <B
CLASS="COMMAND"
>log level =</B
> in your
<TT
CLASS="FILENAME"
>smb.conf</TT
>. You may also find it useful to set the log
level higher for just one machine and keep separate logs for each machine.
To do this use:</P
><P
><PRE
CLASS="PROGRAMLISTING"
>log level = 10
log file = /usr/local/samba/lib/log.%m
include = /usr/local/samba/lib/smb.conf.%m</PRE
></P
><P
>then create a file
<TT
CLASS="FILENAME"
>/usr/local/samba/lib/smb.conf.machine</TT
> where
"machine" is the name of the client you wish to debug. In that file
put any smb.conf commands you want, for example
<B
CLASS="COMMAND"
>log level=</B
> may be useful. This also allows you to
experiment with different security systems, protocol levels etc on just
one machine.</P
><P
>The <TT
CLASS="FILENAME"
>smb.conf</TT
> entry <B
CLASS="COMMAND"
>log level =</B
>
is synonymous with the entry <B
CLASS="COMMAND"
>debuglevel =</B
> that has been
used in older versions of Samba and is being retained for backwards
compatibility of smb.conf files.</P
><P
>As the <B
CLASS="COMMAND"
>log level =</B
> value is increased you will record
a significantly increasing level of debugging information. For most
debugging operations you may not need a setting higher than 3. Nearly
all bugs can be tracked at a setting of 10, but be prepared for a VERY
large volume of log data.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN33"
>Internal errors</A
></H1
><P
>If you get a "INTERNAL ERROR" message in your log files it means that
Samba got an unexpected signal while running. It is probably a
segmentation fault and almost certainly means a bug in Samba (unless
you have faulty hardware or system software)</P
><P
>If the message came from smbd then it will probably be accompanied by
a message which details the last SMB message received by smbd. This
info is often very useful in tracking down the problem so please
include it in your bug report.</P
><P
>You should also detail how to reproduce the problem, if
possible. Please make this reasonably detailed.</P
><P
>You may also find that a core file appeared in a "corefiles"
subdirectory of the directory where you keep your samba log
files. This file is the most useful tool for tracking down the bug. To
use it you do this:</P
><P
><B
CLASS="COMMAND"
>gdb smbd core</B
></P
><P
>adding appropriate paths to smbd and core so gdb can find them. If you
don't have gdb then try "dbx". Then within the debugger use the
command "where" to give a stack trace of where the problem
occurred. Include this in your mail.</P
><P
>If you known any assembly language then do a "disass" of the routine
where the problem occurred (if its in a library routine then
disassemble the routine that called it) and try to work out exactly
where the problem is by looking at the surrounding code. Even if you
don't know assembly then incuding this info in the bug report can be
useful. </P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN43"
>Attaching to a running process</A
></H1
><P
>Unfortunately some unixes (in particular some recent linux kernels)
refuse to dump a core file if the task has changed uid (which smbd
does often). To debug with this sort of system you could try to attach
to the running process using "gdb smbd PID" where you get PID from
smbstatus. Then use "c" to continue and try to cause the core dump
using the client. The debugger should catch the fault and tell you
where it occurred.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN46"
>Patches</A
></H1
><P
>The best sort of bug report is one that includes a fix! If you send us
patches please use <B
CLASS="COMMAND"
>diff -u</B
> format if your version of
diff supports it, otherwise use <B
CLASS="COMMAND"
>diff -c4</B
>. Make sure
your do the diff against a clean version of the source and let me know
exactly what version you used. </P
></DIV
></DIV
></BODY
></HTML
>

View File

@ -0,0 +1,548 @@
<HTML
><HEAD
><TITLE
>Diagnosing your samba server</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="DIAGNOSIS"
>Diagnosing your samba server</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Introduction</A
></H1
><P
>This file contains a list of tests you can perform to validate your
Samba server. It also tells you what the likely cause of the problem
is if it fails any one of these steps. If it passes all these tests
then it is probably working fine.</P
><P
>You should do ALL the tests, in the order shown. I have tried to
carefully choose them so later tests only use capabilities verified in
the earlier tests.</P
><P
>If you send me an email saying "it doesn't work" and you have not
followed this test procedure then you should not be surprised if I
ignore your email.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN8"
>Assumptions</A
></H1
><P
>In all of the tests I assume you have a Samba server called BIGSERVER
and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the
PC is running windows for workgroups with a recent copy of the
microsoft tcp/ip stack. Alternatively, your PC may be running Windows
95 or Windows NT (Workstation or Server).</P
><P
>The procedure is similar for other types of clients.</P
><P
>I also assume you know the name of an available share in your
smb.conf. I will assume this share is called "tmp". You can add a
"tmp" share like by adding the following to smb.conf:</P
><P
><PRE
CLASS="PROGRAMLISTING"
>&#13;[tmp]
comment = temporary files
path = /tmp
read only = yes&#13;</PRE
></P
><P
>THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME
COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS</P
><P
>Please pay attention to the error messages you receive. If any error message
reports that your server is being unfriendly you should first check that you
IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf
file points to name servers that really do exist.</P
><P
>Also, if you do not have DNS server access for name resolution please check
that the settings for your smb.conf file results in "dns proxy = no". The
best way to check this is with "testparm smb.conf"</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN18"
>Tests</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN20"
>Test 1</A
></H2
><P
>In the directory in which you store your smb.conf file, run the command
"testparm smb.conf". If it reports any errors then your smb.conf
configuration file is faulty.</P
><P
>Note: Your smb.conf file may be located in: <TT
CLASS="FILENAME"
>/etc</TT
>
Or in: <TT
CLASS="FILENAME"
>/usr/local/samba/lib</TT
></P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN26"
>Test 2</A
></H2
><P
>Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from
the unix box. If you don't get a valid response then your TCP/IP
software is not correctly installed. </P
><P
>Note that you will need to start a "dos prompt" window on the PC to
run ping.</P
><P
>If you get a message saying "host not found" or similar then your DNS
software or /etc/hosts file is not correctly setup. It is possible to
run samba without DNS entries for the server and client, but I assume
you do have correct entries for the remainder of these tests. </P
><P
>Another reason why ping might fail is if your host is running firewall
software. You will need to relax the rules to let in the workstation
in question, perhaps by allowing access from another subnet (on Linux
this is done via the ipfwadm program.)</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN32"
>Test 3</A
></H2
><P
>Run the command "smbclient -L BIGSERVER" on the unix box. You
should get a list of available shares back. </P
><P
>If you get a error message containing the string "Bad password" then
you probably have either an incorrect "hosts allow", "hosts deny" or
"valid users" line in your smb.conf, or your guest account is not
valid. Check what your guest account is using "testparm" and
temporarily remove any "hosts allow", "hosts deny", "valid users" or
"invalid users" lines.</P
><P
>If you get a "connection refused" response then the smbd server may
not be running. If you installed it in inetd.conf then you probably edited
that file incorrectly. If you installed it as a daemon then check that
it is running, and check that the netbios-ssn port is in a LISTEN
state using "netstat -a".</P
><P
>If you get a "session request failed" then the server refused the
connection. If it says "Your server software is being unfriendly" then
its probably because you have invalid command line parameters to smbd,
or a similar fatal problem with the initial startup of smbd. Also
check your config file (smb.conf) for syntax errors with "testparm"
and that the various directories where samba keeps its log and lock
files exist.</P
><P
>There are a number of reasons for which smbd may refuse or decline
a session request. The most common of these involve one or more of
the following smb.conf file entries:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> hosts deny = ALL
hosts allow = xxx.xxx.xxx.xxx/yy
bind interfaces only = Yes</PRE
></P
><P
>In the above, no allowance has been made for any session requests that
will automatically translate to the loopback adaptor address 127.0.0.1.
To solve this problem change these lines to:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> hosts deny = ALL
hosts allow = xxx.xxx.xxx.xxx/yy 127.</PRE
></P
><P
>Do NOT use the "bind interfaces only" parameter where you may wish to
use the samba password change facility, or where smbclient may need to
access local service for name resolution or for local resource
connections. (Note: the "bind interfaces only" parameter deficiency
where it will not allow connections to the loopback address will be
fixed soon).</P
><P
>Another common cause of these two errors is having something already running
on port 139, such as Samba (ie: smbd is running from inetd already) or
something like Digital's Pathworks. Check your inetd.conf file before trying
to start smbd as a daemon, it can avoid a lot of frustration!</P
><P
>And yet another possible cause for failure of TEST 3 is when the subnet mask
and / or broadcast address settings are incorrect. Please check that the
network interface IP Address / Broadcast Address / Subnet Mask settings are
correct and that Samba has correctly noted these in the log.nmb file.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN47"
>Test 4</A
></H2
><P
>Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the
IP address of your Samba server back.</P
><P
>If you don't then nmbd is incorrectly installed. Check your inetd.conf
if you run it from there, or that the daemon is running and listening
to udp port 137.</P
><P
>One common problem is that many inetd implementations can't take many
parameters on the command line. If this is the case then create a
one-line script that contains the right parameters and run that from
inetd.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN52"
>Test 5</A
></H2
><P
>run the command <B
CLASS="COMMAND"
>nmblookup -B ACLIENT '*'</B
></P
><P
>You should get the PCs IP address back. If you don't then the client
software on the PC isn't installed correctly, or isn't started, or you
got the name of the PC wrong. </P
><P
>If ACLIENT doesn't resolve via DNS then use the IP address of the
client in the above test.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN58"
>Test 6</A
></H2
><P
>Run the command <B
CLASS="COMMAND"
>nmblookup -d 2 '*'</B
></P
><P
>This time we are trying the same as the previous test but are trying
it via a broadcast to the default broadcast address. A number of
Netbios/TCPIP hosts on the network should respond, although Samba may
not catch all of the responses in the short time it listens. You
should see "got a positive name query response" messages from several
hosts.</P
><P
>If this doesn't give a similar result to the previous test then
nmblookup isn't correctly getting your broadcast address through its
automatic mechanism. In this case you should experiment use the
"interfaces" option in smb.conf to manually configure your IP
address, broadcast and netmask. </P
><P
>If your PC and server aren't on the same subnet then you will need to
use the -B option to set the broadcast address to the that of the PCs
subnet.</P
><P
>This test will probably fail if your subnet mask and broadcast address are
not correct. (Refer to TEST 3 notes above).</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN66"
>Test 7</A
></H2
><P
>Run the command <B
CLASS="COMMAND"
>smbclient //BIGSERVER/TMP</B
>. You should
then be prompted for a password. You should use the password of the account
you are logged into the unix box with. If you want to test with
another account then add the -U &gt;accountname&lt; option to the end of
the command line. eg:
<B
CLASS="COMMAND"
>smbclient //bigserver/tmp -Ujohndoe</B
></P
><P
>Note: It is possible to specify the password along with the username
as follows:
<B
CLASS="COMMAND"
>smbclient //bigserver/tmp -Ujohndoe%secret</B
></P
><P
>Once you enter the password you should get the "smb&#62;" prompt. If you
don't then look at the error message. If it says "invalid network
name" then the service "tmp" is not correctly setup in your smb.conf.</P
><P
>If it says "bad password" then the likely causes are:</P
><P
></P
><OL
TYPE="1"
><LI
><P
> you have shadow passords (or some other password system) but didn't
compile in support for them in smbd
</P
></LI
><LI
><P
> your "valid users" configuration is incorrect
</P
></LI
><LI
><P
> you have a mixed case password and you haven't enabled the "password
level" option at a high enough level
</P
></LI
><LI
><P
> the "path =" line in smb.conf is incorrect. Check it with testparm
</P
></LI
><LI
><P
> you enabled password encryption but didn't create the SMB encrypted
password file
</P
></LI
></OL
><P
>Once connected you should be able to use the commands
<B
CLASS="COMMAND"
>dir</B
> <B
CLASS="COMMAND"
>get</B
> <B
CLASS="COMMAND"
>put</B
> etc.
Type <B
CLASS="COMMAND"
>help &gt;command&lt;</B
> for instructions. You should
especially check that the amount of free disk space shown is correct
when you type <B
CLASS="COMMAND"
>dir</B
>.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN92"
>Test 8</A
></H2
><P
>On the PC type the command <B
CLASS="COMMAND"
>net view \\BIGSERVER</B
>. You will
need to do this from within a "dos prompt" window. You should get back a
list of available shares on the server.</P
><P
>If you get a "network name not found" or similar error then netbios
name resolution is not working. This is usually caused by a problem in
nmbd. To overcome it you could do one of the following (you only need
to choose one of them):</P
><P
></P
><OL
TYPE="1"
><LI
><P
> fixup the nmbd installation</P
></LI
><LI
><P
> add the IP address of BIGSERVER to the "wins server" box in the
advanced tcp/ip setup on the PC.</P
></LI
><LI
><P
> enable windows name resolution via DNS in the advanced section of
the tcp/ip setup</P
></LI
><LI
><P
> add BIGSERVER to your lmhosts file on the PC.</P
></LI
></OL
><P
>If you get a "invalid network name" or "bad password error" then the
same fixes apply as they did for the "smbclient -L" test above. In
particular, make sure your "hosts allow" line is correct (see the man
pages)</P
><P
>Also, do not overlook that fact that when the workstation requests the
connection to the samba server it will attempt to connect using the
name with which you logged onto your Windows machine. You need to make
sure that an account exists on your Samba server with that exact same
name and password.</P
><P
>If you get "specified computer is not receiving requests" or similar
it probably means that the host is not contactable via tcp services.
Check to see if the host is running tcp wrappers, and if so add an entry in
the hosts.allow file for your client (or subnet, etc.)</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN109"
>Test 9</A
></H2
><P
>Run the command <B
CLASS="COMMAND"
>net use x: \\BIGSERVER\TMP</B
>. You should
be prompted for a password then you should get a "command completed
successfully" message. If not then your PC software is incorrectly
installed or your smb.conf is incorrect. make sure your "hosts allow"
and other config lines in smb.conf are correct.</P
><P
>It's also possible that the server can't work out what user name to
connect you as. To see if this is the problem add the line "user =
USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the
username corresponding to the password you typed. If you find this
fixes things you may need the username mapping option.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN114"
>Test 10</A
></H2
><P
>Run the command <B
CLASS="COMMAND"
>nmblookup -M TESTGROUP</B
> where
TESTGROUP is the name of the workgroup that your Samba server and
Windows PCs belong to. You should get back the IP address of the
master browser for that workgroup.</P
><P
>If you don't then the election process has failed. Wait a minute to
see if it is just being slow then try again. If it still fails after
that then look at the browsing options you have set in smb.conf. Make
sure you have <B
CLASS="COMMAND"
>preferred master = yes</B
> to ensure that
an election is held at startup.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN120"
>Test 11</A
></H2
><P
>From file manager try to browse the server. Your samba server should
appear in the browse list of your local workgroup (or the one you
specified in smb.conf). You should be able to double click on the name
of the server and get a list of shares. If you get a "invalid
password" error when you do then you are probably running WinNT and it
is refusing to browse a server that has no encrypted password
capability and is in user level security mode. In this case either set
<B
CLASS="COMMAND"
>security = server</B
> AND
<B
CLASS="COMMAND"
>password server = Windows_NT_Machine</B
> in your
smb.conf file, or enable encrypted passwords AFTER compiling in support
for encrypted passwords (refer to the Makefile).</P
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN125"
>Still having troubles?</A
></H1
><P
>Try the mailing list or newsgroup, or use the ethereal utility to
sniff the problem. The official samba mailing list can be reached at
<A
HREF="mailto:samba@samba.org"
TARGET="_top"
>samba@samba.org</A
>. To find
out more about samba and how to subscribe to the mailing list check
out the samba web page at
<A
HREF="http://samba.org/samba"
TARGET="_top"
>http://samba.org/samba</A
></P
><P
>Also look at the other docs in the Samba package!</P
></DIV
></DIV
></BODY
></HTML
>

View File

@ -191,7 +191,7 @@ CLASS="FILENAME"
> is one such file.</P
><P
>When the IP address of the destination interface has been
determined a protocol called ARP/RARP isused to identify
determined a protocol called ARP/RARP is used to identify
the MAC address of the target interface. ARP stands for Address
Resolution Protocol, and is a broadcast oriented method that
uses UDP (User Datagram Protocol) to send a request to all
@ -414,7 +414,7 @@ architecture of the MS Windows network. The term "workgroup" indicates
that the primary nature of the network environment is that of a
peer-to-peer design. In a WORKGROUP all machines are responsible for
their own security, and generally such security is limited to use of
just a password (known as SHARE MORE security). In most situations
just a password (known as SHARE MODE security). In most situations
with peer-to-peer networking the users who control their own machines
will simply opt to have no security at all. It is possible to have
USER MODE security in a WORKGROUP environment, thus requiring use
@ -444,8 +444,8 @@ NAME="AEN100"
></H2
><P
>All MS Windows machines employ an in memory buffer in which is
stored the NetBIOS names and their IP addresses for all external
machines that that the local machine has communicated with over the
stored the NetBIOS names and IP addresses for all external
machines that that machine has communicated with over the
past 10-15 minutes. It is more efficient to obtain an IP address
for a machine from the local cache than it is to go through all the
configured name resolution mechanisms.</P
@ -453,7 +453,7 @@ configured name resolution mechanisms.</P
>If a machine whose name is in the local name cache has been shut
down before the name had been expired and flushed from the cache, then
an attempt to exchange a message with that machine will be subject
to time-out delays. ie: It's name is in the cache, so a name resolution
to time-out delays. i.e.: Its name is in the cache, so a name resolution
lookup will succeed, but the machine can not respond. This can be
frustrating for users - but it is a characteristic of the protocol.</P
><P
@ -660,7 +660,7 @@ dependable browsing using Samba</A
></H1
><P
>As stated above, MS Windows machines register their NetBIOS names
(ie: the machine name for each service type in operation) on start
(i.e.: the machine name for each service type in operation) on start
up. Also, as stated above, the exact method by which this name registration
takes place is determined by whether or not the MS Windows client/server
has been given a WINS server address, whether or not LMHOSTS lookup
@ -685,7 +685,7 @@ Instead, the domain master browser serves the role of contacting each local
master browser (found by asking WINS or from LMHOSTS) and exchanging browse
list contents. This way every master browser will eventually obtain a complete
list of all machines that are on the network. Every 11-15 minutes an election
is held to determine which machine will be the master browser. By nature of
is held to determine which machine will be the master browser. By the nature of
the election criteria used, the machine with the highest uptime, or the
most senior protocol version, or other criteria, will win the election
as domain master browser.</P
@ -770,8 +770,8 @@ these versions no longer support plain text passwords by default.</P
><P
>MS Windows clients have a habit of dropping network mappings that
have been idle for 10 minutes or longer. When the user attempts to
use the mapped drive connection that has been dropped the SMB protocol
has a mechanism by which the connection can be re-established using
use the mapped drive connection that has been dropped, the client
re-establishes the connection using
a cached copy of the password.</P
><P
>When Microsoft changed the default password mode, they dropped support for
@ -959,7 +959,7 @@ NAME="AEN196"
></H2
><P
>This mode of authentication demands that there be on the
Unix/Linux system both a Unix style account as well as and
Unix/Linux system both a Unix style account as well as an
smbpasswd entry for the user. The Unix system account can be
locked if required as only the encrypted password will be
used for SMB client authentication.</P

408
docs/htmldocs/Printing.html Normal file
View File

@ -0,0 +1,408 @@
<HTML
><HEAD
><TITLE
>Debugging Printing Problems</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="PRINTING_DEBUG"
>Debugging Printing Problems</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Introduction</A
></H1
><P
>This is a short description of how to debug printing problems with
Samba. This describes how to debug problems with printing from a SMB
client to a Samba server, not the other way around. For the reverse
see the examples/printing directory.</P
><P
>Ok, so you want to print to a Samba server from your PC. The first
thing you need to understand is that Samba does not actually do any
printing itself, it just acts as a middleman between your PC client
and your Unix printing subsystem. Samba receives the file from the PC
then passes the file to a external "print command". What print command
you use is up to you.</P
><P
>The whole things is controlled using options in smb.conf. The most
relevant options (which you should look up in the smb.conf man page)
are:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> [global]
print command - send a file to a spooler
lpq command - get spool queue status
lprm command - remove a job
[printers]
path = /var/spool/lpd/samba</PRE
></P
><P
>The following are nice to know about:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> queuepause command - stop a printer or print queue
queueresume command - start a printer or print queue</PRE
></P
><P
>Example:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> print command = /usr/bin/lpr -r -P%p %s
lpq command = /usr/bin/lpq -P%p %s
lprm command = /usr/bin/lprm -P%p %j
queuepause command = /usr/sbin/lpc -P%p stop
queuepause command = /usr/sbin/lpc -P%p start</PRE
></P
><P
>Samba should set reasonable defaults for these depending on your
system type, but it isn't clairvoyant. It is not uncommon that you
have to tweak these for local conditions. The commands should
always have fully specified pathnames, as the smdb may not have
the correct PATH values.</P
><P
>When you send a job to Samba to be printed, it will make a temporary
copy of it in the directory specified in the [printers] section.
and it should be periodically cleaned out. The lpr -r option
requests that the temporary copy be removed after printing; If
printing fails then you might find leftover files in this directory,
and it should be periodically cleaned out. Samba used the lpq
command to determine the "job number" assigned to your print job
by the spooler.</P
><P
>The %&gt;letter&lt; are "macros" that get dynamically replaced with appropriate
values when they are used. The %s gets replaced with the name of the spool
file that Samba creates and the %p gets replaced with the name of the
printer. The %j gets replaced with the "job number" which comes from
the lpq output.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN19"
>Debugging printer problems</A
></H1
><P
>One way to debug printing problems is to start by replacing these
command with shell scripts that record the arguments and the contents
of the print file. A simple example of this kind of things might
be:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> print command = /tmp/saveprint %p %s
#!/bin/saveprint
# we make sure that we are the right user
/usr/bin/id -p &#62;/tmp/tmp.print
# we run the command and save the error messages
# replace the command with the one appropriate for your system
/usr/bin/lpr -r -P$1 $2 2&#62;&#62;&#38;/tmp/tmp.print</PRE
></P
><P
>Then you print a file and try removing it. You may find that the
print queue needs to be stopped in order to see the queue status
and remove the job:</P
><P
><PRE
CLASS="PROGRAMLISTING"
>&#13;h4: {42} % echo hi &#62;/tmp/hi
h4: {43} % smbclient //localhost/lw4
added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
Password:
Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
smb: \&#62; print /tmp/hi
putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
smb: \&#62; queue
1049 3 hi-17534
smb: \&#62; cancel 1049
Error cancelling job 1049 : code 0
smb: \&#62; cancel 1049
Job 1049 cancelled
smb: \&#62; queue
smb: \&#62; exit</PRE
></P
><P
>The 'code 0' indicates that the job was removed. The comment
by the smbclient is a bit misleading on this.
You can observe the command output and then and look at the
/tmp/tmp.print file to see what the results are. You can quickly
find out if the problem is with your printing system. Often people
have problems with their /etc/printcap file or permissions on
various print queues.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN28"
>What printers do I have?</A
></H1
><P
>You can use the 'testprns' program to check to see if the printer
name you are using is recognized by Samba. For example, you can
use:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> testprns printer /etc/printcap</PRE
></P
><P
>Samba can get its printcap information from a file or from a program.
You can try the following to see the format of the extracted
information:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> testprns -a printer /etc/printcap
testprns -a printer '|/bin/cat printcap'</PRE
></P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN36"
>Setting up printcap and print servers</A
></H1
><P
>You may need to set up some printcaps for your Samba system to use.
It is strongly recommended that you use the facilities provided by
the print spooler to set up queues and printcap information.</P
><P
>Samba requires either a printcap or program to deliver printcap
information. This printcap information has the format:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> name|alias1|alias2...:option=value:...</PRE
></P
><P
>For almost all printing systems, the printer 'name' must be composed
only of alphanumeric or underscore '_' characters. Some systems also
allow hyphens ('-') as well. An alias is an alternative name for the
printer, and an alias with a space in it is used as a 'comment'
about the printer. The printcap format optionally uses a \ at the end of lines
to extend the printcap to multiple lines.</P
><P
>Here are some examples of printcap files:</P
><P
><P
></P
><OL
TYPE="1"
><LI
><P
>pr just printer name</P
></LI
><LI
><P
>pr|alias printer name and alias</P
></LI
><LI
><P
>pr|My Printer printer name, alias used as comment</P
></LI
><LI
><P
>pr:sh:\ Same as pr:sh:cm= testing
:cm= \
testing</P
></LI
><LI
><P
>pr:sh Same as pr:sh:cm= testing
:cm= testing</P
></LI
></OL
></P
><P
>Samba reads the printcap information when first started. If you make
changes in the printcap information, then you must do the following:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>make sure that the print spooler is aware of these changes.
The LPRng system uses the 'lpc reread' command to do this.</P
></LI
><LI
><P
>make sure that the spool queues, etc., exist and have the
correct permissions. The LPRng system uses the 'checkpc -f'
command to do this.</P
></LI
><LI
><P
>You now should send a SIGHUP signal to the smbd server to have
it reread the printcap information.</P
></LI
></OL
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN64"
>Job sent, no output</A
></H1
><P
>This is the most frustrating part of printing. You may have sent the
job, verified that the job was forwarded, set up a wrapper around
the command to send the file, but there was no output from the printer.</P
><P
>First, check to make sure that the job REALLY is getting to the
right print queue. If you are using a BSD or LPRng print spooler,
you can temporarily stop the printing of jobs. Jobs can still be
submitted, but they will not be printed. Use:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> lpc -Pprinter stop</PRE
></P
><P
>Now submit a print job and then use 'lpq -Pprinter' to see if the
job is in the print queue. If it is not in the print queue then
you will have to find out why it is not being accepted for printing.</P
><P
>Next, you may want to check to see what the format of the job really
was. With the assistance of the system administrator you can view
the submitted jobs files. You may be surprised to find that these
are not in what you would expect to call a printable format.
You can use the UNIX 'file' utitily to determine what the job
format actually is:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> cd /var/spool/lpd/printer # spool directory of print jobs
ls # find job files
file dfA001myhost</PRE
></P
><P
>You should make sure that your printer supports this format OR that
your system administrator has installed a 'print filter' that will
convert the file to a format appropriate for your printer.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN75"
>Job sent, strange output</A
></H1
><P
>Once you have the job printing, you can then start worrying about
making it print nicely.</P
><P
>The most common problem is extra pages of output: banner pages
OR blank pages at the end.</P
><P
>If you are getting banner pages, check and make sure that the
printcap option or printer option is configured for no banners.
If you have a printcap, this is the :sh (suppress header or banner
page) option. You should have the following in your printer.</P
><P
><PRE
CLASS="PROGRAMLISTING"
> printer: ... :sh</PRE
></P
><P
>If you have this option and are still getting banner pages, there
is a strong chance that your printer is generating them for you
automatically. You should make sure that banner printing is disabled
for the printer. This usually requires using the printer setup software
or procedures supplied by the printer manufacturer.</P
><P
>If you get an extra page of output, this could be due to problems
with your job format, or if you are generating PostScript jobs,
incorrect setting on your printer driver on the MicroSoft client.
For example, under Win95 there is a option:</P
><P
><PRE
CLASS="PROGRAMLISTING"
> Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|</PRE
></P
><P
>that allows you to choose if a Ctrl-D is appended to all jobs.
This is a very bad thing to do, as most spooling systems will
automatically add a ^D to the end of the job if it is detected as
PostScript. The multiple ^D may cause an additional page of output.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN87"
>Raw PostScript printed</A
></H1
><P
>This is a problem that is usually caused by either the print spooling
system putting information at the start of the print job that makes
the printer think the job is a text file, or your printer simply
does not support PostScript. You may need to enable 'Automatic
Format Detection' on your printer.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN90"
>Advanced Printing</A
></H1
><P
>Note that you can do some pretty magic things by using your
imagination with the "print command" option and some shell scripts.
Doing print accounting is easy by passing the %U option to a print
command shell script. You could even make the print command detect
the type of output and its size and send it to an appropriate
printer.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN93"
>Real debugging</A
></H1
><P
>If the above debug tips don't help, then maybe you need to bring in
the bug guns, system tracing. See Tracing.txt in this directory.</P
></DIV
></DIV
></BODY
></HTML
>

File diff suppressed because it is too large Load Diff

View File

@ -152,7 +152,7 @@ Identified (RID).</P
>As a result of these defeciencies, a more robust means of storing user attributes
used by smbd was developed. The API which defines access to user accounts
is commonly referred to as the samdb interface (previously this was called the passdb
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
for a samdb backend (e.g. <TT
CLASS="PARAMETER"
><I
@ -498,7 +498,7 @@ CLASS="REPLACEABLE"
ldap suffix = "ou=people,dc=samba,dc=org"
# generally the default ldap search filter is ok
# ldap filter = "(&#38;(uid=%u)(objectclass=sambaAccount))"</PRE
# ldap filter = "(&amp;(uid=%u)(objectclass=sambaAccount))"</PRE
></P
></DIV
></DIV

View File

@ -2124,7 +2124,7 @@ ALIGN="LEFT"
></TABLE
></DIV
><P
>The default logon path is \\%N\U%. NT Workstation will attempt to create
>The default logon path is \\%N\%U. NT Workstation will attempt to create
a directory "\\samba-server\username.PDS" if you specify the logon path
as "\\samba-server\username" with the NT User Manager. Therefore, you
will need to specify (for example) "\\samba-server\username\profile".

550
docs/htmldocs/Speed.html Normal file
View File

@ -0,0 +1,550 @@
<HTML
><HEAD
><TITLE
>Samba performance issues</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="SPEED"
>Samba performance issues</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Comparisons</A
></H1
><P
>The Samba server uses TCP to talk to the client. Thus if you are
trying to see if it performs well you should really compare it to
programs that use the same protocol. The most readily available
programs for file transfer that use TCP are ftp or another TCP based
SMB server.</P
><P
>If you want to test against something like a NT or WfWg server then
you will have to disable all but TCP on either the client or
server. Otherwise you may well be using a totally different protocol
(such as Netbeui) and comparisons may not be valid.</P
><P
>Generally you should find that Samba performs similarly to ftp at raw
transfer speed. It should perform quite a bit faster than NFS,
although this very much depends on your system.</P
><P
>Several people have done comparisons between Samba and Novell, NFS or
WinNT. In some cases Samba performed the best, in others the worst. I
suspect the biggest factor is not Samba vs some other system but the
hardware and drivers used on the various systems. Given similar
hardware Samba should certainly be competitive in speed with other
systems.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN9"
>Oplocks</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN11"
>Overview</A
></H2
><P
>Oplocks are the way that SMB clients get permission from a server to
locally cache file operations. If a server grants an oplock
(opportunistic lock) then the client is free to assume that it is the
only one accessing the file and it will agressively cache file
data. With some oplock types the client may even cache file open/close
operations. This can give enormous performance benefits.</P
><P
>With the release of Samba 1.9.18 we now correctly support opportunistic
locks. This is turned on by default, and can be turned off on a share-
by-share basis by setting the parameter :</P
><P
><B
CLASS="COMMAND"
>oplocks = False</B
></P
><P
>We recommend that you leave oplocks on however, as current benchmark
tests with NetBench seem to give approximately a 30% improvement in
speed with them on. This is on average however, and the actual
improvement seen can be orders of magnitude greater, depending on
what the client redirector is doing.</P
><P
>Previous to Samba 1.9.18 there was a 'fake oplocks' option. This
option has been left in the code for backwards compatibility reasons
but it's use is now deprecated. A short summary of what the old
code did follows.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN19"
>Level2 Oplocks</A
></H2
><P
>With Samba 2.0.5 a new capability - level2 (read only) oplocks is
supported (although the option is off by default - see the smb.conf
man page for details). Turning on level2 oplocks (on a share-by-share basis)
by setting the parameter :</P
><P
><B
CLASS="COMMAND"
>level2 oplocks = true</B
></P
><P
>should speed concurrent access to files that are not commonly written
to, such as application serving shares (ie. shares that contain common
.EXE files - such as a Microsoft Office share) as it allows clients to
read-ahread cache copies of these files.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN25"
>Old 'fake oplocks' option - deprecated</A
></H2
><P
>Samba can also fake oplocks, by granting a oplock whenever a client
asks for one. This is controlled using the smb.conf option "fake
oplocks". If you set "fake oplocks = yes" then you are telling the
client that it may agressively cache the file data for all opens.</P
><P
>Enabling 'fake oplocks' on all read-only shares or shares that you know
will only be accessed from one client at a time you will see a big
performance improvement on many operations. If you enable this option
on shares where multiple clients may be accessing the files read-write
at the same time you can get data corruption.</P
></DIV
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN29"
>Socket options</A
></H1
><P
>There are a number of socket options that can greatly affect the
performance of a TCP based server like Samba.</P
><P
>The socket options that Samba uses are settable both on the command
line with the -O option, or in the smb.conf file.</P
><P
>The "socket options" section of the smb.conf manual page describes how
to set these and gives recommendations.</P
><P
>Getting the socket options right can make a big difference to your
performance, but getting them wrong can degrade it by just as
much. The correct settings are very dependent on your local network.</P
><P
>The socket option TCP_NODELAY is the one that seems to make the
biggest single difference for most networks. Many people report that
adding "socket options = TCP_NODELAY" doubles the read performance of
a Samba drive. The best explanation I have seen for this is that the
Microsoft TCP/IP stack is slow in sending tcp ACKs.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN36"
>Read size</A
></H1
><P
>The option "read size" affects the overlap of disk reads/writes with
network reads/writes. If the amount of data being transferred in
several of the SMB commands (currently SMBwrite, SMBwriteX and
SMBreadbraw) is larger than this value then the server begins writing
the data before it has received the whole packet from the network, or
in the case of SMBreadbraw, it begins writing to the network before
all the data has been read from disk.</P
><P
>This overlapping works best when the speeds of disk and network access
are similar, having very little effect when the speed of one is much
greater than the other.</P
><P
>The default value is 16384, but very little experimentation has been
done yet to determine the optimal value, and it is likely that the best
value will vary greatly between systems anyway. A value over 65536 is
pointless and will cause you to allocate memory unnecessarily.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN41"
>Max xmit</A
></H1
><P
>At startup the client and server negotiate a "maximum transmit" size,
which limits the size of nearly all SMB commands. You can set the
maximum size that Samba will negotiate using the "max xmit = " option
in smb.conf. Note that this is the maximum size of SMB request that
Samba will accept, but not the maximum size that the *client* will accept.
The client maximum receive size is sent to Samba by the client and Samba
honours this limit.</P
><P
>It defaults to 65536 bytes (the maximum), but it is possible that some
clients may perform better with a smaller transmit unit. Trying values
of less than 2048 is likely to cause severe problems.</P
><P
>In most cases the default is the best option.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN46"
>Locking</A
></H1
><P
>By default Samba does not implement strict locking on each read/write
call (although it did in previous versions). If you enable strict
locking (using "strict locking = yes") then you may find that you
suffer a severe performance hit on some systems.</P
><P
>The performance hit will probably be greater on NFS mounted
filesystems, but could be quite high even on local disks.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN50"
>Share modes</A
></H1
><P
>Some people find that opening files is very slow. This is often
because of the "share modes" code needed to fully implement the dos
share modes stuff. You can disable this code using "share modes =
no". This will gain you a lot in opening and closing files but will
mean that (in some cases) the system won't force a second user of a
file to open the file read-only if the first has it open
read-write. For many applications that do their own locking this
doesn't matter, but for some it may. Most Windows applications
depend heavily on "share modes" working correctly and it is
recommended that the Samba share mode support be left at the
default of "on".</P
><P
>The share mode code in Samba has been re-written in the 1.9.17
release following tests with the Ziff-Davis NetBench PC Benchmarking
tool. It is now believed that Samba 1.9.17 implements share modes
similarly to Windows NT.</P
><P
>NOTE: In the most recent versions of Samba there is an option to use
shared memory via mmap() to implement the share modes. This makes
things much faster. See the Makefile for how to enable this.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN55"
>Log level</A
></H1
><P
>If you set the log level (also known as "debug level") higher than 2
then you may suffer a large drop in performance. This is because the
server flushes the log file after each operation, which can be very
expensive. </P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN58"
>Wide lines</A
></H1
><P
>The "wide links" option is now enabled by default, but if you disable
it (for better security) then you may suffer a performance hit in
resolving filenames. The performance loss is lessened if you have
"getwd cache = yes", which is now the default.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN61"
>Read raw</A
></H1
><P
>The "read raw" operation is designed to be an optimised, low-latency
file read operation. A server may choose to not support it,
however. and Samba makes support for "read raw" optional, with it
being enabled by default.</P
><P
>In some cases clients don't handle "read raw" very well and actually
get lower performance using it than they get using the conventional
read operations. </P
><P
>So you might like to try "read raw = no" and see what happens on your
network. It might lower, raise or not affect your performance. Only
testing can really tell.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN66"
>Write raw</A
></H1
><P
>The "write raw" operation is designed to be an optimised, low-latency
file write operation. A server may choose to not support it,
however. and Samba makes support for "write raw" optional, with it
being enabled by default.</P
><P
>Some machines may find "write raw" slower than normal write, in which
case you may wish to change this option.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN70"
>Read prediction</A
></H1
><P
>Samba can do read prediction on some of the SMB commands. Read
prediction means that Samba reads some extra data on the last file it
read while waiting for the next SMB command to arrive. It can then
respond more quickly when the next read request arrives.</P
><P
>This is disabled by default. You can enable it by using "read
prediction = yes".</P
><P
>Note that read prediction is only used on files that were opened read
only.</P
><P
>Read prediction should particularly help for those silly clients (such
as "Write" under NT) which do lots of very small reads on a file.</P
><P
>Samba will not read ahead more data than the amount specified in the
"read size" option. It always reads ahead on 1k block boundaries.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN77"
>Memory mapping</A
></H1
><P
>Samba supports reading files via memory mapping them. One some
machines this can give a large boost to performance, on others it
makes not difference at all, and on some it may reduce performance.</P
><P
>To enable you you have to recompile Samba with the -DUSE_MMAP option
on the FLAGS line of the Makefile.</P
><P
>Note that memory mapping is only used on files opened read only, and
is not used by the "read raw" operation. Thus you may find memory
mapping is more effective if you disable "read raw" using "read raw =
no".</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN82"
>Slow Clients</A
></H1
><P
>One person has reported that setting the protocol to COREPLUS rather
than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).</P
><P
>I suspect that his PC's (386sx16 based) were asking for more data than
they could chew. I suspect a similar speed could be had by setting
"read raw = no" and "max xmit = 2048", instead of changing the
protocol. Lowering the "read size" might also help.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN86"
>Slow Logins</A
></H1
><P
>Slow logins are almost always due to the password checking time. Using
the lowest practical "password level" will improve things a lot. You
could also enable the "UFC crypt" option in the Makefile.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN89"
>Client tuning</A
></H1
><P
>Often a speed problem can be traced to the client. The client (for
example Windows for Workgroups) can often be tuned for better TCP
performance.</P
><P
>See your client docs for details. In particular, I have heard rumours
that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a
large impact on performance.</P
><P
>Also note that some people have found that setting DefaultRcvWindow in
the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a
big improvement. I don't know why.</P
><P
>My own experience wth DefaultRcvWindow is that I get much better
performance with a large value (16384 or larger). Other people have
reported that anything over 3072 slows things down enourmously. One
person even reported a speed drop of a factor of 30 when he went from
3072 to 8192. I don't know why.</P
><P
>It probably depends a lot on your hardware, and the type of unix box
you have at the other end of the link.</P
><P
>Paul Cochrane has done some testing on client side tuning and come
to the following conclusions:</P
><P
>Install the W2setup.exe file from www.microsoft.com. This is an
update for the winsock stack and utilities which improve performance.</P
><P
>Configure the win95 TCPIP registry settings to give better
perfomance. I use a program called MTUSPEED.exe which I got off the
net. There are various other utilities of this type freely available.
The setting which give the best performance for me are:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>MaxMTU Remove</P
></LI
><LI
><P
>RWIN Remove</P
></LI
><LI
><P
>MTUAutoDiscover Disable</P
></LI
><LI
><P
>MTUBlackHoleDetect Disable</P
></LI
><LI
><P
>Time To Live Enabled</P
></LI
><LI
><P
>Time To Live - HOPS 32</P
></LI
><LI
><P
>NDI Cache Size 0</P
></LI
></OL
><P
>I tried virtually all of the items mentioned in the document and
the only one which made a difference to me was the socket options. It
turned out I was better off without any!!!!!</P
><P
>In terms of overall speed of transfer, between various win95 clients
and a DX2-66 20MB server with a crappy NE2000 compatible and old IDE
drive (Kernel 2.0.30). The transfer rate was reasonable for 10 baseT.</P
><P
>FIXME
The figures are: Put Get
P166 client 3Com card: 420-440kB/s 500-520kB/s
P100 client 3Com card: 390-410kB/s 490-510kB/s
DX4-75 client NE2000: 370-380kB/s 330-350kB/s</P
><P
>I based these test on transfer two files a 4.5MB text file and a 15MB
textfile. The results arn't bad considering the hardware Samba is
running on. It's a crap machine!!!!</P
><P
>The updates mentioned in 1 and 2 brought up the transfer rates from
just over 100kB/s in some clients.</P
><P
>A new client is a P333 connected via a 100MB/s card and hub. The
transfer rates from this were good: 450-500kB/s on put and 600+kB/s
on get.</P
><P
>Looking at standard FTP throughput, Samba is a bit slower (100kB/s
upwards). I suppose there is more going on in the samba protocol, but
if it could get up to the rate of FTP the perfomance would be quite
staggering.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN121"
>My Results</A
></H1
><P
>Some people want to see real numbers in a document like this, so here
they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b
tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC
Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to
set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My
server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC
Elite-16 card. You can see my server config in the examples/tridge/
subdirectory of the distribution.</P
><P
>I get 490k/s on reading a 8Mb file with copy.
I get 441k/s writing the same file to the samba server.</P
><P
>Of course, there's a lot more to benchmarks than 2 raw throughput
figures, but it gives you a ballpark figure.</P
><P
>I've also tested Win95 and WinNT, and found WinNT gave me the best
speed as a samba client. The fastest client of all (for me) is
smbclient running on another linux box. Maybe I'll add those results
here someday ...</P
></DIV
></DIV
></BODY
></HTML
>

View File

@ -478,7 +478,7 @@ CLASS="REPLACEABLE"
></TT
></P
><P
>Your should get back a list of shares available on
>You should get back a list of shares available on
your server. If you don't then something is incorrectly setup.
Note that this method can also be used to see what shares
are available on other LanManager clients (such as WfWg).</P
@ -656,8 +656,8 @@ NAME="AEN166"
>By default Samba uses a blank scope ID. This means
all your windows boxes must also have a blank scope ID.
If you really want to use a non-blank scope ID then you will
need to use the -i &lt;scope&gt; option to nmbd, smbd, and
smbclient. All your PCs will need to have the same setting for
need to use the 'netbios scope' smb.conf option.
All your PCs will need to have the same setting for
this to work. I do not recommend scope IDs.</P
></DIV
><DIV
@ -778,19 +778,13 @@ NAME="AEN182"
its open. A client may ask for DENY_NONE, DENY_READ, DENY_WRITE
or DENY_ALL. There are also special compatibility modes called
DENY_FCB and DENY_DOS.</P
><P
>You can disable share modes using "share modes = no".
This may be useful on a heavily loaded server as the share
modes code is very slow. See also the FAST_SHARE_MODES
option in the Makefile for a way to do full share modes
very fast using shared memory (if your OS supports it).</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN192"
NAME="AEN191"
>Mapping Usernames</A
></H2
><P
@ -798,21 +792,6 @@ NAME="AEN192"
the unix server then take a look at the "username map" option.
See the smb.conf man page for details.</P
></DIV
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN195"
>Other Character Sets</A
></H2
><P
>If you have problems using filenames with accented
characters in them (like the German, French or Scandinavian
character sets) then I recommend you look at the "valid chars"
option in smb.conf and also take a look at the validchars
package in the examples directory.</P
></DIV
></DIV
></DIV
></BODY

View File

@ -37,12 +37,12 @@ NAME="AEN8"
><B
CLASS="COMMAND"
>rpcclient</B
> [-A authfile] [-c &#60;command string&#62;] [-d debuglevel] [-h] [-l logfile] [-N] [-s &#60;smb config file&#62;] [-U username[%password]] [-W workgroup] [-N] {server}</P
> [-A authfile] [-c &#60;command string&#62;] [-d debuglevel] [-h] [-l logfile] [-N] [-s &#60;smb config file&#62;] [-U username[%password]] [-W workgroup] [-N] [-I destinationIP] {server}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN22"
NAME="AEN23"
></A
><H2
>DESCRIPTION</H2
@ -65,7 +65,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN28"
NAME="AEN29"
></A
><H2
>OPTIONS</H2
@ -151,6 +151,35 @@ CLASS="FILENAME"
</P
></DD
><DT
>-I IP-address</DT
><DD
><P
><TT
CLASS="REPLACEABLE"
><I
>IP address</I
></TT
> is the address of the server to connect to.
It should be specified in standard "a.b.c.d" notation. </P
><P
>Normally the client would attempt to locate a named
SMB/CIFS server by looking it up via the NetBIOS name resolution
mechanism described above in the <TT
CLASS="PARAMETER"
><I
>name resolve order</I
></TT
>
parameter above. Using this parameter will force the client
to assume that the server is on the machine with the specified IP
address and the NetBIOS name component of the resource being
connected to will be ignored. </P
><P
>There is no default for this parameter. If not supplied,
it will be determined automatically by the client as described
above. </P
></DD
><DT
>-l|--logfile=logbasename</DT
><DD
><P
@ -253,7 +282,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN92"
NAME="AEN101"
></A
><H2
>COMMANDS</H2
@ -647,7 +676,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN212"
NAME="AEN221"
></A
><H2
>BUGS</H2
@ -688,7 +717,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN222"
NAME="AEN231"
></A
><H2
>VERSION</H2
@ -699,7 +728,7 @@ NAME="AEN222"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN225"
NAME="AEN234"
></A
><H2
>AUTHOR</H2

View File

@ -0,0 +1,169 @@
<HTML
><HEAD
><TITLE
>Security levels</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
><BODY
CLASS="ARTICLE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="ARTICLE"
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
><A
NAME="SECURITY_LEVELS"
>Security levels</A
></H1
><HR></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN3"
>Introduction</A
></H1
><P
>Samba supports the following options to the global smb.conf parameter</P
><P
><PRE
CLASS="PROGRAMLISTING"
>[global]
<A
HREF="smb.conf.5.html#SECURITY"
TARGET="_top"
><TT
CLASS="PARAMETER"
><I
>security</I
></TT
></A
> = [share|user(default)|domain|ads]</PRE
></P
><P
>Please refer to the smb.conf man page for usage information and to the document
<A
HREF="DOMAIN_MEMBER.html"
TARGET="_top"
>DOMAIN_MEMBER.html</A
> for further background details
on domain mode security. The Windows 2000 Kerberos domain security model
(security = ads) is described in the <A
HREF="ADS-HOWTO.html"
TARGET="_top"
>ADS-HOWTO.html</A
>.</P
><P
>Of the above, "security = server" means that Samba reports to clients that
it is running in "user mode" but actually passes off all authentication
requests to another "user mode" server. This requires an additional
parameter "password server =" that points to the real authentication server.
That real authentication server can be another Samba server or can be a
Windows NT server, the later natively capable of encrypted password support.</P
></DIV
><DIV
CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN14"
>More complete description of security levels</A
></H1
><P
>A SMB server tells the client at startup what "security level" it is
running. There are two options "share level" and "user level". Which
of these two the client receives affects the way the client then tries
to authenticate itself. It does not directly affect (to any great
extent) the way the Samba server does security. I know this is
strange, but it fits in with the client/server approach of SMB. In SMB
everything is initiated and controlled by the client, and the server
can only tell the client what is available and whether an action is
allowed. </P
><P
>I'll describe user level security first, as its simpler. In user level
security the client will send a "session setup" command directly after
the protocol negotiation. This contains a username and password. The
server can either accept or reject that username/password
combination. Note that at this stage the server has no idea what
share the client will eventually try to connect to, so it can't base
the "accept/reject" on anything other than:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>the username/password</P
></LI
><LI
><P
>the machine that the client is coming from</P
></LI
></OL
><P
>If the server accepts the username/password then the client expects to
be able to mount any share (using a "tree connection") without
specifying a password. It expects that all access rights will be as
the username/password specified in the "session setup". </P
><P
>It is also possible for a client to send multiple "session setup"
requests. When the server responds it gives the client a "uid" to use
as an authentication tag for that username/password. The client can
maintain multiple authentication contexts in this way (WinDD is an
example of an application that does this)</P
><P
>Ok, now for share level security. In share level security the client
authenticates itself separately for each share. It will send a
password along with each "tree connection" (share mount). It does not
explicitly send a username with this operation. The client is
expecting a password to be associated with each share, independent of
the user. This means that samba has to work out what username the
client probably wants to use. It is never explicitly sent the
username. Some commercial SMB servers such as NT actually associate
passwords directly with shares in share level security, but samba
always uses the unix authentication scheme where it is a
username/password that is authenticated, not a "share/password".</P
><P
>Many clients send a "session setup" even if the server is in share
level security. They normally send a valid username but no
password. Samba records this username in a list of "possible
usernames". When the client then does a "tree connection" it also adds
to this list the name of the share they try to connect to (useful for
home directories) and any users listed in the "user =" smb.conf
line. The password is then checked in turn against these "possible
usernames". If a match is found then the client is authenticated as
that user.</P
><P
>Finally "server level" security. In server level security the samba
server reports to the client that it is in user level security. The
client then does a "session setup" as described earlier. The samba
server takes the username/password that the client sends and attempts
to login to the "password server" by sending exactly the same
username/password that it got from the client. If that server is in
user level security and accepts the password then samba accepts the
clients connection. This allows the samba server to use another SMB
server as the "password server". </P
><P
>You should also note that at the very start of all this, where the
server tells the client what security level it is in, it also tells
the client if it supports encryption. If it does then it supplies the
client with a random "cryptkey". The client will then send all
passwords in encrypted form. You have to compile samba with encryption
enabled to support this feature, and you have to maintain a separate
smbpasswd file with SMB style encrypted passwords. It is
cryptographically impossible to translate from unix style encryption
to SMB style encryption, although there are some fairly simple management
schemes by which the two could be kept in sync.</P
></DIV
></DIV
></BODY
></HTML
>

File diff suppressed because it is too large Load Diff

View File

@ -170,7 +170,7 @@ CLASS="CONSTANT"
>,
or <TT
CLASS="CONSTANT"
>printer-notify</TT
>printnotify</TT
>.</P
><P
>The <TT
@ -246,15 +246,68 @@ CLASS="CONSTANT"
><P
>The <TT
CLASS="CONSTANT"
>printer-notify</TT
>printnotify</TT
> message-type sends a
message to smbd which in turn sends a printer notify message to
any Windows NT clients connected to a printer. This message-type
takes an argument of the printer name to send notify messages to.
any Windows NT clients connected to a printer. This message-type
takes the following arguments:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>queuepause printername</DT
><DD
><P
>Send a queue pause change notify
message to the printer specified.</P
></DD
><DT
>queueresume printername</DT
><DD
><P
>Send a queue resume change notify
message for the printer specified.</P
></DD
><DT
>jobpause printername unixjobid</DT
><DD
><P
>Send a job pause change notify
message for the printer and unix jobid
specified.</P
></DD
><DT
>jobresume printername unixjobid</DT
><DD
><P
>Send a job resume change notify
message for the printer and unix jobid
specified.</P
></DD
><DT
>jobdelete printername unixjobid</DT
><DD
><P
>Send a job delete change notify
message for the printer and unix jobid
specified.</P
></DD
></DL
></DIV
>
Note that this message only sends notification that an
event has occured. It doesn't actually cause the
event to happen.
This message can only be sent to <TT
CLASS="CONSTANT"
>smbd</TT
>.</P
>.
</P
></DD
><DT
>parameters</DT
@ -268,7 +321,7 @@ CLASS="CONSTANT"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN81"
NAME="AEN102"
></A
><H2
>VERSION</H2
@ -279,7 +332,7 @@ NAME="AEN81"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN84"
NAME="AEN105"
></A
><H2
>SEE ALSO</H2
@ -305,7 +358,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN91"
NAME="AEN112"
></A
><H2
>AUTHOR</H2

View File

@ -410,12 +410,20 @@ for providing the HOWTO for this section.</P
>This HOWTO describes how to get winbind services up and running
to control access and authenticate users on your Linux box using
the winbind services which come with SAMBA 2.2.2.</P
><P
>There is also some Solaris specific information in
<TT
CLASS="FILENAME"
>docs/textdocs/Solaris-Winbind-HOWTO.txt</TT
>.
Future revisions of this document will incorporate that
information.</P
><DIV
CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN76"
NAME="AEN78"
>Introduction</A
></H2
><P
@ -468,7 +476,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN89"
NAME="AEN91"
>Requirements</A
></H2
><P
@ -529,7 +537,7 @@ CLASS="SECT2"
><HR><H2
CLASS="SECT2"
><A
NAME="AEN103"
NAME="AEN105"
>Testing Things Out</A
></H2
><P
@ -574,7 +582,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN114"
NAME="AEN116"
>Configure and compile SAMBA</A
></H3
><P
@ -640,7 +648,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN133"
NAME="AEN135"
>Configure <TT
CLASS="FILENAME"
>nsswitch.conf</TT
@ -672,6 +680,30 @@ CLASS="COMMAND"
>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</B
></P
><P
>And, in the case of Sun solaris:</P
><P
><TT
CLASS="PROMPT"
>root#</TT
> <B
CLASS="COMMAND"
>ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</B
>
<TT
CLASS="PROMPT"
>root#</TT
> <B
CLASS="COMMAND"
>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</B
>
<TT
CLASS="PROMPT"
>root#</TT
> <B
CLASS="COMMAND"
>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</B
></P
><P
>Now, as root you need to edit <TT
CLASS="FILENAME"
>/etc/nsswitch.conf</TT
@ -721,7 +753,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN158"
NAME="AEN168"
>Configure smb.conf</A
></H3
><P
@ -796,7 +828,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN174"
NAME="AEN184"
>Join the SAMBA server to the PDC domain</A
></H3
><P
@ -842,7 +874,7 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN185"
NAME="AEN195"
>Start up the winbindd daemon and test it!</A
></H3
><P
@ -965,12 +997,17 @@ CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN221"
>Fix the <TT
CLASS="FILENAME"
>/etc/rc.d/init.d/smb</TT
> startup files</A
NAME="AEN231"
>Fix the init.d startup scripts</A
></H3
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN233"
>Linux</A
></H4
><P
>The <B
CLASS="COMMAND"
@ -983,15 +1020,16 @@ CLASS="COMMAND"
CLASS="COMMAND"
>nmbd</B
> daemons are running.
To accomplish this task, you need to modify the <TT
To accomplish this task, you need to modify the startup scripts of your system. They are located at <TT
CLASS="FILENAME"
>/etc/init.d/smb</TT
>
script to add commands to invoke this daemon in the proper sequence. My
> in RedHat and
<TT
CLASS="FILENAME"
>/etc/init.d/smb</TT
> file starts up <B
>/etc/init.d/samba</TT
> in Debian.
script to add commands to invoke this daemon in the proper sequence. My
startup script starts up <B
CLASS="COMMAND"
>smbd</B
>,
@ -1057,6 +1095,86 @@ CLASS="PROGRAMLISTING"
return $RETVAL
}</PRE
></P
></DIV
><DIV
CLASS="SECT4"
><HR><H4
CLASS="SECT4"
><A
NAME="AEN250"
>Solaris</A
></H4
><P
>On solaris, you need to modify the
<TT
CLASS="FILENAME"
>/etc/init.d/samba.server</TT
> startup script. It usually
only starts smbd and nmbd but should now start winbindd too. If you
have samba installed in <TT
CLASS="FILENAME"
>/usr/local/samba/bin</TT
>,
the file could contains something like this:</P
><P
><PRE
CLASS="PROGRAMLISTING"
>##
## samba.server
##
if [ ! -d /usr/bin ]
then # /usr not mounted
exit
fi
killproc() { # kill the named process(es)
pid=`/usr/bin/ps -e |
/usr/bin/grep -w $1 |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] &#38;&#38; kill $pid
}
# Start/stop processes required for samba server
case "$1" in
'start')
#
# Edit these lines to suit your installation (paths, workgroup, host)
#
echo Starting SMBD
/usr/local/samba/bin/smbd -D -s \
/usr/local/samba/smb.conf
echo Starting NMBD
/usr/local/samba/bin/nmbd -D -l \
/usr/local/samba/var/log -s /usr/local/samba/smb.conf
echo Starting Winbind Daemon
/usr/local/samba/bin/winbindd
;;
'stop')
killproc nmbd
killproc smbd
killproc winbindd
;;
*)
echo "Usage: /etc/init.d/samba.server { start | stop }"
;;
esac</PRE
></P
></DIV
><DIV
CLASS="SECT4"
><HR><H4
CLASS="SECT4"
><A
NAME="AEN257"
>Restarting</A
></H4
><P
>If you restart the <B
CLASS="COMMAND"
@ -1072,12 +1190,13 @@ CLASS="COMMAND"
should be able to connect to the samba server as a domain member just as
if you were a local user.</P
></DIV
></DIV
><DIV
CLASS="SECT3"
><HR><H3
CLASS="SECT3"
><A
NAME="AEN243"
NAME="AEN263"
>Configure Winbind and PAM</A
></H3
><P
@ -1117,7 +1236,11 @@ your other pam security modules. On my RedHat system, this was the
<TT
CLASS="FILENAME"
>/lib/security</TT
> directory.</P
> directory. On Solaris, the pam security
modules reside in <TT
CLASS="FILENAME"
>/usr/lib/security</TT
>.</P
><P
><TT
CLASS="PROMPT"
@ -1126,6 +1249,14 @@ CLASS="PROMPT"
CLASS="COMMAND"
>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</B
></P
><DIV
CLASS="SECT4"
><HR><H4
CLASS="SECT4"
><A
NAME="AEN280"
>Linux/FreeBSD-specific PAM configuration</A
></H4
><P
>The <TT
CLASS="FILENAME"
@ -1247,6 +1378,91 @@ CLASS="COMMAND"
> line to get rid of annoying
double prompts for passwords.</P
></DIV
><DIV
CLASS="SECT4"
><HR><H4
CLASS="SECT4"
><A
NAME="AEN313"
>Solaris-specific configuration</A
></H4
><P
>The /etc/pam.conf needs to be changed. I changed this file so that my Domain
users can logon both locally as well as telnet.The following are the changes
that I made.You can customize the pam.conf file as per your requirements,but
be sure of those changes because in the worst case it will leave your system
nearly impossible to boot.</P
><P
><PRE
CLASS="PROGRAMLISTING"
>#
#ident "@(#)pam.conf 1.14 99/09/16 SMI"
#
# Copyright (c) 1996-1999, Sun Microsystems, Inc.
# All Rights Reserved.
#
# PAM configuration
#
# Authentication management
#
login auth required /usr/lib/security/pam_winbind.so
login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass
#
rlogin auth sufficient /usr/lib/security/pam_winbind.so
rlogin auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
rlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
dtlogin auth sufficient /usr/lib/security/pam_winbind.so
dtlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
rsh auth required /usr/lib/security/$ISA/pam_rhosts_auth.so.1
other auth sufficient /usr/lib/security/pam_winbind.so
other auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
#
# Account management
#
login account sufficient /usr/lib/security/pam_winbind.so
login account requisite /usr/lib/security/$ISA/pam_roles.so.1
login account required /usr/lib/security/$ISA/pam_unix.so.1
#
dtlogin account sufficient /usr/lib/security/pam_winbind.so
dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1
dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1
#
other account sufficient /usr/lib/security/pam_winbind.so
other account requisite /usr/lib/security/$ISA/pam_roles.so.1
other account required /usr/lib/security/$ISA/pam_unix.so.1
#
# Session management
#
other session required /usr/lib/security/$ISA/pam_unix.so.1
#
# Password management
#
#other password sufficient /usr/lib/security/pam_winbind.so
other password required /usr/lib/security/$ISA/pam_unix.so.1
dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1
#
# Support for Kerberos V5 authentication (uncomment to use Kerberos)
#
#rlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#login auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#dtlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#other auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
#dtlogin account optional /usr/lib/security/$ISA/pam_krb5.so.1
#other account optional /usr/lib/security/$ISA/pam_krb5.so.1
#other session optional /usr/lib/security/$ISA/pam_krb5.so.1
#other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass</PRE
></P
><P
>I also added a try_first_pass line after the winbind.so line to get rid of
annoying double prompts for passwords.</P
><P
>Now restart your Samba &#38; try connecting through your application that you
configured in the pam.conf.</P
></DIV
></DIV
></DIV
></DIV
><DIV
@ -1254,7 +1470,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN290"
NAME="AEN320"
>Limitations</A
></H1
><P
@ -1295,7 +1511,7 @@ CLASS="SECT1"
><HR><H1
CLASS="SECT1"
><A
NAME="AEN300"
NAME="AEN330"
>Conclusion</A
></H1
><P

View File

@ -3,12 +3,12 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "RPCCLIENT" "1" "16 April 2002" "" ""
.TH "RPCCLIENT" "1" "15 August 2002" "" ""
.SH NAME
rpcclient \- tool for executing client side MS-RPC functions
.SH SYNOPSIS
.sp
\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c <command string>\fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s <smb config file>\fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] \fBserver\fR
\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c <command string>\fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s <smb config file>\fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] [ \fB-I destinationIP\fR ] \fBserver\fR
.SH "DESCRIPTION"
.PP
This tool is part of the Sambasuite.
@ -55,6 +55,22 @@ planning on submitting a bug report to the Samba team (see \fIBUGS.txt\fR).
\fB-h|--help\fR
Print a summary of command line options.
.TP
\fB-I IP-address\fR
\fIIP address\fR is the address of the server to connect to.
It should be specified in standard "a.b.c.d" notation.
Normally the client would attempt to locate a named
SMB/CIFS server by looking it up via the NetBIOS name resolution
mechanism described above in the \fIname resolve order\fR
parameter above. Using this parameter will force the client
to assume that the server is on the machine with the specified IP
address and the NetBIOS name component of the resource being
connected to will be ignored.
There is no default for this parameter. If not supplied,
it will be determined automatically by the client as described
above.
.TP
\fB-l|--logfile=logbasename\fR
File name for log/debug files. The extension
\&'.client' will be appended. The log file is never removed

View File

@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "SMB.CONF" "5" "08 May 2002" "" ""
.TH "SMB.CONF" "5" "15 August 2002" "" ""
.SH NAME
smb.conf \- The configuration file for the Samba suite
.SH "SYNOPSIS"
@ -657,18 +657,18 @@ each parameter for details. Note that some are synonyms.
\fIldap filter\fR
.TP 0.2i
\(bu
\fIldap port\fR
.TP 0.2i
\(bu
\fIldap server\fR
.TP 0.2i
\(bu
\fIldap ssl\fR
.TP 0.2i
\(bu
\fIldap suffix\fR
.TP 0.2i
\(bu
\fIldap suffix\fR
.TP 0.2i
\(bu
\fIldap suffix\fR
.TP 0.2i
\(bu
\fIlm announce\fR
.TP 0.2i
\(bu
@ -906,55 +906,7 @@ each parameter for details. Note that some are synonyms.
\fIsource environment\fR
.TP 0.2i
\(bu
\fIssl\fR
.TP 0.2i
\(bu
\fIssl CA certDir\fR
.TP 0.2i
\(bu
\fIssl CA certFile\fR
.TP 0.2i
\(bu
\fIssl ciphers\fR
.TP 0.2i
\(bu
\fIssl client cert\fR
.TP 0.2i
\(bu
\fIssl client key\fR
.TP 0.2i
\(bu
\fIssl compatibility\fR
.TP 0.2i
\(bu
\fIssl egd socket\fR
.TP 0.2i
\(bu
\fIssl entropy bytes\fR
.TP 0.2i
\(bu
\fIssl entropy file\fR
.TP 0.2i
\(bu
\fIssl hosts\fR
.TP 0.2i
\(bu
\fIssl hosts resign\fR
.TP 0.2i
\(bu
\fIssl require clientcert\fR
.TP 0.2i
\(bu
\fIssl require servercert\fR
.TP 0.2i
\(bu
\fIssl server cert\fR
.TP 0.2i
\(bu
\fIssl server key\fR
.TP 0.2i
\(bu
\fIssl version\fR
\fIuse spnego\fR
.TP 0.2i
\(bu
\fIstat cache\fR
@ -1605,6 +1557,11 @@ Default: \fBadd user script = <empty string>
\fR
Example: \fBadd user script = /usr/local/samba/bin/add_user
%u\fR
.TP
\fBadd group script (G)\fR
This is the full pathname to a script that will
be run \fBAS ROOT\fR by smbd(8) when a new group is requested. It will expand any \fI%g\fR to the group name passed. This script is only useful for installations using the Windows NT domain administration tools.
.TP
\fBadmin users (S)\fR
This is a list of users who will be granted
@ -2189,44 +2146,14 @@ Example: \fBdelete share command = /usr/local/bin/delshare\fR
.TP
\fBdelete user script (G)\fR
This is the full pathname to a script that will
be run \fBAS ROOT\fR by \fBsmbd(8)\fRunder special circumstances
described below.
be run by \fBsmbd(8)\fR
when managing user's with remote RPC (NT) tools.
Normally, a Samba server requires that UNIX users are
created for all users accessing files on this server. For sites
that use Windows NT account databases as their primary user database
creating these users and keeping the user list in sync with the
Windows NT PDC is an onerous task. This option allows \fB smbd\fR to delete the required UNIX users \fBON
DEMAND\fR when a user accesses the Samba server and the
Windows NT user no longer exists.
This script is called when a remote client removes a user
from the server, normally using 'User Manager for Domains' or
\fBrpcclient\fR.
In order to use this option, \fBsmbd\fR must be
set to \fIsecurity = domain\fR or \fIsecurity =
user\fR and \fIdelete user script\fR
must be set to a full pathname for a script
that will delete a UNIX user given one argument of \fI%u\fR,
which expands into the UNIX user name to delete.
When the Windows user attempts to access the Samba server,
at \fBlogin\fR (session setup in the SMB protocol)
time, \fBsmbd\fR contacts the \fIpassword server\fR and attempts to authenticate
the given user with the given password. If the authentication fails
with the specific Domain error code meaning that the user no longer
exists then \fBsmbd\fR attempts to find a UNIX user in
the UNIX password database that matches the Windows user account. If
this lookup succeeds, and \fIdelete user script\fR is
set then \fBsmbd\fR will all the specified script
\fBAS ROOT\fR, expanding any \fI%u\fR
argument to be the user name to delete.
This script should delete the given UNIX username. In this way,
UNIX users are dynamically deleted to match existing Windows NT
accounts.
See also security = domain,
\fIpassword server\fR
, \fIadd user script\fR
\&.
This script should delete the given UNIX username.
Default: \fBdelete user script = <empty string>
\fR
@ -2744,7 +2671,7 @@ would force all created directories to have read and execute
permissions set for 'group' and 'other' as well as the
read/write/execute bits set for the 'user'.
.TP
\fBforce directory security mode (S)\fR
\fBforce directory\fR
This parameter controls what UNIX permission bits
can be modified when a Windows NT client is manipulating the UNIX
permission on a directory using the native NT security dialog box.
@ -3302,14 +3229,9 @@ code paths.
Default : \fBlarge readwrite = yes\fR
.TP
\fBldap admin dn (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
The \fIldap admin dn\fR defines the Distinguished
Name (DN) name used by Samba to contact the ldap
server when retreiving user account information. The \fIldap
Name (DN) name used by Samba to contact the ldap server when retreiving
user account information. The \fIldap
admin dn\fR is used in conjunction with the admin dn password
stored in the \fIprivate/secrets.tdb\fR file. See the
\fBsmbpasswd(8)\fRman
@ -3318,11 +3240,6 @@ page for more information on how to accmplish this.
Default : \fBnone\fR
.TP
\fBldap filter (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
This parameter specifies the RFC 2254 compliant LDAP search filter.
The default is to match the login name with the uid
attribute for all entries matching the sambaAccount
@ -3330,43 +3247,13 @@ objectclass. Note that this filter should only return one entry.
Default : \fBldap filter = (&(uid=%u)(objectclass=sambaAccount))\fR
.TP
\fBldap port (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
This option is used to control the tcp port number used to contact
the \fIldap server\fR.
The default is to use the stand LDAPS port 636.
See Also: ldap ssl
Default : \fBldap port = 636\fR
.TP
\fBldap server (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
This parameter should contains the FQDN of the ldap directory
server which should be queried to locate user account information.
Default : \fBldap server = localhost\fR
.TP
\fBldap ssl (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
This option is used to define whether or not Samba should
use SSL when connecting to the \fIldap
server\fR. This is \fBNOT\fR related to
Samba SSL support which is enabled by specifying the
use SSL when connecting to the ldap server
This is \fBNOT\fR related to
Samba's previous SSL support which was enabled by specifying the
\fB--with-ssl\fR option to the \fIconfigure\fR
script (see \fIssl\fR).
script.
The \fIldap ssl\fR can be set to one of three values:
(a) on - Always use SSL when contacting the
@ -3378,10 +3265,16 @@ Never use SSL when querying the directory, or (c) start_tls
Default : \fBldap ssl = on\fR
.TP
\fBldap suffix (G)\fR
This parameter is only available if Samba has been
configure to include the \fB--with-ldapsam\fR option
at compile time. This option should be considered experimental and
under active development.
Default : \fBnone\fR
.TP
\fBldap user suffix (G)\fR
It specifies where users are added to the tree.
Default : \fBnone\fR
.TP
\fBldap machine suffix (G)\fR
It specifies where machines should be
added to the ldap tree.
Default : \fBnone\fR
.TP
@ -3546,16 +3439,18 @@ you to have separate log files for each user or machine.
Example: \fBlog file = /usr/local/samba/var/log.%m
\fR.TP
\fBlog level (G)\fR
The value of the parameter (an integer) allows
The value of the parameter (a astring) allows
the debug level (logging level) to be specified in the
\fIsmb.conf\fR file. This is to give greater
\fIsmb.conf\fR file. This parameter has been
extended since 2.2.x series, now it allow to specify the debug
level for multiple debug classes. This is to give greater
flexibility in the configuration of the system.
The default will be the log level specified on
the command line or level zero if none was specified.
Example: \fBlog level = 3\fR
.TP
Example: \fBlog level = 3 passdb:5 auth:10 winbind:2
\fR.TP
\fBlogon drive (G)\fR
This parameter specifies the local path to
which the home directory will be connected (see \fIlogon home\fR)
@ -4790,14 +4685,27 @@ arbitary passdb backend from the .so specified as a compulsary argument.
Any characters after the (optional) second : are passed to the plugin
for its own processing
.TP 0.2i
\(bu
\fBunixsam\fR - Allows samba to map all (other) available unix users
This backend uses the standard unix database for retrieving users. Users included
in this pdb are NOT listed in samba user listings and users included in this pdb won't be
able to login. The use of this backend is to always be able to display the owner of a file
on the samba server - even when the user doesn't have a 'real' samba account in one of the
other passdb backends.
This backend should always be the last backend listed, since it contains all users in
the unix passdb and might 'override' mappings if specified earlier. It's meant to only return
accounts for users that aren't covered by the previous backends.
.RE
.PP
Default: \fBpassdb backend = smbpasswd\fR
Default: \fBpassdb backend = smbpasswd unixsam\fR
Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd\fR
Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd unixsam\fR
Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com\fR
Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com unixsam\fR
Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb\fR
.TP
@ -6278,246 +6186,10 @@ Examples: \fBsource environment = |/etc/smb.conf.sh
Example: \fBsource environment =
/usr/local/smb_env_vars\fR
.TP
\fBssl (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
\fBuse spnego (G)\fR
This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000sp2 clients to agree upon an authentication mechanism. As of samba 3.0alpha it must be set to "no" for these clients to join a samba domain controller. It can be set to "yes" to allow samba to participate in an AD domain controlled by a Windows2000 domain controller.
This variable enables or disables the entire SSL mode. If
it is set to no, the SSL-enabled Samba behaves
exactly like the non-SSL Samba. If set to yes,
it depends on the variables \fI ssl hosts\fR and \fIssl hosts resign\fR whether an SSL
connection will be required.
Default: \fBssl = no\fR
.TP
\fBssl CA certDir (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This variable defines where to look up the Certification
Authorities. The given directory should contain one file for
each CA that Samba will trust. The file name must be the hash
value over the "Distinguished Name" of the CA. How this directory
is set up is explained later in this document. All files within the
directory that don't fit into this naming scheme are ignored. You
don't need this variable if you don't verify client certificates.
Default: \fBssl CA certDir = /usr/local/ssl/certs
\fR.TP
\fBssl CA certFile (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This variable is a second way to define the trusted CAs.
The certificates of the trusted CAs are collected in one big
file and this variable points to the file. You will probably
only use one of the two ways to define your CAs. The first choice is
preferable if you have many CAs or want to be flexible, the second
is preferable if you only have one CA and want to keep things
simple (you won't need to create the hashed file names). You
don't need this variable if you don't verify client certificates.
Default: \fBssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem
\fR.TP
\fBssl ciphers (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This variable defines the ciphers that should be offered
during SSL negotiation. You should not set this variable unless
you know what you are doing.
.TP
\fBssl client cert (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
The certificate in this file is used by \fBsmbclient(1)\fRif it exists. It's needed
if the server requires a client certificate.
Default: \fBssl client cert = /usr/local/ssl/certs/smbclient.pem
\fR.TP
\fBssl client key (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This is the private key for \fBsmbclient(1)\fR. It's only needed if the
client should have a certificate.
Default: \fBssl client key = /usr/local/ssl/private/smbclient.pem
\fR.TP
\fBssl compatibility (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This variable defines whether OpenSSL should be configured
for bug compatibility with other SSL implementations. This is
probably not desirable because currently no clients with SSL
implementations other than OpenSSL exist.
Default: \fBssl compatibility = no\fR
.TP
\fBssl egd socket (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This option is used to define the location of the communiation socket of
an EGD or PRNGD daemon, from which entropy can be retrieved. This option
can be used instead of or together with the \fIssl entropy file\fR
directive. 255 bytes of entropy will be retrieved from the daemon.
Default: \fBnone\fR
.TP
\fBssl entropy bytes (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This parameter is used to define the number of bytes which should
be read from the \fIssl entropy
file\fR If a -1 is specified, the entire file will
be read.
Default: \fBssl entropy bytes = 255\fR
.TP
\fBssl entropy file (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This parameter is used to specify a file from which processes will
read "random bytes" on startup. In order to seed the internal pseudo
random number generator, entropy must be provided. On system with a
\fI/dev/urandom\fR device file, the processes
will retrieve its entropy from the kernel. On systems without kernel
entropy support, a file can be supplied that will be read on startup
and that will be used to seed the PRNG.
Default: \fBnone\fR
.TP
\fBssl hosts (G)\fR
See \fI ssl hosts resign\fR.
.TP
\fBssl hosts resign (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
These two variables define whether Samba will go
into SSL mode or not. If none of them is defined, Samba will
allow only SSL connections. If the \fIssl hosts\fR variable lists
hosts (by IP-address, IP-address range, net group or name),
only these hosts will be forced into SSL mode. If the \fI ssl hosts resign\fR variable lists hosts, only these
hosts will \fBNOT\fR be forced into SSL mode. The syntax for these two
variables is the same as for the \fI hosts allow\fR and \fIhosts deny\fR pair of variables, only
that the subject of the decision is different: It's not the access
right but whether SSL is used or not.
The example below requires SSL connections from all hosts
outside the local net (which is 192.168.*.*).
Default: \fBssl hosts = <empty string>\fR
\fBssl hosts resign = <empty string>\fR
Example: \fBssl hosts resign = 192.168.\fR
.TP
\fBssl require clientcert (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
If this variable is set to yes, the
server will not tolerate connections from clients that don't
have a valid certificate. The directory/file given in \fIssl CA certDir\fR
and \fIssl CA certFile
\fRwill be used to look up the CAs that issued
the client's certificate. If the certificate can't be verified
positively, the connection will be terminated. If this variable
is set to no, clients don't need certificates.
Contrary to web applications you really \fBshould\fR
require client certificates. In the web environment the client's
data is sensitive (credit card numbers) and the server must prove
to be trustworthy. In a file server environment the server's data
will be sensitive and the clients must prove to be trustworthy.
Default: \fBssl require clientcert = no\fR
.TP
\fBssl require servercert (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
If this variable is set to yes, the
\fBsmbclient(1)\fR
will request a certificate from the server. Same as
\fIssl require
clientcert\fR for the server.
Default: \fBssl require servercert = no\fR
.TP
\fBssl server cert (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This is the file containing the server's certificate.
The server \fBmust\fR have a certificate. The
file may also contain the server's private key. See later for
how certificates and private keys are created.
Default: \fBssl server cert = <empty string>
\fR.TP
\fBssl server key (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This file contains the private key of the server. If
this variable is not defined, the key is looked up in the
certificate file (it may be appended to the certificate).
The server \fBmust\fR have a private key
and the certificate \fBmust\fR
match this private key.
Default: \fBssl server key = <empty string>
\fR.TP
\fBssl version (G)\fR
This variable is part of SSL-enabled Samba. This
is only available if the SSL libraries have been compiled on your
system and the configure option \fB--with-ssl\fR was
given at configure time.
This enumeration variable defines the versions of the
SSL protocol that will be used. ssl2or3 allows
dynamic negotiation of SSL v2 or v3, ssl2 results
in SSL v2, ssl3 results in SSL v3 and
tls1 results in TLS v1. TLS (Transport Layer
Security) is the new standard for SSL.
Default: \fBssl version = "ssl2or3"\fR
Default: \fBuse spnego = yes\fR
.TP
\fBstat cache (G)\fR
This parameter determines if smbd(8)will use a cache in order to
@ -6698,9 +6370,9 @@ Example: \fBtotal print jobs = 5000\fR
.TP
\fBunix extensions(G)\fR
This boolean parameter controls whether Samba
implments the CIFS UNIX extensions, as defined by HP. These
extensions enable CIFS to server UNIX clients to UNIX servers
better, and allow such things as symbolic links, hard links etc.
implments the CIFS UNIX extensions, as defined by HP.
These extensions enable Samba to better serve UNIX CIFS clients
by supporting features such as symbolic links, hard links, etc...
These extensions require a similarly enabled client, and are of
no current use to Windows clients.
@ -6983,6 +6655,12 @@ to add utmp or utmpx records (depending on the UNIX system) whenever a
connection is made to a Samba server. Sites may use this to record the
user connecting to a Samba share.
Due to the requirements of the utmp record, we
are required to create a unique identifier for the
incoming user. Enabling this option creates an n^2
algorithm to find this number. This may impede
performance on large installations.
See also the \fI utmp directory\fR parameter.
Default: \fButmp = no\fR

View File

@ -3,7 +3,7 @@
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "SMBCONTROL" "1" "08 May 2002" "" ""
.TH "SMBCONTROL" "1" "15 August 2002" "" ""
.SH NAME
smbcontrol \- send messages to smbd, nmbd or winbindd processes
.SH SYNOPSIS
@ -47,7 +47,7 @@ One of: close-share,
debug,
force-election, ping
, profile, debuglevel, profilelevel,
or printer-notify.
or printnotify.
The close-share message-type sends a
message to smbd which will then close the client connections to
@ -90,11 +90,40 @@ a "request profile level" message. The current profile level
setting is returned by a "profilelevel" message. This can be sent
to any smbd or nmbd destinations.
The printer-notify message-type sends a
The printnotify message-type sends a
message to smbd which in turn sends a printer notify message to
any Windows NT clients connected to a printer. This message-type
takes an argument of the printer name to send notify messages to.
This message can only be sent to smbd.
any Windows NT clients connected to a printer. This message-type
takes the following arguments:
.RS
.TP
\fBqueuepause printername\fR
Send a queue pause change notify
message to the printer specified.
.TP
\fBqueueresume printername\fR
Send a queue resume change notify
message for the printer specified.
.TP
\fBjobpause printername unixjobid\fR
Send a job pause change notify
message for the printer and unix jobid
specified.
.TP
\fBjobresume printername unixjobid\fR
Send a job resume change notify
message for the printer and unix jobid
specified.
.TP
\fBjobdelete printername unixjobid\fR
Send a job delete change notify
message for the printer and unix jobid
specified.
.RE
.PP
Note that this message only sends notification that an
event has occured. It doesn't actually cause the
event to happen.
This message can only be sent to smbd.
.TP
\fBparameters\fR
any parameters required for the message-type