mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit d39b53ba5486fc09e5332d77aad9a6047b0e91a6)
This commit is contained in:
commit
c1d854e784
11
docs/docbook/faq/config.sgml
Normal file
11
docs/docbook/faq/config.sgml
Normal file
@ -0,0 +1,11 @@
|
||||
<chapter id="Config">
|
||||
<title>Configuration problems</title>
|
||||
|
||||
<sect1>
|
||||
<title>I have set 'force user' and samba still makes 'root' the owner of all the files I touch!</title>
|
||||
<para>
|
||||
When you have a user in 'admin users', samba will always do file operations for
|
||||
this user as 'root', even if 'force user' has been set.
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
170
docs/docbook/faq/errors.sgml
Normal file
170
docs/docbook/faq/errors.sgml
Normal file
@ -0,0 +1,170 @@
|
||||
<chapter id="errors">
|
||||
|
||||
<title>Common errors</title>
|
||||
|
||||
<sect1>
|
||||
<title>Not listening for calling name</title>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
Session request failed (131,129) with myname=HOBBES destname=CALVIN
|
||||
Not listening for calling name
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you get this when talking to a Samba box then it means that your
|
||||
global "hosts allow" or "hosts deny" settings are causing the Samba
|
||||
server to refuse the connection.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Look carefully at your "hosts allow" and "hosts deny" lines in the
|
||||
global section of smb.conf.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It can also be a problem with reverse DNS lookups not functioning
|
||||
correctly, leading to the remote host identity not being able to
|
||||
be confirmed, but that is less likely.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>System Error 1240</title>
|
||||
|
||||
<para>
|
||||
System error 1240 means that the client is refusing to talk
|
||||
to a non-encrypting server. Microsoft changed WinNT in service
|
||||
pack 3 to refuse to connect to servers that do not support
|
||||
SMB password encryption.
|
||||
</para>
|
||||
|
||||
<para>There are two main solutions:
|
||||
<simplelist>
|
||||
<member>enable SMB password encryption in Samba. See the encryption part of
|
||||
the samba HOWTO Collection</member>
|
||||
|
||||
<member>disable this new behaviour in NT. See the section about
|
||||
Windows NT in the chapter "Portability" of the samba HOWTO collection
|
||||
</member>
|
||||
</simplelist>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>smbclient ignores -N !</title>
|
||||
|
||||
<para>
|
||||
<quote>When getting the list of shares available on a host using the command
|
||||
<command>smbclient -N -L</command>
|
||||
the program always prompts for the password if the server is a Samba server.
|
||||
It also ignores the "-N" argument when querying some (but not all) of our
|
||||
NT servers.
|
||||
</quote>
|
||||
|
||||
<para>
|
||||
No, it does not ignore -N, it is just that your server rejected the
|
||||
null password in the connection, so smbclient prompts for a password
|
||||
to try again.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To get the behaviour that you probably want use <command>smbclient -L host -U%</command>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This will set both the username and password to null, which is
|
||||
an anonymous login for SMB. Using -N would only set the password
|
||||
to null, and this is not accepted as an anonymous login for most
|
||||
SMB servers.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>The data on the CD-Drive I've shared seems to be corrupted!</title>
|
||||
|
||||
<para>
|
||||
Some OSes (notably Linux) default to auto detection of file type on
|
||||
cdroms and do cr/lf translation. This is a very bad idea when use with
|
||||
Samba. It causes all sorts of stuff ups.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To overcome this problem use conv=binary when mounting the cdrom
|
||||
before exporting it with Samba.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Why can users access home directories of other users?</title>
|
||||
|
||||
<para>
|
||||
<quote>
|
||||
We are unable to keep individual users from mapping to any other user's
|
||||
home directory once they have supplied a valid password! They only need
|
||||
to enter their own password. I have not found *any* method that I can
|
||||
use to configure samba to enforce that only a user may map their own
|
||||
home directory.
|
||||
</quote>
|
||||
</para>
|
||||
|
||||
<para><quote>
|
||||
User xyzzy can map his home directory. Once mapped user xyzzy can also map
|
||||
*anyone* elses home directory!
|
||||
</quote></para>
|
||||
|
||||
<para>
|
||||
This is not a security flaw, it is by design. Samba allows
|
||||
users to have *exactly* the same access to the UNIX filesystem
|
||||
as they would if they were logged onto the UNIX box, except
|
||||
that it only allows such views onto the file system as are
|
||||
allowed by the defined shares.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This means that if your UNIX home directories are set up
|
||||
such that one user can happily cd into another users
|
||||
directory and do an ls, the UNIX security solution is to
|
||||
change the UNIX file permissions on the users home directories
|
||||
such that the cd and ls would be denied.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Samba tries very hard not to second guess the UNIX administrators
|
||||
security policies, and trusts the UNIX admin to set
|
||||
the policies and permissions he or she desires.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Samba does allow the setup you require when you have set the
|
||||
"only user = yes" option on the share, is that you have not set the
|
||||
valid users list for the share.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that only user works in conjunction with the users= list,
|
||||
so to get the behavior you require, add the line :
|
||||
<programlisting>
|
||||
users = %S
|
||||
</programlisting>
|
||||
this is equivalent to:
|
||||
<programlisting>
|
||||
valid users = %S
|
||||
</programlisting>
|
||||
to the definition of the [homes] share, as recommended in
|
||||
the smb.conf man page.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Until a few minutes after samba has started, clients get the error "Domain Controller Unavailable"</title>
|
||||
<para>
|
||||
A domain controller has to announce on the network who it is. This usually takes a while.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
376
docs/docbook/faq/features.sgml
Normal file
376
docs/docbook/faq/features.sgml
Normal file
@ -0,0 +1,376 @@
|
||||
<chapter id="features">
|
||||
|
||||
<title>Features</title>
|
||||
|
||||
<sect1>
|
||||
<title>How can I prevent my samba server from being used to distribute the Nimda worm?</title>
|
||||
|
||||
<para>Author: HASEGAWA Yosuke (translated by <ulink url="monyo@samba.gr.jp">TAKAHASHI Motonobu</ulink>)</para>
|
||||
|
||||
<para>
|
||||
Nimba Worm is infected through shared disks on a network, as well as through
|
||||
Microsoft IIS, Internet Explorer and mailer of Outlook series.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At this time, the worm copies itself by the name *.nws and *.eml on
|
||||
the shared disk, moreover, by the name of Riched20.dll in the folder
|
||||
where *.doc file is included.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To prevent infection through the shared disk offered by Samba, set
|
||||
up as follows:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
[global]
|
||||
...
|
||||
# This can break Administration installations of Office2k.
|
||||
# in that case, don't veto the riched20.dll
|
||||
veto files = /*.eml/*.nws/riched20.dll/
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By setting the "veto files" parameter, matched files on the Samba
|
||||
server are completely hidden from the clients and making it impossible
|
||||
to access them at all.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition to it, the following setting is also pointed out by the
|
||||
samba-jp:09448 thread: when the
|
||||
"readme.txt.{3050F4D8-98B5-11CF-BB82-00AA00BDCE0B}" file exists on
|
||||
a Samba server, it is visible only as "readme.txt" and dangerous
|
||||
code may be executed if this file is double-clicked.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Setting the following,
|
||||
<programlisting>
|
||||
veto files = /*.{*}/
|
||||
</programlisting>
|
||||
any files having CLSID in its file extension will be inaccessible from any
|
||||
clients.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This technical article is created based on the discussion of
|
||||
samba-jp:09448 and samba-jp:10900 threads.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>How can I use samba as a fax server?</title>
|
||||
|
||||
<para>Contributor: <ulink url="mailto:zuber@berlin.snafu.de">Gerhard Zuber</ulink></para>
|
||||
|
||||
<para>Requirements:
|
||||
<simplelist>
|
||||
<member>UNIX box (Linux preferred) with SAMBA and a faxmodem</member>
|
||||
<member>ghostscript package</member>
|
||||
<member>mgetty+sendfax package</member>
|
||||
<member>pbm package (portable bitmap tools)</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
|
||||
<para>First, install and configure the required packages. Be sure to read the mgetty+sendfax
|
||||
manual carefully.</para>
|
||||
|
||||
<sect2>
|
||||
<title>Tools for printing faxes</title>
|
||||
|
||||
<para>Your incomed faxes are in:
|
||||
<filename>/var/spool/fax/incoming</filename>
|
||||
|
||||
<para>print it with:</para>
|
||||
|
||||
<para><programlisting>
|
||||
for i in *
|
||||
do
|
||||
g3cat $i | g3tolj | lpr -P hp
|
||||
done
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
g3cat is in the tools-section, g3tolj is in the contrib-section
|
||||
for printing to HP lasers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you want to produce files for displaying and printing with Windows, use
|
||||
some tools from the pbm-package like the following command: <command>g3cat $i | g3topbm - | ppmtopcx - >$i.pcx</command>
|
||||
and view it with your favourite Windows tool (maybe paintbrush)
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Making the fax-server</title>
|
||||
|
||||
<para>fetch the file <filename>mgetty+sendfax/frontends/winword/faxfilter</filename> and place it in <filename>/usr/local/etc/mgetty+sendfax/</filename>(replace /usr/local/ with whatever place you installed mgetty+sendfax)</para>
|
||||
|
||||
<para>prepare your faxspool file as mentioned in this file
|
||||
edit fax/faxspool.in and reinstall or change the final
|
||||
/usr/local/bin/faxspool too.
|
||||
</para>
|
||||
|
||||
<para><programlisting>
|
||||
if [ "$user" = "root" -o "$user" = "fax" -o \
|
||||
"$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
|
||||
</programlisting></para>
|
||||
|
||||
<para>find the first line and change it to the second.</para>
|
||||
|
||||
<para>
|
||||
make sure you have pbmtext (from the pbm-package). This is
|
||||
needed for creating the small header line on each page.
|
||||
</para>
|
||||
|
||||
<para>Prepare your faxheader <filename>/usr/local/etc/mgetty+sendfax/faxheader</filename></para>
|
||||
|
||||
<para>
|
||||
Edit your /etc/printcap file:
|
||||
<programlisting>
|
||||
# FAX
|
||||
lp3|fax:\
|
||||
:lp=/dev/null:\
|
||||
:sd=/usr/spool/lp3:\
|
||||
:if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
|
||||
:lf=/usr/spool/lp3/fax-log:
|
||||
</programlisting>
|
||||
|
||||
<para>Now, edit your <filename>smb.conf</filename> so you have a smb based printer named "fax"</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Installing the client drivers</title>
|
||||
|
||||
<para>
|
||||
Now you have a printer called "fax" which can be used via
|
||||
TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On every system you are able to produce postscript-files you
|
||||
are ready to fax.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On Windows 3.1 95 and NT:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Install a printer wich produces postscript output,
|
||||
e.g. apple laserwriter
|
||||
</para>
|
||||
|
||||
<para>Connect the "fax" to your printer.</para>
|
||||
|
||||
<para>
|
||||
Now write your first fax. Use your favourite wordprocessor,
|
||||
write, winword, notepad or whatever you want, and start
|
||||
with the headerpage.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Usually each fax has a header page. It carries your name,
|
||||
your address, your phone/fax-number.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It carries also the recipient, his address and his *** fax
|
||||
number ***. Now here is the trick:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Use the text:
|
||||
<programlisting>
|
||||
Fax-Nr: 123456789
|
||||
</programlisting>
|
||||
as the recipients fax-number. Make sure this text does not
|
||||
occur in regular text ! Make sure this text is not broken
|
||||
by formatting information, e.g. format it as a single entity.
|
||||
(Windows Write and Win95 Wordpad are functional, maybe newer
|
||||
versions of Winword are breaking formatting information).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The trick is that postscript output is human readable and
|
||||
the faxfilter program scans the text for this pattern and
|
||||
uses the found number as the fax-destination-number.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Now print your fax through the fax-printer and it will be
|
||||
queued for later transmission. Use faxrunq for sending the
|
||||
queue out.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Example smb.conf</title>
|
||||
|
||||
<para><programlisting>
|
||||
[global]
|
||||
printcap name = /etc/printcap
|
||||
print command = /usr/bin/lpr -r -P %p %s
|
||||
lpq command = /usr/bin/lpq -P %p
|
||||
lprm command = /usr/bin/lprm -P %p %j
|
||||
|
||||
[fax]
|
||||
comment = FAX (mgetty+sendfax)
|
||||
path = /tmp
|
||||
printable = yes
|
||||
public = yes
|
||||
writable = no
|
||||
create mode = 0700
|
||||
browseable = yes
|
||||
guest ok = no
|
||||
</programlisting></para>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Samba doesn't work well together with DHCP!</title>
|
||||
|
||||
<para>
|
||||
We wish to help those folks who wish to use the ISC DHCP Server and provide
|
||||
sample configuration settings. Most operating systems today come ship with
|
||||
the ISC DHCP Server. ISC DHCP is available from:
|
||||
<ulink url="ftp://ftp.isc.org/isc/dhcp">ftp://ftp.isc.org/isc/dhcp</ulink>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Incorrect configuration of MS Windows clients (Windows9X, Windows ME, Windows
|
||||
NT/2000) will lead to problems with browsing and with general network
|
||||
operation. Windows 9X/ME users often report problems where the TCP/IP and related
|
||||
network settings will inadvertantly become reset at machine start-up resulting
|
||||
in loss of configuration settings. This results in increased maintenance
|
||||
overheads as well as serious user frustration.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In recent times users on one mailing list incorrectly attributed the cause of
|
||||
network operating problems to incorrect configuration of Samba.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One user insisted that the only way to provent Windows95 from periodically
|
||||
performing a full system reset and hardware detection process on start-up was
|
||||
to install the NetBEUI protocol in addition to TCP/IP. This assertion is not
|
||||
correct.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
|
||||
natively run NetBIOS over TCP/IP, and that is the only protocol that is
|
||||
recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
|
||||
cause problems with browse list operation on most networks. Even Windows NT
|
||||
networks experience these problems when incorrectly configured Windows95
|
||||
systems share the same name space. It is important that only those protocols
|
||||
that are strictly needed for site specific reasons should EVER be installed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Secondly, and totally against common opinion, DHCP is NOT an evil design but is
|
||||
an extension of the BOOTP protocol that has been in use in Unix environments
|
||||
for many years without any of the melt-down problems that some sensationalists
|
||||
would have us believe can be experienced with DHCP. In fact, DHCP in covered by
|
||||
rfc1541 and is a very safe method of keeping an MS Windows desktop environment
|
||||
under control and for ensuring stable network operation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please note that MS Windows systems as of MS Windows NT 3.1 and MS Windows 95
|
||||
store all network configuration settings a registry. There are a few reports
|
||||
from MS Windows network administrators that warrant mention here. It would appear
|
||||
that when one sets certain MS TCP/IP protocol settings (either directly or via
|
||||
DHCP) that these do get written to the registry. Even though a subsequent
|
||||
change of setting may occur the old value may persist in the registry. This
|
||||
has been known to create serious networking problems.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
An example of this occurs when a manual TCP/IP environment is configured to
|
||||
include a NetBIOS Scope. In this event, when the administrator then changes the
|
||||
configuration of the MS TCP/IP protocol stack, without first deleting the
|
||||
current settings, by simply checking the box to configure the MS TCP/IP stack
|
||||
via DHCP then the NetBIOS Scope that is still persistent in the registry WILL be
|
||||
applied to the resulting DHCP offered settings UNLESS the DHCP server also sets
|
||||
a NetBIOS Scope. It may therefore be prudent to forcibly apply a NULL NetBIOS
|
||||
Scope from your DHCP server. The can be done in the dhcpd.conf file with the
|
||||
parameter:
|
||||
<command>option netbios-scope "";</command>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
While it is true that the Microsoft DHCP server that comes with Windows NT
|
||||
Server provides only a sub-set of rfc1533 functionality this is hardly an issue
|
||||
in those sites that already have a large investment and commitment to Unix
|
||||
systems and technologies. The current state of the art of the DHCP Server
|
||||
specification in covered in rfc2132.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>How can I assign NetBIOS names to clients with DHCP?</title>
|
||||
|
||||
<para>
|
||||
SMB network clients need to be configured so that all standard TCP/IP name to
|
||||
address resolution works correctly. Once this has been achieved the SMB
|
||||
environment provides additional tools and services that act as helper agents in
|
||||
the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
|
||||
such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
|
||||
in their Windows NT Server implementation WINS (Windows Internet Name Server).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A client needs to be configured so that it has a unique Machine (Computer)
|
||||
Name.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This can be done, but needs a few NT registry hacks and you need to be able to
|
||||
speak UNICODE, which is of course no problem for a True Wizzard(tm) :)
|
||||
Instructions on how to do this (including a small util for less capable
|
||||
Wizzards) can be found at
|
||||
</para>
|
||||
|
||||
<para><ulink url="http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html">http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html</ulink></para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>How do I convert between unix and dos text formats?</title>
|
||||
|
||||
<para>
|
||||
Jim barry has written an <ulink url="ftp://samba.org/pub/samba/contributed/fixcrlf.zip">
|
||||
excellent drag-and-drop cr/lf converter for
|
||||
windows</ulink>. Just drag your file onto the icon and it converts the file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The utilities unix2dos and dos2unix(in the mtools package) should do
|
||||
the job under unix.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Does samba have wins replication support?</title>
|
||||
|
||||
<para>
|
||||
At the time of writing there is currently being worked on a wins replication implementation(wrepld).
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
37
docs/docbook/faq/sambafaq.sgml
Normal file
37
docs/docbook/faq/sambafaq.sgml
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
|
||||
<!ENTITY general SYSTEM "general.sgml">
|
||||
<!ENTITY install SYSTEM "install.sgml">
|
||||
<!ENTITY errors SYSTEM "errors.sgml">
|
||||
<!ENTITY clientapp SYSTEM "clientapp.sgml">
|
||||
<!ENTITY features SYSTEM "features.sgml">
|
||||
<!ENTITY config SYSTEM "config.sgml">
|
||||
]>
|
||||
|
||||
<book id="Samba-FAQ">
|
||||
<title>Samba FAQ</title>
|
||||
|
||||
<bookinfo>
|
||||
<author><surname>Samba Team</surname></author>
|
||||
<pubdate>October 2002</pubdate>
|
||||
</bookinfo>
|
||||
|
||||
<dedication>
|
||||
<para>
|
||||
This is the Frequently Asked Questions (FAQ) document for
|
||||
Samba, the free and very popular SMB server product. An SMB server
|
||||
allows file and printer connections from clients such as Windows,
|
||||
OS/2, Linux and others. Current to version 3.0. Please send any
|
||||
corrections to the samba documentation mailinglist at
|
||||
<ulink url="mailto:samba-doc@samba.org">samba-doc@samba.org</ulink>.
|
||||
This FAQ was based on the old Samba FAQ by Dan Shearer and Paul Blackman,
|
||||
and the old samba text documents which were mostly written by John Terpstra.
|
||||
</para>
|
||||
</dedication>
|
||||
|
||||
&general;
|
||||
&install;
|
||||
&config;
|
||||
&clientapp;
|
||||
&errors;
|
||||
&features;
|
||||
</book>
|
280
docs/docbook/projdoc/Browsing-Quickguide.sgml
Normal file
280
docs/docbook/projdoc/Browsing-Quickguide.sgml
Normal file
@ -0,0 +1,280 @@
|
||||
<chapter id="Browsing-Quick">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>John</firstname><surname>Terpstra</surname>
|
||||
</author>
|
||||
<pubdate>July 5, 1998</pubdate>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</title>
|
||||
|
||||
<para>
|
||||
This document should be read in conjunction with Browsing and may
|
||||
be taken as the fast track guide to implementing browsing across subnets
|
||||
and / or across workgroups (or domains). WINS is the best tool for resolution
|
||||
of NetBIOS names to IP addesses. WINS is NOT involved in browse list handling
|
||||
except by way of name to address mapping.
|
||||
</para>
|
||||
|
||||
<sect1>
|
||||
<title>Discussion</title>
|
||||
|
||||
<para>
|
||||
Firstly, all MS Windows networking is based on SMB (Server Message
|
||||
Block) based messaging. SMB messaging is implemented using NetBIOS. Samba
|
||||
implements NetBIOS by encapsulating it over TCP/IP. MS Windows products can
|
||||
do likewise. NetBIOS based networking uses broadcast messaging to affect
|
||||
browse list management. When running NetBIOS over TCP/IP this uses UDP
|
||||
based messaging. UDP messages can be broadcast or unicast.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally, only unicast UDP messaging can be forwarded by routers. The
|
||||
"remote announce" parameter to smb.conf helps to project browse announcements
|
||||
to remote network segments via unicast UDP. Similarly, the "remote browse sync"
|
||||
parameter of smb.conf implements browse list collation using unicast UDP.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Secondly, in those networks where Samba is the only SMB server technology
|
||||
wherever possible nmbd should be configured on one (1) machine as the WINS
|
||||
server. This makes it easy to manage the browsing environment. If each network
|
||||
segment is configured with it's own Samba WINS server, then the only way to
|
||||
get cross segment browsing to work is by using the "remote announce" and
|
||||
the "remote browse sync" parameters to your smb.conf file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If only one WINS server is used then the use of the "remote announce" and the
|
||||
"remote browse sync" parameters should NOT be necessary.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Samba WINS does not support MS-WINS replication. This means that when setting up
|
||||
Samba as a WINS server there must only be one nmbd configured as a WINS server
|
||||
on the network. Some sites have used multiple Samba WINS servers for redundancy
|
||||
(one server per subnet) and then used "remote browse sync" and "remote announce"
|
||||
to affect browse list collation across all segments. Note that this means
|
||||
clients will only resolve local names, and must be configured to use DNS to
|
||||
resolve names on other subnets in order to resolve the IP addresses of the
|
||||
servers they can see on other subnets. This setup is not recommended, but is
|
||||
mentioned as a practical consideration (ie: an 'if all else fails' scenario).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Lastly, take note that browse lists are a collection of unreliable broadcast
|
||||
messages that are repeated at intervals of not more than 15 minutes. This means
|
||||
that it will take time to establish a browse list and it can take up to 45
|
||||
minutes to stabilise, particularly across network segments.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Use of the "Remote Announce" parameter</title>
|
||||
<para>
|
||||
The "remote announce" parameter of smb.conf can be used to forcibly ensure
|
||||
that all the NetBIOS names on a network get announced to a remote network.
|
||||
The syntax of the "remote announce" parameter is:
|
||||
<programlisting>
|
||||
remote announce = a.b.c.d [e.f.g.h] ...
|
||||
</programlisting>
|
||||
_or_
|
||||
<programlisting>
|
||||
remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...
|
||||
</programlisting>
|
||||
|
||||
where:
|
||||
<variablelist>
|
||||
<varlistentry><term>a.b.c.d and e.f.g.h</term>
|
||||
<listitem><para>is either the LMB (Local Master Browser) IP address
|
||||
or the broadcst address of the remote network.
|
||||
ie: the LMB is at 192.168.1.10, or the address
|
||||
could be given as 192.168.1.255 where the netmask
|
||||
is assumed to be 24 bits (255.255.255.0).
|
||||
When the remote announcement is made to the broadcast
|
||||
address of the remote network every host will receive
|
||||
our announcements. This is noisy and therefore
|
||||
undesirable but may be necessary if we do NOT know
|
||||
the IP address of the remote LMB.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>WORKGROUP</term>
|
||||
<listitem><para>is optional and can be either our own workgroup
|
||||
or that of the remote network. If you use the
|
||||
workgroup name of the remote network then our
|
||||
NetBIOS machine names will end up looking like
|
||||
they belong to that workgroup, this may cause
|
||||
name resolution problems and should be avoided.
|
||||
</para></listitem>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Use of the "Remote Browse Sync" parameter</title>
|
||||
|
||||
<para>
|
||||
The "remote browse sync" parameter of smb.conf is used to announce to
|
||||
another LMB that it must synchronise it's NetBIOS name list with our
|
||||
Samba LMB. It works ONLY if the Samba server that has this option is
|
||||
simultaneously the LMB on it's network segment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The syntax of the "remote browse sync" parameter is:
|
||||
<programlisting>
|
||||
remote browse sync = a.b.c.d
|
||||
</programlisting>
|
||||
|
||||
where a.b.c.d is either the IP address of the remote LMB or else is the network broadcast address of the remote segment.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Use of WINS</title>
|
||||
|
||||
<para>
|
||||
Use of WINS (either Samba WINS _or_ MS Windows NT Server WINS) is highly
|
||||
recommended. Every NetBIOS machine registers it's name together with a
|
||||
name_type value for each of of several types of service it has available.
|
||||
eg: It registers it's name directly as a unique (the type 0x03) name.
|
||||
It also registers it's name if it is running the lanmanager compatible
|
||||
server service (used to make shares and printers available to other users)
|
||||
by registering the server (the type 0x20) name.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
All NetBIOS names are up to 15 characters in length. The name_type variable
|
||||
is added to the end of the name - thus creating a 16 character name. Any
|
||||
name that is shorter than 15 characters is padded with spaces to the 15th
|
||||
character. ie: All NetBIOS names are 16 characters long (including the
|
||||
name_type information).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
WINS can store these 16 character names as they get registered. A client
|
||||
that wants to log onto the network can ask the WINS server for a list
|
||||
of all names that have registered the NetLogon service name_type. This saves
|
||||
broadcast traffic and greatly expedites logon processing. Since broadcast
|
||||
name resolution can not be used across network segments this type of
|
||||
information can only be provided via WINS _or_ via statically configured
|
||||
"lmhosts" files that must reside on all clients in the absence of WINS.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
WINS also serves the purpose of forcing browse list synchronisation by all
|
||||
LMB's. LMB's must synchronise their browse list with the DMB (domain master
|
||||
browser) and WINS helps the LMB to identify it's DMB. By definition this
|
||||
will work only within a single workgroup. Note that the domain master browser
|
||||
has NOTHING to do with what is referred to as an MS Windows NT Domain. The
|
||||
later is a reference to a security environment while the DMB refers to the
|
||||
master controller for browse list information only.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Use of WINS will work correctly only if EVERY client TCP/IP protocol stack
|
||||
has been configured to use the WINS server/s. Any client that has not been
|
||||
configured to use the WINS server will continue to use only broadcast based
|
||||
name registration so that WINS may NEVER get to know about it. In any case,
|
||||
machines that have not registered with a WINS server will fail name to address
|
||||
lookup attempts by other clients and will therefore cause workstation access
|
||||
errors.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To configure Samba as a WINS server just add "wins support = yes" to the
|
||||
smb.conf file [globals] section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To configure Samba to register with a WINS server just add
|
||||
"wins server = a.b.c.d" to your smb.conf file [globals] section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<emphasis>DO NOT EVER</emphasis> use both "wins support = yes" together with "wins server = a.b.c.d"
|
||||
particularly not using it's own IP address.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Do NOT use more than one (1) protocol on MS Windows machines</title>
|
||||
|
||||
<para>
|
||||
A very common cause of browsing problems results from installing more than
|
||||
one protocol on an MS Windows machine.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Every NetBIOS machine take part in a process of electing the LMB (and DMB)
|
||||
every 15 minutes. A set of election criteria is used to determine the order
|
||||
of precidence for winning this election process. A machine running Samba or
|
||||
Windows NT will be biased so that the most suitable machine will predictably
|
||||
win and thus retain it's role.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The election process is "fought out" so to speak over every NetBIOS network
|
||||
interface. In the case of a Windows 9x machine that has both TCP/IP and IPX
|
||||
installed and has NetBIOS enabled over both protocols the election will be
|
||||
decided over both protocols. As often happens, if the Windows 9x machine is
|
||||
the only one with both protocols then the LMB may be won on the NetBIOS
|
||||
interface over the IPX protocol. Samba will then lose the LMB role as Windows
|
||||
9x will insist it knows who the LMB is. Samba will then cease to function
|
||||
as an LMB and thus browse list operation on all TCP/IP only machines will
|
||||
fail.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Name Resolution Order</title>
|
||||
|
||||
<para>
|
||||
Resolution of NetBIOS names to IP addresses can take place using a number
|
||||
of methods. The only ones that can provide NetBIOS name_type information
|
||||
are:
|
||||
<simplelist>
|
||||
<member>WINS: the best tool!</member>
|
||||
<member>LMHOSTS: is static and hard to maintain.</member>
|
||||
<member>Broadcast: uses UDP and can not resolve names across remote segments.</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Alternative means of name resolution includes:
|
||||
<simplelist>
|
||||
<member>/etc/hosts: is static, hard to maintain, and lacks name_type info</member>
|
||||
<member>DNS: is a good choice but lacks essential name_type info.</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Many sites want to restrict DNS lookups and want to avoid broadcast name
|
||||
resolution traffic. The "name resolve order" parameter is of great help here.
|
||||
The syntax of the "name resolve order" parameter is:
|
||||
<programlisting>
|
||||
name resolve order = wins lmhosts bcast host
|
||||
</programlisting>
|
||||
_or_
|
||||
<programlisting>
|
||||
name resolve order = wins lmhosts (eliminates bcast and host)
|
||||
</programlisting>
|
||||
The default is:
|
||||
<programlisting>
|
||||
name resolve order = host lmhost wins bcast
|
||||
</programlisting>.
|
||||
where "host" refers the the native methods used by the Unix system
|
||||
to implement the gethostbyname() function call. This is normally
|
||||
controlled by <filename>/etc/host.conf</filename>, <filename>/etc/nsswitch.conf</filename> and <filename>/etc/resolv.conf</filename>.
|
||||
</sect1>
|
||||
</chapter>
|
57
docs/docs-status
Normal file
57
docs/docs-status
Normal file
@ -0,0 +1,57 @@
|
||||
If you'd like to work on any of these, please contact jerry@samba.org or jelmer@samba.org.
|
||||
|
||||
Outdated docs:
|
||||
docs/OID/allocated-arcs.txt - does this file really belong here?
|
||||
docs/OID/samba-oid.mail - does this file really belong here?
|
||||
docs/announce - out of date (announces 2.2.0) - should it go away?
|
||||
docs/history - needs updating (is current up to 1998 - merge with 10year.html ?)
|
||||
docs/docbook/devdoc/* - most of these docs are outdated and need updates...
|
||||
docs/docbook/manpages/net.8.sgml - Still not finished
|
||||
docs/docbook/manpages/rpcclient.1.sgml - Command documentation might be outdated
|
||||
docs/docbook/manpages/samba.7.sgml - Listing of samba programs is not complete
|
||||
docs/docbook/manpages/smbclient.1.sgml - document -k (kerberos authentication)
|
||||
docs/docbook/manpages/smbcontrol.1.sgml - Document -s, samsync, samrepl, pool-usage, dmalloc-mark, dmalloc-log-changed, shutdown, change_id
|
||||
docs/docbook/manpages/smb.conf.5.sgml - 'restrict anonymous' isn't documented properly
|
||||
docs/docbook/projdoc/DOMAIN_MEMBER.sgml - Needs update to 3.0
|
||||
docs/docbook/projdoc/ADS-HOWTO.sgml - seems outdated (it says we require 'ads server' when in ads mode, though that's not true, according to the manpages...)
|
||||
docs/docbook/projdoc/ENCRYPTION.sgml - contains useless old info about smbpasswd
|
||||
docs/docbook/projdoc/Integrating-with-Windows.sgml - Should slowly go a way. Contains a little bit information about wins, a little bit about domain membership, a little about winbind, etc
|
||||
docs/docbook/projdoc/NT_Security.sgml - probably outdated
|
||||
docs/docbook/projdoc/Diagnosis.sgml - Needs extension
|
||||
docs/docbook/projdoc/PAM-Authentication-And-Samba.sgml
|
||||
docs/docbook/projdoc/Printing.sgml - Cups is not documented, smbprint, printing /to/ a windows server... - Kurt Pfeifle
|
||||
docs/docbook/projdoc/Samba-BDC-HOWTO.sgml - Needs update to 3.0
|
||||
docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml - Needs update to 3.0
|
||||
docs/docbook/projdoc/Samba-PDC-HOWTO.sgml - Needs update to 3.0
|
||||
docs/docbook/projdoc/Speed.sgml - contains outdated and invalid information
|
||||
docs/docbook/projdoc/UNIX_INSTALL.sgml - Needs a lot of updating (swat, ADS, PDC, etc)
|
||||
docs/docbook/projdoc/printer_driver2.sgml - Needs integration with printing.sgml, still up to date?
|
||||
docs/docbook/projdoc/security_level.sgml - information about ads and domain should be added (currently only contains pointers to the ads and domain_member docs)
|
||||
docs/docbook/projdoc/winbind.sgml - needs documentation for ADS
|
||||
docs/textdocs/CUPS-PrintingInfo.txt - needs to be converted to sgml - Kurt Pfeifle
|
||||
docs/textdocs/PROFILES.txt - needs to be converted to sgml
|
||||
docs/textdocs/README.jis - Seems to need updating - possibly obsoleted by a newer japanese howto?
|
||||
docs/textdocs/RoutedNetworks.txt - still valid, but shouldn't this go into Other_clients.sgml ? This text originally comes from microsoft, what about copyright?
|
||||
|
||||
These still need to be checked:
|
||||
docs/docbook/manpages/smbd.8.sgml
|
||||
docs/docbook/manpages/smbmnt.8.sgml
|
||||
docs/docbook/manpages/smbmount.8.sgml
|
||||
docs/docbook/manpages/smbpasswd.8.sgml
|
||||
docs/docbook/manpages/smbsh.1.sgml
|
||||
docs/docbook/manpages/smbspool.8.sgml
|
||||
docs/docbook/manpages/smbstatus.1.sgml
|
||||
docs/docbook/manpages/smbtar.1.sgml
|
||||
docs/docbook/manpages/smbumount.8.sgml
|
||||
docs/docbook/manpages/swat.8.sgml
|
||||
docs/docbook/manpages/testparm.1.sgml
|
||||
docs/docbook/manpages/testprns.1.sgml
|
||||
docs/docbook/manpages/wbinfo.1.sgml
|
||||
|
||||
Stuff that needs to be documented:
|
||||
Merge the various docs about wins and browsing
|
||||
Windows NT 4.0 Style Trust Relationship
|
||||
One Time Migration script from a Windows NT 4.0 PDC to a Samba PDC
|
||||
ldap passwd sync
|
||||
|
||||
http://www.unav.es/cti/ldap-smb/smb-ldap-3-howto.html
|
445
docs/htmldocs/browsing-quick.html
Normal file
445
docs/htmldocs/browsing-quick.html
Normal file
@ -0,0 +1,445 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Improved browsing in samba"
|
||||
HREF="improved-browsing.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Samba performance issues"
|
||||
HREF="speed.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="improved-browsing.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="speed.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="BROWSING-QUICK"
|
||||
></A
|
||||
>Chapter 16. Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</H1
|
||||
><P
|
||||
>This document should be read in conjunction with Browsing and may
|
||||
be taken as the fast track guide to implementing browsing across subnets
|
||||
and / or across workgroups (or domains). WINS is the best tool for resolution
|
||||
of NetBIOS names to IP addesses. WINS is NOT involved in browse list handling
|
||||
except by way of name to address mapping.</P
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2665"
|
||||
></A
|
||||
>16.1. Discussion</H1
|
||||
><P
|
||||
>Firstly, all MS Windows networking is based on SMB (Server Message
|
||||
Block) based messaging. SMB messaging is implemented using NetBIOS. Samba
|
||||
implements NetBIOS by encapsulating it over TCP/IP. MS Windows products can
|
||||
do likewise. NetBIOS based networking uses broadcast messaging to affect
|
||||
browse list management. When running NetBIOS over TCP/IP this uses UDP
|
||||
based messaging. UDP messages can be broadcast or unicast.</P
|
||||
><P
|
||||
>Normally, only unicast UDP messaging can be forwarded by routers. The
|
||||
"remote announce" parameter to smb.conf helps to project browse announcements
|
||||
to remote network segments via unicast UDP. Similarly, the "remote browse sync"
|
||||
parameter of smb.conf implements browse list collation using unicast UDP.</P
|
||||
><P
|
||||
>Secondly, in those networks where Samba is the only SMB server technology
|
||||
wherever possible nmbd should be configured on one (1) machine as the WINS
|
||||
server. This makes it easy to manage the browsing environment. If each network
|
||||
segment is configured with it's own Samba WINS server, then the only way to
|
||||
get cross segment browsing to work is by using the "remote announce" and
|
||||
the "remote browse sync" parameters to your smb.conf file.</P
|
||||
><P
|
||||
>If only one WINS server is used then the use of the "remote announce" and the
|
||||
"remote browse sync" parameters should NOT be necessary.</P
|
||||
><P
|
||||
>Samba WINS does not support MS-WINS replication. This means that when setting up
|
||||
Samba as a WINS server there must only be one nmbd configured as a WINS server
|
||||
on the network. Some sites have used multiple Samba WINS servers for redundancy
|
||||
(one server per subnet) and then used "remote browse sync" and "remote announce"
|
||||
to affect browse list collation across all segments. Note that this means
|
||||
clients will only resolve local names, and must be configured to use DNS to
|
||||
resolve names on other subnets in order to resolve the IP addresses of the
|
||||
servers they can see on other subnets. This setup is not recommended, but is
|
||||
mentioned as a practical consideration (ie: an 'if all else fails' scenario).</P
|
||||
><P
|
||||
>Lastly, take note that browse lists are a collection of unreliable broadcast
|
||||
messages that are repeated at intervals of not more than 15 minutes. This means
|
||||
that it will take time to establish a browse list and it can take up to 45
|
||||
minutes to stabilise, particularly across network segments.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2673"
|
||||
></A
|
||||
>16.2. Use of the "Remote Announce" parameter</H1
|
||||
><P
|
||||
>The "remote announce" parameter of smb.conf can be used to forcibly ensure
|
||||
that all the NetBIOS names on a network get announced to a remote network.
|
||||
The syntax of the "remote announce" parameter is:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> remote announce = a.b.c.d [e.f.g.h] ...</PRE
|
||||
>
|
||||
_or_
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...</PRE
|
||||
>
|
||||
|
||||
where:
|
||||
<P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>a.b.c.d and e.f.g.h</DT
|
||||
><DD
|
||||
><P
|
||||
>is either the LMB (Local Master Browser) IP address
|
||||
or the broadcst address of the remote network.
|
||||
ie: the LMB is at 192.168.1.10, or the address
|
||||
could be given as 192.168.1.255 where the netmask
|
||||
is assumed to be 24 bits (255.255.255.0).
|
||||
When the remote announcement is made to the broadcast
|
||||
address of the remote network every host will receive
|
||||
our announcements. This is noisy and therefore
|
||||
undesirable but may be necessary if we do NOT know
|
||||
the IP address of the remote LMB.</P
|
||||
></DD
|
||||
><DT
|
||||
>WORKGROUP</DT
|
||||
><DD
|
||||
><P
|
||||
>is optional and can be either our own workgroup
|
||||
or that of the remote network. If you use the
|
||||
workgroup name of the remote network then our
|
||||
NetBIOS machine names will end up looking like
|
||||
they belong to that workgroup, this may cause
|
||||
name resolution problems and should be avoided.</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
> </P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2687"
|
||||
></A
|
||||
>16.3. Use of the "Remote Browse Sync" parameter</H1
|
||||
><P
|
||||
>The "remote browse sync" parameter of smb.conf is used to announce to
|
||||
another LMB that it must synchronise it's NetBIOS name list with our
|
||||
Samba LMB. It works ONLY if the Samba server that has this option is
|
||||
simultaneously the LMB on it's network segment.</P
|
||||
><P
|
||||
>The syntax of the "remote browse sync" parameter is:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> remote browse sync = a.b.c.d</PRE
|
||||
>
|
||||
|
||||
where a.b.c.d is either the IP address of the remote LMB or else is the network broadcast address of the remote segment.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2692"
|
||||
></A
|
||||
>16.4. Use of WINS</H1
|
||||
><P
|
||||
>Use of WINS (either Samba WINS _or_ MS Windows NT Server WINS) is highly
|
||||
recommended. Every NetBIOS machine registers it's name together with a
|
||||
name_type value for each of of several types of service it has available.
|
||||
eg: It registers it's name directly as a unique (the type 0x03) name.
|
||||
It also registers it's name if it is running the lanmanager compatible
|
||||
server service (used to make shares and printers available to other users)
|
||||
by registering the server (the type 0x20) name.</P
|
||||
><P
|
||||
>All NetBIOS names are up to 15 characters in length. The name_type variable
|
||||
is added to the end of the name - thus creating a 16 character name. Any
|
||||
name that is shorter than 15 characters is padded with spaces to the 15th
|
||||
character. ie: All NetBIOS names are 16 characters long (including the
|
||||
name_type information).</P
|
||||
><P
|
||||
>WINS can store these 16 character names as they get registered. A client
|
||||
that wants to log onto the network can ask the WINS server for a list
|
||||
of all names that have registered the NetLogon service name_type. This saves
|
||||
broadcast traffic and greatly expedites logon processing. Since broadcast
|
||||
name resolution can not be used across network segments this type of
|
||||
information can only be provided via WINS _or_ via statically configured
|
||||
"lmhosts" files that must reside on all clients in the absence of WINS.</P
|
||||
><P
|
||||
>WINS also serves the purpose of forcing browse list synchronisation by all
|
||||
LMB's. LMB's must synchronise their browse list with the DMB (domain master
|
||||
browser) and WINS helps the LMB to identify it's DMB. By definition this
|
||||
will work only within a single workgroup. Note that the domain master browser
|
||||
has NOTHING to do with what is referred to as an MS Windows NT Domain. The
|
||||
later is a reference to a security environment while the DMB refers to the
|
||||
master controller for browse list information only.</P
|
||||
><P
|
||||
>Use of WINS will work correctly only if EVERY client TCP/IP protocol stack
|
||||
has been configured to use the WINS server/s. Any client that has not been
|
||||
configured to use the WINS server will continue to use only broadcast based
|
||||
name registration so that WINS may NEVER get to know about it. In any case,
|
||||
machines that have not registered with a WINS server will fail name to address
|
||||
lookup attempts by other clients and will therefore cause workstation access
|
||||
errors.</P
|
||||
><P
|
||||
>To configure Samba as a WINS server just add "wins support = yes" to the
|
||||
smb.conf file [globals] section.</P
|
||||
><P
|
||||
>To configure Samba to register with a WINS server just add
|
||||
"wins server = a.b.c.d" to your smb.conf file [globals] section.</P
|
||||
><P
|
||||
><SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>DO NOT EVER</I
|
||||
></SPAN
|
||||
> use both "wins support = yes" together with "wins server = a.b.c.d"
|
||||
particularly not using it's own IP address.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2703"
|
||||
></A
|
||||
>16.5. Do NOT use more than one (1) protocol on MS Windows machines</H1
|
||||
><P
|
||||
>A very common cause of browsing problems results from installing more than
|
||||
one protocol on an MS Windows machine.</P
|
||||
><P
|
||||
>Every NetBIOS machine take part in a process of electing the LMB (and DMB)
|
||||
every 15 minutes. A set of election criteria is used to determine the order
|
||||
of precidence for winning this election process. A machine running Samba or
|
||||
Windows NT will be biased so that the most suitable machine will predictably
|
||||
win and thus retain it's role.</P
|
||||
><P
|
||||
>The election process is "fought out" so to speak over every NetBIOS network
|
||||
interface. In the case of a Windows 9x machine that has both TCP/IP and IPX
|
||||
installed and has NetBIOS enabled over both protocols the election will be
|
||||
decided over both protocols. As often happens, if the Windows 9x machine is
|
||||
the only one with both protocols then the LMB may be won on the NetBIOS
|
||||
interface over the IPX protocol. Samba will then lose the LMB role as Windows
|
||||
9x will insist it knows who the LMB is. Samba will then cease to function
|
||||
as an LMB and thus browse list operation on all TCP/IP only machines will
|
||||
fail.</P
|
||||
><P
|
||||
>The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2709"
|
||||
></A
|
||||
>16.6. Name Resolution Order</H1
|
||||
><P
|
||||
>Resolution of NetBIOS names to IP addresses can take place using a number
|
||||
of methods. The only ones that can provide NetBIOS name_type information
|
||||
are:
|
||||
<P
|
||||
></P
|
||||
><TABLE
|
||||
BORDER="0"
|
||||
><TBODY
|
||||
><TR
|
||||
><TD
|
||||
>WINS: the best tool!</TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
>LMHOSTS: is static and hard to maintain.</TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
>Broadcast: uses UDP and can not resolve names across remote segments.</TD
|
||||
></TR
|
||||
></TBODY
|
||||
></TABLE
|
||||
><P
|
||||
></P
|
||||
></P
|
||||
><P
|
||||
>Alternative means of name resolution includes:
|
||||
<P
|
||||
></P
|
||||
><TABLE
|
||||
BORDER="0"
|
||||
><TBODY
|
||||
><TR
|
||||
><TD
|
||||
>/etc/hosts: is static, hard to maintain, and lacks name_type info</TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
>DNS: is a good choice but lacks essential name_type info.</TD
|
||||
></TR
|
||||
></TBODY
|
||||
></TABLE
|
||||
><P
|
||||
></P
|
||||
></P
|
||||
><P
|
||||
>Many sites want to restrict DNS lookups and want to avoid broadcast name
|
||||
resolution traffic. The "name resolve order" parameter is of great help here.
|
||||
The syntax of the "name resolve order" parameter is:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> name resolve order = wins lmhosts bcast host</PRE
|
||||
>
|
||||
_or_
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> name resolve order = wins lmhosts (eliminates bcast and host)</PRE
|
||||
>
|
||||
The default is:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> name resolve order = host lmhost wins bcast</PRE
|
||||
>.
|
||||
where "host" refers the the native methods used by the Unix system
|
||||
to implement the gethostbyname() function call. This is normally
|
||||
controlled by <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/host.conf</TT
|
||||
>, <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/nsswitch.conf</TT
|
||||
> and <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="improved-browsing.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="speed.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Improved browsing in samba</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Samba performance issues</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
345
docs/htmldocs/bugreport.html
Normal file
345
docs/htmldocs/bugreport.html
Normal file
@ -0,0 +1,345 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Reporting Bugs</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="HOWTO Access Samba source code via CVS"
|
||||
HREF="cvs-access.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Group mapping HOWTO"
|
||||
HREF="groupmapping.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="cvs-access.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="groupmapping.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="BUGREPORT"
|
||||
></A
|
||||
>Chapter 19. Reporting Bugs</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2921"
|
||||
></A
|
||||
>19.1. Introduction</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2928"
|
||||
></A
|
||||
>19.2. General info</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2934"
|
||||
></A
|
||||
>19.3. Debug levels</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2951"
|
||||
></A
|
||||
>19.4. Internal errors</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2961"
|
||||
></A
|
||||
>19.5. Attaching to a running process</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2964"
|
||||
></A
|
||||
>19.6. Patches</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="cvs-access.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="groupmapping.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>HOWTO Access Samba source code via CVS</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Group mapping HOWTO</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
300
docs/htmldocs/cvs-access.html
Normal file
300
docs/htmldocs/cvs-access.html
Normal file
@ -0,0 +1,300 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>HOWTO Access Samba source code via CVS</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Samba performance issues"
|
||||
HREF="speed.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Reporting Bugs"
|
||||
HREF="bugreport.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="speed.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="bugreport.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="CVS-ACCESS"
|
||||
></A
|
||||
>Chapter 18. HOWTO Access Samba source code via CVS</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2873"
|
||||
></A
|
||||
>18.1. Introduction</H1
|
||||
><P
|
||||
>Samba is developed in an open environment. Developers use CVS
|
||||
(Concurrent Versioning System) to "checkin" (also known as
|
||||
"commit") new source code. Samba's various CVS branches can
|
||||
be accessed via anonymous CVS using the instructions
|
||||
detailed in this chapter.</P
|
||||
><P
|
||||
>This document is a modified version of the instructions found at
|
||||
<A
|
||||
HREF="http://samba.org/samba/cvs.html"
|
||||
TARGET="_top"
|
||||
>http://samba.org/samba/cvs.html</A
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2878"
|
||||
></A
|
||||
>18.2. CVS Access to samba.org</H1
|
||||
><P
|
||||
>The machine samba.org runs a publicly accessible CVS
|
||||
repository for access to the source code of several packages,
|
||||
including samba, rsync and jitterbug. There are two main ways of
|
||||
accessing the CVS server on this host.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2881"
|
||||
></A
|
||||
>18.2.1. Access via CVSweb</H2
|
||||
><P
|
||||
>You can access the source code via your
|
||||
favourite WWW browser. This allows you to access the contents of
|
||||
individual files in the repository and also to look at the revision
|
||||
history and commit logs of individual files. You can also ask for a diff
|
||||
listing between any two versions on the repository.</P
|
||||
><P
|
||||
>Use the URL : <A
|
||||
HREF="http://samba.org/cgi-bin/cvsweb"
|
||||
TARGET="_top"
|
||||
>http://samba.org/cgi-bin/cvsweb</A
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2886"
|
||||
></A
|
||||
>18.2.2. Access via cvs</H2
|
||||
><P
|
||||
>You can also access the source code via a
|
||||
normal cvs client. This gives you much more control over you can
|
||||
do with the repository and allows you to checkout whole source trees
|
||||
and keep them up to date via normal cvs commands. This is the
|
||||
preferred method of access if you are a developer and not
|
||||
just a casual browser.</P
|
||||
><P
|
||||
>To download the latest cvs source code, point your
|
||||
browser at the URL : <A
|
||||
HREF="http://www.cyclic.com/"
|
||||
TARGET="_top"
|
||||
>http://www.cyclic.com/</A
|
||||
>.
|
||||
and click on the 'How to get cvs' link. CVS is free software under
|
||||
the GNU GPL (as is Samba). Note that there are several graphical CVS clients
|
||||
which provide a graphical interface to the sometimes mundane CVS commands.
|
||||
Links to theses clients are also available from http://www.cyclic.com.</P
|
||||
><P
|
||||
>To gain access via anonymous cvs use the following steps.
|
||||
For this example it is assumed that you want a copy of the
|
||||
samba source code. For the other source code repositories
|
||||
on this system just substitute the correct package name</P
|
||||
><P
|
||||
></P
|
||||
><OL
|
||||
TYPE="1"
|
||||
><LI
|
||||
><P
|
||||
> Install a recent copy of cvs. All you really need is a
|
||||
copy of the cvs client binary.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> Run the command
|
||||
</P
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>cvs -d :pserver:cvs@samba.org:/cvsroot login</B
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> When it asks you for a password type <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>cvs</B
|
||||
></TT
|
||||
>.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> Run the command
|
||||
</P
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>cvs -d :pserver:cvs@samba.org:/cvsroot co samba</B
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> This will create a directory called samba containing the
|
||||
latest samba source code (i.e. the HEAD tagged cvs branch). This
|
||||
currently corresponds to the 3.0 development tree.
|
||||
</P
|
||||
><P
|
||||
> CVS branches other HEAD can be obtained by using the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>-r</I
|
||||
></TT
|
||||
>
|
||||
and defining a tag name. A list of branch tag names can be found on the
|
||||
"Development" page of the samba web site. A common request is to obtain the
|
||||
latest 2.2 release code. This could be done by using the following command.
|
||||
</P
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_2_2 samba</B
|
||||
>
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> Whenever you want to merge in the latest code changes use
|
||||
the following command from within the samba directory:
|
||||
</P
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>cvs update -d -P</B
|
||||
>
|
||||
</P
|
||||
></LI
|
||||
></OL
|
||||
></DIV
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="speed.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="bugreport.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Samba performance issues</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Reporting Bugs</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
654
docs/htmldocs/diagnosis.html
Normal file
654
docs/htmldocs/diagnosis.html
Normal file
@ -0,0 +1,654 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Diagnosing your samba server</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Samba and other CIFS clients"
|
||||
HREF="other-clients.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="other-clients.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
> </TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="DIAGNOSIS"
|
||||
></A
|
||||
>Chapter 23. Diagnosing your samba server</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3184"
|
||||
></A
|
||||
>23.1. Introduction</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3189"
|
||||
></A
|
||||
>23.2. Assumptions</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"
|
||||
> [tmp]
|
||||
comment = temporary files
|
||||
path = /tmp
|
||||
read only = yes </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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3199"
|
||||
></A
|
||||
>23.3. Tests</H1
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3201"
|
||||
></A
|
||||
>23.3.1. Test 1</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3207"
|
||||
></A
|
||||
>23.3.2. Test 2</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3213"
|
||||
></A
|
||||
>23.3.3. Test 3</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3228"
|
||||
></A
|
||||
>23.3.4. Test 4</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3233"
|
||||
></A
|
||||
>23.3.5. Test 5</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3239"
|
||||
></A
|
||||
>23.3.6. Test 6</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3247"
|
||||
></A
|
||||
>23.3.7. Test 7</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 >accountname< 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>" 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 >command<</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3273"
|
||||
></A
|
||||
>23.3.8. Test 8</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3290"
|
||||
></A
|
||||
>23.3.9. Test 9</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
|
||||
><P
|
||||
>It might also be the case that your client only sends encrypted passwords
|
||||
and you have <B
|
||||
CLASS="COMMAND"
|
||||
>encrypt passwords = no</B
|
||||
> in <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
>.
|
||||
Turn it back on to fix.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3298"
|
||||
></A
|
||||
>23.3.10. Test 10</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3304"
|
||||
></A
|
||||
>23.3.11. Test 11</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3309"
|
||||
></A
|
||||
>23.4. Still having troubles?</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="other-clients.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Samba and other CIFS clients</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
482
docs/htmldocs/domain-security.html
Normal file
482
docs/htmldocs/domain-security.html
Normal file
@ -0,0 +1,482 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>security = domain in Samba 2.x</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Security levels"
|
||||
HREF="securitylevels.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Unified Logons between Windows NT and UNIX using Winbind"
|
||||
HREF="winbind.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="securitylevels.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="winbind.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="DOMAIN-SECURITY"
|
||||
></A
|
||||
>Chapter 9. security = domain in Samba 2.x</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1133"
|
||||
></A
|
||||
>9.1. Joining an NT Domain with Samba 2.2</H1
|
||||
><P
|
||||
>Assume you have a Samba 2.x server with a NetBIOS name of
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>SERV1</TT
|
||||
> and are joining an NT domain called
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>DOM</TT
|
||||
>, which has a PDC with a NetBIOS name
|
||||
of <TT
|
||||
CLASS="CONSTANT"
|
||||
>DOMPDC</TT
|
||||
> and two backup domain controllers
|
||||
with NetBIOS names <TT
|
||||
CLASS="CONSTANT"
|
||||
>DOMBDC1</TT
|
||||
> and <TT
|
||||
CLASS="CONSTANT"
|
||||
>DOMBDC2
|
||||
</TT
|
||||
>.</P
|
||||
><P
|
||||
>In order to join the domain, first stop all Samba daemons
|
||||
and run the command:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>smbpasswd -j DOM -r DOMPDC
|
||||
-U<TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>Administrator%password</I
|
||||
></TT
|
||||
></B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>as we are joining the domain DOM and the PDC for that domain
|
||||
(the only machine that has write access to the domain SAM database)
|
||||
is DOMPDC. The <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>Administrator%password</I
|
||||
></TT
|
||||
> is
|
||||
the login name and password for an account which has the necessary
|
||||
privilege to add machines to the domain. If this is successful
|
||||
you will see the message:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="COMPUTEROUTPUT"
|
||||
>smbpasswd: Joined domain DOM.</TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
>in your terminal window. See the <A
|
||||
HREF="smbpasswd.8.html"
|
||||
TARGET="_top"
|
||||
> smbpasswd(8)</A
|
||||
> man page for more details.</P
|
||||
><P
|
||||
>There is existing development code to join a domain
|
||||
without having to create the machine trust account on the PDC
|
||||
beforehand. This code will hopefully be available soon
|
||||
in release branches as well.</P
|
||||
><P
|
||||
>This command goes through the machine account password
|
||||
change protocol, then writes the new (random) machine account
|
||||
password for this Samba server into a file in the same directory
|
||||
in which an smbpasswd file would be stored - normally :</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>/usr/local/samba/private</TT
|
||||
></P
|
||||
><P
|
||||
>In Samba 2.0.x, the filename looks like this:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
><TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
><NT DOMAIN NAME></I
|
||||
></TT
|
||||
>.<TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
><Samba
|
||||
Server Name></I
|
||||
></TT
|
||||
>.mac</TT
|
||||
></P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="FILENAME"
|
||||
>.mac</TT
|
||||
> suffix stands for machine account
|
||||
password file. So in our example above, the file would be called:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>DOM.SERV1.mac</TT
|
||||
></P
|
||||
><P
|
||||
>In Samba 2.2, this file has been replaced with a TDB
|
||||
(Trivial Database) file named <TT
|
||||
CLASS="FILENAME"
|
||||
>secrets.tdb</TT
|
||||
>.
|
||||
</P
|
||||
><P
|
||||
>This file is created and owned by root and is not
|
||||
readable by any other user. It is the key to the domain-level
|
||||
security for your system, and should be treated as carefully
|
||||
as a shadow password file.</P
|
||||
><P
|
||||
>Now, before restarting the Samba daemons you must
|
||||
edit your <A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf(5)</TT
|
||||
>
|
||||
</A
|
||||
> file to tell Samba it should now use domain security.</P
|
||||
><P
|
||||
>Change (or add) your <A
|
||||
HREF="smb.conf.5.html#SECURITY"
|
||||
TARGET="_top"
|
||||
> <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security =</I
|
||||
></TT
|
||||
></A
|
||||
> line in the [global] section
|
||||
of your smb.conf to read:</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>security = domain</B
|
||||
></P
|
||||
><P
|
||||
>Next change the <A
|
||||
HREF="smb.conf.5.html#WORKGROUP"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
> workgroup =</I
|
||||
></TT
|
||||
></A
|
||||
> line in the [global] section to read: </P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>workgroup = DOM</B
|
||||
></P
|
||||
><P
|
||||
>as this is the name of the domain we are joining. </P
|
||||
><P
|
||||
>You must also have the parameter <A
|
||||
HREF="smb.conf.5.html#ENCRYPTPASSWORDS"
|
||||
TARGET="_top"
|
||||
> <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>encrypt passwords</I
|
||||
></TT
|
||||
></A
|
||||
> set to <TT
|
||||
CLASS="CONSTANT"
|
||||
>yes
|
||||
</TT
|
||||
> in order for your users to authenticate to the NT PDC.</P
|
||||
><P
|
||||
>Finally, add (or modify) a <A
|
||||
HREF="smb.conf.5.html#PASSWORDSERVER"
|
||||
TARGET="_top"
|
||||
> <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>password server =</I
|
||||
></TT
|
||||
></A
|
||||
> line in the [global]
|
||||
section to read: </P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>password server = DOMPDC DOMBDC1 DOMBDC2</B
|
||||
></P
|
||||
><P
|
||||
>These are the primary and backup domain controllers Samba
|
||||
will attempt to contact in order to authenticate users. Samba will
|
||||
try to contact each of these servers in order, so you may want to
|
||||
rearrange this list in order to spread out the authentication load
|
||||
among domain controllers.</P
|
||||
><P
|
||||
>Alternatively, if you want smbd to automatically determine
|
||||
the list of Domain controllers to use for authentication, you may
|
||||
set this line to be :</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>password server = *</B
|
||||
></P
|
||||
><P
|
||||
>This method, which was introduced in Samba 2.0.6,
|
||||
allows Samba to use exactly the same mechanism that NT does. This
|
||||
method either broadcasts or uses a WINS database in order to
|
||||
find domain controllers to authenticate against.</P
|
||||
><P
|
||||
>Finally, restart your Samba daemons and get ready for
|
||||
clients to begin using domain security!</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1197"
|
||||
></A
|
||||
>9.2. Samba and Windows 2000 Domains</H1
|
||||
><P
|
||||
>Many people have asked regarding the state of Samba's ability to participate in
|
||||
a Windows 2000 Domain. Samba 2.2 is able to act as a member server of a Windows
|
||||
2000 domain operating in mixed or native mode.</P
|
||||
><P
|
||||
>There is much confusion between the circumstances that require a "mixed" mode
|
||||
Win2k DC and a when this host can be switched to "native" mode. A "mixed" mode
|
||||
Win2k domain controller is only needed if Windows NT BDCs must exist in the same
|
||||
domain. By default, a Win2k DC in "native" mode will still support
|
||||
NetBIOS and NTLMv1 for authentication of legacy clients such as Windows 9x and
|
||||
NT 4.0. Samba has the same requirements as a Windows NT 4.0 member server.</P
|
||||
><P
|
||||
>The steps for adding a Samba 2.2 host to a Win2k domain are the same as those
|
||||
for adding a Samba server to a Windows NT 4.0 domain. The only exception is that
|
||||
the "Server Manager" from NT 4 has been replaced by the "Active Directory Users and
|
||||
Computers" MMC (Microsoft Management Console) plugin.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1202"
|
||||
></A
|
||||
>9.3. Why is this better than security = server?</H1
|
||||
><P
|
||||
>Currently, domain security in Samba doesn't free you from
|
||||
having to create local Unix users to represent the users attaching
|
||||
to your server. This means that if domain user <TT
|
||||
CLASS="CONSTANT"
|
||||
>DOM\fred
|
||||
</TT
|
||||
> attaches to your domain security Samba server, there needs
|
||||
to be a local Unix user fred to represent that user in the Unix
|
||||
filesystem. This is very similar to the older Samba security mode
|
||||
<A
|
||||
HREF="smb.conf.5.html#SECURITYEQUALSSERVER"
|
||||
TARGET="_top"
|
||||
>security = server</A
|
||||
>,
|
||||
where Samba would pass through the authentication request to a Windows
|
||||
NT server in the same way as a Windows 95 or Windows 98 server would.
|
||||
</P
|
||||
><P
|
||||
>Please refer to the <A
|
||||
HREF="winbind.html"
|
||||
TARGET="_top"
|
||||
>Winbind
|
||||
paper</A
|
||||
> for information on a system to automatically
|
||||
assign UNIX uids and gids to Windows NT Domain users and groups.
|
||||
This code is available in development branches only at the moment,
|
||||
but will be moved to release branches soon.</P
|
||||
><P
|
||||
>The advantage to domain-level security is that the
|
||||
authentication in domain-level security is passed down the authenticated
|
||||
RPC channel in exactly the same way that an NT server would do it. This
|
||||
means Samba servers now participate in domain trust relationships in
|
||||
exactly the same way NT servers do (i.e., you can add Samba servers into
|
||||
a resource domain and have the authentication passed on from a resource
|
||||
domain PDC to an account domain PDC.</P
|
||||
><P
|
||||
>In addition, with <B
|
||||
CLASS="COMMAND"
|
||||
>security = server</B
|
||||
> every Samba
|
||||
daemon on a server has to keep a connection open to the
|
||||
authenticating server for as long as that daemon lasts. This can drain
|
||||
the connection resources on a Microsoft NT server and cause it to run
|
||||
out of available connections. With <B
|
||||
CLASS="COMMAND"
|
||||
>security = domain</B
|
||||
>,
|
||||
however, the Samba daemons connect to the PDC/BDC only for as long
|
||||
as is necessary to authenticate the user, and then drop the connection,
|
||||
thus conserving PDC connection resources.</P
|
||||
><P
|
||||
>And finally, acting in the same manner as an NT server
|
||||
authenticating to a PDC means that as part of the authentication
|
||||
reply, the Samba server gets the user identification information such
|
||||
as the user SID, the list of NT groups the user belongs to, etc. All
|
||||
this information will allow Samba to be extended in the future into
|
||||
a mode the developers currently call appliance mode. In this mode,
|
||||
no local Unix users will be necessary, and Samba will generate Unix
|
||||
uids and gids from the information passed back from the PDC when a
|
||||
user is authenticated, making a Samba server truly plug and play
|
||||
in an NT domain environment. Watch for this code soon.</P
|
||||
><P
|
||||
><SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>NOTE:</I
|
||||
></SPAN
|
||||
> Much of the text of this document
|
||||
was first published in the Web magazine <A
|
||||
HREF="http://www.linuxworld.com"
|
||||
TARGET="_top"
|
||||
>
|
||||
LinuxWorld</A
|
||||
> as the article <A
|
||||
HREF="http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html"
|
||||
TARGET="_top"
|
||||
>Doing
|
||||
the NIS/NT Samba</A
|
||||
>.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="securitylevels.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="winbind.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Security levels</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Unified Logons between Windows NT and UNIX using Winbind</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
229
docs/htmldocs/groupmapping.html
Normal file
229
docs/htmldocs/groupmapping.html
Normal file
@ -0,0 +1,229 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Group mapping HOWTO</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Reporting Bugs"
|
||||
HREF="bugreport.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Portability"
|
||||
HREF="portability.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="bugreport.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="portability.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="GROUPMAPPING"
|
||||
></A
|
||||
>Chapter 20. Group mapping HOWTO</H1
|
||||
><P
|
||||
>
|
||||
Starting with Samba 3.0 alpha 2, a new group mapping function is available. The
|
||||
current method (likely to change) to manage the groups is a new command called
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>smbgroupedit</B
|
||||
>.</P
|
||||
><P
|
||||
>The first immediate reason to use the group mapping on a PDC, is that
|
||||
the <B
|
||||
CLASS="COMMAND"
|
||||
>domain admin group</B
|
||||
> of <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> is
|
||||
now gone. This parameter was used to give the listed users local admin rights
|
||||
on their workstations. It was some magic stuff that simply worked but didn't
|
||||
scale very well for complex setups.</P
|
||||
><P
|
||||
>Let me explain how it works on NT/W2K, to have this magic fade away.
|
||||
When installing NT/W2K on a computer, the installer program creates some users
|
||||
and groups. Notably the 'Administrators' group, and gives to that group some
|
||||
privileges like the ability to change the date and time or to kill any process
|
||||
(or close too) running on the local machine. The 'Administrator' user is a
|
||||
member of the 'Administrators' group, and thus 'inherit' the 'Administrators'
|
||||
group privileges. If a 'joe' user is created and become a member of the
|
||||
'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.</P
|
||||
><P
|
||||
>When a NT/W2K machine is joined to a domain, during that phase, the "Domain
|
||||
Administrators' group of the PDC is added to the 'Administrators' group of the
|
||||
workstation. Every members of the 'Domain Administrators' group 'inherit' the
|
||||
rights of the 'Administrators' group when logging on the workstation.</P
|
||||
><P
|
||||
>You are now wondering how to make some of your samba PDC users members of the
|
||||
'Domain Administrators' ? That's really easy.</P
|
||||
><P
|
||||
></P
|
||||
><OL
|
||||
TYPE="1"
|
||||
><LI
|
||||
><P
|
||||
>create a unix group (usually in <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/group</TT
|
||||
>), let's call it domadm</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>add to this group the users that must be Administrators. For example if you want joe,john and mary, your entry in <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/group</TT
|
||||
> will look like:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>domadm:x:502:joe,john,mary</PRE
|
||||
></P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>Map this domadm group to the <B
|
||||
CLASS="COMMAND"
|
||||
>domain admins</B
|
||||
> group by running the command:</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>smbgroupedit -c "Domain Admins" -u domadm</B
|
||||
></P
|
||||
></LI
|
||||
></OL
|
||||
><P
|
||||
>You're set, joe, john and mary are domain administrators !</P
|
||||
><P
|
||||
>Like the Domain Admins group, you can map any arbitrary Unix group to any NT
|
||||
group. You can also make any Unix group a domain group. For example, on a domain
|
||||
member machine (an NT/W2K or a samba server running winbind), you would like to
|
||||
give access to a certain directory to some users who are member of a group on
|
||||
your samba PDC. Flag that group as a domain group by running:</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>smbgroupedit -a unixgroup -td</B
|
||||
></P
|
||||
><P
|
||||
>You can list the various groups in the mapping database like this</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>smbgroupedit -v</B
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="bugreport.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="portability.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Reporting Bugs</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Portability</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
848
docs/htmldocs/improved-browsing.html
Normal file
848
docs/htmldocs/improved-browsing.html
Normal file
@ -0,0 +1,848 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Improved browsing in samba</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Using samba 3.0 with ActiveDirectory support"
|
||||
HREF="ads.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Quick Cross Subnet Browsing / Cross Workgroup Browsing guide"
|
||||
HREF="browsing-quick.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="ads.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="browsing-quick.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="IMPROVED-BROWSING"
|
||||
></A
|
||||
>Chapter 15. Improved browsing in samba</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2517"
|
||||
></A
|
||||
>15.1. Overview of browsing</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2521"
|
||||
></A
|
||||
>15.2. Browsing support in samba</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2530"
|
||||
></A
|
||||
>15.3. Problem resolution</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2537"
|
||||
></A
|
||||
>15.4. Browsing across subnets</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2542"
|
||||
></A
|
||||
>15.4.1. How does cross subnet browsing work ?</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>1B<. 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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2577"
|
||||
></A
|
||||
>15.5. Setting up a WINS server</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->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->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 :</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
> wins server = >name or IP address<</B
|
||||
></P
|
||||
><P
|
||||
>where >name or IP address< 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 = >name<</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2596"
|
||||
></A
|
||||
>15.6. Setting up Browsing in a WORKGROUP</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2614"
|
||||
></A
|
||||
>15.7. Setting up Browsing in a DOMAIN</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>1B<) 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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2624"
|
||||
></A
|
||||
>15.8. Forcing samba to be the master</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2633"
|
||||
></A
|
||||
>15.9. Making samba the domain master</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2651"
|
||||
></A
|
||||
>15.10. Note about broadcast addresses</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2654"
|
||||
></A
|
||||
>15.11. Multiple interfaces</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="ads.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="browsing-quick.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Using samba 3.0 with ActiveDirectory support</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
909
docs/htmldocs/install.html
Normal file
909
docs/htmldocs/install.html
Normal file
@ -0,0 +1,909 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>How to Install and Test SAMBA</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Integrating MS Windows networks with Samba"
|
||||
HREF="integrate-ms-networks.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="integrate-ms-networks.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="INSTALL"
|
||||
></A
|
||||
>Chapter 1. How to Install and Test SAMBA</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN20"
|
||||
></A
|
||||
>1.1. Step 0: Read the man pages</H1
|
||||
><P
|
||||
>The man pages distributed with SAMBA contain
|
||||
lots of useful info that will help to get you started.
|
||||
If you don't know how to read man pages then try
|
||||
something like:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>$ </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>nroff -man smbd.8 | more
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Other sources of information are pointed to
|
||||
by the Samba web site,<A
|
||||
HREF="http://www.samba.org/"
|
||||
TARGET="_top"
|
||||
> http://www.samba.org</A
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN28"
|
||||
></A
|
||||
>1.2. Step 1: Building the Binaries</H1
|
||||
><P
|
||||
>To do this, first run the program <B
|
||||
CLASS="COMMAND"
|
||||
>./configure
|
||||
</B
|
||||
> in the source directory. This should automatically
|
||||
configure Samba for your operating system. If you have unusual
|
||||
needs then you may wish to run</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>./configure --help
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>first to see what special options you can enable.
|
||||
Then executing</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>make</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>will create the binaries. Once it's successfully
|
||||
compiled you can use </P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>make install</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>to install the binaries and manual pages. You can
|
||||
separately install the binaries and/or man pages using</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>make installbin
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>and</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>make installman
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Note that if you are upgrading for a previous version
|
||||
of Samba you might like to know that the old versions of
|
||||
the binaries will be renamed with a ".old" extension. You
|
||||
can go back to the previous version with</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>make revert
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>if you find this version a disaster!</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN56"
|
||||
></A
|
||||
>1.3. Step 2: The all important step</H1
|
||||
><P
|
||||
>At this stage you must fetch yourself a
|
||||
coffee or other drink you find stimulating. Getting the rest
|
||||
of the install right can sometimes be tricky, so you will
|
||||
probably need it.</P
|
||||
><P
|
||||
>If you have installed samba before then you can skip
|
||||
this step.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN60"
|
||||
></A
|
||||
>1.4. Step 3: Create the smb configuration file.</H1
|
||||
><P
|
||||
>There are sample configuration files in the examples
|
||||
subdirectory in the distribution. I suggest you read them
|
||||
carefully so you can see how the options go together in
|
||||
practice. See the man page for all the options.</P
|
||||
><P
|
||||
>The simplest useful configuration file would be
|
||||
something like this:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> [global]
|
||||
workgroup = MYGROUP
|
||||
|
||||
[homes]
|
||||
guest ok = no
|
||||
read only = no
|
||||
</PRE
|
||||
></P
|
||||
><P
|
||||
>which would allow connections by anyone with an
|
||||
account on the server, using either their login name or
|
||||
"homes" as the service name. (Note that I also set the
|
||||
workgroup that Samba is part of. See BROWSING.txt for details)</P
|
||||
><P
|
||||
>Note that <B
|
||||
CLASS="COMMAND"
|
||||
>make install</B
|
||||
> will not install
|
||||
a <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file. You need to create it
|
||||
yourself. </P
|
||||
><P
|
||||
>Make sure you put the smb.conf file in the same place
|
||||
you specified in the<TT
|
||||
CLASS="FILENAME"
|
||||
>Makefile</TT
|
||||
> (the default is to
|
||||
look for it in <TT
|
||||
CLASS="FILENAME"
|
||||
>/usr/local/samba/lib/</TT
|
||||
>).</P
|
||||
><P
|
||||
>For more information about security settings for the
|
||||
[homes] share please refer to the document UNIX_SECURITY.txt.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN74"
|
||||
></A
|
||||
>1.5. Step 4: Test your config file with
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>testparm</B
|
||||
></H1
|
||||
><P
|
||||
>It's important that you test the validity of your
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file using the testparm program.
|
||||
If testparm runs OK then it will list the loaded services. If
|
||||
not it will give an error message.</P
|
||||
><P
|
||||
>Make sure it runs OK and that the services look
|
||||
reasonable before proceeding. </P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN80"
|
||||
></A
|
||||
>1.6. Step 5: Starting the smbd and nmbd</H1
|
||||
><P
|
||||
>You must choose to start smbd and nmbd either
|
||||
as daemons or from <B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
>. Don't try
|
||||
to do both! Either you can put them in <TT
|
||||
CLASS="FILENAME"
|
||||
> inetd.conf</TT
|
||||
> and have them started on demand
|
||||
by <B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
>, or you can start them as
|
||||
daemons either from the command line or in <TT
|
||||
CLASS="FILENAME"
|
||||
> /etc/rc.local</TT
|
||||
>. See the man pages for details
|
||||
on the command line options. Take particular care to read
|
||||
the bit about what user you need to be in order to start
|
||||
Samba. In many cases you must be root.</P
|
||||
><P
|
||||
>The main advantage of starting <B
|
||||
CLASS="COMMAND"
|
||||
>smbd</B
|
||||
>
|
||||
and <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> using the recommended daemon method
|
||||
is that they will respond slightly more quickly to an initial connection
|
||||
request.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN90"
|
||||
></A
|
||||
>1.6.1. Step 5a: Starting from inetd.conf</H2
|
||||
><P
|
||||
>NOTE; The following will be different if
|
||||
you use NIS or NIS+ to distributed services maps.</P
|
||||
><P
|
||||
>Look at your <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/services</TT
|
||||
>.
|
||||
What is defined at port 139/tcp. If nothing is defined
|
||||
then add a line like this:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>netbios-ssn 139/tcp</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>similarly for 137/udp you should have an entry like:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>netbios-ns 137/udp</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Next edit your <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/inetd.conf</TT
|
||||
>
|
||||
and add two lines something like this:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd
|
||||
netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd
|
||||
</PRE
|
||||
></P
|
||||
><P
|
||||
>The exact syntax of <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/inetd.conf</TT
|
||||
>
|
||||
varies between unixes. Look at the other entries in inetd.conf
|
||||
for a guide.</P
|
||||
><P
|
||||
>NOTE: Some unixes already have entries like netbios_ns
|
||||
(note the underscore) in <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/services</TT
|
||||
>.
|
||||
You must either edit <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/services</TT
|
||||
> or
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/inetd.conf</TT
|
||||
> to make them consistent.</P
|
||||
><P
|
||||
>NOTE: On many systems you may need to use the
|
||||
"interfaces" option in smb.conf to specify the IP address
|
||||
and netmask of your interfaces. Run <B
|
||||
CLASS="COMMAND"
|
||||
>ifconfig</B
|
||||
>
|
||||
as root if you don't know what the broadcast is for your
|
||||
net. <B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> tries to determine it at run
|
||||
time, but fails on some unixes. See the section on "testing nmbd"
|
||||
for a method of finding if you need to do this.</P
|
||||
><P
|
||||
>!!!WARNING!!! Many unixes only accept around 5
|
||||
parameters on the command line in <TT
|
||||
CLASS="FILENAME"
|
||||
>inetd.conf</TT
|
||||
>.
|
||||
This means you shouldn't use spaces between the options and
|
||||
arguments, or you should use a script, and start the script
|
||||
from <B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
>.</P
|
||||
><P
|
||||
>Restart <B
|
||||
CLASS="COMMAND"
|
||||
>inetd</B
|
||||
>, perhaps just send
|
||||
it a HUP. If you have installed an earlier version of <B
|
||||
CLASS="COMMAND"
|
||||
> nmbd</B
|
||||
> then you may need to kill nmbd as well.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN119"
|
||||
></A
|
||||
>1.6.2. Step 5b. Alternative: starting it as a daemon</H2
|
||||
><P
|
||||
>To start the server as a daemon you should create
|
||||
a script something like this one, perhaps calling
|
||||
it <TT
|
||||
CLASS="FILENAME"
|
||||
>startsmb</TT
|
||||
>.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> #!/bin/sh
|
||||
/usr/local/samba/bin/smbd -D
|
||||
/usr/local/samba/bin/nmbd -D
|
||||
</PRE
|
||||
></P
|
||||
><P
|
||||
>then make it executable with <B
|
||||
CLASS="COMMAND"
|
||||
>chmod
|
||||
+x startsmb</B
|
||||
></P
|
||||
><P
|
||||
>You can then run <B
|
||||
CLASS="COMMAND"
|
||||
>startsmb</B
|
||||
> by
|
||||
hand or execute it from <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/rc.local</TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
>To kill it send a kill signal to the processes
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>nmbd</B
|
||||
> and <B
|
||||
CLASS="COMMAND"
|
||||
>smbd</B
|
||||
>.</P
|
||||
><P
|
||||
>NOTE: If you use the SVR4 style init system then
|
||||
you may like to look at the <TT
|
||||
CLASS="FILENAME"
|
||||
>examples/svr4-startup</TT
|
||||
>
|
||||
script to make Samba fit into that system.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN135"
|
||||
></A
|
||||
>1.7. Step 6: Try listing the shares available on your
|
||||
server</H1
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>$ </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>smbclient -L
|
||||
<TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>yourhostname</I
|
||||
></TT
|
||||
></B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>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
|
||||
><P
|
||||
>If you choose user level security then you may find
|
||||
that Samba requests a password before it will list the shares.
|
||||
See the <B
|
||||
CLASS="COMMAND"
|
||||
>smbclient</B
|
||||
> man page for details. (you
|
||||
can force it to list the shares without a password by
|
||||
adding the option -U% to the command line. This will not work
|
||||
with non-Samba servers)</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN144"
|
||||
></A
|
||||
>1.8. Step 7: Try connecting with the unix client</H1
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>$ </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>smbclient <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
> //yourhostname/aservice</I
|
||||
></TT
|
||||
></B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Typically the <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>yourhostname</I
|
||||
></TT
|
||||
>
|
||||
would be the name of the host where you installed <B
|
||||
CLASS="COMMAND"
|
||||
> smbd</B
|
||||
>. The <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>aservice</I
|
||||
></TT
|
||||
> is
|
||||
any service you have defined in the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
>
|
||||
file. Try your user name if you just have a [homes] section
|
||||
in <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>For example if your unix host is bambi and your login
|
||||
name is fred you would type:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>$ </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>smbclient //bambi/fred
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN160"
|
||||
></A
|
||||
>1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT,
|
||||
Win2k, OS/2, etc... client</H1
|
||||
><P
|
||||
>Try mounting disks. eg:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>C:\WINDOWS\> </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>net use d: \\servername\service
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Try printing. eg:</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>C:\WINDOWS\> </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>net use lpt1:
|
||||
\\servername\spoolservice</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>C:\WINDOWS\> </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>print filename
|
||||
</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Celebrate, or send me a bug report!</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN174"
|
||||
></A
|
||||
>1.10. What If Things Don't Work?</H1
|
||||
><P
|
||||
>If nothing works and you start to think "who wrote
|
||||
this pile of trash" then I suggest you do step 2 again (and
|
||||
again) till you calm down.</P
|
||||
><P
|
||||
>Then you might read the file DIAGNOSIS.txt and the
|
||||
FAQ. If you are still stuck then try the mailing list or
|
||||
newsgroup (look in the README for details). Samba has been
|
||||
successfully installed at thousands of sites worldwide, so maybe
|
||||
someone else has hit your problem and has overcome it. You could
|
||||
also use the WWW site to scan back issues of the samba-digest.</P
|
||||
><P
|
||||
>When you fix the problem PLEASE send me some updates to the
|
||||
documentation (or source code) so that the next person will find it
|
||||
easier. </P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN179"
|
||||
></A
|
||||
>1.10.1. Diagnosing Problems</H2
|
||||
><P
|
||||
>If you have installation problems then go to
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>DIAGNOSIS.txt</TT
|
||||
> to try to find the
|
||||
problem.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN183"
|
||||
></A
|
||||
>1.10.2. Scope IDs</H2
|
||||
><P
|
||||
>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 '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
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN186"
|
||||
></A
|
||||
>1.10.3. Choosing the Protocol Level</H2
|
||||
><P
|
||||
>The SMB protocol has many dialects. Currently
|
||||
Samba supports 5, called CORE, COREPLUS, LANMAN1,
|
||||
LANMAN2 and NT1.</P
|
||||
><P
|
||||
>You can choose what maximum protocol to support
|
||||
in the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf</TT
|
||||
> file. The default is
|
||||
NT1 and that is the best for the vast majority of sites.</P
|
||||
><P
|
||||
>In older versions of Samba you may have found it
|
||||
necessary to use COREPLUS. The limitations that led to
|
||||
this have mostly been fixed. It is now less likely that you
|
||||
will want to use less than LANMAN1. The only remaining advantage
|
||||
of COREPLUS is that for some obscure reason WfWg preserves
|
||||
the case of passwords in this protocol, whereas under LANMAN1,
|
||||
LANMAN2 or NT1 it uppercases all passwords before sending them,
|
||||
forcing you to use the "password level=" option in some cases.</P
|
||||
><P
|
||||
>The main advantage of LANMAN2 and NT1 is support for
|
||||
long filenames with some clients (eg: smbclient, Windows NT
|
||||
or Win95). </P
|
||||
><P
|
||||
>See the smb.conf(5) manual page for more details.</P
|
||||
><P
|
||||
>Note: To support print queue reporting you may find
|
||||
that you have to use TCP/IP as the default protocol under
|
||||
WfWg. For some reason if you leave Netbeui as the default
|
||||
it may break the print queue reporting on some systems.
|
||||
It is presumably a WfWg bug.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN195"
|
||||
></A
|
||||
>1.10.4. Printing from UNIX to a Client PC</H2
|
||||
><P
|
||||
>To use a printer that is available via a smb-based
|
||||
server from a unix host with LPR you will need to compile the
|
||||
smbclient program. You then need to install the script
|
||||
"smbprint". Read the instruction in smbprint for more details.
|
||||
</P
|
||||
><P
|
||||
>There is also a SYSV style script that does much
|
||||
the same thing called smbprint.sysv. It contains instructions.</P
|
||||
><P
|
||||
>See the CUPS manual for information about setting up
|
||||
printing from a unix host with CUPS to a smb-based server. </P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN200"
|
||||
></A
|
||||
>1.10.5. Locking</H2
|
||||
><P
|
||||
>One area which sometimes causes trouble is locking.</P
|
||||
><P
|
||||
>There are two types of locking which need to be
|
||||
performed by a SMB server. The first is "record locking"
|
||||
which allows a client to lock a range of bytes in a open file.
|
||||
The second is the "deny modes" that are specified when a file
|
||||
is open.</P
|
||||
><P
|
||||
>Record locking semantics under Unix is very
|
||||
different from record locking under Windows. Versions
|
||||
of Samba before 2.2 have tried to use the native
|
||||
fcntl() unix system call to implement proper record
|
||||
locking between different Samba clients. This can not
|
||||
be fully correct due to several reasons. The simplest
|
||||
is the fact that a Windows client is allowed to lock a
|
||||
byte range up to 2^32 or 2^64, depending on the client
|
||||
OS. The unix locking only supports byte ranges up to
|
||||
2^31. So it is not possible to correctly satisfy a
|
||||
lock request above 2^31. There are many more
|
||||
differences, too many to be listed here.</P
|
||||
><P
|
||||
>Samba 2.2 and above implements record locking
|
||||
completely independent of the underlying unix
|
||||
system. If a byte range lock that the client requests
|
||||
happens to fall into the range 0-2^31, Samba hands
|
||||
this request down to the Unix system. All other locks
|
||||
can not be seen by unix anyway.</P
|
||||
><P
|
||||
>Strictly a SMB server should check for locks before
|
||||
every read and write call on a file. Unfortunately with the
|
||||
way fcntl() works this can be slow and may overstress the
|
||||
rpc.lockd. It is also almost always unnecessary as clients
|
||||
are supposed to independently make locking calls before reads
|
||||
and writes anyway if locking is important to them. By default
|
||||
Samba only makes locking calls when explicitly asked
|
||||
to by a client, but if you set "strict locking = yes" then it will
|
||||
make lock checking calls on every read and write. </P
|
||||
><P
|
||||
>You can also disable by range locking completely
|
||||
using "locking = no". This is useful for those shares that
|
||||
don't support locking or don't need it (such as cdroms). In
|
||||
this case Samba fakes the return codes of locking calls to
|
||||
tell clients that everything is OK.</P
|
||||
><P
|
||||
>The second class of locking is the "deny modes". These
|
||||
are set by an application when it opens a file to determine
|
||||
what types of access should be allowed simultaneously with
|
||||
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
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN209"
|
||||
></A
|
||||
>1.10.6. Mapping Usernames</H2
|
||||
><P
|
||||
>If you have different usernames on the PCs and
|
||||
the unix server then take a look at the "username map" option.
|
||||
See the smb.conf man page for details.</P
|
||||
></DIV
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="integrate-ms-networks.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>SAMBA Project Documentation</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Integrating MS Windows networks with Samba</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
1184
docs/htmldocs/integrate-ms-networks.html
Normal file
1184
docs/htmldocs/integrate-ms-networks.html
Normal file
File diff suppressed because it is too large
Load Diff
319
docs/htmldocs/msdfs.html
Normal file
319
docs/htmldocs/msdfs.html
Normal file
@ -0,0 +1,319 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Hosting a Microsoft Distributed File System tree on Samba</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Configuring PAM for distributed but centrally
|
||||
managed authentication"
|
||||
HREF="pam.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="UNIX Permission Bits and Windows NT Access Control Lists"
|
||||
HREF="unix-permissions.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="pam.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="unix-permissions.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="MSDFS"
|
||||
></A
|
||||
>Chapter 4. Hosting a Microsoft Distributed File System tree on Samba</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN525"
|
||||
></A
|
||||
>4.1. Instructions</H1
|
||||
><P
|
||||
>The Distributed File System (or Dfs) provides a means of
|
||||
separating the logical view of files and directories that users
|
||||
see from the actual physical locations of these resources on the
|
||||
network. It allows for higher availability, smoother storage expansion,
|
||||
load balancing etc. For more information about Dfs, refer to <A
|
||||
HREF="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp"
|
||||
TARGET="_top"
|
||||
> Microsoft documentation</A
|
||||
>. </P
|
||||
><P
|
||||
>This document explains how to host a Dfs tree on a Unix
|
||||
machine (for Dfs-aware clients to browse) using Samba.</P
|
||||
><P
|
||||
>To enable SMB-based DFS for Samba, configure it with the
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>--with-msdfs</I
|
||||
></TT
|
||||
> option. Once built, a
|
||||
Samba server can be made a Dfs server by setting the global
|
||||
boolean <A
|
||||
HREF="smb.conf.5.html#HOSTMSDFS"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
> host msdfs</I
|
||||
></TT
|
||||
></A
|
||||
> parameter in the <TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf
|
||||
</TT
|
||||
> file. You designate a share as a Dfs root using the share
|
||||
level boolean <A
|
||||
HREF="smb.conf.5.html#MSDFSROOT"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
> msdfs root</I
|
||||
></TT
|
||||
></A
|
||||
> parameter. A Dfs root directory on
|
||||
Samba hosts Dfs links in the form of symbolic links that point
|
||||
to other servers. For example, a symbolic link
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>junction->msdfs:storage1\share1</TT
|
||||
> in
|
||||
the share directory acts as the Dfs junction. When Dfs-aware
|
||||
clients attempt to access the junction link, they are redirected
|
||||
to the storage location (in this case, \\storage1\share1).</P
|
||||
><P
|
||||
>Dfs trees on Samba work with all Dfs-aware clients ranging
|
||||
from Windows 95 to 2000.</P
|
||||
><P
|
||||
>Here's an example of setting up a Dfs tree on a Samba
|
||||
server.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
># The smb.conf file:
|
||||
[global]
|
||||
netbios name = SAMBA
|
||||
host msdfs = yes
|
||||
|
||||
[dfs]
|
||||
path = /export/dfsroot
|
||||
msdfs root = yes
|
||||
</PRE
|
||||
></P
|
||||
><P
|
||||
>In the /export/dfsroot directory we set up our dfs links to
|
||||
other servers on the network.</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>cd /export/dfsroot</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>chown root /export/dfsroot</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>chmod 755 /export/dfsroot</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>ln -s msdfs:storageA\\shareA linka</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PROMPT"
|
||||
>root# </TT
|
||||
><TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>ln -s msdfs:serverB\\share,serverC\\share linkb</B
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>You should set up the permissions and ownership of
|
||||
the directory acting as the Dfs root such that only designated
|
||||
users can create, delete or modify the msdfs links. Also note
|
||||
that symlink names should be all lowercase. This limitation exists
|
||||
to have Samba avoid trying all the case combinations to get at
|
||||
the link name. Finally set up the symbolic links to point to the
|
||||
network shares you want, and start Samba.</P
|
||||
><P
|
||||
>Users on Dfs-aware clients can now browse the Dfs tree
|
||||
on the Samba server at \\samba\dfs. Accessing
|
||||
links linka or linkb (which appear as directories to the client)
|
||||
takes users directly to the appropriate shares on the network.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN560"
|
||||
></A
|
||||
>4.1.1. Notes</H2
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
>Windows clients need to be rebooted
|
||||
if a previously mounted non-dfs share is made a dfs
|
||||
root or vice versa. A better way is to introduce a
|
||||
new share and make it the dfs root.</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>Currently there's a restriction that msdfs
|
||||
symlink names should all be lowercase.</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>For security purposes, the directory
|
||||
acting as the root of the Dfs tree should have ownership
|
||||
and permissions set so that only designated users can
|
||||
modify the symbolic links in the directory.</P
|
||||
></LI
|
||||
></UL
|
||||
></DIV
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="pam.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="unix-permissions.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Configuring PAM for distributed but centrally
|
||||
managed authentication</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>UNIX Permission Bits and Windows NT Access Control Lists</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
586
docs/htmldocs/other-clients.html
Normal file
586
docs/htmldocs/other-clients.html
Normal file
@ -0,0 +1,586 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Samba and other CIFS clients</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Portability"
|
||||
HREF="portability.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Diagnosing your samba server"
|
||||
HREF="diagnosis.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="portability.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="diagnosis.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="OTHER-CLIENTS"
|
||||
></A
|
||||
>Chapter 22. Samba and other CIFS clients</H1
|
||||
><P
|
||||
>This chapter contains client-specific information.</P
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3070"
|
||||
></A
|
||||
>22.1. Macintosh clients?</H1
|
||||
><P
|
||||
>Yes. <A
|
||||
HREF="http://www.thursby.com/"
|
||||
TARGET="_top"
|
||||
>Thursby</A
|
||||
> now have a CIFS Client / Server called DAVE - see</P
|
||||
><P
|
||||
>They test it against Windows 95, Windows NT and samba for
|
||||
compatibility issues. At the time of writing, DAVE was at version
|
||||
1.0.1. The 1.0.0 to 1.0.1 update is available as a free download from
|
||||
the Thursby web site (the speed of finder copies has been greatly
|
||||
enhanced, and there are bug-fixes included).</P
|
||||
><P
|
||||
>
|
||||
Alternatives - There are two free implementations of AppleTalk for
|
||||
several kinds of UNIX machnes, and several more commercial ones.
|
||||
These products allow you to run file services and print services
|
||||
natively to Macintosh users, with no additional support required on
|
||||
the Macintosh. The two free omplementations are
|
||||
<A
|
||||
HREF="http://www.umich.edu/~rsug/netatalk/"
|
||||
TARGET="_top"
|
||||
>Netatalk</A
|
||||
>, and
|
||||
<A
|
||||
HREF="http://www.cs.mu.oz.au/appletalk/atalk.html"
|
||||
TARGET="_top"
|
||||
>CAP</A
|
||||
>.
|
||||
What Samba offers MS
|
||||
Windows users, these packages offer to Macs. For more info on these
|
||||
packages, Samba, and Linux (and other UNIX-based systems) see
|
||||
<A
|
||||
HREF="http://www.eats.com/linux_mac_win.html"
|
||||
TARGET="_top"
|
||||
>http://www.eats.com/linux_mac_win.html</A
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3079"
|
||||
></A
|
||||
>22.2. OS2 Client</H1
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3081"
|
||||
></A
|
||||
>22.2.1. How can I configure OS/2 Warp Connect or
|
||||
OS/2 Warp 4 as a client for Samba?</H2
|
||||
><P
|
||||
>A more complete answer to this question can be
|
||||
found on <A
|
||||
HREF="http://carol.wins.uva.nl/~leeuw/samba/warp.html"
|
||||
TARGET="_top"
|
||||
> http://carol.wins.uva.nl/~leeuw/samba/warp.html</A
|
||||
>.</P
|
||||
><P
|
||||
>Basically, you need three components:</P
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
>The File and Print Client ('IBM Peer')
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>TCP/IP ('Internet support')
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>The "NetBIOS over TCP/IP" driver ('TCPBEUI')
|
||||
</P
|
||||
></LI
|
||||
></UL
|
||||
><P
|
||||
>Installing the first two together with the base operating
|
||||
system on a blank system is explained in the Warp manual. If Warp
|
||||
has already been installed, but you now want to install the
|
||||
networking support, use the "Selective Install for Networking"
|
||||
object in the "System Setup" folder.</P
|
||||
><P
|
||||
>Adding the "NetBIOS over TCP/IP" driver is not described
|
||||
in the manual and just barely in the online documentation. Start
|
||||
MPTS.EXE, click on OK, click on "Configure LAPS" and click
|
||||
on "IBM OS/2 NETBIOS OVER TCP/IP" in 'Protocols'. This line
|
||||
is then moved to 'Current Configuration'. Select that line,
|
||||
click on "Change number" and increase it from 0 to 1. Save this
|
||||
configuration.</P
|
||||
><P
|
||||
>If the Samba server(s) is not on your local subnet, you
|
||||
can optionally add IP names and addresses of these servers
|
||||
to the "Names List", or specify a WINS server ('NetBIOS
|
||||
Nameserver' in IBM and RFC terminology). For Warp Connect you
|
||||
may need to download an update for 'IBM Peer' to bring it on
|
||||
the same level as Warp 4. See the webpage mentioned above.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3096"
|
||||
></A
|
||||
>22.2.2. How can I configure OS/2 Warp 3 (not Connect),
|
||||
OS/2 1.2, 1.3 or 2.x for Samba?</H2
|
||||
><P
|
||||
>You can use the free Microsoft LAN Manager 2.2c Client
|
||||
for OS/2 from
|
||||
<A
|
||||
HREF="ftp://ftp.microsoft.com/BusSys/Clients/LANMAN.OS2/"
|
||||
TARGET="_top"
|
||||
> ftp://ftp.microsoft.com/BusSys/Clients/LANMAN.OS2/</A
|
||||
>.
|
||||
See <A
|
||||
HREF="http://carol.wins.uva.nl/~leeuw/lanman.html"
|
||||
TARGET="_top"
|
||||
> http://carol.wins.uva.nl/~leeuw/lanman.html</A
|
||||
> for
|
||||
more information on how to install and use this client. In
|
||||
a nutshell, edit the file \OS2VER in the root directory of
|
||||
the OS/2 boot partition and add the lines:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> 20=setup.exe
|
||||
20=netwksta.sys
|
||||
20=netvdd.sys
|
||||
</PRE
|
||||
></P
|
||||
><P
|
||||
>before you install the client. Also, don't use the
|
||||
included NE2000 driver because it is buggy. Try the NE2000
|
||||
or NS2000 driver from
|
||||
<A
|
||||
HREF="ftp://ftp.cdrom.com/pub/os2/network/ndis/"
|
||||
TARGET="_top"
|
||||
> ftp://ftp.cdrom.com/pub/os2/network/ndis/</A
|
||||
> instead.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3105"
|
||||
></A
|
||||
>22.2.3. Are there any other issues when OS/2 (any version)
|
||||
is used as a client?</H2
|
||||
><P
|
||||
>When you do a NET VIEW or use the "File and Print
|
||||
Client Resource Browser", no Samba servers show up. This can
|
||||
be fixed by a patch from <A
|
||||
HREF="http://carol.wins.uva.nl/~leeuw/samba/fix.html"
|
||||
TARGET="_top"
|
||||
> http://carol.wins.uva.nl/~leeuw/samba/fix.html</A
|
||||
>.
|
||||
The patch will be included in a later version of Samba. It also
|
||||
fixes a couple of other problems, such as preserving long
|
||||
filenames when objects are dragged from the Workplace Shell
|
||||
to the Samba server. </P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3109"
|
||||
></A
|
||||
>22.2.4. How do I get printer driver download working
|
||||
for OS/2 clients?</H2
|
||||
><P
|
||||
>First, create a share called [PRINTDRV] that is
|
||||
world-readable. Copy your OS/2 driver files there. Note
|
||||
that the .EA_ files must still be separate, so you will need
|
||||
to use the original install files, and not copy an installed
|
||||
driver from an OS/2 system.</P
|
||||
><P
|
||||
>Install the NT driver first for that printer. Then,
|
||||
add to your smb.conf a parameter, os2 driver map =
|
||||
<TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>filename</I
|
||||
></TT
|
||||
>". Then, in the file
|
||||
specified by <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>filename</I
|
||||
></TT
|
||||
>, map the
|
||||
name of the NT driver name to the OS/2 driver name as
|
||||
follows:</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>nt driver name = os2 "driver
|
||||
name"."device name"</B
|
||||
>, e.g.:
|
||||
HP LaserJet 5L = LASERJET.HP LaserJet 5L</P
|
||||
><P
|
||||
>You can have multiple drivers mapped in this file.</P
|
||||
><P
|
||||
>If you only specify the OS/2 driver name, and not the
|
||||
device name, the first attempt to download the driver will
|
||||
actually download the files, but the OS/2 client will tell
|
||||
you the driver is not available. On the second attempt, it
|
||||
will work. This is fixed simply by adding the device name
|
||||
to the mapping, after which it will work on the first attempt.
|
||||
</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3119"
|
||||
></A
|
||||
>22.3. Windows for Workgroups</H1
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3121"
|
||||
></A
|
||||
>22.3.1. Use latest TCP/IP stack from Microsoft</H2
|
||||
><P
|
||||
>Use the latest TCP/IP stack from microsoft if you use Windows
|
||||
for workgroups.</P
|
||||
><P
|
||||
>The early TCP/IP stacks had lots of bugs.</P
|
||||
><P
|
||||
>
|
||||
Microsoft has released an incremental upgrade to their TCP/IP 32-Bit
|
||||
VxD drivers. The latest release can be found on their ftp site at
|
||||
ftp.microsoft.com, located in /peropsys/windows/public/tcpip/wfwt32.exe.
|
||||
There is an update.txt file there that describes the problems that were
|
||||
fixed. New files include WINSOCK.DLL, TELNET.EXE, WSOCK.386, VNBT.386,
|
||||
WSTCP.386, TRACERT.EXE, NETSTAT.EXE, and NBTSTAT.EXE.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3126"
|
||||
></A
|
||||
>22.3.2. Delete .pwl files after password change</H2
|
||||
><P
|
||||
>WfWg does a lousy job with passwords. I find that if I change my
|
||||
password on either the unix box or the PC the safest thing to do is to
|
||||
delete the .pwl files in the windows directory. The PC will complain about not finding the files, but will soon get over it, allowing you to enter the new password.</P
|
||||
><P
|
||||
>
|
||||
If you don't do this you may find that WfWg remembers and uses the old
|
||||
password, even if you told it a new one.</P
|
||||
><P
|
||||
>
|
||||
Often WfWg will totally ignore a password you give it in a dialog box.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3131"
|
||||
></A
|
||||
>22.3.3. Configure WfW password handling</H2
|
||||
><P
|
||||
>There is a program call admincfg.exe
|
||||
on the last disk (disk 8) of the WFW 3.11 disk set. To install it
|
||||
type EXPAND A:\ADMINCFG.EX_ C:\WINDOWS\ADMINCFG.EXE Then add an icon
|
||||
for it via the "Progam Manager" "New" Menu. This program allows you
|
||||
to control how WFW handles passwords. ie disable Password Caching etc
|
||||
for use with <B
|
||||
CLASS="COMMAND"
|
||||
>security = user</B
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN3135"
|
||||
></A
|
||||
>22.3.4. Case handling of passwords</H2
|
||||
><P
|
||||
>Windows for Workgroups uppercases the password before sending it to the server. Unix passwords can be case-sensitive though. Check the <A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
>smb.conf(5)</A
|
||||
> information on <B
|
||||
CLASS="COMMAND"
|
||||
>password level</B
|
||||
> to specify what characters samba should try to uppercase when checking.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3140"
|
||||
></A
|
||||
>22.4. Windows '95/'98</H1
|
||||
><P
|
||||
>When using Windows 95 OEM SR2 the following updates are recommended where Samba
|
||||
is being used. Please NOTE that the above change will affect you once these
|
||||
updates have been installed.</P
|
||||
><P
|
||||
>
|
||||
There are more updates than the ones mentioned here. You are referred to the
|
||||
Microsoft Web site for all currently available updates to your specific version
|
||||
of Windows 95.</P
|
||||
><P
|
||||
></P
|
||||
><OL
|
||||
TYPE="1"
|
||||
><LI
|
||||
><P
|
||||
>Kernel Update: KRNLUPD.EXE</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>Ping Fix: PINGUPD.EXE</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>RPC Update: RPCRTUPD.EXE</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>TCP/IP Update: VIPUPD.EXE</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>Redirector Update: VRDRUPD.EXE</P
|
||||
></LI
|
||||
></OL
|
||||
><P
|
||||
>Also, if using MS OutLook it is desirable to install the OLEUPD.EXE fix. This
|
||||
fix may stop your machine from hanging for an extended period when exiting
|
||||
OutLook and you may also notice a significant speedup when accessing network
|
||||
neighborhood services.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3156"
|
||||
></A
|
||||
>22.5. Windows 2000 Service Pack 2</H1
|
||||
><P
|
||||
>
|
||||
There are several annoyances with Windows 2000 SP2. One of which
|
||||
only appears when using a Samba server to host user profiles
|
||||
to Windows 2000 SP2 clients in a Windows domain. This assumes
|
||||
that Samba is a member of the domain, but the problem will
|
||||
likely occur if it is not.</P
|
||||
><P
|
||||
>
|
||||
In order to server profiles successfully to Windows 2000 SP2
|
||||
clients (when not operating as a PDC), Samba must have
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>nt acl support = no</B
|
||||
>
|
||||
added to the file share which houses the roaming profiles.
|
||||
If this is not done, then the Windows 2000 SP2 client will
|
||||
complain about not being able to access the profile (Access
|
||||
Denied) and create multiple copies of it on disk (DOMAIN.user.001,
|
||||
DOMAIN.user.002, etc...). See the
|
||||
<A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
>smb.conf(5)</A
|
||||
> man page
|
||||
for more details on this option. Also note that the
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>nt acl support</B
|
||||
> parameter was formally a global parameter in
|
||||
releases prior to Samba 2.2.2.</P
|
||||
><P
|
||||
>
|
||||
The following is a minimal profile share:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> [profile]
|
||||
path = /export/profile
|
||||
create mask = 0600
|
||||
directory mask = 0700
|
||||
nt acl support = no
|
||||
read only = no</PRE
|
||||
></P
|
||||
><P
|
||||
>The reason for this bug is that the Win2k SP2 client copies
|
||||
the security descriptor for the profile which contains
|
||||
the Samba server's SID, and not the domain SID. The client
|
||||
compares the SID for SAMBA\user and realizes it is
|
||||
different that the one assigned to DOMAIN\user. Hence the reason
|
||||
for the "access denied" message.</P
|
||||
><P
|
||||
>By disabling the <B
|
||||
CLASS="COMMAND"
|
||||
>nt acl support</B
|
||||
> parameter, Samba will send
|
||||
the Win2k client a response to the QuerySecurityDescriptor
|
||||
trans2 call which causes the client to set a default ACL
|
||||
for the profile. This default ACL includes </P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>DOMAIN\user "Full Control"</B
|
||||
></P
|
||||
><P
|
||||
><SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>NOTE : This bug does not occur when using winbind to
|
||||
create accounts on the Samba host for Domain users.</I
|
||||
></SPAN
|
||||
></P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="portability.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="diagnosis.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Portability</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Diagnosing your samba server</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
425
docs/htmldocs/pam.html
Normal file
425
docs/htmldocs/pam.html
Normal file
@ -0,0 +1,425 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Configuring PAM for distributed but centrally
|
||||
managed authentication</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Integrating MS Windows networks with Samba"
|
||||
HREF="integrate-ms-networks.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Hosting a Microsoft Distributed File System tree on Samba"
|
||||
HREF="msdfs.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="integrate-ms-networks.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="msdfs.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="PAM"
|
||||
></A
|
||||
>Chapter 3. Configuring PAM for distributed but centrally
|
||||
managed authentication</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN454"
|
||||
></A
|
||||
>3.1. Samba and PAM</H1
|
||||
><P
|
||||
>A number of Unix systems (eg: Sun Solaris), as well as the
|
||||
xxxxBSD family and Linux, now utilize the Pluggable Authentication
|
||||
Modules (PAM) facility to provide all authentication,
|
||||
authorization and resource control services. Prior to the
|
||||
introduction of PAM, a decision to use an alternative to
|
||||
the system password database (<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/passwd</TT
|
||||
>)
|
||||
would require the provision of alternatives for all programs that provide
|
||||
security services. Such a choice would involve provision of
|
||||
alternatives to such programs as: <B
|
||||
CLASS="COMMAND"
|
||||
>login</B
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>passwd</B
|
||||
>, <B
|
||||
CLASS="COMMAND"
|
||||
>chown</B
|
||||
>, etc.</P
|
||||
><P
|
||||
>PAM provides a mechanism that disconnects these security programs
|
||||
from the underlying authentication/authorization infrastructure.
|
||||
PAM is configured either through one file <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/pam.conf</TT
|
||||
> (Solaris),
|
||||
or by editing individual files that are located in <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/pam.d</TT
|
||||
>.</P
|
||||
><P
|
||||
>The following is an example <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/pam.d/login</TT
|
||||
> configuration file.
|
||||
This example had all options been uncommented is probably not usable
|
||||
as it stacks many conditions before allowing successful completion
|
||||
of the login process. Essentially all conditions can be disabled
|
||||
by commenting them out except the calls to <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_pwdb.so</TT
|
||||
>.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>#%PAM-1.0
|
||||
# The PAM configuration file for the `login' service
|
||||
#
|
||||
auth required pam_securetty.so
|
||||
auth required pam_nologin.so
|
||||
# auth required pam_dialup.so
|
||||
# auth optional pam_mail.so
|
||||
auth required pam_pwdb.so shadow md5
|
||||
# account requisite pam_time.so
|
||||
account required pam_pwdb.so
|
||||
session required pam_pwdb.so
|
||||
# session optional pam_lastlog.so
|
||||
# password required pam_cracklib.so retry=3
|
||||
password required pam_pwdb.so shadow md5</PRE
|
||||
></P
|
||||
><P
|
||||
>PAM allows use of replacable modules. Those available on a
|
||||
sample system include:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>$ /bin/ls /lib/security
|
||||
pam_access.so pam_ftp.so pam_limits.so
|
||||
pam_ncp_auth.so pam_rhosts_auth.so pam_stress.so
|
||||
pam_cracklib.so pam_group.so pam_listfile.so
|
||||
pam_nologin.so pam_rootok.so pam_tally.so
|
||||
pam_deny.so pam_issue.so pam_mail.so
|
||||
pam_permit.so pam_securetty.so pam_time.so
|
||||
pam_dialup.so pam_lastlog.so pam_mkhomedir.so
|
||||
pam_pwdb.so pam_shells.so pam_unix.so
|
||||
pam_env.so pam_ldap.so pam_motd.so
|
||||
pam_radius.so pam_smbpass.so pam_unix_acct.so
|
||||
pam_wheel.so pam_unix_auth.so pam_unix_passwd.so
|
||||
pam_userdb.so pam_warn.so pam_unix_session.so</PRE
|
||||
></P
|
||||
><P
|
||||
>The following example for the login program replaces the use of
|
||||
the <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_pwdb.so</TT
|
||||
> module which uses the system
|
||||
password database (<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/passwd</TT
|
||||
>,
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/shadow</TT
|
||||
>, <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/group</TT
|
||||
>) with
|
||||
the module <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_smbpass.so</TT
|
||||
> which uses the Samba
|
||||
database which contains the Microsoft MD4 encrypted password
|
||||
hashes. This database is stored in either
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/usr/local/samba/private/smbpasswd</TT
|
||||
>,
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/samba/smbpasswd</TT
|
||||
>, or in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/samba.d/smbpasswd</TT
|
||||
>, depending on the
|
||||
Samba implementation for your Unix/Linux system. The
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>pam_smbpass.so</TT
|
||||
> module is provided by
|
||||
Samba version 2.2.1 or later. It can be compiled by specifying the
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>--with-pam_smbpass</B
|
||||
> options when running Samba's
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>configure</TT
|
||||
> script. For more information
|
||||
on the <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_smbpass</TT
|
||||
> module, see the documentation
|
||||
in the <TT
|
||||
CLASS="FILENAME"
|
||||
>source/pam_smbpass</TT
|
||||
> directory of the Samba
|
||||
source distribution.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>#%PAM-1.0
|
||||
# The PAM configuration file for the `login' service
|
||||
#
|
||||
auth required pam_smbpass.so nodelay
|
||||
account required pam_smbpass.so nodelay
|
||||
session required pam_smbpass.so nodelay
|
||||
password required pam_smbpass.so nodelay</PRE
|
||||
></P
|
||||
><P
|
||||
>The following is the PAM configuration file for a particular
|
||||
Linux system. The default condition uses <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_pwdb.so</TT
|
||||
>.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>#%PAM-1.0
|
||||
# The PAM configuration file for the `samba' service
|
||||
#
|
||||
auth required /lib/security/pam_pwdb.so nullok nodelay shadow audit
|
||||
account required /lib/security/pam_pwdb.so audit nodelay
|
||||
session required /lib/security/pam_pwdb.so nodelay
|
||||
password required /lib/security/pam_pwdb.so shadow md5</PRE
|
||||
></P
|
||||
><P
|
||||
>In the following example the decision has been made to use the
|
||||
smbpasswd database even for basic samba authentication. Such a
|
||||
decision could also be made for the passwd program and would
|
||||
thus allow the smbpasswd passwords to be changed using the passwd
|
||||
program.</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>#%PAM-1.0
|
||||
# The PAM configuration file for the `samba' service
|
||||
#
|
||||
auth required /lib/security/pam_smbpass.so nodelay
|
||||
account required /lib/security/pam_pwdb.so audit nodelay
|
||||
session required /lib/security/pam_pwdb.so nodelay
|
||||
password required /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf</PRE
|
||||
></P
|
||||
><P
|
||||
>Note: PAM allows stacking of authentication mechanisms. It is
|
||||
also possible to pass information obtained within one PAM module through
|
||||
to the next module in the PAM stack. Please refer to the documentation for
|
||||
your particular system implementation for details regarding the specific
|
||||
capabilities of PAM in this environment. Some Linux implmentations also
|
||||
provide the <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_stack.so</TT
|
||||
> module that allows all
|
||||
authentication to be configured in a single central file. The
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>pam_stack.so</TT
|
||||
> method has some very devoted followers
|
||||
on the basis that it allows for easier administration. As with all issues in
|
||||
life though, every decision makes trade-offs, so you may want examine the
|
||||
PAM documentation for further helpful information.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN498"
|
||||
></A
|
||||
>3.2. Distributed Authentication</H1
|
||||
><P
|
||||
>The astute administrator will realize from this that the
|
||||
combination of <TT
|
||||
CLASS="FILENAME"
|
||||
>pam_smbpass.so</TT
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>winbindd</B
|
||||
>, and <B
|
||||
CLASS="COMMAND"
|
||||
>rsync</B
|
||||
> (see
|
||||
<A
|
||||
HREF="http://rsync.samba.org/"
|
||||
TARGET="_top"
|
||||
>http://rsync.samba.org/</A
|
||||
>)
|
||||
will allow the establishment of a centrally managed, distributed
|
||||
user/password database that can also be used by all
|
||||
PAM (eg: Linux) aware programs and applications. This arrangement
|
||||
can have particularly potent advantages compared with the
|
||||
use of Microsoft Active Directory Service (ADS) in so far as
|
||||
reduction of wide area network authentication traffic.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN505"
|
||||
></A
|
||||
>3.3. PAM Configuration in smb.conf</H1
|
||||
><P
|
||||
>There is an option in smb.conf called <A
|
||||
HREF="smb.conf.5.html#OBEYPAMRESTRICTIONS"
|
||||
TARGET="_top"
|
||||
>obey pam restrictions</A
|
||||
>.
|
||||
The following is from the on-line help for this option in SWAT;</P
|
||||
><P
|
||||
>When Samba 2.2 is configure to enable PAM support (i.e.
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>--with-pam</TT
|
||||
>), this parameter will
|
||||
control whether or not Samba should obey PAM's account
|
||||
and session management directives. The default behavior
|
||||
is to use PAM for clear text authentication only and to
|
||||
ignore any account or session management. Note that Samba always
|
||||
ignores PAM for authentication in the case of
|
||||
<A
|
||||
HREF="smb.conf.5.html#ENCRYPTPASSWORDS"
|
||||
TARGET="_top"
|
||||
>encrypt passwords = yes</A
|
||||
>.
|
||||
The reason is that PAM modules cannot support the challenge/response
|
||||
authentication mechanism needed in the presence of SMB
|
||||
password encryption. </P
|
||||
><P
|
||||
>Default: <B
|
||||
CLASS="COMMAND"
|
||||
>obey pam restrictions = no</B
|
||||
></P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="integrate-ms-networks.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="msdfs.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Integrating MS Windows networks with Samba</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Hosting a Microsoft Distributed File System tree on Samba</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
314
docs/htmldocs/portability.html
Normal file
314
docs/htmldocs/portability.html
Normal file
@ -0,0 +1,314 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Portability</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Group mapping HOWTO"
|
||||
HREF="groupmapping.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Samba and other CIFS clients"
|
||||
HREF="other-clients.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="groupmapping.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="other-clients.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="PORTABILITY"
|
||||
></A
|
||||
>Chapter 21. Portability</H1
|
||||
><P
|
||||
>Samba works on a wide range of platforms but the interface all the
|
||||
platforms provide is not always compatible. This chapter contains
|
||||
platform-specific information about compiling and using samba.</P
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3011"
|
||||
></A
|
||||
>21.1. HPUX</H1
|
||||
><P
|
||||
>HP's implementation of supplementary groups is, er, non-standard (for
|
||||
hysterical reasons). There are two group files, /etc/group and
|
||||
/etc/logingroup; the system maps UIDs to numbers using the former, but
|
||||
initgroups() reads the latter. Most system admins who know the ropes
|
||||
symlink /etc/group to /etc/logingroup (hard link doesn't work for reasons
|
||||
too stupid to go into here). initgroups() will complain if one of the
|
||||
groups you're in in /etc/logingroup has what it considers to be an invalid
|
||||
ID, which means outside the range [0..UID_MAX], where UID_MAX is (I think)
|
||||
60000 currently on HP-UX. This precludes -2 and 65534, the usual 'nobody'
|
||||
GIDs.</P
|
||||
><P
|
||||
>If you encounter this problem, make sure that the programs that are failing
|
||||
to initgroups() be run as users not in any groups with GIDs outside the
|
||||
allowed range.</P
|
||||
><P
|
||||
>This is documented in the HP manual pages under setgroups(2) and passwd(4).</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3016"
|
||||
></A
|
||||
>21.2. SCO Unix</H1
|
||||
><P
|
||||
>
|
||||
If you run an old version of SCO Unix then you may need to get important
|
||||
TCP/IP patches for Samba to work correctly. Without the patch, you may
|
||||
encounter corrupt data transfers using samba.</P
|
||||
><P
|
||||
>The patch you need is UOD385 Connection Drivers SLS. It is available from
|
||||
SCO (ftp.sco.com, directory SLS, files uod385a.Z and uod385a.ltr.Z).</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3020"
|
||||
></A
|
||||
>21.3. DNIX</H1
|
||||
><P
|
||||
>DNIX has a problem with seteuid() and setegid(). These routines are
|
||||
needed for Samba to work correctly, but they were left out of the DNIX
|
||||
C library for some reason.</P
|
||||
><P
|
||||
>For this reason Samba by default defines the macro NO_EID in the DNIX
|
||||
section of includes.h. This works around the problem in a limited way,
|
||||
but it is far from ideal, some things still won't work right.</P
|
||||
><P
|
||||
>
|
||||
To fix the problem properly you need to assemble the following two
|
||||
functions and then either add them to your C library or link them into
|
||||
Samba.</P
|
||||
><P
|
||||
>
|
||||
put this in the file <TT
|
||||
CLASS="FILENAME"
|
||||
>setegid.s</TT
|
||||
>:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> .globl _setegid
|
||||
_setegid:
|
||||
moveq #47,d0
|
||||
movl #100,a0
|
||||
moveq #1,d1
|
||||
movl 4(sp),a1
|
||||
trap #9
|
||||
bccs 1$
|
||||
jmp cerror
|
||||
1$:
|
||||
clrl d0
|
||||
rts</PRE
|
||||
></P
|
||||
><P
|
||||
>put this in the file <TT
|
||||
CLASS="FILENAME"
|
||||
>seteuid.s</TT
|
||||
>:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> .globl _seteuid
|
||||
_seteuid:
|
||||
moveq #47,d0
|
||||
movl #100,a0
|
||||
moveq #0,d1
|
||||
movl 4(sp),a1
|
||||
trap #9
|
||||
bccs 1$
|
||||
jmp cerror
|
||||
1$:
|
||||
clrl d0
|
||||
rts</PRE
|
||||
></P
|
||||
><P
|
||||
>after creating the above files you then assemble them using</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>as seteuid.s</B
|
||||
></P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>as setegid.s</B
|
||||
></P
|
||||
><P
|
||||
>that should produce the files <TT
|
||||
CLASS="FILENAME"
|
||||
>seteuid.o</TT
|
||||
> and
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>setegid.o</TT
|
||||
></P
|
||||
><P
|
||||
>then you need to add these to the LIBSM line in the DNIX section of
|
||||
the Samba Makefile. Your LIBSM line will then look something like this:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>LIBSM = setegid.o seteuid.o -ln</PRE
|
||||
></P
|
||||
><P
|
||||
>
|
||||
You should then remove the line:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>#define NO_EID</PRE
|
||||
></P
|
||||
><P
|
||||
>from the DNIX section of <TT
|
||||
CLASS="FILENAME"
|
||||
>includes.h</TT
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN3049"
|
||||
></A
|
||||
>21.4. RedHat Linux Rembrandt-II</H1
|
||||
><P
|
||||
>By default RedHat Rembrandt-II during installation adds an
|
||||
entry to /etc/hosts as follows:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> 127.0.0.1 loopback "hostname"."domainname"</PRE
|
||||
></P
|
||||
><P
|
||||
>This causes Samba to loop back onto the loopback interface.
|
||||
The result is that Samba fails to communicate correctly with
|
||||
the world and therefor may fail to correctly negotiate who
|
||||
is the master browse list holder and who is the master browser.</P
|
||||
><P
|
||||
>Corrective Action: Delete the entry after the word loopback
|
||||
in the line starting 127.0.0.1</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="groupmapping.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="other-clients.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Group mapping HOWTO</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Samba and other CIFS clients</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
1231
docs/htmldocs/printing.html
Normal file
1231
docs/htmldocs/printing.html
Normal file
File diff suppressed because it is too large
Load Diff
515
docs/htmldocs/printingdebug.html
Normal file
515
docs/htmldocs/printingdebug.html
Normal file
@ -0,0 +1,515 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Debugging Printing Problems</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Printing Support in Samba 2.2.x"
|
||||
HREF="printing.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Security levels"
|
||||
HREF="securitylevels.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="printing.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="securitylevels.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="PRINTINGDEBUG"
|
||||
></A
|
||||
>Chapter 7. Debugging Printing Problems</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN986"
|
||||
></A
|
||||
>7.1. Introduction</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 %>letter< 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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1002"
|
||||
></A
|
||||
>7.2. Debugging printer problems</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 >/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</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"
|
||||
> 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</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1011"
|
||||
></A
|
||||
>7.3. What printers do I have?</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1019"
|
||||
></A
|
||||
>7.4. Setting up printcap and print servers</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1047"
|
||||
></A
|
||||
>7.5. Job sent, no output</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1058"
|
||||
></A
|
||||
>7.6. Job sent, strange output</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1070"
|
||||
></A
|
||||
>7.7. Raw PostScript printed</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1073"
|
||||
></A
|
||||
>7.8. Advanced Printing</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1076"
|
||||
></A
|
||||
>7.9. Real debugging</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="printing.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="securitylevels.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Printing Support in Samba 2.2.x</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Security levels</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
358
docs/htmldocs/samba-bdc.html
Normal file
358
docs/htmldocs/samba-bdc.html
Normal file
@ -0,0 +1,358 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="How to Configure Samba 2.2 as a Primary Domain Controller"
|
||||
HREF="samba-pdc.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Storing Samba's User/Machine Account information in an LDAP Directory"
|
||||
HREF="samba-ldap-howto.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="samba-pdc.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="samba-ldap-howto.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="SAMBA-BDC"
|
||||
></A
|
||||
>Chapter 12. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2148"
|
||||
></A
|
||||
>12.1. Prerequisite Reading</H1
|
||||
><P
|
||||
>Before you continue reading in this chapter, please make sure
|
||||
that you are comfortable with configuring a Samba PDC
|
||||
as described in the <A
|
||||
HREF="Samba-PDC-HOWTO.html"
|
||||
TARGET="_top"
|
||||
>Samba-PDC-HOWTO</A
|
||||
>.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2152"
|
||||
></A
|
||||
>12.2. Background</H1
|
||||
><P
|
||||
>What is a Domain Controller? It is a machine that is able to answer
|
||||
logon requests from workstations in a Windows NT Domain. Whenever a
|
||||
user logs into a Windows NT Workstation, the workstation connects to a
|
||||
Domain Controller and asks him whether the username and password the
|
||||
user typed in is correct. The Domain Controller replies with a lot of
|
||||
information about the user, for example the place where the users
|
||||
profile is stored, the users full name of the user. All this
|
||||
information is stored in the NT user database, the so-called SAM.</P
|
||||
><P
|
||||
>There are two kinds of Domain Controller in a NT 4 compatible Domain:
|
||||
A Primary Domain Controller (PDC) and one or more Backup Domain
|
||||
Controllers (BDC). The PDC contains the master copy of the
|
||||
SAM. Whenever the SAM has to change, for example when a user changes
|
||||
his password, this change has to be done on the PDC. A Backup Domain
|
||||
Controller is a machine that maintains a read-only copy of the
|
||||
SAM. This way it is able to reply to logon requests and authenticate
|
||||
users in case the PDC is not available. During this time no changes to
|
||||
the SAM are possible. Whenever changes to the SAM are done on the PDC,
|
||||
all BDC receive the changes from the PDC.</P
|
||||
><P
|
||||
>Since version 2.2 Samba officially supports domain logons for all
|
||||
current Windows Clients, including Windows 2000 and XP. This text
|
||||
assumes the domain to be named SAMBA. To be able to act as a PDC, some
|
||||
parameters in the [global]-section of the smb.conf have to be set:</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>workgroup = SAMBA
|
||||
domain master = yes
|
||||
domain logons = yes</PRE
|
||||
></P
|
||||
><P
|
||||
>Several other things like a [homes] and a [netlogon] share also may be
|
||||
set along with settings for the profile path, the users home drive and
|
||||
others. This will not be covered in this document.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2160"
|
||||
></A
|
||||
>12.3. What qualifies a Domain Controller on the network?</H1
|
||||
><P
|
||||
>Every machine that is a Domain Controller for the domain SAMBA has to
|
||||
register the NetBIOS group name SAMBA#1c with the WINS server and/or
|
||||
by broadcast on the local network. The PDC also registers the unique
|
||||
NetBIOS name SAMBA#1b with the WINS server. The name type #1b is
|
||||
normally reserved for the domain master browser, a role that has
|
||||
nothing to do with anything related to authentication, but the
|
||||
Microsoft Domain implementation requires the domain master browser to
|
||||
be on the same machine as the PDC.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2163"
|
||||
></A
|
||||
>12.3.1. How does a Workstation find its domain controller?</H2
|
||||
><P
|
||||
>A NT workstation in the domain SAMBA that wants a local user to be
|
||||
authenticated has to find the domain controller for SAMBA. It does
|
||||
this by doing a NetBIOS name query for the group name SAMBA#1c. It
|
||||
assumes that each of the machines it gets back from the queries is a
|
||||
domain controller and can answer logon requests. To not open security
|
||||
holes both the workstation and the selected (TODO: How is the DC
|
||||
chosen) domain controller authenticate each other. After that the
|
||||
workstation sends the user's credentials (his name and password) to
|
||||
the domain controller, asking for approval.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2166"
|
||||
></A
|
||||
>12.3.2. When is the PDC needed?</H2
|
||||
><P
|
||||
>Whenever a user wants to change his password, this has to be done on
|
||||
the PDC. To find the PDC, the workstation does a NetBIOS name query
|
||||
for SAMBA#1b, assuming this machine maintains the master copy of the
|
||||
SAM. The workstation contacts the PDC, both mutually authenticate and
|
||||
the password change is done.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2169"
|
||||
></A
|
||||
>12.4. Can Samba be a Backup Domain Controller?</H1
|
||||
><P
|
||||
>With version 2.2, no. The native NT SAM replication protocols have
|
||||
not yet been fully implemented. The Samba Team is working on
|
||||
understanding and implementing the protocols, but this work has not
|
||||
been finished for version 2.2.</P
|
||||
><P
|
||||
>Can I get the benefits of a BDC with Samba? Yes. The main reason for
|
||||
implementing a BDC is availability. If the PDC is a Samba machine,
|
||||
a second Samba machine can be set up to
|
||||
service logon requests whenever the PDC is down.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2173"
|
||||
></A
|
||||
>12.5. How do I set up a Samba BDC?</H1
|
||||
><P
|
||||
>Several things have to be done:</P
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
>The domain SID has to be the same on the PDC and the BDC. This used to
|
||||
be stored in the file private/MACHINE.SID. This file is not created
|
||||
anymore since Samba 2.2.5 or even earlier. Nowadays the domain SID is
|
||||
stored in the file private/secrets.tdb. Simply copying the secrets.tdb
|
||||
from the PDC to the BDC does not work, as the BDC would
|
||||
generate a new SID for itself and override the domain SID with this
|
||||
new BDC SID.</P
|
||||
><P
|
||||
>To retrieve the domain SID from the PDC or an existing BDC and store it in the
|
||||
secrets.tdb, execute 'net rpc getsid' on the BDC.</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>The Unix user database has to be synchronized from the PDC to the
|
||||
BDC. This means that both the /etc/passwd and /etc/group have to be
|
||||
replicated from the PDC to the BDC. This can be done manually
|
||||
whenever changes are made, or the PDC is set up as a NIS master
|
||||
server and the BDC as a NIS slave server. To set up the BDC as a
|
||||
mere NIS client would not be enough, as the BDC would not be able to
|
||||
access its user database in case of a PDC failure.</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>The Samba password database in the file private/smbpasswd has to be
|
||||
replicated from the PDC to the BDC. This is a bit tricky, see the
|
||||
next section.</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>Any netlogon share has to be replicated from the PDC to the
|
||||
BDC. This can be done manually whenever login scripts are changed,
|
||||
or it can be done automatically together with the smbpasswd
|
||||
synchronization.</P
|
||||
></LI
|
||||
></UL
|
||||
><P
|
||||
>Finally, the BDC has to be found by the workstations. This can be done
|
||||
by setting</P
|
||||
><P
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>workgroup = samba
|
||||
domain master = no
|
||||
domain logons = yes</PRE
|
||||
></P
|
||||
><P
|
||||
>in the [global]-section of the smb.conf of the BDC. This makes the BDC
|
||||
only register the name SAMBA#1c with the WINS server. This is no
|
||||
problem as the name SAMBA#1c is a NetBIOS group name that is meant to
|
||||
be registered by more than one machine. The parameter 'domain master =
|
||||
no' forces the BDC not to register SAMBA#1b which as a unique NetBIOS
|
||||
name is reserved for the Primary Domain Controller.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2190"
|
||||
></A
|
||||
>12.5.1. How do I replicate the smbpasswd file?</H2
|
||||
><P
|
||||
>Replication of the smbpasswd file is sensitive. It has to be done
|
||||
whenever changes to the SAM are made. Every user's password change is
|
||||
done in the smbpasswd file and has to be replicated to the BDC. So
|
||||
replicating the smbpasswd file very often is necessary.</P
|
||||
><P
|
||||
>As the smbpasswd file contains plain text password equivalents, it
|
||||
must not be sent unencrypted over the wire. The best way to set up
|
||||
smbpasswd replication from the PDC to the BDC is to use the utility
|
||||
rsync. rsync can use ssh as a transport. ssh itself can be set up to
|
||||
accept *only* rsync transfer without requiring the user to type a
|
||||
password.</P
|
||||
></DIV
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-pdc.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-ldap-howto.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>How to Configure Samba 2.2 as a Primary Domain Controller</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Storing Samba's User/Machine Account information in an LDAP Directory</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
1004
docs/htmldocs/samba-ldap-howto.html
Normal file
1004
docs/htmldocs/samba-ldap-howto.html
Normal file
File diff suppressed because it is too large
Load Diff
276
docs/htmldocs/securitylevels.html
Normal file
276
docs/htmldocs/securitylevels.html
Normal file
@ -0,0 +1,276 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Security levels</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Debugging Printing Problems"
|
||||
HREF="printingdebug.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="security = domain in Samba 2.x"
|
||||
HREF="domain-security.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="printingdebug.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="domain-security.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="SECURITYLEVELS"
|
||||
></A
|
||||
>Chapter 8. Security levels</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1089"
|
||||
></A
|
||||
>8.1. Introduction</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN1100"
|
||||
></A
|
||||
>8.2. More complete description of security levels</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="printingdebug.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="domain-security.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Debugging Printing Problems</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>security = domain in Samba 2.x</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
657
docs/htmldocs/speed.html
Normal file
657
docs/htmldocs/speed.html
Normal file
@ -0,0 +1,657 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Samba performance issues</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Quick Cross Subnet Browsing / Cross Workgroup Browsing guide"
|
||||
HREF="browsing-quick.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="HOWTO Access Samba source code via CVS"
|
||||
HREF="cvs-access.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="browsing-quick.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="cvs-access.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="SPEED"
|
||||
></A
|
||||
>Chapter 17. Samba performance issues</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2742"
|
||||
></A
|
||||
>17.1. Comparisons</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2748"
|
||||
></A
|
||||
>17.2. Oplocks</H1
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2750"
|
||||
></A
|
||||
>17.2.1. Overview</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2758"
|
||||
></A
|
||||
>17.2.2. Level2 Oplocks</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"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN2764"
|
||||
></A
|
||||
>17.2.3. Old 'fake oplocks' option - deprecated</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2768"
|
||||
></A
|
||||
>17.3. Socket options</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2775"
|
||||
></A
|
||||
>17.4. Read size</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2780"
|
||||
></A
|
||||
>17.5. Max xmit</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2785"
|
||||
></A
|
||||
>17.6. Locking</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2789"
|
||||
></A
|
||||
>17.7. Share modes</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2794"
|
||||
></A
|
||||
>17.8. Log level</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2797"
|
||||
></A
|
||||
>17.9. Wide lines</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2800"
|
||||
></A
|
||||
>17.10. Read raw</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2805"
|
||||
></A
|
||||
>17.11. Write raw</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2809"
|
||||
></A
|
||||
>17.12. Read prediction</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2816"
|
||||
></A
|
||||
>17.13. Memory mapping</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2821"
|
||||
></A
|
||||
>17.14. Slow Clients</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2825"
|
||||
></A
|
||||
>17.15. Slow Logins</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2828"
|
||||
></A
|
||||
>17.16. Client tuning</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"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN2860"
|
||||
></A
|
||||
>17.17. My Results</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
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="browsing-quick.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="cvs-access.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>HOWTO Access Samba source code via CVS</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
917
docs/htmldocs/unix-permissions.html
Normal file
917
docs/htmldocs/unix-permissions.html
Normal file
@ -0,0 +1,917 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>UNIX Permission Bits and Windows NT Access Control Lists</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
|
||||
REL="HOME"
|
||||
TITLE="SAMBA Project Documentation"
|
||||
HREF="samba-howto-collection.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE="Hosting a Microsoft Distributed File System tree on Samba"
|
||||
HREF="msdfs.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Printing Support in Samba 2.2.x"
|
||||
HREF="printing.html"></HEAD
|
||||
><BODY
|
||||
CLASS="CHAPTER"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>SAMBA Project Documentation</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="msdfs.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="printing.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="CHAPTER"
|
||||
><H1
|
||||
><A
|
||||
NAME="UNIX-PERMISSIONS"
|
||||
></A
|
||||
>Chapter 5. UNIX Permission Bits and Windows NT Access Control Lists</H1
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN580"
|
||||
></A
|
||||
>5.1. Viewing and changing UNIX permissions using the NT
|
||||
security dialogs</H1
|
||||
><P
|
||||
>New in the Samba 2.0.4 release is the ability for Windows
|
||||
NT clients to use their native security settings dialog box to
|
||||
view and modify the underlying UNIX permissions.</P
|
||||
><P
|
||||
>Note that this ability is careful not to compromise
|
||||
the security of the UNIX host Samba is running on, and
|
||||
still obeys all the file permission rules that a Samba
|
||||
administrator can set.</P
|
||||
><P
|
||||
>In Samba 2.0.4 and above the default value of the
|
||||
parameter <A
|
||||
HREF="smb.conf.5.html#NTACLSUPPORT"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
> nt acl support</I
|
||||
></TT
|
||||
></A
|
||||
> has been changed from
|
||||
<TT
|
||||
CLASS="CONSTANT"
|
||||
>false</TT
|
||||
> to <TT
|
||||
CLASS="CONSTANT"
|
||||
>true</TT
|
||||
>, so
|
||||
manipulation of permissions is turned on by default.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN589"
|
||||
></A
|
||||
>5.2. How to view file security on a Samba share</H1
|
||||
><P
|
||||
>From an NT 4.0 client, single-click with the right
|
||||
mouse button on any file or directory in a Samba mounted
|
||||
drive letter or UNC path. When the menu pops-up, click
|
||||
on the <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Properties</I
|
||||
></SPAN
|
||||
> entry at the bottom of
|
||||
the menu. This brings up the normal file properties dialog
|
||||
box, but with Samba 2.0.4 this will have a new tab along the top
|
||||
marked <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Security</I
|
||||
></SPAN
|
||||
>. Click on this tab and you
|
||||
will see three buttons, <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Permissions</I
|
||||
></SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Auditing</I
|
||||
></SPAN
|
||||
>, and <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Ownership</I
|
||||
></SPAN
|
||||
>.
|
||||
The <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Auditing</I
|
||||
></SPAN
|
||||
> button will cause either
|
||||
an error message <SPAN
|
||||
CLASS="ERRORNAME"
|
||||
>A requested privilege is not held
|
||||
by the client</SPAN
|
||||
> to appear if the user is not the
|
||||
NT Administrator, or a dialog which is intended to allow an
|
||||
Administrator to add auditing requirements to a file if the
|
||||
user is logged on as the NT Administrator. This dialog is
|
||||
non-functional with a Samba share at this time, as the only
|
||||
useful button, the <B
|
||||
CLASS="COMMAND"
|
||||
>Add</B
|
||||
> button will not currently
|
||||
allow a list of users to be seen.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN600"
|
||||
></A
|
||||
>5.3. Viewing file ownership</H1
|
||||
><P
|
||||
>Clicking on the <B
|
||||
CLASS="COMMAND"
|
||||
>"Ownership"</B
|
||||
> button
|
||||
brings up a dialog box telling you who owns the given file. The
|
||||
owner name will be of the form :</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>"SERVER\user (Long name)"</B
|
||||
></P
|
||||
><P
|
||||
>Where <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>SERVER</I
|
||||
></TT
|
||||
> is the NetBIOS name of
|
||||
the Samba server, <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>user</I
|
||||
></TT
|
||||
> is the user name of
|
||||
the UNIX user who owns the file, and <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>(Long name)</I
|
||||
></TT
|
||||
>
|
||||
is the descriptive string identifying the user (normally found in the
|
||||
GECOS field of the UNIX password database). Click on the <B
|
||||
CLASS="COMMAND"
|
||||
>Close
|
||||
</B
|
||||
> button to remove this dialog.</P
|
||||
><P
|
||||
>If the parameter <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>nt acl support</I
|
||||
></TT
|
||||
>
|
||||
is set to <TT
|
||||
CLASS="CONSTANT"
|
||||
>false</TT
|
||||
> then the file owner will
|
||||
be shown as the NT user <B
|
||||
CLASS="COMMAND"
|
||||
>"Everyone"</B
|
||||
>.</P
|
||||
><P
|
||||
>The <B
|
||||
CLASS="COMMAND"
|
||||
>Take Ownership</B
|
||||
> button will not allow
|
||||
you to change the ownership of this file to yourself (clicking on
|
||||
it will display a dialog box complaining that the user you are
|
||||
currently logged onto the NT client cannot be found). The reason
|
||||
for this is that changing the ownership of a file is a privileged
|
||||
operation in UNIX, available only to the <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>root</I
|
||||
></SPAN
|
||||
>
|
||||
user. As clicking on this button causes NT to attempt to change
|
||||
the ownership of a file to the current user logged into the NT
|
||||
client this will not work with Samba at this time.</P
|
||||
><P
|
||||
>There is an NT chown command that will work with Samba
|
||||
and allow a user with Administrator privilege connected
|
||||
to a Samba 2.0.4 server as root to change the ownership of
|
||||
files on both a local NTFS filesystem or remote mounted NTFS
|
||||
or Samba drive. This is available as part of the <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Seclib
|
||||
</I
|
||||
></SPAN
|
||||
> NT security library written by Jeremy Allison of
|
||||
the Samba Team, available from the main Samba ftp site.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN620"
|
||||
></A
|
||||
>5.4. Viewing file or directory permissions</H1
|
||||
><P
|
||||
>The third button is the <B
|
||||
CLASS="COMMAND"
|
||||
>"Permissions"</B
|
||||
>
|
||||
button. Clicking on this brings up a dialog box that shows both
|
||||
the permissions and the UNIX owner of the file or directory.
|
||||
The owner is displayed in the form :</P
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>"SERVER\user (Long name)"</B
|
||||
></P
|
||||
><P
|
||||
>Where <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>SERVER</I
|
||||
></TT
|
||||
> is the NetBIOS name of
|
||||
the Samba server, <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>user</I
|
||||
></TT
|
||||
> is the user name of
|
||||
the UNIX user who owns the file, and <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>(Long name)</I
|
||||
></TT
|
||||
>
|
||||
is the descriptive string identifying the user (normally found in the
|
||||
GECOS field of the UNIX password database).</P
|
||||
><P
|
||||
>If the parameter <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>nt acl support</I
|
||||
></TT
|
||||
>
|
||||
is set to <TT
|
||||
CLASS="CONSTANT"
|
||||
>false</TT
|
||||
> then the file owner will
|
||||
be shown as the NT user <B
|
||||
CLASS="COMMAND"
|
||||
>"Everyone"</B
|
||||
> and the
|
||||
permissions will be shown as NT "Full Control".</P
|
||||
><P
|
||||
>The permissions field is displayed differently for files
|
||||
and directories, so I'll describe the way file permissions
|
||||
are displayed first.</P
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN635"
|
||||
></A
|
||||
>5.4.1. File Permissions</H2
|
||||
><P
|
||||
>The standard UNIX user/group/world triple and
|
||||
the corresponding "read", "write", "execute" permissions
|
||||
triples are mapped by Samba into a three element NT ACL
|
||||
with the 'r', 'w', and 'x' bits mapped into the corresponding
|
||||
NT permissions. The UNIX world permissions are mapped into
|
||||
the global NT group <B
|
||||
CLASS="COMMAND"
|
||||
>Everyone</B
|
||||
>, followed
|
||||
by the list of permissions allowed for UNIX world. The UNIX
|
||||
owner and group permissions are displayed as an NT
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>user</B
|
||||
> icon and an NT <B
|
||||
CLASS="COMMAND"
|
||||
>local
|
||||
group</B
|
||||
> icon respectively followed by the list
|
||||
of permissions allowed for the UNIX user and group.</P
|
||||
><P
|
||||
>As many UNIX permission sets don't map into common
|
||||
NT names such as <B
|
||||
CLASS="COMMAND"
|
||||
>"read"</B
|
||||
>, <B
|
||||
CLASS="COMMAND"
|
||||
> "change"</B
|
||||
> or <B
|
||||
CLASS="COMMAND"
|
||||
>"full control"</B
|
||||
> then
|
||||
usually the permissions will be prefixed by the words <B
|
||||
CLASS="COMMAND"
|
||||
> "Special Access"</B
|
||||
> in the NT display list.</P
|
||||
><P
|
||||
>But what happens if the file has no permissions allowed
|
||||
for a particular UNIX user group or world component ? In order
|
||||
to allow "no permissions" to be seen and modified then Samba
|
||||
overloads the NT <B
|
||||
CLASS="COMMAND"
|
||||
>"Take Ownership"</B
|
||||
> ACL attribute
|
||||
(which has no meaning in UNIX) and reports a component with
|
||||
no permissions as having the NT <B
|
||||
CLASS="COMMAND"
|
||||
>"O"</B
|
||||
> bit set.
|
||||
This was chosen of course to make it look like a zero, meaning
|
||||
zero permissions. More details on the decision behind this will
|
||||
be given below.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT2"
|
||||
><H2
|
||||
CLASS="SECT2"
|
||||
><A
|
||||
NAME="AEN649"
|
||||
></A
|
||||
>5.4.2. Directory Permissions</H2
|
||||
><P
|
||||
>Directories on an NT NTFS file system have two
|
||||
different sets of permissions. The first set of permissions
|
||||
is the ACL set on the directory itself, this is usually displayed
|
||||
in the first set of parentheses in the normal <B
|
||||
CLASS="COMMAND"
|
||||
>"RW"</B
|
||||
>
|
||||
NT style. This first set of permissions is created by Samba in
|
||||
exactly the same way as normal file permissions are, described
|
||||
above, and is displayed in the same way.</P
|
||||
><P
|
||||
>The second set of directory permissions has no real meaning
|
||||
in the UNIX permissions world and represents the <B
|
||||
CLASS="COMMAND"
|
||||
> "inherited"</B
|
||||
> permissions that any file created within
|
||||
this directory would inherit.</P
|
||||
><P
|
||||
>Samba synthesises these inherited permissions for NT by
|
||||
returning as an NT ACL the UNIX permission mode that a new file
|
||||
created by Samba on this share would receive.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN656"
|
||||
></A
|
||||
>5.5. Modifying file or directory permissions</H1
|
||||
><P
|
||||
>Modifying file and directory permissions is as simple
|
||||
as changing the displayed permissions in the dialog box, and
|
||||
clicking the <B
|
||||
CLASS="COMMAND"
|
||||
>OK</B
|
||||
> button. However, there are
|
||||
limitations that a user needs to be aware of, and also interactions
|
||||
with the standard Samba permission masks and mapping of DOS
|
||||
attributes that need to also be taken into account.</P
|
||||
><P
|
||||
>If the parameter <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>nt acl support</I
|
||||
></TT
|
||||
>
|
||||
is set to <TT
|
||||
CLASS="CONSTANT"
|
||||
>false</TT
|
||||
> then any attempt to set
|
||||
security permissions will fail with an <B
|
||||
CLASS="COMMAND"
|
||||
>"Access Denied"
|
||||
</B
|
||||
> message.</P
|
||||
><P
|
||||
>The first thing to note is that the <B
|
||||
CLASS="COMMAND"
|
||||
>"Add"</B
|
||||
>
|
||||
button will not return a list of users in Samba 2.0.4 (it will give
|
||||
an error message of <B
|
||||
CLASS="COMMAND"
|
||||
>"The remote procedure call failed
|
||||
and did not execute"</B
|
||||
>). This means that you can only
|
||||
manipulate the current user/group/world permissions listed in
|
||||
the dialog box. This actually works quite well as these are the
|
||||
only permissions that UNIX actually has.</P
|
||||
><P
|
||||
>If a permission triple (either user, group, or world)
|
||||
is removed from the list of permissions in the NT dialog box,
|
||||
then when the <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> button is pressed it will
|
||||
be applied as "no permissions" on the UNIX side. If you then
|
||||
view the permissions again the "no permissions" entry will appear
|
||||
as the NT <B
|
||||
CLASS="COMMAND"
|
||||
>"O"</B
|
||||
> flag, as described above. This
|
||||
allows you to add permissions back to a file or directory once
|
||||
you have removed them from a triple component.</P
|
||||
><P
|
||||
>As UNIX supports only the "r", "w" and "x" bits of
|
||||
an NT ACL then if other NT security attributes such as "Delete
|
||||
access" are selected then they will be ignored when applied on
|
||||
the Samba server.</P
|
||||
><P
|
||||
>When setting permissions on a directory the second
|
||||
set of permissions (in the second set of parentheses) is
|
||||
by default applied to all files within that directory. If this
|
||||
is not what you want you must uncheck the <B
|
||||
CLASS="COMMAND"
|
||||
>"Replace
|
||||
permissions on existing files"</B
|
||||
> checkbox in the NT
|
||||
dialog before clicking <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
>.</P
|
||||
><P
|
||||
>If you wish to remove all permissions from a
|
||||
user/group/world component then you may either highlight the
|
||||
component and click the <B
|
||||
CLASS="COMMAND"
|
||||
>"Remove"</B
|
||||
> button,
|
||||
or set the component to only have the special <B
|
||||
CLASS="COMMAND"
|
||||
>"Take
|
||||
Ownership"</B
|
||||
> permission (displayed as <B
|
||||
CLASS="COMMAND"
|
||||
>"O"
|
||||
</B
|
||||
>) highlighted.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN678"
|
||||
></A
|
||||
>5.6. Interaction with the standard Samba create mask
|
||||
parameters</H1
|
||||
><P
|
||||
>Note that with Samba 2.0.5 there are four new parameters
|
||||
to control this interaction. These are :</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security mask</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force security mode</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>directory security mask</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory security mode</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>Once a user clicks <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> to apply the
|
||||
permissions Samba maps the given permissions into a user/group/world
|
||||
r/w/x triple set, and then will check the changed permissions for a
|
||||
file against the bits set in the <A
|
||||
HREF="smb.conf.5.html#SECURITYMASK"
|
||||
TARGET="_top"
|
||||
>
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security mask</I
|
||||
></TT
|
||||
></A
|
||||
> parameter. Any bits that
|
||||
were changed that are not set to '1' in this parameter are left alone
|
||||
in the file permissions.</P
|
||||
><P
|
||||
>Essentially, zero bits in the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security mask</I
|
||||
></TT
|
||||
>
|
||||
mask may be treated as a set of bits the user is <SPAN
|
||||
CLASS="emphasis"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>not</I
|
||||
></SPAN
|
||||
>
|
||||
allowed to change, and one bits are those the user is allowed to change.
|
||||
</P
|
||||
><P
|
||||
>If not set explicitly this parameter is set to the same value as
|
||||
the <A
|
||||
HREF="smb.conf.5.html#CREATEMASK"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>create mask
|
||||
</I
|
||||
></TT
|
||||
></A
|
||||
> parameter to provide compatibility with Samba 2.0.4
|
||||
where this permission change facility was introduced. To allow a user to
|
||||
modify all the user/group/world permissions on a file, set this parameter
|
||||
to 0777.</P
|
||||
><P
|
||||
>Next Samba checks the changed permissions for a file against
|
||||
the bits set in the <A
|
||||
HREF="smb.conf.5.html#FORCESECURITYMODE"
|
||||
TARGET="_top"
|
||||
> <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force security mode</I
|
||||
></TT
|
||||
></A
|
||||
> parameter. Any bits
|
||||
that were changed that correspond to bits set to '1' in this parameter
|
||||
are forced to be set.</P
|
||||
><P
|
||||
>Essentially, bits set in the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force security mode
|
||||
</I
|
||||
></TT
|
||||
> parameter may be treated as a set of bits that, when
|
||||
modifying security on a file, the user has always set to be 'on'.</P
|
||||
><P
|
||||
>If not set explicitly this parameter is set to the same value
|
||||
as the <A
|
||||
HREF="smb.conf.5.html#FORCECREATEMODE"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force
|
||||
create mode</I
|
||||
></TT
|
||||
></A
|
||||
> parameter to provide compatibility
|
||||
with Samba 2.0.4 where the permission change facility was introduced.
|
||||
To allow a user to modify all the user/group/world permissions on a file
|
||||
with no restrictions set this parameter to 000.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security mask</I
|
||||
></TT
|
||||
> and <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force
|
||||
security mode</I
|
||||
></TT
|
||||
> parameters are applied to the change
|
||||
request in that order.</P
|
||||
><P
|
||||
>For a directory Samba will perform the same operations as
|
||||
described above for a file except using the parameter <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
> directory security mask</I
|
||||
></TT
|
||||
> instead of <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security
|
||||
mask</I
|
||||
></TT
|
||||
>, and <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory security mode
|
||||
</I
|
||||
></TT
|
||||
> parameter instead of <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force security mode
|
||||
</I
|
||||
></TT
|
||||
>.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>directory security mask</I
|
||||
></TT
|
||||
> parameter
|
||||
by default is set to the same value as the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>directory mask
|
||||
</I
|
||||
></TT
|
||||
> parameter and the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory security
|
||||
mode</I
|
||||
></TT
|
||||
> parameter by default is set to the same value as
|
||||
the <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory mode</I
|
||||
></TT
|
||||
> parameter to provide
|
||||
compatibility with Samba 2.0.4 where the permission change facility
|
||||
was introduced.</P
|
||||
><P
|
||||
>In this way Samba enforces the permission restrictions that
|
||||
an administrator can set on a Samba share, whilst still allowing users
|
||||
to modify the permission bits within that restriction.</P
|
||||
><P
|
||||
>If you want to set up a share that allows users full control
|
||||
in modifying the permission bits on their files and directories and
|
||||
doesn't force any particular bits to be set 'on', then set the following
|
||||
parameters in the <A
|
||||
HREF="smb.conf.5.html"
|
||||
TARGET="_top"
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>smb.conf(5)
|
||||
</TT
|
||||
></A
|
||||
> file in that share specific section :</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>security mask = 0777</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force security mode = 0</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>directory security mask = 0777</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory security mode = 0</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>As described, in Samba 2.0.4 the parameters :</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>create mask</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force create mode</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>directory mask</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>force directory mode</I
|
||||
></TT
|
||||
></P
|
||||
><P
|
||||
>were used instead of the parameters discussed here.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="SECT1"
|
||||
><H1
|
||||
CLASS="SECT1"
|
||||
><A
|
||||
NAME="AEN742"
|
||||
></A
|
||||
>5.7. Interaction with the standard Samba file attribute
|
||||
mapping</H1
|
||||
><P
|
||||
>Samba maps some of the DOS attribute bits (such as "read
|
||||
only") into the UNIX permissions of a file. This means there can
|
||||
be a conflict between the permission bits set via the security
|
||||
dialog and the permission bits set by the file attribute mapping.
|
||||
</P
|
||||
><P
|
||||
>One way this can show up is if a file has no UNIX read access
|
||||
for the owner it will show up as "read only" in the standard
|
||||
file attributes tabbed dialog. Unfortunately this dialog is
|
||||
the same one that contains the security info in another tab.</P
|
||||
><P
|
||||
>What this can mean is that if the owner changes the permissions
|
||||
to allow themselves read access using the security dialog, clicks
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> to get back to the standard attributes tab
|
||||
dialog, and then clicks <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> on that dialog, then
|
||||
NT will set the file permissions back to read-only (as that is what
|
||||
the attributes still say in the dialog). This means that after setting
|
||||
permissions and clicking <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> to get back to the
|
||||
attributes dialog you should always hit <B
|
||||
CLASS="COMMAND"
|
||||
>"Cancel"</B
|
||||
>
|
||||
rather than <B
|
||||
CLASS="COMMAND"
|
||||
>"OK"</B
|
||||
> to ensure that your changes
|
||||
are not overridden.</P
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="msdfs.html"
|
||||
ACCESSKEY="P"
|
||||
>Prev</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="samba-howto-collection.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="printing.html"
|
||||
ACCESSKEY="N"
|
||||
>Next</A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Hosting a Microsoft Distributed File System tree on Samba</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>Printing Support in Samba 2.2.x</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
144
source3/python/examples/tdbpack/oldtdbutil.py
Normal file
144
source3/python/examples/tdbpack/oldtdbutil.py
Normal file
@ -0,0 +1,144 @@
|
||||
#!/usr/bin/python
|
||||
#############################################################
|
||||
# tdbutil
|
||||
#
|
||||
# Purpose:
|
||||
# Contains functions that are used to pack and unpack data
|
||||
# from Samba's tdb databases. Samba sometimes represents complex
|
||||
# data structures as a single value in a database. These functions
|
||||
# allow other python scripts to package data types into a single python
|
||||
# string and unpackage them.
|
||||
#
|
||||
#
|
||||
# XXXXX: This code is no longer used; it's just here for testing
|
||||
# compatibility with the new (much faster) C implementation.
|
||||
#
|
||||
##############################################################
|
||||
import string
|
||||
|
||||
def pack(format,list):
|
||||
retstring = ''
|
||||
listind = 0
|
||||
|
||||
# Cycle through format entries
|
||||
for type in format:
|
||||
# Null Terminated String
|
||||
if (type == 'f' or type == 'P'):
|
||||
retstring = retstring + list[listind] + "\000"
|
||||
# 4 Byte Number
|
||||
if (type == 'd'):
|
||||
retstring = retstring + PackNum(list[listind],4)
|
||||
# 2 Byte Number
|
||||
if (type == 'w'):
|
||||
retstring = retstring + PackNum(list[listind],2)
|
||||
# Pointer Value
|
||||
if (type == 'p'):
|
||||
if (list[listind]):
|
||||
retstring = retstring + PackNum(1,4)
|
||||
else:
|
||||
retstring = retstring + PackNum(0,4)
|
||||
# Buffer and Length
|
||||
if (type == 'B'):
|
||||
# length
|
||||
length = list[listind]
|
||||
retstring = retstring + PackNum(length,4)
|
||||
length = int(length)
|
||||
listind = listind + 1
|
||||
# buffer
|
||||
retstring = retstring + list[listind][:length]
|
||||
|
||||
listind = listind + 1
|
||||
|
||||
return retstring
|
||||
|
||||
def unpack(format,buffer):
|
||||
retlist = []
|
||||
bufind = 0
|
||||
|
||||
lasttype = ""
|
||||
for type in format:
|
||||
# Pointer Value
|
||||
if (type == 'p'):
|
||||
newvalue = UnpackNum(buffer[bufind:bufind+4])
|
||||
bufind = bufind + 4
|
||||
if (newvalue):
|
||||
newvalue = 1L
|
||||
else:
|
||||
newvalue = 0L
|
||||
retlist.append(newvalue)
|
||||
# Previous character till end of data
|
||||
elif (type == '$'):
|
||||
if (lasttype == 'f'):
|
||||
while (bufind < len(buffer)):
|
||||
newstring = ''
|
||||
while (buffer[bufind] != '\000'):
|
||||
newstring = newstring + buffer[bufind]
|
||||
bufind = bufind + 1
|
||||
bufind = bufind + 1
|
||||
retlist.append(newstring)
|
||||
# Null Terminated String
|
||||
elif (type == 'f' or type == 'P'):
|
||||
newstring = ''
|
||||
while (buffer[bufind] != '\000'):
|
||||
newstring = newstring + buffer[bufind]
|
||||
bufind = bufind + 1
|
||||
bufind = bufind + 1
|
||||
retlist.append(newstring)
|
||||
# 4 Byte Number
|
||||
elif (type == 'd'):
|
||||
newvalue = UnpackNum(buffer[bufind:bufind+4])
|
||||
bufind = bufind + 4
|
||||
retlist.append(newvalue)
|
||||
# 2 Byte Number
|
||||
elif (type == 'w'):
|
||||
newvalue = UnpackNum(buffer[bufind:bufind+2])
|
||||
bufind = bufind + 2
|
||||
retlist.append(newvalue)
|
||||
# Length and Buffer
|
||||
elif (type == 'B'):
|
||||
# Length
|
||||
length = UnpackNum(buffer[bufind:bufind+4])
|
||||
bufind = bufind + 4
|
||||
retlist.append(length)
|
||||
length = int(length)
|
||||
# Buffer
|
||||
retlist.append(buffer[bufind:bufind+length])
|
||||
bufind = bufind + length
|
||||
|
||||
lasttype = type
|
||||
|
||||
return ((retlist,buffer[bufind:]))
|
||||
|
||||
def PackNum(myint,size):
|
||||
retstring = ''
|
||||
size = size * 2
|
||||
hint = hex(myint)[2:]
|
||||
|
||||
# Check for long notation
|
||||
if (hint[-1:] == 'L'):
|
||||
hint = hint[:-1]
|
||||
|
||||
addon = size - len(hint)
|
||||
for i in range(0,addon):
|
||||
hint = '0' + hint
|
||||
|
||||
while (size > 0):
|
||||
val = string.atoi(hint[size-2:size],16)
|
||||
retstring = retstring + chr(val)
|
||||
size = size - 2
|
||||
|
||||
return retstring
|
||||
|
||||
def UnpackNum(buffer):
|
||||
size = len(buffer)
|
||||
mystring = ''
|
||||
|
||||
for i in range(size-1,-1,-1):
|
||||
val = hex(ord(buffer[i]))[2:]
|
||||
if (len(val) == 1):
|
||||
val = '0' + val
|
||||
mystring = mystring + val
|
||||
if (len(mystring) > 4):
|
||||
return string.atol(mystring,16)
|
||||
else:
|
||||
return string.atoi(mystring,16)
|
Loading…
x
Reference in New Issue
Block a user