summaryrefslogtreecommitdiff
path: root/docs/docbook/projdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docbook/projdoc')
-rw-r--r--docs/docbook/projdoc/AccessControls.xml436
-rw-r--r--docs/docbook/projdoc/AdvancedNetworkAdmin.xml216
-rw-r--r--docs/docbook/projdoc/Bugs.xml56
-rw-r--r--docs/docbook/projdoc/CUPS-printing.xml6610
-rw-r--r--docs/docbook/projdoc/Compiling.xml211
-rw-r--r--docs/docbook/projdoc/DOMAIN_MEMBER.xml383
-rw-r--r--docs/docbook/projdoc/Diagnosis.xml66
-rw-r--r--docs/docbook/projdoc/Further-Resources.xml99
-rw-r--r--docs/docbook/projdoc/GROUP-MAPPING-HOWTO.xml351
-rw-r--r--docs/docbook/projdoc/Integrating-with-Windows.xml205
-rw-r--r--docs/docbook/projdoc/InterdomainTrusts.xml121
-rw-r--r--docs/docbook/projdoc/IntroSMB.xml46
-rw-r--r--docs/docbook/projdoc/NT4Migration.xml141
-rw-r--r--docs/docbook/projdoc/NetworkBrowsing.xml400
-rw-r--r--docs/docbook/projdoc/Other-Clients.xml116
-rw-r--r--docs/docbook/projdoc/PAM-Authentication-And-Samba.xml893
-rw-r--r--docs/docbook/projdoc/PolicyMgmt.xml456
-rw-r--r--docs/docbook/projdoc/Portability.xml42
-rw-r--r--docs/docbook/projdoc/Problems.xml66
-rw-r--r--docs/docbook/projdoc/ProfileMgmt.xml749
-rw-r--r--docs/docbook/projdoc/SWAT.xml126
-rw-r--r--docs/docbook/projdoc/Samba-BDC-HOWTO.xml70
-rw-r--r--docs/docbook/projdoc/Samba-PDC-HOWTO.xml317
-rw-r--r--docs/docbook/projdoc/ServerType.xml271
-rw-r--r--docs/docbook/projdoc/Speed.xml98
-rw-r--r--docs/docbook/projdoc/StandAloneServer.xml53
-rw-r--r--docs/docbook/projdoc/UNIX_INSTALL.xml44
-rw-r--r--docs/docbook/projdoc/VFS.xml378
-rw-r--r--docs/docbook/projdoc/locking.xml79
-rw-r--r--docs/docbook/projdoc/msdfs_setup.xml135
-rw-r--r--docs/docbook/projdoc/passdb.xml811
-rw-r--r--docs/docbook/projdoc/printer_driver2.xml4007
-rw-r--r--docs/docbook/projdoc/samba-doc.xml32
-rw-r--r--docs/docbook/projdoc/securing-samba.xml467
-rw-r--r--docs/docbook/projdoc/unicode.xml48
-rw-r--r--docs/docbook/projdoc/upgrading-to-3.0.xml30
-rw-r--r--docs/docbook/projdoc/winbind.xml167
37 files changed, 13650 insertions, 5146 deletions
diff --git a/docs/docbook/projdoc/AccessControls.xml b/docs/docbook/projdoc/AccessControls.xml
index 38c3475d34..44780501fe 100644
--- a/docs/docbook/projdoc/AccessControls.xml
+++ b/docs/docbook/projdoc/AccessControls.xml
@@ -9,7 +9,7 @@
<para>
Advanced MS Windows users are frequently perplexed when file, directory and share manipulation of
resources shared via Samba do not behave in the manner they might expect. MS Windows network
-adminstrators are often confused regarding network access controls and what is the best way to
+administrators are often confused regarding network access controls and what is the best way to
provide users with the type of access they need while protecting resources from the consequences
of untoward access capabilities.
</para>
@@ -45,7 +45,7 @@ This is an opportune point to mention that it should be borne in mind that Samba
provide a means of interoperability and interchange of data between two operating environments
that are quite different. It was never the intent to make Unix/Linux like MS Windows NT. Instead
the purpose was an is to provide a sufficient level of exchange of data between the two environments.
-What is available today extends well beyond early plans and expections, yet the gap continues to
+What is available today extends well beyond early plans and expectations, yet the gap continues to
shrink.
</para>
@@ -66,7 +66,7 @@ shrink.
<para>
Samba honours and implements Unix file system access controls. Users
who access a Samba server will do so as a particular MS Windows user.
- This information is passed to the Samba server as part of the logon orr
+ This information is passed to the Samba server as part of the logon or
connection setup process. Samba uses this user identity to validate
whether or not the user should be given access to file system resources
(files and directories). This chapter provides an overview for those
@@ -110,7 +110,7 @@ shrink.
operating system supports them. If not, then this option will not be
available to you. Current Unix technology platforms have native support
for POSIX ACLs. There are patches for the Linux kernel that provide
- this also. Sadly, few Linux paltforms ship today with native ACLs and
+ this also. Sadly, few Linux platforms ship today with native ACLs and
Extended Attributes enabled. This chapter has pertinent information
for users of platforms that support them.
</para>
@@ -142,14 +142,15 @@ at how Samba helps to bridge the differences.
<para>
It is good news that Samba does this to a very large extent and on top of that provides a high degree
of optional configuration to over-ride the default behaviour. We will look at some of these over-rides,
- but for the greater part we will stay withing the bounds of default behaviour. Those wishing to explore
+ but for the greater part we will stay within the bounds of default behaviour. Those wishing to explore
to depths of control ability should review the &smb.conf; man page.
</para>
- <itemizedlist>
- <title>File System Feature Comparison</title>
- <listitem>
- <para><emphasis>Name Space</emphasis></para>
+ <variablelist>
+ <title>File System Feature Comparison</title>
+ <varlistentry>
+ <term>Name Space</term>
+ <listitem>
<para>
MS Windows NT4 / 200x/ XP files names may be up to 254 characters long, Unix file names
may be 1023 characters long. In MS Windows file extensions indicate particular file types,
@@ -158,10 +159,12 @@ at how Samba helps to bridge the differences.
<para>
What MS Windows calls a Folder, Unix calls a directory,
</para>
- </listitem>
+ </listitem>
+ </varlistentry>
- <listitem>
- <para><emphasis>Case Sensitivity</emphasis></para>
+ <varlistentry>
+ <term>Case Sensitivity</term>
+ <listitem>
<para>
MS Windows file names are generally Upper Case if made up of 8.3 (ie: 8 character file name
and 3 character extension. If longer than 8.3 file names are Case Preserving, and Case
@@ -176,28 +179,32 @@ at how Samba helps to bridge the differences.
</para>
<para>
Consider the following, all are unique Unix names but one single MS Windows file name:
- <programlisting>
+ <computeroutput>
MYFILE.TXT
MyFile.txt
myfile.txt
- </programlisting>
+ </computeroutput>
So clearly, In an MS Windows file name space these three files CAN NOT co-exist! But in Unix
they can. So what should Samba do if all three are present? Answer, the one that is lexically
first will be accessible to MS Windows users, the others are invisible and unaccessible - any
other solution would be suicidal.
</para>
- </listitem>
+ </listitem>
+ </varlistentry>
- <listitem>
- <para><emphasis>Directory Separators</emphasis></para>
+ <varlistentry>
+ <term>Directory Separators</term>
+ <listitem>
<para>
MS Windows and DOS uses the back-slash '\' as a directory delimiter, Unix uses the forward-slash '/'
as it's directory delimiter. This is transparently handled by Samba.
</para>
- </listitem>
+ </listitem>
+ </varlistentry>
- <listitem>
- <para><emphasis>Drive Identification</emphasis></para>
+ <varlistentry>
+ <term>Drive Identification</term>
+ <listitem>
<para>
MS Windows products support a notion of drive letters, like <command>C:</command> to represent
disk partitions. Unix has NO concept if separate identifiers for file partitions since each
@@ -205,20 +212,24 @@ at how Samba helps to bridge the differences.
The Unix directory tree begins at '/', just like the root of a DOS drive is specified like
<command>C:\</command>.
</para>
- </listitem>
+ </listitem>
+ </varlistentry>
- <listitem>
- <para><emphasis>File Naming Conventions</emphasis></para>
+ <varlistentry>
+ <term>File Naming Conventions</term>
+ <listitem>
<para>
MS Windows generally never experiences file names that begin with a '.', while in Unix these
are commonly found in a user's home directory. Files that begin with a '.' are typically
either start up files for various Unix applications, or they may be files that contain
start-up configuration data.
</para>
- </listitem>
-
- <listitem>
- <para><emphasis>Links and Short-Cuts</emphasis></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Links and Short-Cuts</term>
+ <listitem>
<para>
MS Windows make use of "links and Short-Cuts" that are actually special types of files that will
redirect an attempt to execute the file to the real location of the file. Unix knows of file and directory
@@ -228,10 +239,11 @@ at how Samba helps to bridge the differences.
Symbolic links are files in Unix that contain the actual location of the data (file OR directory). An
operation (like read or write) will operate directly on the file referenced. Symbolic links are also
referred to as 'soft links'. A hard link is something that MS Windows is NOT familiar with. It allows
- one physical file to be known simulataneously by more than one file name.
+ one physical file to be known simultaneously by more than one file name.
</para>
- </listitem>
- </itemizedlist>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<para>
There are many other subtle differences that may cause the MS Windows administrator some temporary discomfort
@@ -246,13 +258,20 @@ at how Samba helps to bridge the differences.
<para>
There are three basic operations for managing directories, <command>create, delete, rename</command>.
- <programlisting>
- Action MS Windows Command Unix Command
- ------ ------------------ ------------
- create md folder mkdir folder
- delete rd folder rmdir folder
- rename rename oldname newname mv oldname newname
- </programlisting>
+ <table frame="all">
+ <title>Managing directories with unix and windows</title>
+ <tgroup align="center" cols="3">
+ <thead>
+ <row><entry>Action</entry><entry>MS Windows Command</entry><entry>Unix Command</entry></row>
+ </thead>
+
+ <tbody>
+ <row><entry>create</entry><entry>md folder</entry><entry>mkdir folder</entry></row>
+ <row><entry>delete</entry><entry>rd folder</entry><entry>rmdir folder</entry></row>
+ <row><entry>rename</entry><entry>rename oldname newname</entry><entry>mv oldname newname</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
</para>
</sect2>
@@ -268,11 +287,11 @@ at how Samba helps to bridge the differences.
</para>
<para>
- Unix/Linux file and directory access permissions invloves setting three (3) primary sets of data and one (1) control set.
+ Unix/Linux file and directory access permissions involves setting three (3) primary sets of data and one (1) control set.
A Unix file listing looks as follows:-
- <programlisting>
- jht@frodo:~/stuff> ls -la
+ <screen>
+ <prompt>jht@frodo:~/stuff> </prompt><userinput>ls -la</userinput>
total 632
drwxr-xr-x 13 jht users 816 2003-05-12 22:56 .
drwxr-xr-x 37 jht users 3800 2003-05-12 22:29 ..
@@ -293,8 +312,8 @@ at how Samba helps to bridge the differences.
-r-xr-xr-x 1 jht users 206339 2003-05-12 22:32 mydata05.lst
-rw-rw-rw- 1 jht users 41105 2003-05-12 22:32 mydata06.lst
-rwxrwxrwx 1 jht users 19312 2003-05-12 22:32 mydata07.lst
- jht@frodo:~/stuff>
- </programlisting>
+ <prompt>jht@frodo:~/stuff></prompt>
+ </screen>
</para>
<para>
@@ -305,6 +324,7 @@ at how Samba helps to bridge the differences.
The permissions field is made up of:
<programlisting>
+ <comment> JRV: Put this into a diagram of some sort</comment>
[ type ] [ users ] [ group ] [ others ] [File, Directory Permissions]
[ d | l ] [ r w x ] [ r w x ] [ r w x ]
| | | | | | | | | | |
@@ -324,20 +344,24 @@ at how Samba helps to bridge the differences.
<para>
Any bit flag may be unset. An unset bit flag is the equivalent of 'Can NOT' and is represented as a '-' character.
- <programlisting>
- <title>Example File</title>
+
+ <example>
+ <title>Example File</title>
+ <programlisting>
-rwxr-x--- Means: The owner (user) can read, write, execute
the group can read and execute
everyone else can NOT do anything with it
- </programlisting>
+ </programlisting>
+ </example>
+
</para>
<para>
- Additional posibilities in the [type] field are: c = character device, b = block device, p = pipe device, s = Unix Domain Socket.
+ Additional possibilities in the [type] field are: c = character device, b = block device, p = pipe device, s = Unix Domain Socket.
</para>
<para>
- The letters `rwxXst' set permissions for the user, group and others as: read (r), write (w), execute (or access for directories) (x),r
+ The letters `rwxXst' set permissions for the user, group and others as: read (r), write (w), execute (or access for directories) (x),
execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s),
sticky (t).
</para>
@@ -356,7 +380,7 @@ at how Samba helps to bridge the differences.
</para>
<para>
- When a directory is set <command>drw-r-----</command> this means that the owner can read and create (write) files in it, but because
+ When a directory is set <constant>drw-r-----</constant> this means that the owner can read and create (write) files in it, but because
the (x) execute flags are not set files can not be listed (seen) in the directory by anyone. The group can read files in the
directory but can NOT create new files. NOTE: If files in the directory are set to be readable and writable for the group, then
group members will be able to write to (or delete) them.
@@ -379,17 +403,17 @@ Before using any of the following options please refer to the man page for &smb.
<para>
User and group based controls can prove very useful. In some situations it is distinctly desirable to affect all
- file system operations as if a single user is doing this, the use of the <emphasis>force user</emphasis> and
- <emphasis>force group</emphasis> behaviour will achieve this. In other situations it may be necessary to affect a
+ file system operations as if a single user is doing this, the use of the <parameter>force user</parameter> and
+ <parameter>force group</parameter> behaviour will achieve this. In other situations it may be necessary to affect a
paranoia level of control to ensure that only particular authorised persons will be able to access a share or
- it's contents, here the use of the <emphasis>valid users</emphasis> or the <emphasis>invalid users</emphasis> may
+ it's contents, here the use of the <parameter>valid users</parameter> or the <parameter>invalid users</parameter> may
be most useful.
</para>
<para>
As always, it is highly advisable to use the least difficult to maintain and the least ambiguous method for
controlling access. Remember, that when you leave the scene someone else will need to provide assistance and
- if that person finds to great a mess, or if they do not understand what you have done then there is risk of
+ if that person finds too great a mess, or if they do not understand what you have done then there is risk of
Samba being removed and an alternative solution being adopted.
</para>
@@ -482,7 +506,7 @@ Before using any of the following options please refer to the man page for &smb.
The following file and directory permission based controls, if misused, can result in considerable difficulty to
diagnose the cause of mis-configuration. Use them sparingly and carefully. By gradually introducing each one by one
undesirable side-effects may be detected. In the event of a problem, always comment all of them out and then gradually
- re-instroduce them in a controlled fashion.
+ re-introduce them in a controlled fashion.
</para>
<table frame='all'><title>File and Directory Permission Based Controls</title>
@@ -539,13 +563,13 @@ Before using any of the following options please refer to the man page for &smb.
<row>
<entry>hide unreadable</entry>
<entry><para>
- Prevents clients from seeing the existance of files that cannot be read.
+ Prevents clients from seeing the existence of files that cannot be read.
</para></entry>
</row>
<row>
<entry>hide unwriteable files</entry>
<entry><para>
- Prevents clients from seeing the existance of files that cannot be written to. Unwriteable directories are shown as usual.
+ Prevents clients from seeing the existence of files that cannot be written to. Unwriteable directories are shown as usual.
</para></entry>
</row>
<row>
@@ -653,10 +677,10 @@ Before using any of the following options please refer to the man page for &smb.
<para>
This section deals with how to configure Samba per share access control restrictions.
- By default samba sets no restrictions on the share itself. Restrictions on the share itself
+ By default, Samba sets no restrictions on the share itself. Restrictions on the share itself
can be set on MS Windows NT4/200x/XP shares. This can be a very effective way to limit who can
connect to a share. In the absence of specific restrictions the default setting is to allow
- the global user <emphasis>Everyone</emphasis> Full Control (ie: Full control, Change and Read).
+ the global user <constant>Everyone</constant> Full Control (ie: Full control, Change and Read).
</para>
<para>
@@ -669,8 +693,8 @@ Before using any of the following options please refer to the man page for &smb.
<para>
Samba stores the per share access control settings in a file called <filename>share_info.tdb</filename>.
The location of this file on your system will depend on how samba was compiled. The default location
- for samba's tdb files is under <filename>/usr/local/samba/var</filename>. If the <filename>tdbdump</filename>
- utility has been compiled and installed on your system then you can examine the contents of this file
+ for Samba's tdb files is under <filename>/usr/local/samba/var</filename>. If the <filename>tdbdump</filename>
+ utility has been compiled and installed on your system, then you can examine the contents of this file
by: <userinput>tdbdump share_info.tdb</userinput>.
</para>
@@ -678,7 +702,7 @@ Before using any of the following options please refer to the man page for &smb.
<title>Share Permissions Management</title>
<para>
- The best tool for the task is platform dependant. Choose the best tool for your environmemt.
+ The best tool for the task is platform dependant. Choose the best tool for your environment.
</para>
<sect3>
@@ -692,13 +716,13 @@ Before using any of the following options please refer to the man page for &smb.
<procedure>
<title>Instructions</title>
<step><para>
- Launch the NT4 Server Manager, click on the Samba server you want to administer, then from the menu
- select Computer, then click on the Shared Directories entry.
+ Launch the <application>NT4 Server Manager</application>, click on the Samba server you want to administer, then from the menu
+ select <guimenu>Computer</guimenu>, then click on the <guimenuitem>Shared Directories</guimenuitem> entry.
</para></step>
<step><para>
- Now click on the share that you wish to manage, then click on the Properties tab, next click on
- the Permissions tab. Now you can Add or change access control settings as you wish.
+ Now click on the share that you wish to manage, then click on the <guilabel>Properties</guilabel> tab, next click on
+ the <guilabel>Permissions</guilabel> tab. Now you can add or change access control settings as you wish.
</para></step>
</procedure>
@@ -708,14 +732,14 @@ Before using any of the following options please refer to the man page for &smb.
<title>Windows 200x/XP</title>
<para>
- On MS Windows NT4/200x/XP system access control lists on the share itself are set using native
+ On <application>MS Windows NT4/200x/XP</application> system access control lists on the share itself are set using native
tools, usually from filemanager. For example, in Windows 200x: right click on the shared folder,
- then select 'Sharing', then click on 'Permissions'. The default Windows NT4/200x permission allows
- <emphasis>Everyone</emphasis> Full Control on the Share.
+ then select <guimenuitem>Sharing</guimenuitem>, then click on <guilabel>Permissions</guilabel>. The default
+ Windows NT4/200x permission allows <emphasis>Everyone</emphasis> Full Control on the Share.
</para>
<para>
- MS Windows 200x and later all comes with a tool called the 'Computer Management' snap-in for the
+ MS Windows 200x and later all comes with a tool called the <application>Computer Management</application> snap-in for the
Microsoft Management Console (MMC). This tool is located by clicking on <filename>Control Panel ->
Administrative Tools -> Computer Management</filename>.
</para>
@@ -723,21 +747,22 @@ Before using any of the following options please refer to the man page for &smb.
<procedure>
<title>Instructions</title>
<step><para>
- After launching the MMC with the Computer Management snap-in, click on the menu item 'Action',
- select 'Connect to another computer'. If you are not logged onto a domain you will be prompted
+ After launching the MMC with the Computer Management snap-in, click on the menu item <guimenuitem>Action</guimenuitem>,
+ select <guilabel>Connect to another computer</guilabel>. If you are not logged onto a domain you will be prompted
to enter a domain login user identifier and a password. This will authenticate you to the domain.
- If you where already logged in with administrative privilidge this step is not offered.
+ If you where already logged in with administrative privilege this step is not offered.
</para></step>
<step><para>
- If the Samba server is not shown in the Select Computer box, then type in the name of the target
- Samba server in the field 'Name:'. Now click on the [+] next to 'System Tools', then on the [+]
- next to 'Shared Folders' in the left panel.
+ If the Samba server is not shown in the <guilabel>Select Computer</guilabel> box, then type in the name of the target
+ Samba server in the field <guilabel>Name:</guilabel>. Now click on the <guibutton>[+]</guibutton> next to
+ <guilabel>System Tools</guilabel>, then on the <guibutton>[+]</guibutton> next to <guilabel>Shared Folders</guilabel> in the
+ left panel.
</para></step>
<step><para>
Now in the right panel, double-click on the share you wish to set access control permissions on.
- Then click on the tab 'Share Permissions'. It is now possible to add access control entities
+ Then click on the tab <guilabel>Share Permissions</guilabel>. It is now possible to add access control entities
to the shared folder. Do NOT forget to set what type of access (full control, change, read) you
wish to assign for each entry.
</para></step>
@@ -745,10 +770,10 @@ Before using any of the following options please refer to the man page for &smb.
<warning>
<para>
- Be careful. If you take away all permissions from the Everyone user without removing this user
+ Be careful. If you take away all permissions from the <constant>Everyone</constant> user without removing this user
then effectively no user will be able to access the share. This is a result of what is known as
- ACL precidence. ie: Everyone with NO ACCESS means that MaryK who is part of the group Everyone
- will have no access even if this user is given explicit full control access.
+ ACL precedence. ie: Everyone with <emphasis>no access</emphasis> means that MaryK who is part of the group
+ <constant>Everyone</constant> will have no access even if this user is given explicit full control access.
</para>
</warning>
@@ -789,19 +814,19 @@ Before using any of the following options please refer to the man page for &smb.
<para>From an NT4/2000/XP 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 <emphasis>Properties</emphasis> entry at the bottom of
+ on the <guilabel>Properties</guilabel> entry at the bottom of
the menu. This brings up the file properties dialog
- box. Click on the tab <emphasis>Security</emphasis> and you
- will see three buttons, <emphasis>Permissions</emphasis>,
- <emphasis>Auditing</emphasis>, and <emphasis>Ownership</emphasis>.
- The <emphasis>Auditing</emphasis> button will cause either
+ box. Click on the tab <guilabel>Security</guilabel> and you
+ will see three buttons, <guibutton>Permissions</guibutton>,
+ <guibutton>Auditing</guibutton>, and <guibutton>Ownership</guibutton>.
+ The <guibutton>Auditing</guibutton> button will cause either
an error message <errorname>A requested privilege is not held
by the client</errorname> 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 <command>Add</command> button will not currently
+ useful button, the <guibutton>Add</guibutton> button will not currently
allow a list of users to be seen.</para>
</sect2>
@@ -809,7 +834,7 @@ Before using any of the following options please refer to the man page for &smb.
<sect2>
<title>Viewing file ownership</title>
- <para>Clicking on the <command>"Ownership"</command> button
+ <para>Clicking on the <guibutton>Ownership</guibutton> button
brings up a dialog box telling you who owns the given file. The
owner name will be of the form :</para>
@@ -819,14 +844,14 @@ Before using any of the following options please refer to the man page for &smb.
the Samba server, <replaceable>user</replaceable> is the user name of
the UNIX user who owns the file, and <replaceable>(Long name)</replaceable>
is the descriptive string identifying the user (normally found in the
- GECOS field of the UNIX password database). Click on the <command>Close
- </command> button to remove this dialog.</para>
+ GECOS field of the UNIX password database). Click on the
+ <guibutton>Close </guibutton> button to remove this dialog.</para>
<para>If the parameter <parameter>nt acl support</parameter>
is set to <constant>false</constant> then the file owner will
- be shown as the NT user <command>"Everyone"</command>.</para>
+ be shown as the NT user <constant>"Everyone"</constant>.</para>
- <para>The <command>Take Ownership</command> button will not allow
+ <para>The <guibutton>Take Ownership</guibutton> 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
@@ -840,8 +865,8 @@ Before using any of the following options please refer to the man page for &smb.
and allow a user with Administrator privilege connected
to a Samba 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 <emphasis>Seclib
- </emphasis> NT security library written by Jeremy Allison of
+ or Samba drive. This is available as part of the <application>Seclib
+ </application> NT security library written by Jeremy Allison of
the Samba Team, available from the main Samba ftp site.</para>
</sect2>
@@ -849,12 +874,14 @@ Before using any of the following options please refer to the man page for &smb.
<sect2>
<title>Viewing File or Directory Permissions</title>
- <para>The third button is the <command>"Permissions"</command>
+ <para>The third button is the <guibutton>Permissions</guibutton>
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 :</para>
- <para><command>"SERVER\user (Long name)"</command></para>
+ <para><command>"<replaceable>SERVER</replaceable>\
+ <replaceable>user</replaceable>
+ <replaceable>(Long name)</replaceable>"</command></para>
<para>Where <replaceable>SERVER</replaceable> is the NetBIOS name of
the Samba server, <replaceable>user</replaceable> is the user name of
@@ -864,7 +891,7 @@ Before using any of the following options please refer to the man page for &smb.
<para>If the parameter <parameter>nt acl support</parameter>
is set to <constant>false</constant> then the file owner will
- be shown as the NT user <command>"Everyone"</command> and the
+ be shown as the NT user <constant>"Everyone"</constant> and the
permissions will be shown as NT "Full Control".</para>
@@ -875,23 +902,23 @@ Before using any of the following options please refer to the man page for &smb.
<sect3>
<title>File Permissions</title>
- <para>The standard UNIX user/group/world triple and
+ <para>The standard UNIX user/group/world triplet and
the corresponding "read", "write", "execute" permissions
- triples are mapped by Samba into a three element NT ACL
+ triplets 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 <command>Everyone</command>, followed
+ the global NT group <constant>Everyone</constant>, followed
by the list of permissions allowed for UNIX world. The UNIX
owner and group permissions are displayed as an NT
- <command>user</command> icon and an NT <command>local
- group</command> icon respectively followed by the list
+ <guiicon>user</guiicon> icon and an NT <guiicon>local
+ group</guiicon> icon respectively followed by the list
of permissions allowed for the UNIX user and group.</para>
<para>As many UNIX permission sets don't map into common
- NT names such as <command>"read"</command>, <command>
- "change"</command> or <command>"full control"</command> then
- usually the permissions will be prefixed by the words <command>
- "Special Access"</command> in the NT display list.</para>
+ NT names such as <constant>read</constant>, <constant>
+ "change"</constant> or <constant>full control</constant> then
+ usually the permissions will be prefixed by the words <constant>
+ "Special Access"</constant> in the NT display list.</para>
<para>But what happens if the file has no permissions allowed
for a particular UNIX user group or world component ? In order
@@ -910,14 +937,14 @@ Before using any of the following options please refer to the man page for &smb.
<para>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 <command>"RW"</command>
+ in the first set of parentheses in the normal <constant>"RW"</constant>
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.</para>
<para>The second set of directory permissions has no real meaning
- in the UNIX permissions world and represents the <command>
- "inherited"</command> permissions that any file created within
+ in the UNIX permissions world and represents the <constant>
+ inherited</constant> permissions that any file created within
this directory would inherit.</para>
<para>Samba synthesises these inherited permissions for NT by
@@ -931,32 +958,32 @@ Before using any of the following options please refer to the man page for &smb.
<para>Modifying file and directory permissions is as simple
as changing the displayed permissions in the dialog box, and
- clicking the <command>OK</command> button. However, there are
+ clicking the <guibutton>OK</guibutton> 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.</para>
<para>If the parameter <parameter>nt acl support</parameter>
is set to <constant>false</constant> then any attempt to set
- security permissions will fail with an <command>"Access Denied"
- </command> message.</para>
+ security permissions will fail with an <errorname>"Access Denied"
+ </errorname> message.</para>
- <para>The first thing to note is that the <command>"Add"</command>
+ <para>The first thing to note is that the <guibutton>"Add"</guibutton>
button will not return a list of users in Samba (it will give
- an error message of <command>"The remote procedure call failed
- and did not execute"</command>). This means that you can only
+ an error message of <errorname>The remote procedure call failed
+ and did not execute</errorname>). 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.</para>
- <para>If a permission triple (either user, group, or world)
+ <para>If a permission triplet (either user, group, or world)
is removed from the list of permissions in the NT dialog box,
- then when the <command>"OK"</command> button is pressed it will
+ then when the <guibutton>OK</guibutton> 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 <command>"O"</command> 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.</para>
+ you have removed them from a triplet component.</para>
<para>As UNIX supports only the "r", "w" and "x" bits of
an NT ACL then if other NT security attributes such as "Delete
@@ -966,15 +993,15 @@ Before using any of the following options please refer to the man page for &smb.
<para>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 <command>"Replace
- permissions on existing files"</command> checkbox in the NT
- dialog before clicking <command>"OK"</command>.</para>
+ is not what you want you must uncheck the <guilabel>Replace
+ permissions on existing files</guilabel> checkbox in the NT
+ dialog before clicking <guibutton>OK</guibutton>.</para>
<para>If you wish to remove all permissions from a
user/group/world component then you may either highlight the
- component and click the <command>"Remove"</command> button,
- or set the component to only have the special <command>"Take
- Ownership"</command> permission (displayed as <command>"O"
+ component and click the <guibutton>Remove</guibutton> button,
+ or set the component to only have the special <constant>Take
+ Ownership</constant> permission (displayed as <command>"O"
</command>) highlighted.</para>
</sect2>
@@ -984,16 +1011,20 @@ Before using any of the following options please refer to the man page for &smb.
<para>There are four parameters
to control interaction with the standard Samba create mask parameters.
- These are :</para>
+ These are :
- <para><parameter>security mask</parameter></para>
- <para><parameter>force security mode</parameter></para>
- <para><parameter>directory security mask</parameter></para>
- <para><parameter>force directory security mode</parameter></para>
+ <simplelist>
+ <member><parameter>security mask</parameter></member>
+ <member><parameter>force security mode</parameter></member>
+ <member><parameter>directory security mask</parameter></member>
+ <member><parameter>force directory security mode</parameter></member>
+ </simplelist>
- <para>Once a user clicks <command>"OK"</command> to apply the
+ </para>
+
+ <para>Once a user clicks <guibutton>OK</guibutton> 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
+ r/w/x triplet set, and then will check the changed permissions for a
file against the bits set in the <ulink url="smb.conf.5.html#SECURITYMASK">
<parameter>security mask</parameter></ulink> parameter. Any bits that
were changed that are not set to '1' in this parameter are left alone
@@ -1050,12 +1081,15 @@ Before using any of the following options please refer to the man page for &smb.
<para>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 &smb.conf; file in that share specific section :</para>
+ parameters in the &smb.conf; file in that share specific section :
+ </para>
- <para><parameter>security mask = 0777</parameter></para>
- <para><parameter>force security mode = 0</parameter></para>
- <para><parameter>directory security mask = 0777</parameter></para>
- <para><parameter>force directory security mode = 0</parameter></para>
+ <simplelist>
+ <member><parameter>security mask = 0777</parameter></member>
+ <member><parameter>force security mode = 0</parameter></member>
+ <member><parameter>directory security mask = 0777</parameter></member>
+ <member><parameter>force directory security mode = 0</parameter></member>
+ </simplelist>
</sect2>
<sect2>
@@ -1075,13 +1109,13 @@ Before using any of the following options please refer to the man page for &smb.
<para>What this can mean is that if the owner changes the permissions
to allow themselves read access using the security dialog, clicks
- <command>"OK"</command> to get back to the standard attributes tab
- dialog, and then clicks <command>"OK"</command> on that dialog, then
+ <guibutton>OK</guibutton> to get back to the standard attributes tab
+ dialog, and then clicks <guibutton>OK</guibutton> 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 <command>"OK"</command> to get back to the
- attributes dialog you should always hit <command>"Cancel"</command>
- rather than <command>"OK"</command> to ensure that your changes
+ permissions and clicking <guibutton>OK</guibutton> to get back to the
+ attributes dialog you should always hit <guibutton>Cancel</guibutton>
+ rather than <guibutton>OK</guibutton> to ensure that your changes
are not overridden.</para>
</sect2>
</sect1>
@@ -1099,10 +1133,12 @@ are examples taken from the mailing list in recent times.
<title>Users can not write to a public share</title>
<para>
+ <quote>
We are facing some troubles with file / directory permissions. I can log on the domain as admin user(root),
- and theres a public share, on which everyone needs to have permission to create / modify files, but only
+ and there's a public share, on which everyone needs to have permission to create / modify files, but only
root can change the file, no one else can. We need to constantly go to server to
- <command>chgrp -R users *</command> and <command>chown -R nobody *</command> to allow others users to change the file.
+ <userinput>chgrp -R users *</userinput> and <userinput>chown -R nobody *</userinput> to allow others users to change the file.
+ </quote>
</para>
<para>
@@ -1112,77 +1148,99 @@ are examples taken from the mailing list in recent times.
<procedure>
<title>Example Solution:</title>
<step>
- <para>
- Go to the top of the directory that is shared
- </para>
+ <para>
+ Go to the top of the directory that is shared
+ </para>
</step>
<step>
- <para>
- Set the ownership to what ever public owner and group you want
- <programlisting>
- find 'directory_name' -type d -exec chown user.group {}\;
- find 'directory_name' -type d -exec chmod 6775 'directory_name'
- find 'directory_name' -type f -exec chmod 0775 {} \;
- find 'directory_name' -type f -exec chown user.group {}\;
- </programlisting>
- </para>
+ <para>
+ Set the ownership to what ever public owner and group you want
+ <programlisting>
+ find 'directory_name' -type d -exec chown user.group {}\;
+ find 'directory_name' -type d -exec chmod 6775 'directory_name'
+ find 'directory_name' -type f -exec chmod 0775 {} \;
+ find 'directory_name' -type f -exec chown user.group {}\;
+ </programlisting>
+ </para>
- <para>
- Note: The above will set the 'sticky bit' on all directories. Read your
- Unix/Linux man page on what that does. It causes the OS to assign to all
- files created in the directories the ownership of the directory.
- </para>
+ <note><para>
+ The above will set the 'sticky bit' on all directories. Read your
+ Unix/Linux man page on what that does. It causes the OS to assign
+ to all files created in the directories the ownership of the
+ directory.
+ </para></note>
+ </step>
+ <step>
+ <para>
- <para>
- <programlisting>
- Directory is: /foodbar
- chown jack.engr /foodbar
+ Directory is: <replaceable>/foodbar</replaceable>
+ <screen>
+ <prompt>$ </prompt><userinput>chown jack.engr /foodbar</userinput>
+ </screen>
+ </para>
- Note: This is the same as doing:
- chown jack /foodbar
- chgrp engr /foodbar
+ <note><para>
+ <para>This is the same as doing:</para>
+ <screen>
+ <prompt>$ </prompt><userinput>chown jack /foodbar</userinput>
+ <prompt>$ </prompt><userinput>chgrp engr /foodbar</userinput>
+ </screen>
+ </para></note>
+ </step>
+ <step>
+ <para>Now do:
- Now do:
- chmod 6775 /foodbar
- ls -al /foodbar/..
+ <screen>
+ <prompt>$ </prompt><userinput>chmod 6775 /foodbar</userinput>
+ <prompt>$ </prompt><userinput>ls -al /foodbar/..</userinput>
+ </screen>
- You should see:
- drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar
+ </para>
+
+ <para>You should see:
+ <screen>
+ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar
+ </screen>
+ </para>
+ </step>
+ <step>
- Now do:
- su - jill
- cd /foodbar
- touch Afile
- ls -al
- </programlisting>
+ <para>Now do:
+ <screen>
+ <prompt>$ </prompt><userinput>su - jill</userinput>
+ <prompt>$ </prompt><userinput>cd /foodbar</userinput>
+ <prompt>$ </prompt><userinput>touch Afile</userinput>
+ <prompt>$ </prompt><userinput>ls -al</userinput>
+ </screen>
</para>
<para>
- You should see that the file 'Afile' created by Jill will have ownership
+ You should see that the file <filename>Afile</filename> created by Jill will have ownership
and permissions of Jack, as follows:
- <programlisting>
+ <screen>
-rw-r--r-- 1 jack engr 0 2003-02-04 09:57 Afile
- </programlisting>
+ </screen>
</para>
</step>
<step>
<para>
- Now in your smb.conf for the share add:
+ Now in your &smb.conf; for the share add:
<programlisting>
force create mode = 0775
- force direcrtory mode = 6775
+ force directory mode = 6775
</programlisting>
</para>
- <para>
- Note: The above are only needed IF your users are NOT members of the group
+ <note><para>
+ The above are only needed <emphasis>if</emphasis> your users are <emphasis>not</emphasis> members of the group
you have used. ie: Within the OS do not have write permission on the directory.
</para>
-
+ </note>
+
<para>
- An alternative is to set in the smb.conf entry for the share:
+ An alternative is to set in the &smb.conf; entry for the share:
<programlisting>
force user = jack
force group = engr
@@ -1193,6 +1251,16 @@ are examples taken from the mailing list in recent times.
</sect2>
+ <sect2>
+ <title>I have set force user and Samba still makes <emphasis>root</emphasis> 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 <emphasis>root</emphasis>, even if <parameter>force user</parameter> has been set.
+ </para>
+ </sect2>
+
+
</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/AdvancedNetworkAdmin.xml b/docs/docbook/projdoc/AdvancedNetworkAdmin.xml
index e6e7347290..ee1f351e41 100644
--- a/docs/docbook/projdoc/AdvancedNetworkAdmin.xml
+++ b/docs/docbook/projdoc/AdvancedNetworkAdmin.xml
@@ -4,15 +4,34 @@
<pubdate>April 3 2003</pubdate>
</chapterinfo>
-<title>Advanced Network Manangement</title>
+<title>Advanced Network Management</title>
<para>
-This section attempts to document peripheral issues that are of great importance to network
+This section documents peripheral issues that are of great importance to network
administrators who want to improve network resource access control, to automate the user
environment, and to make their lives a little easier.
</para>
<sect1>
+<title>Features and Benefits</title>
+
+<para>
+Often the difference between a working network environment and a well appreciated one can
+best be measured by the <emphasis>little things</emphasis> that makes everything work more
+harmoniously. A key part of every network environment solution is the ability to remotely
+manage MS Windows workstations, to remotely access the Samba server, to provide customised
+logon scripts, as well as other house keeping activities that help to sustain more reliable
+network operations.
+</para>
+
+<para>
+This chapter presents information on each of these area. They are placed here, and not in
+other chapters, for ease of reference.
+</para>
+
+</sect1>
+
+<sect1>
<title>Remote Server Administration</title>
<para>
@@ -20,20 +39,20 @@ environment, and to make their lives a little easier.
</para>
<para>
-Since I don't need to buy an NT4 Server, how do I get the 'User Manager for Domains',
+ Since I don't need to buy an <application>NT4 Server</application>, how do I get the 'User Manager for Domains',
the 'Server Manager'?
</para>
<para>
-Microsoft distributes a version of these tools called nexus for installation on Windows 9x / Me
-systems. The tools set includes:
+Microsoft distributes a version of these tools called nexus for installation
+on <application>Windows 9x / Me</application> systems. The tools set includes:
</para>
-<itemizedlist>
- <listitem><para>Server Manager</para></listitem>
- <listitem><para>User Manager for Domains</para></listitem>
- <listitem><para>Event Viewer</para></listitem>
-</itemizedlist>
+<simplelist>
+ <member>Server Manager</member>
+ <member>User Manager for Domains</member>
+ <member>Event Viewer</member>
+</simplelist>
<para>
Click here to download the archived file <ulink
@@ -41,12 +60,158 @@ url="ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE">ftp://ftp.microsoft.com
</para>
<para>
-The Windows NT 4.0 version of the 'User Manager for
+The <application>Windows NT 4.0</application> version of the 'User Manager for
Domains' and 'Server Manager' are available from Microsoft via ftp
from <ulink url="ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE">ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE</ulink>
</para>
</sect1>
+
+<sect1>
+<title>Remote Desktop Management</title>
+
+<para>
+There are a number of possible remote desktop management solutions that range from free
+through costly. Do not let that put you off. Sometimes the most costly solutions is the
+most cost effective. In any case, you will need to draw your own conclusions as to which
+is the best tool in your network environment.
+</para>
+
+ <sect2>
+ <title>Remote Management from NoMachines.Com</title>
+
+ <para>
+ The following information was posted to the Samba mailing list at Apr 3 23:33:50 GMT 2003.
+ It is presented in slightly edited form (with author details omitted for privacy reasons).
+ The entire answer is reproduced below with some comments removed.
+ </para>
+
+<para>
+<screen>
+&gt; I have a wonderful linux/samba server running as PDC for a network.
+&gt; Now I would like to add remote desktop capabilities so that
+&gt; users outside could login to the system and get their desktop up from
+&gt; home or another country..
+&gt;
+&gt; Is there a way to accomplish this? Do I need a windows terminal server?
+&gt; Do I need to configure it so that it is a member of the domain or a
+&gt; BDC,PDC? Are there any hacks for MS Windows XP to enable remote login
+&gt; even if the computer is in a domain?
+&gt;
+&gt; Any ideas/experience would be appreciated :)
+</screen>
+</para>
+
+ <para>
+ Answer provided: Check out the new offer from NoMachine, "NX" software:
+ <ulink url="http://www.nomachine.com/">http://www.nomachine.com/</ulink>.
+ </para>
+
+ <para>
+ It implements a very easy-to-use interface to the remote X protocol as
+ well as incorporating VNC/RFB and rdesktop/RDP into it, but at a speed
+ performance much better than anything you may have ever seen...
+ </para>
+
+ <para>
+ Remote X is not new at all -- but what they did achieve successfully is
+ a new way of compression and caching technologies which makes the thing
+ fast enough to run even over slow modem/ISDN connections.
+ </para>
+
+ <para>
+ I could test drive their (public) RedHat machine in Italy, over a loaded
+ internet connection, with enabled thumbnail previews in KDE konqueror
+ which popped up immediately on "mouse-over". From inside that (remote X)
+ session I started a rdesktop session on another, a Windows XP machine.
+ To test the performance, I played Pinball. I am proud to announce here
+ that my score was 631750 points at first try...
+ </para>
+
+ <para>
+ NX performs better on my local LAN than any of the other "pure"
+ connection methods I am using from time to time: TightVNC, rdesktop or
+ remote X. It is even faster than a direct crosslink connection between
+ two nodes.
+ </para>
+
+ <para>
+ I even got sound playing from the remote X app to my local boxes, and
+ had a working "copy'n'paste" from an NX window (running a KDE session
+ in Italy) to my Mozilla mailing agent... These guys are certainly doing
+ something right!
+ </para>
+
+ <para>
+ I recommend to test drive NX to anybody with a only a remote interest
+ in remote computing
+ <ulink url="http://www.nomachine.com/testdrive.php">http://www.nomachine.com/testdrive.php</ulink>.
+ </para>
+
+ <para>
+ Just download the free of charge client software (available for RedHat,
+ SuSE, Debian and Windows) and be up and running within 5 minutes (they
+ need to send you your account data, though, because you are assigned
+ a real Unix account on their testdrive.nomachine.com box...
+ </para>
+
+ <para>
+ They plan to get to the point were you can have NX application servers
+ running as a cluster of nodes, and users simply start an NX session locally,
+ and can select applications to run transparently (apps may even run on
+ another NX node, but pretend to be on the same as used for initial login,
+ because it displays in the same window.... well, you also can run it
+ fullscreen, and after a short time you forget that it is a remote session
+ at all).
+ </para>
+
+ <para>
+ Now the best thing at the end: all the core compression and caching
+ technologies are released under the GPL and available as source code
+ to anybody who wants to build on it! These technologies are working,
+ albeit started from the command line only (and very inconvenient to
+ use in order to get a fully running remote X session up and running....)
+ </para>
+
+ <para>
+ To answer your questions:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
+ You don't need to install a terminal server; XP has RDP support built in.
+ </para></listitem>
+
+ <listitem><para>
+ NX is much cheaper than Citrix -- and comparable in performance, probably faster
+ </para></listitem>
+
+ <listitem><para>
+ You don't need to hack XP -- it just works
+ </para></listitem>
+
+ <listitem><para>
+ You log into the XP box from remote transparently (and I think there is no
+ need to change anything to get a connection, even if authentication is against a domain)
+ </para></listitem>
+
+ <listitem><para>
+ The NX core technologies are all Open Source and released under the GPL --
+ you can today use a (very inconvenient) commandline to use it at no cost,
+ but you can buy a comfortable (proprietary) NX GUI frontend for money
+ </para></listitem>
+
+ <listitem><para>
+ NoMachine are encouraging and offering help to OSS/Free Software implementations
+ for such a frontend too, even if it means competition to them (they have written
+ to this effect even to the LTSP, KDE and GNOME developer mailing lists)
+ </para></listitem>
+ </itemizedlist>
+
+ </sect2>
+
+</sect1>
+
<sect1>
<title>Network Logon Script Magic</title>
@@ -62,14 +227,16 @@ There are several opportunities for creating a custom network startup configurat
<simplelist>
<member>No Logon Script</member>
<member>Simple universal Logon Script that applies to all users</member>
- <member>Use of a conditional Logon Script that applies per user or per group attirbutes</member>
+ <member>Use of a conditional Logon Script that applies per user or per group attributes</member>
<member>Use of Samba's Preexec and Postexec functions on access to the NETLOGON share to create
a custom Logon Script and then execute it.</member>
<member>User of a tool such as KixStart</member>
</simplelist>
<para>
-The Samba source code tree includes two logon script generation/execution tools. See <filename>examples</filename> directory <filename>genlogon</filename> and <filename>ntlogon</filename> subdirectories.
+The Samba source code tree includes two logon script generation/execution tools.
+See <filename>examples</filename> directory <filename>genlogon</filename> and
+<filename>ntlogon</filename> subdirectories.
</para>
<para>
@@ -77,7 +244,7 @@ The following listings are from the genlogon directory.
</para>
<para>
-This is the genlogon.pl file:
+This is the <filename>genlogon.pl</filename> file:
<programlisting>
#!/usr/bin/perl
@@ -159,9 +326,9 @@ Those wishing to use more elaborate or capable logon processing system should ch
</para>
<simplelist>
- <member>http://www.craigelachie.org/rhacer/ntlogon</member>
- <member>http://www.kixtart.org</member>
- <member>http://support.microsoft.com/default.asp?scid=kb;en-us;189105</member>
+ <member><ulink url="http://www.craigelachie.org/rhacer/ntlogon">http://www.craigelachie.org/rhacer/ntlogon</ulink></member>
+ <member><ulink url="http://www.kixtart.org">http://www.kixtart.org</ulink></member>
+ <member><ulink url="http://support.microsoft.com/default.asp?scid=kb;en-us;189105">http://support.microsoft.com/default.asp?scid=kb;en-us;189105</ulink></member>
</simplelist>
<sect2>
@@ -174,10 +341,21 @@ Printers may be added automatically during logon script processing through the u
rundll32 printui.dll,PrintUIEntry /?
</programlisting>
-See the documentation in the Microsoft knowledgebase article no: 189105 referred to above.
+See the documentation in the <ulink url="http://support.microsoft.com/default.asp?scid=kb;en-us;189105">Microsoft knowledgebase article no: 189105</ulink>.
</para>
</sect2>
</sect1>
-</chapter>
+<sect1>
+<title>Common Errors</title>
+
+<para>
+The information provided in this chapter has been reproduced from postings on the samba@samba.org
+mailing list. No implied endorsement or recommendation is offered. Administrators should conduct
+their own evaluation of alternatives and are encouraged to draw their own conclusions.
+</para>
+
+</sect1>
+
+</chapter>
diff --git a/docs/docbook/projdoc/Bugs.xml b/docs/docbook/projdoc/Bugs.xml
index d782920457..b2b8d5c67e 100644
--- a/docs/docbook/projdoc/Bugs.xml
+++ b/docs/docbook/projdoc/Bugs.xml
@@ -2,11 +2,7 @@
<chapterinfo>
&author.jelmer;
- <author>
- <affiliation>
- <orgname>Samba Team</orgname>
- </affiliation>
- </author>
+ <author><surname>Someone; Tridge or Karl Auer perhaps?</surname></author>
<pubdate> 27 June 1997 </pubdate>
</chapterinfo>
@@ -15,7 +11,8 @@
<sect1>
<title>Introduction</title>
-<para>Please report bugs using <ulink url="https://bugzilla.samba.org/">bugzilla</ulink>.</para>
+<para>Please report bugs using
+ <ulink url="https://bugzilla.samba.org/">bugzilla</ulink>.</para>
<para>
Please take the time to read this file before you submit a bug
@@ -78,12 +75,12 @@ time, and exactly what the results were.
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
+10 showing the problem may be appropriate. A higher level gives more
detail, but may use too much disk space.
</para>
<para>
-To set the debug level use <command>log level =</command> in your
+To set the debug level use the <parameter>log level</parameter> in your
&smb.conf;. 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:
@@ -100,24 +97,25 @@ then create a file
<filename>/usr/local/samba/lib/smb.conf.<replaceable>machine</replaceable></filename> where
<replaceable>machine</replaceable> is the name of the client you wish to debug. In that file
put any &smb.conf; commands you want, for example
-<command>log level=</command> may be useful. This also allows you to
+<parameter>log level</parameter> may be useful. This also allows you to
experiment with different security systems, protocol levels etc on just
one machine.
</para>
<para>
-The &smb.conf; entry <command>log level =</command>
-is synonymous with the entry <command>debuglevel =</command> that has been
-used in older versions of Samba and is being retained for backwards
+The &smb.conf; entry <parameter>log level</parameter>
+is synonymous with the parameter <parameter>debuglevel</parameter> that has
+been used in older versions of Samba and is being retained for backwards
compatibility of &smb.conf; files.
</para>
<para>
-As the <command>log level =</command> value is increased you will record
+As the <parameter>log level</parameter> 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.
+debugging operations you may not need a setting higher than
+<constant>3</constant>. Nearly
+all bugs can be tracked at a setting of <constant>10</constant>, but be
+prepared for a VERY large volume of log data.
</para>
</sect1>
@@ -126,8 +124,8 @@ large volume of log data.
<title>Internal errors</title>
<para>
-If you get a "INTERNAL ERROR" message in your log files it means that
-Samba got an unexpected signal while running. It is probably a
+If you get a <errorname>INTERNAL ERROR</errorname> message in your log files
+it means that Samba got an unexpected signal while running. It is probably a
segmentation fault and almost certainly means a bug in Samba (unless
you have faulty hardware or system software).
</para>
@@ -151,21 +149,24 @@ files. This file is the most useful tool for tracking down the bug. To
use it you do this:
</para>
-<para><command>gdb smbd core</command></para>
+<screen>
+ <prompt>$ </prompt><userinput>gdb smbd core</userinput>
+</screen>
<para>
adding appropriate paths to smbd and core so gdb can find them. If you
-don't have gdb then try <userinput>dbx</userinput>. Then within the debugger use the
-command <userinput>where</userinput> to give a stack trace of where the problem
-occurred. Include this in your mail.
+don't have gdb then try <userinput>dbx</userinput>. Then within the debugger
+use the command <command>where</command> to give a stack trace of where the
+problem occurred. Include this in your report.
</para>
<para>
-If you know any assembly language then do a <userinput>disass</userinput> of the routine
+If you know any assembly language then do a
+<command>disass</command> 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
+don't know assembly, including this info in the bug report can be
useful.
</para>
</sect1>
@@ -177,8 +178,10 @@ useful.
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 <userinput>gdb smbd <replaceable>PID</replaceable></userinput> where you get <replaceable>PID</replaceable> from
-<application>smbstatus</application>. Then use <userinput>c</userinput> to continue and try to cause the core dump
+to the running process using
+<userinput>gdb smbd <replaceable>PID</replaceable></userinput> where you get
+<replaceable>PID</replaceable> from <application>smbstatus</application>.
+Then use <command>c</command> to continue and try to cause the core dump
using the client. The debugger should catch the fault and tell you
where it occurred.
</para>
@@ -198,4 +201,3 @@ exactly what version you used.
</sect1>
</chapter>
-
diff --git a/docs/docbook/projdoc/CUPS-printing.xml b/docs/docbook/projdoc/CUPS-printing.xml
index 7e302000e6..252da6f4ef 100644
--- a/docs/docbook/projdoc/CUPS-printing.xml
+++ b/docs/docbook/projdoc/CUPS-printing.xml
@@ -1,799 +1,5244 @@
<chapter id="CUPS-printing">
-
<chapterinfo>
- &author.jht;
+
<author>
<firstname>Kurt</firstname><surname>Pfeifle</surname>
<affiliation>
- <address><email>kpfeifle@danka.de</email></address>
+ <orgname> Danka Deutschland GmbH </orgname>
+ <address><email>kpfeifle@danka.de</email></address>
</affiliation>
</author>
- <pubdate> (25 March 2003) </pubdate>
+ <author>
+ <firstname>Ciprian</firstname><surname>Vizitiu</surname>
+ <affiliation>
+ <address><email>CVizitiu@gbif.org</email></address>
+ </affiliation>
+ <contrib>drawings</contrib>
+ </author>
+
+ <pubdate> (3 June 2003) </pubdate>
</chapterinfo>
-<title>CUPS Printing Support</title>
+<title>CUPS Printing Support in Samba 3.0</title>
+
+<sect1>
+
+ <title>Introduction</title>
+
+ <sect2>
+ <title>Features and Benefits</title>
+
+ <para>
+ The Common Unix Print System (<ulink
+ url="http://www.cups.org/">CUPS</ulink>) has become very popular. All
+ big Linux distributions now ship it as their default printing
+ system. But to many it is still a very mystical tool. Normally it
+ "just works" (TM). People tend to regard it as a sort of "black box",
+ which they don't want to look into, as long as it works OK. But once
+ there is a little problem, they are in trouble to find out where to
+ start debugging it. Also, even the most recent and otherwise excellent
+ printed Samba documentation has only limited attention paid to CUPS
+ printing, leaving out important pieces or even writing plain wrong
+ things about it. This demands rectification. But before you dive into
+ this chapter, make sure that you don't forget to refer to the
+ "Classical Printing" chapter also. It contains a lot of information
+ that is relevant for CUPS too.
+ </para>
+
+ <para>
+ CUPS sports quite a few unique and powerful features. While their
+ basic functions may be grasped quite easily, they are also
+ new. Because they are different from other, more traditional printing
+ systems, it is best to try and not apply any prior knowledge about
+ printing upon this new system. Rather try to start understand CUPS
+ from the beginning. This documentation will lead you here to a
+ complete understanding of CUPS, if you study all of the material
+ contained. But lets start with the most basic things first. Maybe this
+ is all you need for now. Then you can skip most of the other
+ paragraphs.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Overview</title>
+
+ <para>
+ CUPS is more than just a print spooling system. It is a complete
+ printer management system that complies with the new IPP
+ (<emphasis>Internet Printing Protocol</emphasis>). IPP is an industry
+ and IETF (<emphasis>Internet Engineering Task Force</emphasis>)
+ standard for network printing. Many of its functions can be managed
+ remotely (or locally) via a web browser (giving you a
+ platform-independent access to the CUPS print server). In addition it
+ has the traditional commandline and several more modern GUI interfaces
+ (GUI interfaces developed by 3rd parties, like KDE's
+ overwhelming <ulink
+ url="http://printing.kde.org/">KDEPrint</ulink>).
+ </para>
+
+ <para>
+ CUPS allows creation of "raw" printers (ie: NO print file
+ format translation) as well as "smart" printers (i.e. CUPS does
+ file format conversion as required for the printer). In many ways
+ this gives CUPS similar capabilities to the MS Windows print
+ monitoring system. Of course, if you are a CUPS advocate, you would
+ argue that CUPS is better! In any case, let us now move on to
+ explore how one may configure CUPS for interfacing with MS Windows
+ print clients via Samba.
+ </para>
+ </sect2>
+</sect1>
+
+<sect1>
+ <title>Basic Configuration of CUPS support</title>
+
+ <para>
+ Printing with CUPS in the most basic <filename>smb.conf</filename>
+ setup in Samba 3.0 (as was true for 2.2.x) only needs two
+ settings: <parameter>printing = cups</parameter> and <parameter>printcap
+ = cups</parameter>. CUPS itself doesn't need a printcap file
+ anymore. However, the <filename>cupsd.conf</filename> configuration
+ file knows two related directives: they control if such a file should
+ be automatically created and maintained by CUPS for the convenience of
+ third party applications (example: <parameter>Printcap
+ /etc/printcap</parameter> and <parameter>PrintcapFormat
+ BSD</parameter>). These legacy programs often require the existence of
+ printcap file containing printernames or they will refuse to
+ print. Make sure CUPS is set to generate and maintain a printcap! For
+ details see <command>man cupsd.conf</command> and other CUPS-related
+ documentation, like the wealth of documents on your CUPS server
+ itself: <ulink
+ url="http://localhost:631/documentation.html">http://localhost:631/documentation.html</ulink>.
+ </para>
+
+ <sect2>
+ <title>Linking of smbd with libcups.so</title>
+
+ <para>
+ Samba has a very special relationship to CUPS. The reason is: Samba
+ can be compiled with CUPS library support. Most recent installations
+ have this support enabled, and per default CUPS linking is compiled
+ into smbd and other Samba binaries. Of course, you can use CUPS even
+ if Samba is not linked against <filename>libcups.so</filename> -- but
+ there are some differences in required or supported configuration
+ then.
+ </para>
+
+ <para>
+ If SAMBA is compiled against libcups, then <parameter>printcap =
+ cups</parameter> uses the CUPS API to list printers, submit jobs,
+ query queues, etc. Otherwise it maps to the System V commands with an
+ additional <command>-oraw</command> option for printing. On a Linux
+ system, you can use the <command>ldd</command> utility to find out
+ details (ldd may not be present on other OS platforms, or its function
+ may be embodied by a different command):
+ </para>
+
+ <para><screen>
+ transmeta:/home/kurt # ldd `which smbd`
+ libssl.so.0.9.6 =&gt; /usr/lib/libssl.so.0.9.6 (0x4002d000)
+ libcrypto.so.0.9.6 =&gt; /usr/lib/libcrypto.so.0.9.6 (0x4005a000)
+ libcups.so.2 =&gt; /usr/lib/libcups.so.2 (0x40123000)
+ [....]
+ </screen></para>
+
+ <para>
+ The line <computeroutput>libcups.so.2 =&gt; /usr/lib/libcups.so.2
+ (0x40123000)</computeroutput> shows there is CUPS support compiled
+ into this version of Samba. If this is the case, and printing = cups
+ is set, then <emphasis>any otherwise manually set print command in
+ <filename>smb.conf</filename> is ignored</emphasis>. This is an
+ important point to remember!
+ </para>
+
+ <tip><para> Should you require -- for any reason -- to set your own
+ print commands, you can still do this by setting <parameter>printing =
+ sysv</parameter>. However, you'll loose all the benefits from the
+ close CUPS/Samba integration. You are on your own then to manually
+ configure the rest of the printing system commands (most important:
+ <parameter>print command</parameter>; other commands are
+ <parameter>lppause command, lpresume command, lpq command, lprm
+ command, queuepause command </parameter> and <parameter>queue resume
+ command</parameter>).</para></tip>
+ </sect2>
+
+ <sect2>
+ <title>Simple <filename>smb.conf</filename> Settings for CUPS</title>
+
+ <para>
+ To summarize, here is the simplest printing-related setup
+ for <filename>smb.conf</filename> to enable basic CUPS support:
+ </para>
+
+ <para><screen>
+
+ [global]
+ load printers = yes
+ printing = cups
+ printcap name = cups
+
+ [printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+ public = yes
+ guest ok = yes
+ writable = no
+ printable = yes
+ printer admin = root, @ntadmins
+
+ </screen></para>
+
+ <para>
+ This is all you need for basic printing setup for CUPS. It will print
+ all Graphic, Text, PDF and PostScript file submitted from Windows
+ clients. However, most of your Windows users would not know how to
+ send these kind of files to print without opening a GUI
+ application. Windows clients tend to have local printer drivers
+ installed. And the GUI application's print buttons start a printer
+ driver. Your users also very rarely send files from the command
+ line. Unlike UNIX clients, they hardly submit graphic, text or PDF
+ formatted files directly to the spooler. They nearly exclusively print
+ from GUI applications, with a "printer driver" hooked in between the
+ applications native format and the print data stream. If the backend
+ printer is not a PostScript device, the print data stream is "binary",
+ sensible only for the target printer. Read on to learn which problem
+ this may cause and how to avoid it.
+ </para>
+ </sect2>
+
+<sect2>
+<title>More complex <filename>smb.conf</filename> Settings for
+CUPS</title>
+
+<para>
+Here is a slightly more complex printing-related setup
+for <filename>smb.conf</filename>. It enables general CUPS printing
+support for all printers, but defines one printer share which is set
+up differently.
+</para>
+
+<para><screen>
+<![CDATA[
+ [global]
+ printing = cups
+ printcap name = cups
+ load printers = yes
+
+ [printers]
+ comment = All Printers
+ path = /var/spool/samba
+ public = yes
+ guest ok = yes
+ writable = no
+ printable = yes
+ printer admin = root, @ntadmins
+
+ [special_printer]
+ comment = A special printer with his own settings
+ path = /var/spool/samba-special
+ printing = sysv
+ printcap = lpstat
+ print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ;\
+ echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ;\
+ echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log :\
+ rm %f
+ public = no
+ guest ok = no
+ writeable = no
+ printable = yes
+ printer admin = kurt
+ hosts deny = 0.0.0.0
+ hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60
+]]>
+</screen></para>
+
+<para>
+This special share is only there for my testing purposes. It doesn't
+even write the print job to a file. It just logs the job parameters
+known to Samba into the <filename>/tmp/smbprn.log</filename> file and
+deletes the jobfile. Moreover, the <parameter>printer
+admin</parameter> of this share is "kurt" (not the "@ntadmins" group);
+guest access is not allowed; the share isn't announced in Network
+Neighbourhood (so you need to know it is there), and it is only
+allowing access from three hosts. To prevent CUPS kicking in and
+taking over the print jobs for that share, we need to set
+<parameter>printing = sysv</parameter> and <parameter>printcap =
+lpstat</parameter>.
+</para>
+</sect2>
+</sect1>
<sect1>
-<title>Introduction</title>
-
+<title>Advanced Configuration</title>
+
+<para>
+Before we dive into all the configuration options, let's clarify a few
+points. <emphasis>Network printing needs to be organized and setup
+correctly</emphasis>. Often this is not done correctly. Legacy systems
+or small LANs in business environments often lack a clear design and
+good housekeeping.
+</para>
+
+<sect2>
+<title>Central spooling vs. "Peer-to-Peer" printing</title>
+
+<para>
+Many small office or home networks, as well as badly organized larger
+environments, allow each client a direct access to available network
+printers. Generally, this is a bad idea. It often blocks one client's
+access to the printer when another client's job is printing. It also
+might freeze the first client's application while it is waiting to get
+rid of the job. Also, there are frequent complaints about various jobs
+being printed with their pages mixed with each other. A better concept
+is the usage of a "print server": it routes all jobs through one
+central system, which responds immediately, takes jobs from multiple
+concurrent clients at the same time and in turn transfers them to the
+printer(s) in the correct order.
+</para>
+</sect2>
+
+<sect2>
+<title>CUPS/Samba as a "spooling-only" Print Server; "raw" printing
+with Vendor Drivers on Windows Clients</title>
+
+<para>
+Most traditionally configured Unix print servers acting on behalf of
+Samba's Windows clients represented a really simple setup. Their only
+task was to manage the "raw" spooling of all jobs handed to them by
+Samba. This approach meant that the Windows clients were expected to
+prepare the print job file in such a way that it became fit to be fed to
+the printing device. Here a native (vendor-supplied) Windows printer
+driver for the target device needed to be installed on each and every
+client.
+</para>
+
<para>
-The Common Unix Print System (CUPS) has become very popular, but to many it is
-a very mystical tool. There is a great deal of uncertainty regarding CUPS and how
-it works. The result is seen in a large number of posting on the samba mailing lists
-expressing frustration when MS Windows printers appear not to work with a CUPS
-backr-end.
+Of course you can setup CUPS, Samba and your Windows clients in the
+same, traditional and simple way. When CUPS printers are configured
+for RAW print-through mode operation it is the responsibility of the
+Samba client to fully render the print job (file). The file must be
+sent in a format that is suitable for direct delivery to the
+printer. Clients need to run the vendor-provided drivers to do
+this. In this case CUPS will NOT do any print file format conversion
+work.
</para>
+</sect2>
+
+<sect2>
+<title>Driver Installation Methods on Windows Clients</title>
<para>
-This is a good time to point out how CUPS can be used and what it does. CUPS is more
-than just a print spooling system - it is a complete printer management system that
-complies with HTTP and IPP protocols. It can be managed remotely via a web browser
-and it can print using http and ipp protocols.
+The printer drivers on the Windows clients may be installed
+in two functionally different ways:
</para>
+<itemizedlist>
+<listitem><para>manually install the drivers locally on each client,
+one by one; this yields the old <emphasis>LanMan</emphasis> style
+printing; it uses a <filename>\\sambaserver\printershare</filename>
+type of connection.</para></listitem>
+
+<listitem><para>deposit and prepare the drivers (for later download) on
+the print server (Samba); this enables the clients to use
+"Point'n'Print" to get drivers semi-automatically installed the
+first time they access the printer; with this method NT/2K/XP
+clients use the <emphasis>SPOOLSS/MS-RPC</emphasis>
+type printing calls.</para></listitem>
+</itemizedlist>
+
<para>
-CUPS allows to creation of RAW printers (ie: NO file format translation) as well as
-SMART printers (ie: CUPS does file format conversion as required for the printer). In
-many ways this gives CUPS similar capabilities to the MS Windows print monitoring
-system. Of course, if you are a CUPS advocate, you would agrue that CUPS is better!
-In any case, let us now move on to explore how one may configure CUPS for interfacing
-with MS Windows print clients via Samba.
+The second method is recommended for use over the first.
</para>
+</sect2>
+
+<sect2>
+<title>Explicitly enable "raw" printing for
+<emphasis>application/octet-stream</emphasis>!</title>
<para>
-<ulink url="http://www.cups.org/">CUPS</ulink> is a newcomer in the UNIX printing scene,
-which has convinced many people upon first trial already. However, it has quite a few
-new features, which make it different from other, more traditional printing systems.
+If you use the first option (drivers are installed on the client
+side), there is one setting to take care of: CUPS needs to be told
+that it should allow "raw" printing of deliberate (binary) file
+formats. The CUPS files that need to be correctly set for RAW mode
+printers to work are:
</para>
+<itemizedlist>
+<listitem><para>/etc/cups/mime.types
+</para></listitem>
+
+<listitem><para>/etc/cups/mime.convs</para></listitem>
+</itemizedlist>
+
+<para>
+Both contain entries (at the end of the respective files) which must
+be uncommented to allow RAW mode operation.
+In<filename>/etc/cups/mime.types</filename> make sure this line is
+present:
+</para>
+
+<para><screen>
+
+ application/octet-stream
+
+</screen></para>
+
+<para>
+In <filename>/etc/cups/mime.convs</filename>,
+have this line:
+</para>
+
+<para><screen>
+
+ application/octet-stream application/vnd.cups-raw 0 -
+
+</screen></para>
+
+<para>
+If these two files are not set up correctly for raw Windows client
+printing, you may encounter the dreaded <computeroutput>Unable to
+convert file 0</computeroutput> in your CUPS error_log file.
+</para>
+
+<note><para>editing the <filename>mime.convs</filename> and the
+<filename>mime.types</filename> file does not
+<emphasis>enforce</emphasis> "raw" printing, it only
+<emphasis>allows</emphasis> it.
+</para></note>
+
+<formalpara><title>Background</title>
+
+<para>
+CUPS being a more security-aware printing system than traditional ones
+does not by default allow a user to send deliberate (possibly binary)
+data to printing devices. This could be easily abused to launch a
+"Denial of Service" attack on your printer(s), causing at the least
+the loss of a lot of paper and ink. "Unknown" data are tagged by CUPS
+as <emphasis>MIME type: application/octet-stream</emphasis> and not
+allowed to go to the printer. By default, you can only send other
+(known) MIME types "raw". Sending data "raw" means that CUPS does not
+try to convert them and passes them to the printer untouched (see next
+chapter for even more background explanations).
+</para>
+</formalpara>
+
+<para>
+This is all you need to know to get the CUPS/Samba combo printing
+"raw" files prepared by Windows clients, which have vendor drivers
+locally installed. If you are not interested in background information about
+more advanced CUPS/Samba printing, simply skip the remaining sections
+of this chapter.
+</para>
+</sect2>
+
+<sect2>
+<title>Three familiar Methods for driver upload plus a new one</title>
+
+<para>
+If you want to use the MS-RPC type printing, you must upload the
+drivers onto the Samba server first (<parameter>[print$]</parameter>
+share). For a discussion on how to deposit printer drivers on the
+Samba host (so that the Windows clients can download and use them via
+"Point'n'Print") please also refer to the previous chapter of this
+HOWTO Collection. There you will find a description or reference to
+three methods of preparing the client drivers on the Samba server:
+</para>
+
+<itemizedlist>
+<listitem><para>the GUI, "Add Printer Wizard"
+<emphasis>upload-from-a-Windows-client</emphasis>
+method;</para></listitem>
+
+<listitem><para>the commandline, "smbclient/rpcclient"
+<emphasis>upload-from-a-UNIX-workstation</emphasis>
+method;</para></listitem>
+
+<listitem><para>the <emphasis>Imprints</emphasis> Toolset
+method.</para></listitem>
+</itemizedlist>
+
+<para>
+These 3 methods apply to CUPS all the same. A new and more
+convenient way to load the Windows drivers into Samba is provided
+provided if you use CUPS:
+</para>
+
+<itemizedlist>
+<listitem><para>the <emphasis>cupsaddsmb</emphasis>
+utility.</para></listitem>
+</itemizedlist>
+
+<para>
+cupsaddsmb is discussed in much detail further below. But we will
+first explore the CUPS filtering system and compare the Windows and
+UNIX printing architectures.
+</para>
+</sect2>
</sect1>
<sect1>
-<title>Configuring &smb.conf; for CUPS</title>
+<title>Using CUPS/Samba in an advanced Way -- intelligent printing
+with PostScript Driver Download</title>
<para>
-Printing with CUPS in the most basic &smb.conf;
-setup in Samba-3 only needs two settings: <command>printing = cups</command> and
-<command>printcap = cups</command>. While CUPS itself doesn't need a printcap
-anymore, the <filename>cupsd.conf</filename> configuration file knows two directives
-(example: <command>Printcap /etc/printcap</command> and <command>PrintcapFormat
-BSD</command>), which control if such a file should be created for the
-convenience of third party applications. Make sure it is set! For details see
-<command>man cupsd.conf</command> and other CUPS-related documentation.
+Still reading on? Good. Let's go into more detail then. We now know
+how to set up a "dump" printserver, that is, a server which is spooling
+printjobs "raw", leaving the print data untouched.
</para>
<para>
-If SAMBA is compiled against libcups, then <command>printcap = cups</command> uses the
-CUPS API to list printers, submit jobs, etc. Otherwise it maps to the System V commands
-with an additional <parameter>-oraw</parameter> option for printing. On a Linux system,
-you can use the <command>ldd</command> command to find out details (ldd may not be
-present on other OS platforms, or its function may be embodied by a different command):
+Possibly you need to setup CUPS in a more smart way. The reasons could
+be manifold:
</para>
+<itemizedlist>
+<listitem><para>Maybe your boss wants to get monthly statistics: Which
+printer did how many pages? What was the average data size of a job?
+What was the average print run per day? What are the typical hourly
+peaks in printing? Which departments prints how
+much?</para></listitem>
+
+<listitem><para>Maybe you are asked to setup a print quota system:
+users should not be able to print more jobs, once they have surpassed
+a given limit per period?</para></listitem>
+
+<listitem><para>Maybe your previous network printing setup is a mess
+and shall be re-organized from a clean beginning?</para></listitem>
+
+<listitem><para>Maybe you have experiencing too many "Blue Screens",
+originating from poorly debugged printer drivers running in NT "kernel
+mode"?</para></listitem>
+</itemizedlist>
+
<para>
-<programlisting>transmeta:/home/kurt # ldd `which smbd`
- libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000)
- libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000)
- libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000)
- libdl.so.2 => /lib/libdl.so.2 (0x401e8000)
- libnsl.so.1 => /lib/libnsl.so.1 (0x401ec000)
- libpam.so.0 => /lib/libpam.so.0 (0x40202000)
- libc.so.6 => /lib/libc.so.6 (0x4020b000)
- /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)
-</programlisting></para>
+These goals cannot be achieved by a raw print server. To build a
+server meeting these requirements, you'll first need to learn about
+how CUPS works and how you can enable its features.
+</para>
<para>
-The line "libcups.so.2 =&gt; /usr/lib/libcups.so.2
-(0x40123000)" shows there is CUPS support compiled into this version of
-Samba. If this is the case, and <command>printing = cups</command> is set, then any
-otherwise manually set print command in &smb.conf; is ignored.
+What follows is the comparison of some fundamental concepts for
+Windows and Unix printing; then is the time for a description of the
+CUPS filtering system, how it works and how you can tweak it.
</para>
+
+<sect2>
+<title>GDI on Windows -- PostScript on Unix</title>
+
+<para>
+Network printing is one of the most complicated and error-prone
+day-to-day tasks any user or an administrator may encounter. This is
+true for all OS platforms. And there are reasons for this.
+</para>
+
+<para>
+You can't expect for most file formats to just throw them towards
+printers and they get printed. There needs to be a file format
+conversion in between. The problem is: there is no common standard for
+print file formats across all manufacturers and printer types. While
+<emphasis>PostScript</emphasis> (trademark held by Adobe), and, to an
+extent, <emphasis>PCL</emphasis> (trademark held by HP), have developed
+into semi-official "standards", by being the most widely used PDLs
+(<emphasis>Page Description Languages</emphasis>), there are still
+many manufacturers who "roll their own" (their reasons may be
+unacceptable license fees for using printer-embedded PostScript
+interpreters, etc.).
+</para>
+</sect2>
+
+<sect2>
+<title>Windows Drivers, GDI and EMF</title>
+
+<para>
+In Windows OS, the format conversion job is done by the printer
+drivers. On MS Windows OS platforms all application programmers have
+at their disposal a built-in API, the GDI (<emphasis>Graphical Device
+Interface</emphasis>), as part and parcel of the OS itself, to base
+themselves on. This GDI core is used as one common unified ground, for
+all Windows programs, to draw pictures, fonts and documents
+<emphasis>on screen</emphasis> as well as <emphasis>on
+paper</emphasis> (=print). Therefore printer driver developers can
+standardize on a well-defined GDI output for their own driver
+input. Achieving WYSIWYG ("What You See Is What You Get") is
+relatively easy, because the on-screen graphic primitives, as well as
+the on-paper drawn objects, come from one common source. This source,
+the GDI, produces often a file format called EMF (<emphasis>Enhanced
+MetaFile</emphasis>). The EMF is processed by the printer driver and
+converted to the printer-specific file format.
+</para>
+
+<note><para>
+To the GDI foundation in MS Windows, Apple has chosen to
+put paper and screen output on a common foundation for their
+(BSD-Unix-based, did you know??) Mac OS X and Darwin Operating
+Systems.Their <emphasis>Core Graphic Engine</emphasis> uses a
+<emphasis>PDF</emphasis> derivate for all display work.
+</para></note>
+
+<para>
+
+<figure><title>Windows Printing to a local Printer</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/1small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/1small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+</sect2>
+
+<sect2>
+<title>Unix Printfile Conversion and GUI Basics</title>
+
+<para>
+In Unix and Linux, there is no comparable layer built into the OS
+kernel(s) or the X (screen display) server. Every application is
+responsible for itself to create its print output. Fortunately, most
+use PostScript. That gives at least some common ground. Unfortunately,
+there are many different levels of quality for this PostScript. And
+worse: there is a huge difference (and no common root) in the way how
+the same document is displayed on screen and how it is presented on
+paper. WYSIWYG is more difficult to achieve. This goes back to the
+time decades ago, when the predecessors of <emphasis>X.org</emphasis>,
+designing the UNIX foundations and protocols for Graphical User
+Interfaces refused to take over responsibility for "paper output"
+also, as some had demanded at the time, and restricted itself to
+"on-screen only". (For some years now, the "Xprint" project has been
+under development, attempting to build printing support into the X
+framework, including a PostScript and a PCL driver, but it is not yet
+ready for prime time.) You can see this unfavorable inheritance up to
+the present day by looking into the various "font" directories on your
+system; there are separate ones for fonts used for X display and fonts
+to be used on paper.
+</para>
+
+<formalpara>
+<title>Background</title>
+
+<para>
+The PostScript programming language is an "invention" by Adobe Inc.,
+but its specifications have been published to the full. Its strength
+lies in its powerful abilities to describe graphical objects (fonts,
+shapes, patterns, lines, curves, dots...), their attributes (color,
+linewidth...) and the way to manipulate (scale, distort, rotate,
+shift...) them. Because of its open specification, anybody with the
+skill can start writing his own implementation of a PostScript
+interpreter and use it to display PostScript files on screen or on
+paper. Most graphical output devices are based on the concept of
+"raster images" or "pixels" (one notable exception are pen
+plotters). Of course, you can look at a PostScript file in its textual
+form and you will be reading its PostScript code, the language
+instructions which need to be interpreted by a rasterizer. Rasterizers
+produce pixel images, which may be displayed on screen by a viewer
+program or on paper by a printer.
+</para>
+</formalpara>
+</sect2>
+
+<sect2>
+<title>PostScript and Ghostscript</title>
+
+<para>
+So, Unix is lacking a common ground for printing on paper and
+displaying on screen. Despite this unfavorable legacy for Unix, basic
+printing is fairly easy: if you have PostScript printers at your
+disposal! The reason is: these devices have a built-in PostScript
+language "interpreter", also called a <emphasis>Raster Image
+Processor</emphasis> (RIP), (which makes them more expensive than
+other types of printers); throw PostScript towards them, and they will
+spit out your printed pages. Their RIP is doing all the hard work of
+converting the PostScript drawing commands into a bitmap picture as
+you see it on paper, in a resolution as done by your printer. This is
+no different to PostScript printing of a file from a Windows origin.
+</para>
+
+<note><para>Traditional Unix programs and printing systems -- while
+using PostScript -- are largely not PPD-aware. PPDs are "PostScript
+Printer Description" files. They enable you to specify and control all
+options a printer supports: duplexing, stapling, punching... Therefore
+Unix users for a long time couldn't choose many of the supported
+device and job options, unlike Windows or Apple users. But now there
+is CUPS.... ;-)
+</para>
+</note>
+
+<para>
+<figure><title>Printing to a Postscript Printer</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/2small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/2small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<para>
+However, there are other types of printers out there. These don't know
+how to print PostScript. They use their own <emphasis>Page Description
+Language</emphasis> (PDL, often proprietary). To print to them is much
+more demanding. Since your Unix applications mostly produce
+PostScript, and since these devices don't understand PostScript, you
+need to convert the printfiles to a format suitable for your printer
+on the host, before you can send it away.
+</para>
+</sect2>
+
+<sect2>
+<title>Ghostscript -- the Software RIP for non-PostScript Printers</title>
+
+<para>
+Here is where <emphasis>Ghostscript</emphasis> kicks in. Ghostscript is
+the traditional (and quite powerful) PostScript interpreter used on
+Unix platforms. It is a RIP in software, capable to do a
+<emphasis>lot</emphasis> of file format conversions, for a very broad
+spectrum of hardware devices as well as software file formats.
+Ghostscript technology and drivers is what enables PostScript printing
+to non-PostScript hardware.
+</para>
+
+<para>
+<figure><title>Ghostscript as a RIP for non-postscript printers</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/3small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/3small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<tip><para>
+Use the "gs -h" command to check for all built-in "devices" of your
+Ghostscript version. If you specify e.g. a parameter of
+<parameter>-sDEVICE=png256</parameter> on your Ghostscript command
+line, you are asking Ghostscript to convert the input into a PNG
+file. Naming a "device" on the commandline is the most important
+single parameter to tell Ghostscript how exactly it should render the
+input. New Ghostscript versions are released at fairly regular
+intervals, now by artofcode LLC. They are initially put under the
+"AFPL" license, but re-released under the GNU GPL as soon as the next
+AFPL version appears. GNU Ghostscript is probably the version
+installed on most Samba systems. But it has got some
+deficiencies. Therefore ESP Ghostscript was developed as an
+enhancement over GNU Ghostscript, with lots of bug-fixes, additional
+devices and improvements. It is jointly maintained by developers from
+CUPS, Gimp-Print, MandrakeSoft, SuSE, RedHat and Debian. It includes
+the "cups" device (essential to print to non-PS printers from CUPS).
+</para></tip>
+</sect2>
+
+<sect2>
+<title>PostScript Printer Description (PPD) Specification</title>
+
+<para>
+While PostScript in essence is a <emphasis>Page Description
+Language</emphasis> (PDL) to represent the page layout in a
+<emphasis>device independent</emphasis> way, real world print jobs are
+always ending up to be output on a hardware with device-specific
+features. To take care of all the differences in hardware, and to
+allow for innovations, Adobe has specified a syntax and file format
+for <emphasis>PostScript Printer Description</emphasis> (PPD)
+files. Every PostScript printer ships with one of these files.
+</para>
+
+<para>
+PPDs contain all information about general and special features of the
+given printer model: Which different resolutions can it handle? Does
+it have a Duplexing Unit? How many paper trays are there? What media
+types and sizes does it take? For each item it also names the special
+command string to be sent to the printer (mostly inside the PostScript
+file) in order to enable it.
+</para>
+
+<para>
+Information from these PPDs is meant to be taken into account by the
+printer drivers. Therefore, installed as part of the Windows
+PostScript driver for a given printer is the printer's PPD. Where it
+makes sense, the PPD features are presented in the drivers' UI dialogs
+to display to the user as choice of print options. In the end, the
+user selections are somehow written (in the form of special
+PostScript, PJL, JCL or vendor-dependent commands) into the PostScript
+file created by the driver.
+</para>
+
+<warning><para>
+A PostScript file that was created to contain device-specific commands
+for achieving a certain print job output (e.g. duplexed, stapled and
+punched) on a specific target machine, may not print as expected, or
+may not be printable at all on other models; it also may not be fit
+for further processing by software (e.g. by a PDF distilling program).
+</para></warning>
+</sect2>
+
+<sect2>
+<title>CUPS can use all Windows-formatted Vendor PPDs</title>
+
+<para>
+CUPS can handle all spec-compliant PPDs as supplied by the
+manufacturers for their PostScript models. Even if a
+Unix/Linux-illiterate vendor might not have mentioned our favorite
+OS in his manuals and brochures -- you can safely trust this:
+<emphasis>if you get hold of the Windows NT version of the PPD, you
+can use it unchanged in CUPS</emphasis> and thus access the full
+power of your printer just like a Windows NT user could!
+</para>
+
+<tip><para>
+To check the spec compliance of any PPD online, go to <ulink
+url="http://www.cups.org/testppd.php">http://www.cups.org/testppd.php</ulink>
+and upload your PPD. You will see the results displayed
+immediately. CUPS in all versions after 1.1.19 has a much more strict
+internal PPD parsing and checking code enabled; in case of printing
+trouble this online resource should be one of your first pitstops.
+</para></tip>
+
+<warning><para>
+For real PostScript printers <emphasis>don't</emphasis> use the
+<emphasis>Foomatic</emphasis> or <emphasis>cupsomatic</emphasis>
+PPDs from Linuxprinting.org. With these devices the original
+vendor-provided PPDs are always the first choice!
+</para></warning>
+
+<tip><para>
+If you are looking for an original vendor-provided PPD of a specific
+device, and you know that an NT4 box (or any other Windows box) on
+your LAN has the PostScript driver installed, just use
+<command>smbclient //NT4-box/print\$ -U username</command> to
+access the Windows directory where all printer driver files are
+stored. First look in the <filename>W32X86/2</filename> subdir for
+the PPD you are seeking.
+</para></tip>
+</sect2>
+
+<sect2>
+<title>CUPS also uses PPDs for non-PostScript Printers</title>
+
+<para>
+CUPS also uses specially crafted PPDs to handle non-PostScript
+printers. These PPDs are usually not available from the vendors (and
+no, you can't just take the PPD of a Postscript printer with the same
+model name and hope it works for the non-PostScript version too). To
+understand how these PPDs work for non-PS printers we first need to
+dive deeply into the CUPS filtering and file format conversion
+architecture. Stay tuned.
+</para>
+</sect2>
</sect1>
<sect1>
-<title>CUPS - RAW Print Through Mode</title>
+<title>The CUPS Filtering Architecture</title>
-<note>
<para>
-When used in raw print through mode is will be necessary to use the printer
-vendor's drivers in each Windows client PC.
+The core of the CUPS filtering system is based on
+<emphasis>Ghostscript</emphasis>. In addition to Ghostscript, CUPS
+uses some other filters of its own. You (or your OS vendor) may have
+plugged in even more filters. CUPS handles all data file formats under
+the label of various <emphasis>MIME types</emphasis>. Every incoming
+printfile is subjected to an initial
+<emphasis>auto-typing</emphasis>. The auto-typing determines its given
+MIME type. A given MIME type implies zero or more possible filtering
+chains relevant to the selected target printer. This section discusses
+how MIME types recognition and conversion rules interact. They are
+used by CUPS to automatically setup a working filtering chain for any
+given input data format.
</para>
-</note>
<para>
-When CUPS printers are configured for RAW print-through mode operation it is the
-responsibility of the Samba client to fully render the print job (file) in a format
-that is suitable for direct delivery to the printer. In this case CUPS will NOT
-do any print file format conversion work.
+If CUPS rasterizes a PostScript file <emphasis>natively</emphasis> to
+a bitmap, this is done in 2 stages:
</para>
+<itemizedlist>
+<listitem><para>the first stage uses a Ghostscript device named "cups"
+(this is since version 1.1.15) and produces a generic raster format
+called "CUPS raster".
+</para></listitem>
+
+<listitem><para>the second stage uses a "raster driver" which converts
+the generic CUPS raster to a device specific raster.</para></listitem>
+</itemizedlist>
+
<para>
-The CUPS files that need to be correctly set for RAW mode printers to work are:
+Make sure your Ghostscript version has the "cups" device compiled in
+(check with <command>gs -h | grep cups</command>). Otherwise you
+may encounter the dreaded <computeroutput>Unable to convert file
+0</computeroutput> in your CUPS error_log file. To have "cups" as a
+device in your Ghostscript, you either need to <emphasis>patch GNU
+Ghostscript</emphasis> and re-compile or use <ulink
+url="http://www.cups.org/ghostscript.php">ESP Ghostscript</ulink>. The
+superior alternative is ESP Ghostscript: it supports not just CUPS,
+but 300 other devices too (while GNU Ghostscript supports only about
+180). Because of this broad output device support, ESP Ghostscript is
+the first choice for non-CUPS spoolers too. It is now recommended by
+Linuxprinting.org for all spoolers.
+</para>
+
+<para>
+CUPS printers may be setup to use <emphasis>external</emphasis>
+rendering paths. One of the most common ones is provided by the
+<emphasis>Foomatic/cupsomatic</emphasis> concept, from <ulink
+url="http://www.linuxprinting.org/">Linuxprinting.org</ulink>. This
+uses the classical Ghostscript approach, doing everything in one
+step. It doesn't use the "cups" device, but one of the many
+others. However, even for Foomatic/cupsomatic usage, best results and
+broadest printer model support is provided by ESP Ghostscript (more
+about cupsomatic/Foomatic, particularly the new version called now
+<emphasis>foomatic-rip</emphasis>, follows below).
+</para>
+
+<sect2>
+<title>MIME types and CUPS Filters</title>
+
+<para>
+CUPS reads the file <filename>/etc/cups/mime.types</filename>
+(and all other files carrying a <filename>*.types</filename> suffix
+in the same directory) upon startup. These files contain the MIME
+type recognition rules which are applied when CUPS runs its
+auto-typing routines. The rule syntax is explained in the man page
+for <filename>mime.types</filename> and in the comments section of the
+<filename>mime.types</filename> file itself. A simple rule reads
+like this:
+</para>
+
+<para><screen>
+
+ application/pdf pdf string(0,%PDF)
+
+</screen></para>
+
+<para>
+This means: if a filename has either a
+<filename>.pdf</filename> suffix, or if the magic
+string <emphasis>%PDF</emphasis> is right at the
+beginning of the file itself (offset 0 from the start), then it is
+a PDF file (<emphasis>application/pdf</emphasis>).
+Another rule is this:
+</para>
+
+<para><screen>
+
+ application/postscript ai eps ps string(0,%!) string(0,&lt;04&gt;%!)
+
+</screen></para>
+
+<para>
+Its meaning: if the filename has one of the suffixes
+<filename>.ai</filename>, <filename>.eps</filename>,
+<filename>.ps</filename> or if the file itself starts with one of the
+strings <emphasis>%!</emphasis> or <emphasis><![CDATA[<04>%!]]></emphasis>, it
+is a generic PostScript file
+(<emphasis>application/postscript</emphasis>).
+</para>
+
+<note><para>
+There is a very important difference between two similar MIME type in
+CUPS: one is <emphasis>application/postscript</emphasis>, the other is
+<emphasis>application/vnd.cups-postscript</emphasis>. While
+<emphasis>application/postscript</emphasis> is meant to be device
+independent (job options for the file are still outside the PS file
+content, embedded in commandline or environment variables by CUPS),
+<emphasis>application/vnd.cups-postscript</emphasis> may have the job
+options inserted into the PostScript data itself (were
+applicable). The transformation of the generic PostScript
+(application/postscript) to the device-specific version
+(application/vnd.cups-postscript) is the responsibility of the
+CUPS <emphasis>pstops</emphasis> filter. pstops uses information
+contained in the PPD to do the transformation.
+</para></note>
+
+<warning><para>
+Don't confuse the other mime.types file your system might be using
+with the one in the <filename>/etc/cups/</filename> directory.
+</para></warning>
+
+<para>
+CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI and a
+lot of image formats (GIF. PNG, TIFF, JPEG, Photo-CD, SUN-Raster,
+PNM, PBM, SGI-RGB and some more) and their associated MIME types
+with its filters.
+</para>
+</sect2>
+
+<sect2>
+<title>MIME type Conversion Rules</title>
+
+<para>
+CUPS reads the file <filename>/etc/cups/mime.convs</filename>
+(and all other files named with a <filename>*.convs</filename>
+suffix in the same directory) upon startup. These files contain
+lines naming an input MIME type, an output MIME type, a format
+conversion filter which can produce the output from the input type
+and virtual costs associated with this conversion. One example line
+reads like this:
+</para>
+
+<para><screen>
+
+ application/pdf application/postscript 33 pdftops
+
+</screen></para>
+
+<para>
+This means that the <emphasis>pdftops</emphasis> filter will take
+<emphasis>application/pdf</emphasis> as input and produce
+<emphasis>application/postscript</emphasis> as output, the virtual
+cost of this operation is 33 CUPS-$. The next filter is more
+expensive, costing 66 CUPS-$:
+</para>
+
+<para><screen>
+
+ application/vnd.hp-HPGL application/postscript 66 hpgltops
+
+</screen></para>
+
+<para>
+This is the <emphasis>hpgltops</emphasis>, which processes HP-GL
+plotter files to PostScript.
+</para>
+
+<para><screen>
+
+ application/octet-stream
+
+</screen></para>
+
+<para>
+Here are two more examples:
+</para>
+
+<para><screen>
+
+ application/x-shell application/postscript 33 texttops
+ text/plain application/postscript 33 texttops
+
+</screen></para>
+
+<para>
+The last two examples name the <emphasis>texttops</emphasis> filter
+to work on "text/plain" as well as on "application/x-shell". (Hint:
+this differentiation is needed for the syntax highlighting feature of
+"texttops").
+</para>
+</sect2>
+
+<sect2>
+<title>Filter Requirements</title>
+
+<para>
+There are many more combinations named in mime.convs. However, you
+are not limited to use the ones pre-defined there. You can plug in any
+filter you like into the CUPS framework. It must meet, or must be made
+to meet some minimal requirements. If you find (or write) a cool
+conversion filter of some kind, make sure it complies to what CUPS
+needs, and put in the right lines in <filename>mime.types</filename>
+and <filename>mime.convs</filename>, then it will work seamlessly
+inside CUPS!
+</para>
+
+<tip><para>
+The mentioned "CUPS requirements" for filters are simple. Take
+filenames or <filename>stdin</filename> as input and write to
+<filename>stdout</filename>. They should take these 5 or 6 arguments:
+<emphasis>printer job user title copies options [filename]</emphasis>
+</para>
+
+<variablelist>
+<varlistentry><term>Printer</term>
+<listitem><para>The name of the printer queue (normally this is the
+name of the filter being run)</para></listitem>
+</varlistentry>
+
+<varlistentry><term>job</term>
+<listitem><para>The numeric job ID for the job being
+printed</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Printer</term>
+<listitem><para>The string from the originating-user-name
+attribute</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Printer</term>
+<listitem><para>The string from the job-name attribute</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Printer</term>
+<listitem><para>The numeric value from the number-copies
+attribute</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Printer</term>
+<listitem><para>The job options</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Printer</term>
+<listitem><para>(Optionally) The print request file (if missing,
+filters expected data fed through <filename>stdin</filename>). In most
+cases it is very easy to write a simple wrapper script around existing
+filters to make them work with CUPS.</para></listitem>
+</varlistentry>
+</variablelist>
+</tip>
+</sect2>
+
+<sect2>
+<title>Prefilters</title>
+
+<para>
+As was said, PostScript is the central file format to any Unix based
+printing system. From PostScript, CUPS generates raster data to feed
+non-PostScript printers.
+</para>
+
+<para>
+But what is happening if you send one of the supported non-PS formats
+to print? Then CUPS runs "pre-filters" on these input formats to
+generate PostScript first. There are pre-filters to create PS from
+ASCII text, PDF, DVI or HP-GL. The outcome of these filters is always
+of MIME type <emphasis>application/postscript</emphasis> (meaning that
+any device-specific print options are not yet embedded into the
+PostScript by CUPS, and that the next filter to be called is
+pstops). Another pre-filter is running on all supported image formats,
+the <emphasis>imagetops</emphasis> filter. Its outcome is always of
+MIME type <emphasis>application/vnd.cups-postscript</emphasis>
+(<emphasis>not</emphasis> application/postscript), meaning it has the
+print options already embedded into the file.
+</para>
+
+<para>
+<figure><title>Prefiltering in CUPS to form Postscript</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/4small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/4small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+</sect2>
+
+<sect2>
+<title>pstops</title>
+
+<para>
+<emphasis>pstops</emphasis>is the filter to convert
+<emphasis>application/postscript</emphasis> to
+<emphasis>application/vnd.cups-postscript</emphasis>. It was said
+above that this filter inserts all device-specific print options
+(commands to the printer to ask for the duplexing of output, or
+stapling an punching it, etc.) into the PostScript file.
+</para>
+
+<para>
+<figure><title>Adding Device-specific Print Options</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/5small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/5small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<para>
+This is not all: other tasks performed by it are:
+</para>
<itemizedlist>
- <listitem><para><filename>/etc/cups/mime.types</filename></para></listitem>
- <listitem><para><filename>/etc/cups/mime.convs</filename></para></listitem>
+<listitem><para>
+selecting the range of pages to be printed (if you choose to
+print only pages "3, 6, 8-11, 16, 19-21", or only the odd numbered
+ones)
+</para></listitem>
+
+<listitem><para>
+putting 2 or more logical pages on one sheet of paper (the
+so-called "number-up" function)
+</para></listitem>
+
+<listitem><para>counting the pages of the job to insert the accounting
+information into the <filename>/var/log/cups/page_log</filename>
+</para></listitem>
</itemizedlist>
+</sect2>
+
+<sect2>
+<title>pstoraster</title>
+
+<para>
+<emphasis>pstoraster</emphasis> is at the core of the CUPS filtering
+system. It is responsible for the first stage of the rasterization
+process. Its input is of MIME type application/vnd.cups-postscript;
+its output is application/vnd.cups-raster. This output format is not
+yet meant to be printable. Its aim is to serve as a general purpose
+input format for more specialized <emphasis>raster drivers</emphasis>,
+that are able to generate device-specific printer data.
+</para>
+
+<para>
+<figure><title>Postscript to intermediate Raster format</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/6small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/6small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<para>
+CUPS raster is a generic raster format with powerful features. It is
+able to include per-page information, color profiles and more to be
+used by the following downstream raster drivers. Its MIME type is
+registered with IANA and its specification is of course completely
+open. It is designed to make it very easy and inexpensive for
+manufacturers to develop Linux and Unix raster drivers for their
+printer models, should they choose to do so. CUPS always takes care
+for the first stage of rasterization so these vendors don't need to care
+about Ghostscript complications (in fact, there is currently more
+than one vendor financing the development of CUPS raster drivers).
+</para>
+
+<para>
+<figure><title>CUPS-raster production using Ghostscript</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/7small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/7small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<para>
+CUPS versions before version 1.1.15 were shipping a binary (or source
+code) standalone filter, named "pstoraster". pstoraster was derived
+from GNU Ghostscript 5.50, and could be installed besides and in
+addition to any GNU or AFPL Ghostscript package without conflicting.
+</para>
+
+<para>
+From version 1.1.15, this has changed. The functions for this has been
+integrated back into Ghostscript (now based on GNU Ghostscript version
+7.05). The "pstoraster" filter is now a simple shell script calling
+<command>gs</command> with the <command>-sDEVICE=cups</command>
+parameter. If your Ghostscript doesn't show a success on asking for
+<command>gs -h |grep cups</command>, you might not be able to
+print. Update your Ghostscript then!
+</para>
+</sect2>
+
+<sect2>
+<title>imagetops and imagetoraster</title>
+
+<para>
+Above in the section about prefilters, we mentioned the prefilter
+that generates PostScript from image formats. The imagetoraster
+filter is used to convert directly from image to raster, without the
+intermediate PostScript stage. It is used more often than the above
+mentioned prefilters. Here is a summarizing flowchart of image file
+filtering:
+</para>
+
+<para>
+<figure><title>Image format to CUPS-raster format conversion</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/8small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/8small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+</sect2>
+
+<sect2>
+<title>rasterto [printers specific]</title>
+
+<para>
+CUPS ships with quite some different raster drivers processing CUPS
+raster. On my system I find in /usr/lib/cups/filter/ these:
+<parameter>rastertoalps, rastertobj, rastertoepson, rastertoescp,
+rastertopcl, rastertoturboprint, rastertoapdk, rastertodymo,
+rastertoescp, rastertohp</parameter> and
+<parameter>rastertoprinter</parameter>. Don't worry if you have less
+than this; some of these are installed by commercial add-ons to CUPS
+(like <parameter>rastertoturboprint</parameter>), others (like
+<parameter>rastertoprinter</parameter>) by 3rd party driver
+development projects (such as Gimp-Print) wanting to cooperate as
+closely as possible with CUPS.
+</para>
+
+<para>
+<figure><title>Raster to Printer Specific formats</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/9small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/9small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+</sect2>
+
+<sect2>
+<title>CUPS Backends</title>
+
+<para>
+The last part of any CUPS filtering chain is a "backend". Backends
+are special programs that send the print-ready file to the final
+device. There is a separate backend program for any transfer
+"protocol" of sending printjobs over the network, or for every local
+interface. Every CUPS printqueue needs to have a CUPS "device-URI"
+associated with it. The device URI is the way to encode the backend
+used to send the job to its destination. Network device-URIs are using
+two slashes in their syntax, local device URIs only one, as you can
+see from the following list. Keep in mind that local interface names
+may vary much from my examples, if your OS is not Linux:
+</para>
+
+<variablelist>
+<varlistentry><term>usb</term>
+<listitem><para>
+This backend sends printfiles to USB-connected printers. An
+example for the CUPS device-URI to use is:
+<filename>usb:/dev/usb/lp0</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>serial</term>
+<listitem><para>
+This backend sends printfiles to serially connected printers.
+An example for the CUPS device-URI to use is:
+<filename>serial:/dev/ttyS0?baud=11500</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>parallel</term>
+<listitem><para>
+This backend sends printfiles to printers connected to the
+parallel port. An example for the CUPS device-URI to use is:
+<filename>parallel:/dev/lp0</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>scsi</term>
+<listitem><para>
+This backend sends printfiles to printers attached to the
+SCSI interface. An example for the CUPS device-URI to use is:
+<filename>scsi:/dev/sr1</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>lpd</term>
+<listitem><para>
+This backend sends printfiles to LPR/LPD connected network
+printers. An example for the CUPS device-URI to use is:
+<filename>lpd://remote_host_name/remote_queue_name</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>AppSocket/HP JetDirect</term>
+<listitem><para>
+This backend sends printfiles to AppSocket (a.k.a. "HP
+JetDirect") connected network printers. An example for the CUPS
+device-URI to use is:
+<filename>socket://10.11.12.13:9100</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>ipp</term>
+<listitem><para>
+This backend sends printfiles to IPP connected network
+printers (or to other CUPS servers). Examples for CUPS device-URIs
+to use are:
+<filename>ipp:://192.193.194.195/ipp</filename>
+(for many HP printers) or
+<filename>ipp://remote_cups_server/printers/remote_printer_name</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>http</term>
+<listitem><para>
+This backend sends printfiles to HTTP connected printers.
+(The http:// CUPS backend is only a symlink to the ipp:// backend.)
+Examples for the CUPS device-URIs to use are:
+<filename>http:://192.193.194.195:631/ipp</filename>
+(for many HP printers) or
+<filename>http://remote_cups_server:631/printers/remote_printer_name</filename>
+</para></listitem></varlistentry>
+
+<varlistentry><term>smb</term>
+<listitem><para>
+This backend sends printfiles to printers shared by a Windows
+host. An example for CUPS device-URIs to use are:
+<filename>smb://workgroup/server/printersharename</filename>
+Or
+<filename>Smb://server/printersharename</filename>
+or
+<filename>smb://username:password@workgroup/server/printersharename</filename>
+or
+<filename>smb://username:password@server/printersharename</filename>.
+The smb:// backend is a symlink to the Samba utility
+<emphasis>smbspool</emphasis> (doesn't ship with CUPS). If the
+symlink is not present in your CUPS backend directory, have your
+root user create it: <command>ln -s `which smbspool`
+/usr/lib/cups/backend/smb</command>.
+</para></listitem></varlistentry>
+</variablelist>
-Both contain entries that must be uncommented to allow <emphasis>RAW</emphasis> mode
-operation.
+<para>
+It is easy to write your own backends as Shell or Perl scripts, if you
+need any modification or extension to the CUPS print system. One
+reason could be that you want to create "special" printers which send
+the printjobs as email (through a "mailto:/" backend), convert them to
+PDF (through a "pdfgen:/" backend) or dump them to "/dev/null" (In
+fact I have the system-wide default printer set up to be connected to
+a "devnull:/" backend: there are just too many people sending jobs
+without specifying a printer, or scripts and programs which don't name
+a printer. The system-wide default deletes the job and sends a polite
+mail back to the $USER asking him to always specify a correct
+printername).
+</para>
+
+<para>
+Not all of the mentioned backends may be present on your system or
+usable (depending on your hardware configuration). One test for all
+available CUPS backends is provided by the <emphasis>lpinfo</emphasis>
+utility. Used with the <parameter>-v</parameter> parameter, it lists
+all available backends:
+</para>
+
+<para><screen>
+
+ lpinfo -v
+
+</screen></para>
+</sect2>
+
+<sect2>
+<title>cupsomatic/Foomatic -- how do they fit into the Picture?</title>
+
+<para>
+"cupsomatic" filters may be the most widely used on CUPS
+installations. You must be clear about the fact that these were not
+developed by the CUPS people. They are a "Third Party" add-on to
+CUPS. They utilize the traditional Ghostscript devices to render jobs
+for CUPS. When troubleshooting, you should know about the
+difference. Here the whole rendering process is done in one stage,
+inside Ghostscript, using an appropriate "device" for the target
+printer. cupsomatic uses PPDs which are generated from the "Foomatic"
+Printer &amp; Driver Database at Linuxprinting.org.
+</para>
+
+<para>
+You can recognize these PPDs from the line calling the
+<emphasis>cupsomatic</emphasis> filter:
+</para>
+
+<para><screen>
+
+ *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic"
+
+</screen></para>
+
+<para>
+This line you may find amongst the first 40 or so lines of the PPD
+file. If you have such a PPD installed, the printer shows up in the
+CUPS web interface with a <emphasis>foomatic</emphasis> namepart for
+the driver description. cupsomatic is a Perl script that runs
+Ghostscript, with all the complicated commandline options
+auto-constructed from the selected PPD and commandline options give to
+the printjob.
+</para>
+
+<para>
+However, cupsomatic is now deprecated. Its PPDs (especially the first
+generation of them, still in heavy use out there) are not meeting the
+Adobe specifications. You might also suffer difficulties when you try
+to download them with "Point'n'Print" to Windows clients. A better,
+and more powerful successor is now in a very stable Beta-version
+available: it is called <emphasis>foomatic-rip</emphasis>. To use
+foomatic-rip as a filter with CUPS, you need the new-type PPDs. These
+have a similar, but different line:
+</para>
+
+<para><screen>
+
+ *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
+
+</screen></para>
+
+<para>
+The PPD generating engine at Linuxprinting.org has been revamped.
+The new PPDs comply to the Adobe spec. On top, they also provide a
+new way to specify different quality levels (hi-res photo, normal
+color, grayscale, draft...) with a single click (whereas before you
+could have required 5 or more different selections (media type,
+resolution, inktype, dithering algorithm...). There is support for
+custom-size media built in. There is support to switch
+print-options from page to page, in the middle of a job. And the
+best thing is: the new foomatic-rip now works seamlessly with all
+legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR etc.), providing
+for them access to use PPDs for their printing!
+</para>
+</sect2>
+
+<sect2>
+<title>The Complete Picture</title>
+
+<para>
+If you want to see an overview over all the filters and how they
+relate to each other, the complete picture of the puzzle is at the end
+of this document.
+</para>
+</sect2>
+
+<sect2>
+<title><filename>mime.convs</filename></title>
+
+<para>
+CUPS auto-constructs all possible filtering chain paths for any given
+MIME type, and every printer installed. But how does it decide in
+favor or against a specific alternative? (There may often be cases,
+where there is a choice of two or more possible filtering chains for
+the same target printer). Simple: you may have noticed the figures in
+the 3rd column of the mime.convs file. They represent virtual costs
+assigned to this filter. Every possible filtering chain will sum up to
+a total "filter cost". CUPS decides for the most "inexpensive" route.
+</para>
+
+<tip><para>
+The setting of <parameter>FilterLimit 1000</parameter> in
+<filename>cupsd.conf</filename> will not allow more filters to
+run concurrently than will consume a total of 1000 virtual filter
+cost. This is a very efficient way to limit the load of any CUPS
+server by setting an appropriate "FilterLimit" value. A FilterLimit of
+200 allows roughly 1 job at a time, while a FilterLimit of 1000 allows
+approximately 5 jobs maximum at a time.
+</para></tip>
+</sect2>
+
+<sect2>
+<title>"Raw" printing</title>
+
+<para>
+You can tell CUPS to print (nearly) any file "raw". "Raw" means it
+will not be filtered. CUPS will send the file to the printer "as is"
+without bothering if the printer is able to digest it. Users need to
+take care themselves that they send sensible data formats only. Raw
+printing can happen on any queue if the "-o raw" option is specified
+on the command line. You can also set up raw-only queues by simply not
+associating any PPD with it. This command:
+</para>
+
+<para><screen>
+
+ lpadmin -P rawprinter -v socket://11.12.13.14:9100 -E
+
+</screen></para>
+
+<para>
+sets up a queue named "rawprinter", connected via the "socket"
+protocol (a.k.a. "HP JetDirect") to the device at IP address
+11.12.1.3.14, using port 9100. (If you had added a PPD with
+<command>-P /path/to/PPD</command> to this command line, you would
+have installed a "normal" printqueue.
+</para>
+
+<para>
+CUPS will automatically treat each job sent to a queue as a "raw" one,
+if it can't find a PPD associated with the queue. However, CUPS will
+only send known MIME types (as defined in its own mime.types file) and
+refuse others.
+</para>
+</sect2>
+
+<sect2>
+<title>"application/octet-stream" printing</title>
+
+<para>
+Any MIME type with no rule in the
+<filename>/etc/cups/mime.types</filename> file is regarded as unknown
+or <emphasis>application/octet-stream</emphasis> and will not be
+sent. Because CUPS refuses to print unknown MIME types per default,
+you will probably have experienced the fact that printjobs originating
+from Windows clients were not printed. You may have found an error
+message in your CUPS logs like:
</para>
+<para><screen>
+
+ Unable to convert file 0 to printable format for job
+
+</screen></para>
+
<para>
-Firstly, to enable CUPS based printing from Samba the following options must be
-enabled in your &smb.conf; file [globals] section:
+To enable the printing of "application/octet-stream" files, edit
+these two files:
+</para>
<itemizedlist>
- <listitem><para>printing = CUPS</para></listitem>
+<listitem><para><filename>/etc/cups/mime.convs</filename></para></listitem>
- <listitem><para>printcap = CUPS</para></listitem>
+<listitem><para><filename>/etc/cups/mime.types</filename></para></listitem>
</itemizedlist>
-When these parameters are specified the print directives in &smb.conf; (as well as in
-samba itself) will be ignored because samba will directly interface with CUPS through
-it's application program interface (API) - so long as Samba has been compiled with
-CUPS library (libcups) support. If samba has NOT been compiled with CUPS support then
-printing will use the System V AT&amp;T command set with the <emphasis>-oraw</emphasis>
-option automatically passing through.
+<para>
+Both contain entries (at the end of the respective files) which must
+be uncommented to allow RAW mode operation for
+application/octet-stream. In <filename>/etc/cups/mime.types</filename>
+make sure this line is present:
+</para>
+
+<para><screen>
+
+ application/octet-stream
+
+</screen></para>
+
+<para>
+This line (with no specific auto-typing rule set) makes all files
+not otherwise auto-typed a member of application/octet-stream. In
+<filename>/etc/cups/mime.convs</filename>, have this
+line:
</para>
+<para><screen>
+
+ application/octet-stream application/vnd.cups-raw 0 -
+
+</screen></para>
+
<para>
-Cupsomatic (an enhanced printing utility that is part of some CUPS implementations)
-on the Samba/CUPS server does *not* add any features if a file is really
-printed "raw". However, if you have loaded the driver for the Windows client from
-the CUPS server, using the "cupsaddsmb" utility, and if this driver is one using
-a "Foomatic" PPD, the PJL header in question is already added on the Windows client,
-at the time when the driver initially generated the PostScript data and CUPS in true
-"-oraw" manner doesn't remove this PJL header and passes the file "as is" to its
-printer communication backend.
+This line tells CUPS to use the <emphasis>Null Filter</emphasis>
+(denoted as "-", doing... nothing at all) on
+<emphasis>application/octet-stream</emphasis>, and tag the result as
+<emphasis>application/vnd.cups-raw</emphasis>. This last one is
+always a green light to the CUPS scheduler to now hand the file over
+to the "backend" connecting to the printer and sending it over.
</para>
-<note><para>NOTE: editing in the "mime.convs" and the "mime.types" file does not *enforce*
-"raw" printing, it only *allows* it.</para></note>
+<note><para> Editing the <filename>mime.convs</filename> and the
+<filename>mime.types</filename> file does not
+<emphasis>enforce</emphasis> "raw" printing, it only
+<emphasis>allows</emphasis> it.
+</para></note>
+
+<formalpara>
+<title>Background</title>
<para>
-Print files that arrive from MS Windows printing are "auto-typed" by CUPS. This aids
-the process of determining proper treatment while in the print queue system.
+CUPS being a more security-aware printing system than traditional ones
+does not by default allow one to send deliberate (possibly binary)
+data to printing devices. (This could be easily abused to launch a
+Denial of Service attack on your printer(s), causing at least the loss
+of a lot of paper and ink...) "Unknown" data are regarded by CUPS
+as <emphasis>MIME type</emphasis>
+<emphasis>application/octet-stream</emphasis>. While you
+<emphasis>can</emphasis> send data "raw", the MIME type for these must
+be one that is known to CUPS and an allowed one. The file
+<filename>/etc/cups/mime.types</filename> defines the "rules" how CUPS
+recognizes MIME types. The file
+<filename>/etc/cups/mime.convs</filename> decides which file
+conversion filter(s) may be applied to which MIME types.
+</para>
+</formalpara>
+</sect2>
+
+<sect2>
+<title>PostScript Printer Descriptions (PPDs) for non-PS Printers</title>
+
+<para>
+Originally PPDs were meant to be used for PostScript printers
+only. Here, they help to send device-specific commands and settings
+to the RIP which processes the jobfile. CUPS has extended this
+scope for PPDs to cover non-PostScript printers too. This was not
+very difficult, because it is a standardized file format. In a way
+it was logical too: CUPS handles PostScript and uses a PostScript
+RIP (=Ghostscript) to process the jobfiles. The only difference is:
+a PostScript printer has the RIP built-in, for other types of
+printers the Ghostscript RIP runs on the host computer.
+</para>
+
+<para>
+PPDs for a non-PS printer have a few lines that are unique to
+CUPS. The most important one looks similar to this:
+</para>
+
+<para><screen>
+
+ *cupsFilter: application/vnd.cups-raster 66 rastertoprinter
+
+</screen></para>
+
+<para>
+It is the last piece in the CUPS filtering puzzle. This line tells the
+CUPS daemon to use as a last filter "rastertoprinter". This filter
+should be served as input an "application/vnd.cups-raster" MIME type
+file. Therefore CUPS should auto-construct a filtering chain, which
+delivers as its last output the specified MIME type. This is then
+taken as input to the specified "rastertoprinter" filter. After this
+the last filter has done its work ("rastertoprinter" is a Gimp-Print
+filter), the file should go to the backend, which sends it to the
+output device.
+</para>
+
+<para>
+CUPS by default ships only a few generic PPDs, but they are good for
+several hundred printer models. You may not be able to control
+different paper trays, or you may get larger margins than your
+specific model supports):
+</para>
+
+<variablelist>
+<varlistentry><term>deskjet.ppd</term>
+<listitem><para>older HP inkjet printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>deskjet2.ppd</term>
+<listitem><para>newer HP inkjet printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>dymo.ppd</term>
+<listitem><para>label printers
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>epson9.ppd</term>
+<listitem><para>Epson 24pin impact printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>epson24.ppd</term>
+<listitem><para>Epson 24pin impact printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>okidata9.ppd</term>
+<listitem><para>Okidata 9pin impact printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>okidat24.ppd</term>
+<listitem><para>Okidata 24pin impact printers and compatible
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>stcolor.ppd</term>
+<listitem><para>older Epson Stylus Color printers
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>stcolor2.ppd</term>
+<listitem><para>newer Epson Stylus Color printers
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>stphoto.ppd</term>
+<listitem><para>older Epson Stylus Photo printers
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>stphoto2.ppd</term>
+<listitem><para>newer Epson Stylus Photo printers
+</para></listitem>
+</varlistentry>
+
+<varlistentry><term>laserjet.ppd</term>
+<listitem><para>all PCL printers. Further below is a discussion
+of several other driver/PPD-packages suitable fur use with CUPS.
+</para></listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
+<sect2>
+<title>Difference between <emphasis>cupsomatic/foomatic-rip</emphasis> and
+<emphasis>native CUPS</emphasis> printing</title>
+
+<para>
+Native CUPS rasterization works in two steps.
+</para>
<itemizedlist>
- <listitem><para>
- Files generated by PCL drivers and directed at PCK printers get auto-typed as
- <filename>application/octet-stream</filename>. Unknown file format types also
- get auto-typed with this tag.
- </para></listitem>
-
- <listitem><para>
- Files generated by a Postscript driver and directed at a Postscript printer
- are auto-typed depending on the auto-detected most suitable MIME type as:
-
- <itemizedlist>
- <listitem><para>* application/postscript</para></listitem>
- <listitem><para>* application/vnd.cups-postscript</para></listitem>
- </itemizedlist>
- </para>
- </listitem>
+<listitem><para>
+First is the "pstoraster" step. It uses the special "cups"
+device from ESP Ghostscript 7.05.x as its tool
+</para></listitem>
+
+<listitem><para>
+Second comes the "rasterdriver" step. It uses various
+device-specific filters; there are several vendors who provide good
+quality filters for this step, some are Free Software, some are
+Shareware/Non-Free, some are proprietary.</para></listitem>
</itemizedlist>
+
+<para>
+Often this produces better quality (and has several more
+advantages) than other methods.
</para>
+<para>
+<figure><title>cupsomatic/foomatic processing versus Native CUPS</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/10small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/10small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+
+<para>
+One other method is the <emphasis>cupsomatic/foomatic-rip</emphasis>
+way. Note that cupsomatic is <emphasis>not</emphasis> made by the CUPS
+developers. It is an independent contribution to printing development,
+made by people from Linuxprinting.org (see also <ulink
+url="http://www.cups.org/cups-help.html">http://www.cups.org/cups-help.html</ulink>).
+cupsomatic is no longer developed and maintained and is no longer
+supported. It has now been replaced by
+<emphasis>foomatic-rip</emphasis>. foomatic-rip is a complete re-write
+of the old cupsomatic idea, but very much improved and generalized to
+other (non-CUPS) spoolers. An upgrade to foomatic-rip is strongly
+advised, especially if you are upgrading to a recent version of CUPS
+too.
+</para>
+
+<para>
+Both the cupsomatic (old) and the foomatic-rip (new) methods from
+Linuxprinting.org use the traditional Ghostscript print file
+processing, doing everything in a single step. It therefore relies on
+all the other devices built-in into Ghostscript. The quality is as
+good (or bad) as Ghostscript rendering is in other spoolers. The
+advantage is that this method supports many printer models not
+supported (yet) by the more modern CUPS method.
+</para>
+
+<para>
+Of course, you can use both methods side by side on one system (and
+even for one printer, if you set up different queues), and find out
+which works best for you.
+</para>
+
+<para>
+cupsomatic "kidnaps" the printfile after the
+<emphasis>application/vnd.cups-postscript</emphasis> stage and
+deviates it through the CUPS-external, system wide Ghostscript
+installation: Therefore the printfile bypasses the "pstoraster" filter
+(and thus also bypasses the CUPS-raster-drivers
+"rastertosomething"). After Ghostscript finished its rasterization,
+cupsomatic hands the rendered file directly to the CUPS backend. The
+flowchart above illustrates the difference between native CUPS
+rendering and the Foomatic/cupsomatic method.
+</para>
+</sect2>
+
+<sect2>
+<title>Examples for filtering Chains</title>
<para>
-"application/postscript" first goes thru the "pstops" filter (where the page counting
-and accounting takes place). The outcome will be of MIME type
-"application/vnd.cups-postscript". The pstopsfilter reads and uses information from
-the PPD and inserts user-provided options into the PostScript file. As a consequence,
-the filtered file could possibly have an unwanted PJL header.
+Here are a few examples of commonly occurring filtering chains to
+illustrate the workings of CUPS.
</para>
<para>
-"application/postscript" will be all files with a ".ps", ".ai", ".eps" suffix or which
-have as their first character string one of "%!" or "&gt;04&lt;%".
+Assume you want to print a PDF file to a HP JetDirect-connected
+PostScript printer, but you want to print the pages 3-5, 7, 11-13
+only, and you want to print them "2-up" and "duplex":
+</para>
+
+<itemizedlist>
+<listitem><para>your print options (page selection as required, 2-up,
+duplex) are passed to CUPS on the commandline;</para></listitem>
+
+<listitem><para>the (complete) PDF file is sent to CUPS and autotyped as
+<emphasis>application/pdf</emphasis>;</para></listitem>
+
+<listitem><para>the file therefore first must pass the
+<emphasis>pdftops</emphasis> pre-filter, which produces PostScript
+MIME type <emphasis>application/postscript</emphasis> (a preview here
+would still show all pages of the original PDF);</para></listitem>
+
+<listitem><para>the file then passes the <emphasis>pstops</emphasis>
+filter which applies the commandline options: it selects the pages
+2-5, 7 and 11-13, creates and imposed layout "2 pages on 1 sheet" and
+inserts the correct "duplex" command (as is defined in the printer's
+PPD) into the new PostScript file; the file now is of PostScript MIME
+type
+<emphasis>application/vnd.cups-postscript</emphasis>;</para></listitem>
+
+<listitem><para>the file goes to the <emphasis>socket</emphasis>
+backend, which transfers the job to the printers.</para></listitem>
+</itemizedlist>
+
+<para>
+The resulting filter chain therefore is:
</para>
+<para><screen>
+pdftops --&gt; pstops --&gt; socket
+</screen></para>
+
<para>
-"application/vnd.cups-postscript" will files which contain the string
-"LANGUAGE=POSTSCRIPT" (or similar variations with different capitalization) in the
-first 512 bytes, and also contain the "PJL super escape code" in the first 128 bytes
-("&gt;1B&lt;%-12345X"). Very likely, most PostScript files generated on Windows using a CUPS
-or other PPD, will have to be auto-typed as "vnd.cups-postscript". A file produced
-with a "Generic PostScript driver" will just be tagged "application/postscript".
+Assume your want to print the same filter to an USB-connected
+Epson Stylus Photo printer, installed with the CUPS
+<filename>stphoto2.ppd</filename>. The first few filtering stages
+are nearly the same:
</para>
+<itemizedlist>
+<listitem><para>your print options (page selection as required, 2-up,
+duplex) are passed to CUPS on the commandline;</para></listitem>
+
+<listitem><para>the (complete) PDF file is sent to CUPS and autotyped as
+<emphasis>application/pdf</emphasis>;</para></listitem>
+
+<listitem><para>the file therefore first must pass the
+<emphasis>pdftops</emphasis> pre-filter, which produces PostScript
+MIME type <emphasis>application/postscript</emphasis> (a preview here
+would still show all pages of the original PDF);</para></listitem>
+
+<listitem><para>the file then passes the "pstops" filter which applies
+the commandline options: it selects the pages 2-5, 7 and 11-13,
+creates and imposed layout "2 pages on 1 sheet" and inserts the
+correct "duplex" command... (OOoops -- this printer and his PPD
+don't support duplex printing at all -- this option will be ignored
+then) into the new PostScript file; the file now is of PostScript
+MIME type
+<emphasis>application/vnd.cups-postscript</emphasis>;</para></listitem>
+
+<listitem><para>the file then passes the
+<emphasis>pstoraster</emphasis> stage and becomes MIME type
+<emphasis>application/cups-raster</emphasis>;</para></listitem>
+
+<listitem><para>finally, the <emphasis>rastertoepson</emphasis> filter
+does its work (as is indicated in the printer's PPD), creating the
+printer-specific raster data and embedding any user-selected
+print-options into the print data stream;</para></listitem>
+
+<listitem><para>the file goes to the <emphasis>usb</emphasis> backend,
+which transfers the job to the printers.</para></listitem>
+</itemizedlist>
+
<para>
-Once the file is in "application/vnd.cups-postscript" format, either "pstoraster"
-or "cupsomatic" will take over (depending on the printer configuration, as
-determined by the PPD in use).
+The resulting filter chain therefore is:
</para>
+<para><screen>
+pdftops --&gt; pstops --&gt; pstoraster --&gt; rastertoepson --&gt; usb
+</screen></para>
+</sect2>
+
+<sect2>
+<title>Sources of CUPS drivers / PPDs</title>
+
+<para>
+On the internet you can find now many thousand CUPS-PPD files
+(with their companion filters), in many national languages,
+supporting more than 1000 non-PostScript models.
+</para>
+
+<itemizedlist>
+<listitem><para><ulink url="http://wwwl.easysw.com/printpro/">ESP
+PrintPro (http://wwwl.easysw.com/printpro/)</ulink> (commercial,
+non-Free) is packaged with more than 3000 PPDs, ready for
+successful use "out of the box" on Linux, Mac OS X, IBM-AIX,
+HP-UX, Sun-Solaris, SGI-IRIX, Compaq Tru64, Digital Unix and some
+more commercial Unices (it is written by the CUPS developers
+themselves and its sales help finance the further development of
+CUPS, as they feed their creators).</para></listitem>
+
+<listitem><para>the <ulink
+url="http://gimp-print.sourceforge.net/">Gimp-Print-Project
+(http://gimp-print.sourceforge.net/)</ulink> (GPL, Free Software)
+provides around 140 PPDs (supporting nearly 400 printers, many driven
+to photo quality output), to be used alongside the Gimp-Print CUPS
+filters;</para></listitem>
+
+<listitem><para><ulink url="http://www.turboprint.com/">TurboPrint
+(http://www.turboprint.com/)</ulink> (Shareware, non-Free) supports
+roughly the same amount of printers in excellent
+quality;</para></listitem>
+
+<listitem><para><ulink
+url="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/">OMNI
+(http://www-124.ibm.com/developerworks/oss/linux/projects/omni/)</ulink>
+(LPGL, Free) is a package made by IBM, now containing support for more
+than 400 printers, stemming from the inheritance of IBM OS/2 Know-How
+ported over to Linux (CUPS support is in a Beta-stage at
+present);</para></listitem>
+
+<listitem><para><ulink url="http://hpinkjet.sourceforge.net/">HPIJS
+(http://hpinkjet.sourceforge.net/)</ulink> (BSD-style licenses, Free)
+supports around 150 of HP's own printers and is also providing
+excellent print quality now (currently available only via the Foomatic
+path);</para></listitem>
+
+<listitem><para><ulink
+url="http://www.linuxprinting.org/">Foomatic/cupsomatic
+(http://www.linuxprinting.org/)</ulink> (LPGL, Free) from
+Linuxprinting.org are providing PPDs for practically every Ghostscript
+filter known to the world (including Omni, Gimp-Print and
+HPIJS).</para></listitem>
+</itemizedlist>
+
<note><para>
-A printer queue with *no* PPD associated to it is a "raw" printer and all files
-will go directly there as received by the spooler. The exeptions are file types
-"application/octet-stream" which need "passthrough feature" enabled.
-"Raw" queues don't do any filtering at all, they hand the file directly to the
-CUPS backend. This backend is responsible for the sending of the data to the device
-(as in the "device URI" notation as lpd://, socket://, smb://, ipp://, http://,
-parallel:/, serial:/, usb:/ etc.)
+The cupsomatic/Foomatic trick from Linuxprinting.org works
+differently from the other drivers. This is explained elsewhere in this
+document.
</para></note>
+</sect2>
-<note><para>
-"cupsomatic"/Foomatic are *not* native CUPS drivers and they don't ship with CUPS.
-They are a Third Party add-on, developed at Linuxprinting.org. As such, they are
-a brilliant hack to make all models (driven by Ghostscript drivers/filters in
-traditional spoolers) also work via CUPS, with the same (good or bad!) quality
-as in these other spoolers. "cupsomatic" is only a vehicle to execute a ghostscript
-commandline at that stage in the CUPS filtering chain, where "normally" the native
-CUPS "pstoraster" filter would kick in. cupsomatic by-passes pstoraster, "kidnaps"
-the printfile from CUPS away and re-directs it to go through Ghostscipt. CUPS accepts this,
-because the associated CUPS-O-Matic-/Foomatic-PPD specifies:
+<sect2>
+<title>Printing with Interface Scripts</title>
+
+<para>
+CUPS also supports the usage of "interface scripts" as known from
+System V AT&amp;T printing systems. These are often used for PCL
+printers, from applications that generate PCL print jobs. Interface
+scripts are specific to printer models. They have a similar role as
+PPDs for PostScript printers. Interface scripts may inject the Escape
+sequences as required into the print data stream, if the user has
+chosen to select a certain paper tray, or print landscape, or use A3
+paper, etc. Interfaces scripts are practically unknown in the Linux
+realm. On HP-UX platforms they are more often used. You can use any
+working interface script on CUPS too. Just install the printer with
+the <command>-i</command> option:
</para>
-<programlisting>
- *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic"
-</programlisting>
+<para><screen>
+
+ lpadmin -p pclprinter -v socket://11.12.13.14:9100 -i /path/to/interface-script
+
+</screen></para>
<para>
-This line persuades CUPS to hand the file to cupsomatic, once it has successfully
-converted it to the MIME type "application/vnd.cups-postscript". This conversion will not
-happen for Jobs arriving from Windows which are auto-typed "application/octet-stream",
-with the according changes in "/etc/cups/mime.types" in place.
-</para></note>
+Interface scripts might be the "unknown animal" to many. However,
+with CUPS they provide the most easy way to plug in your own
+custom-written filtering script or program into one specific print
+queue (some information about the traditional usage of interface scripts is
+to be found at <ulink
+url="http://playground.sun.com/printing/documentation/interface.html">http://playground.sun.com/printing/documentation/interface.html</ulink>).
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Network printing (purely Windows)</title>
<para>
-CUPS is widely configurable and flexible, even regarding its filtering mechanism.
-Another workaround in some situations would be to have
-in "/etc/cups/mime.types" entries as follows:
+Network printing covers a lot of ground. To understand what exactly
+goes on with Samba when it is printing on behalf of its Windows
+clients, let's first look at a "purely Windows" setup: Windows clients
+with a Windows NT print server.
</para>
-<programlisting>
- application/postscript application/vnd.cups-raw 0 -
- application/vnd.cups-postscript application/vnd.cups-raw 0 -
-</programlisting>
+<sect2>
+<title>From Windows Clients to an NT Print Server</title>
<para>
-This would prevent all Postscript files from being filtered (rather, they will go
-thru the virtual "nullfilter" denoted with "-"). This could only be useful for
-PS printers. If you want to print PS code on non-PS printers an entry as follows
-could be useful:
+Windows clients printing to an NT-based print server have two
+options. They may
</para>
-<programlisting>
- */* application/vnd.cups-raw 0 -
-</programlisting>
+<itemizedlist>
+<listitem><para>execute the driver locally and render the GDI output
+(EMF) into the printer specific format on their own,
+or</para></listitem>
+
+<listitem><para>send the GDI output (EMF) to the server, where the
+driver is executed to render the printer specific
+output.</para></listitem>
+</itemizedlist>
+
+<para>
+Both print paths are shown in the flowcharts below.
+</para>
+</sect2>
+
+<sect2>
+<title>Driver Execution on the Client</title>
<para>
-and would effectively send *all* files to the backend without further processing.
+In the first case the print server must spool the file as "raw",
+meaning it shouldn't touch the jobfile and try to convert it in any
+way. This is what traditional Unix-based print server can do too; and
+at a better performance and more reliably than NT print server. This
+is what most Samba administrators probably are familiar with. One
+advantage of this setup is that this "spooling-only" print server may
+be used even if no driver(s) for Unix are available it is sufficient
+to have the Windows client drivers available and installed on the
+clients.
</para>
<para>
-Lastly, you could have the following entry:
+<figure><title>Print Driver execution on the Client</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/11small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/11small.png"/></imageobject>
+</mediaobject>
+</figure>
</para>
+</sect2>
-<programlisting>
- application/vnd.cups-postscript application/vnd.cups-raw 0 my_PJL_stripping_filter
-</programlisting>
+<sect2>
+<title>Driver Execution on the Server</title>
<para>
-You will need to write a "my_PJL_stripping_filter" (could be a shellscript) that
-parses the PostScript and removes the unwanted PJL. This would need to conform to
-CUPS filter design (mainly, receive and pass the parameters printername, job-id,
-username, jobtitle, copies, print options and possibly the filename). It would
-be installed as world executable into "/usr/lib/cups/filters/" and will be called
-by CUPS if it encounters a MIME type "application/vnd.cups-postscript".
+The other path executes the printer driver on the server. The clients
+transfers print files in EMF format to the server. The server uses the
+PostScript, PCL, ESC/P or other driver to convert the EMF file into
+the printer-specific language. It is not possible for Unix to do the
+same. Currently there is no program or method to convert a Windows
+client's GDI output on a Unix server into something a printer could
+understand.
</para>
<para>
-CUPS can handle "-o job-hold-until=indefinite". This keeps the job in the queue
-"on hold". It will only be printed upon manual release by the printer operator.
-This is a requirement in many "central reproduction departments", where a few
-operators manage the jobs of hundreds of users on some big machine, where no
-user is allowed to have direct access. (The operators often need to load the
-proper paper type before running the 10.000 page job requested by marketing
-for the mailing, etc.).
+<figure><title>Print Driver execution on the Server</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/12small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/12small.png"/></imageobject>
+</mediaobject>
+</figure>
</para>
+<para>
+However, there is something similar possible with CUPS. Read on...
+</para>
+</sect2>
</sect1>
<sect1>
-<title>CUPS as a network PostScript RIP</title>
+<title>Network Printing (Windows clients -- UNIX/Samba Print
+Servers)</title>
<para>
-This is the configuration where CUPS drivers are working on server, and where the
-Adobe PostScript driver with CUPS-PPDs is downloaded to clients.
+Since UNIX print servers <emphasis>cannot</emphasis> execute the Win32
+program code on their platform, the picture is somewhat
+different. However, this doesn't limit your options all that
+much. In the contrary, you may have a way here to implement printing
+features which are not possible otherwise.
</para>
+<sect2>
+<title>From Windows Clients to a CUPS/Samba Print Server</title>
+
<para>
-CUPS is perfectly able to use PPD files (PostScript
-Printer Descriptions). PPDs can control all print device options. They
-are usually provided by the manufacturer -- if you own a PostSript printer,
-that is. PPD files are always a component of PostScript printer drivers on MS
-Windows or Apple Mac OS systems. They are ASCII files containing
-user-selectable print options, mapped to appropriate PostScript, PCL or PJL
-commands for the target printer. Printer driver GUI dialogs translate these
-options "on-the-fly" into buttons and drop-down lists for the user to
-select.
+Here is a simple recipe showing how you can take advantage of CUPS
+powerful features for the benefit of your Windows network printing
+clients:
</para>
+<itemizedlist>
+
+<listitem><para>Let the Windows clients send PostScript to the CUPS
+server.</para></listitem>
+
+<listitem><para>Let the CUPS server render the PostScript into device
+specific raster format.</para></listitem>
+</itemizedlist>
+
<para>
-CUPS can load, without any conversions, the PPD file from
-any Windows (NT is recommended) PostScript driver and handle the options.
-There is a web browser interface to the print options (select
-http://localhost:631/printers/ and click on one "Configure Printer" button
-to see it), a commandline interface (see <command>man lpoptions</command> or
-try if you have <command>lphelp</command> on your system) plus some different GUI frontends on Linux
-UNIX, which can present PPD options to the users. PPD options are normally
-meant to become evaluated by the PostScript RIP on the real PostScript
-printer.
+This requires the clients to use a PostScript driver (even if the
+printer is a non-PostScript model. It also requires that you have a
+"driver" on the CUPS server.
</para>
<para>
-CUPS doesn't stop at "real" PostScript printers in its
-usage of PPDs. The CUPS developers have extended the PPD concept, to also
-describe available device and driver options for non-PostScript printers
-through CUPS-PPDs.
+Firstly, to enable CUPS based printing through Samba the
+following options should be set in your <filename>smb.conf</filename> file [globals]
+section:
</para>
+<itemizedlist>
+<listitem><para><parameter>printing = CUPS</parameter></para></listitem>
+
+<listitem><para><parameter>printcap = CUPS</parameter></para></listitem>
+</itemizedlist>
+
<para>
-This is logical, as CUPS includes a fully featured
-PostScript interpreter (RIP). This RIP is based on Ghostscript. It can
-process all received PostScript (and additionally many other file formats)
-from clients. All CUPS-PPDs geared to non-PostScript printers contain an
-additional line, starting with the keyword <parameter>*cupsFilter</parameter>.
-This line
-tells the CUPS print system which printer-specific filter to use for the
-interpretation of the accompanying PostScript. Thus CUPS lets all its
-printers appear as PostScript devices to its clients, because it can act as a
-PostScript RIP for those printers, processing the received PostScript code
-into a proper raster print format.
+When these parameters are specified, all manually set print directives
+(like <parameter>print command =...</parameter>, or <parameter>lppause
+command =...</parameter>) in <filename>smb.conf</filename> (as well as
+in samba itself) will be ignored. Instead, Samba will directly
+interface with CUPS through it's application program interface (API) -
+as long as Samba has been compiled with CUPS library (libcups)
+support. If Samba has NOT been compiled with CUPS support, and if no
+other print commands are set up, then printing will use the
+<emphasis>System V</emphasis> AT&amp;T command set, with the -oraw
+option automatically passing through (if you want your own defined
+print commands to work with a Samba that has CUPS support compiled in,
+simply use <parameter>printing = sysv</parameter>).
</para>
<para>
-CUPS-PPDs can also be used on Windows-Clients, on top of a
-PostScript driver (recommended is the Adobe one).
+<figure><title>Printing via CUPS/samba server</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/13small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/13small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+</sect2>
+
+<sect2>
+<title>Samba receiving Jobfiles and passing them to CUPS</title>
+
+<para>
+Samba <emphasis>must</emphasis> use its own spool directory (it is set
+by a line similar to <parameter>path = /var/spool/samba</parameter>,
+in the <parameter>[printers]</parameter> or
+<parameter>[printername]</parameter> section of
+<filename>smb.conf</filename>). Samba receives the job in its own
+spool space and passes it into the spool directory of CUPS (the CUPS
+spooling directory is set by the <parameter>RequestRoot</parameter>
+directive, in a line that defaults to <parameter>RequestRoot
+/var/spool/cups</parameter>). CUPS checks the access rights of its
+spool dir and resets it to healthy values with every re-start. We have
+seen quite some people who had used a common spooling space for Samba
+and CUPS, and were struggling for weeks with this "problem".
+</para>
+
+<para>
+A Windows user authenticates only to Samba (by whatever means is
+configured). If Samba runs on the same host as CUPS, you only need to
+allow "localhost" to print. If they run on different machines, you
+need to make sure the Samba host gets access to printing on CUPS.
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Network PostScript RIP: CUPS Filters on Server -- clients use
+PostScript Driver with CUPS-PPDs</title>
+
+<para>
+PPDs can control all print device options. They are usually provided
+by the manufacturer; if you own a PostScript printer, that is. PPD
+files (PostScript Printer Descriptions) are always a component of
+PostScript printer drivers on MS Windows or Apple Mac OS systems. They
+are ASCII files containing user-selectable print options, mapped to
+appropriate PostScript, PCL or PJL commands for the target
+printer. Printer driver GUI dialogs translate these options
+"on-the-fly" into buttons and drop-down lists for the user to select.
+</para>
+
+<para>
+CUPS can load, without any conversions, the PPD file from any Windows
+(NT is recommended) PostScript driver and handle the options. There is
+a web browser interface to the print options (select <ulink
+url="http://localhost:631/printers/">http://localhost:631/printers/</ulink>
+and click on one <emphasis>Configure Printer</emphasis> button to see
+it), or a commandline interface (see <command>man lpoptions</command>
+or see if you have lphelp on your system). There are also some
+different GUI frontends on Linux/UNIX, which can present PPD options
+to users. PPD options are normally meant to be evaluated by the
+PostScript RIP on the real PostScript printer.
+</para>
+
+<sect2>
+<title>PPDs for non-PS Printers on UNIX</title>
+
+<para>
+CUPS doesn't limit itself to "real" PostScript printers in its usage
+of PPDs. The CUPS developers have extended the scope of the PPD
+concept, to also describe available device and driver options for
+non-PostScript printers through CUPS-PPDs.
</para>
<para>
-This feature enables CUPS to do a few tricks no other
+This is logical, as CUPS includes a fully featured PostScript
+interpreter (RIP). This RIP is based on Ghostscript. It can process
+all received PostScript (and additionally many other file formats)
+from clients. All CUPS-PPDs geared to non-PostScript printers contain
+an additional line, starting with the keyword
+<parameter>*cupsFilter</parameter> . This line tells the CUPS print
+system which printer-specific filter to use for the interpretation of
+the supplied PostScript. Thus CUPS lets all its printers appear as
+PostScript devices to its clients, because it can act as a PostScript
+RIP for those printers, processing the received PostScript code into a
+proper raster print format.
+</para>
+</sect2>
+
+<sect2>
+<title>PPDs for non-PS Printers on Windows</title>
+
+<para>
+CUPS-PPDs can also be used on Windows-Clients, on top of a
+"core" PostScript driver (now recommended is the "CUPS PostScript
+Driver for WindowsNT/2K/XP"; you can also use the Adobe one, with
+limitations). This feature enables CUPS to do a few tricks no other
spooler can do:
</para>
<itemizedlist>
- <listitem><para>act as a networked PostScript RIP (Raster Image Processor), handling
- printfiles from all client platforms in a uniform way;</para></listitem>
- <listitem><para>act as a central accounting and billing server, as all files are passed
- through the <command>pstops</command> Filter and are therefor logged in
- the CUPS <filename>page&lowbar;log</filename>. - <emphasis>NOTE: </emphasis>this
- can not happen with "raw" print jobs, which always remain unfiltered
- per definition;</para></listitem>
- <listitem><para>enable clients to consolidate on a single PostScript driver, even for
- many different target printers.</para></listitem>
+
+<listitem><para>act as a networked PostScript RIP (Raster Image
+Processor), handling printfiles from all client platforms in a uniform
+way;</para></listitem>
+
+<listitem><para>act as a central accounting and billing server, since
+all files are passed through the pstops filter and are therefore
+logged in the CUPS <filename>page_log</filename> file.
+<emphasis>NOTE:</emphasis> this can not happen with "raw" print jobs,
+which always remain unfiltered per definition;</para></listitem>
+
+<listitem><para>enable clients to consolidate on a single PostScript
+driver, even for many different target printers.</para></listitem>
</itemizedlist>
+
+<para>
+Using CUPS PPDs on Windows clients enables these to control
+all print job settings just as a UNIX client can do too.
+</para>
+</sect2>
</sect1>
<sect1>
-<title>Windows Terminal Servers (WTS) as CUPS clients</title>
+<title>Windows Terminal Servers (WTS) as CUPS Clients</title>
<para>
-This setup may be of special interest to people
-experiencing major problems in WTS environments. WTS need often a multitude
-of non-PostScript drivers installed to run their clients' variety of
-different printer models. This often imposes the price of much increased
-instability. In many cases, in an attempt to overcome this problem, site
-administrators have resorted to restrict the allowed drivers installed on
-their WTS to one generic PCL- and one PostScript driver. This however
-restricts the clients in the amount of printer options available for them --
-often they can't get out more then simplex prints from one standard paper
-tray, while their devices could do much better, if driven by a different
-driver!
+This setup may be of special interest to people experiencing major
+problems in WTS environments. WTS need often a multitude of
+non-PostScript drivers installed to run their clients' variety of
+different printer models. This often imposes the price of much
+increased instability.
</para>
+<sect2>
+<title>Printer Drivers running in "Kernel Mode" cause many
+Problems</title>
+
<para>
-Using an Adobe PostScript driver, enabled with a CUPS-PPD,
-seems to be a very elegant way to overcome all these shortcomings. The
-PostScript driver is not known to cause major stability problems on WTS (even
-if used with many different PPDs). The clients will be able to (again) chose
-paper trays, duplex printing and other settings. However, there is a certain
-price for this too: a CUPS server acting as a PostScript RIP for its clients
-requires more CPU and RAM than just to act as a "raw spooling" device. Plus,
-this setup is not yet widely tested, although the first feedbacks look very
-promising...
+The reason is that in Win NT printer drivers run in "Kernel
+Mode", this introduces a high risk for the stability of the system
+if the driver is not really stable and well-tested. And there are a
+lot of bad drivers out there! Especially notorious is the example
+of the PCL printer driver that had an additional sound module
+running, to notify users via soundcard of their finished jobs. Do I
+need to say that this one was also reliably causing "Blue Screens
+of Death" on a regular basis?
</para>
-</sect1>
+<para>
+PostScript drivers generally are very well tested. They are not known
+to cause any problems, even though they run in Kernel Mode too. This
+might be because there have so far only been 2 different PostScript
+drivers the ones from Adobe and the one from Microsoft. Both are
+very well tested and are as stable as you ever can imagine on
+Windows. The CUPS driver is derived from the Microsoft one.
+</para>
+</sect2>
-<sect1>
-<title>Setting up CUPS for driver download</title>
-
-<para>
-The <command>cupsadsmb</command> utility (shipped with all current
-CUPS versions) makes the sharing of any (or all) installed CUPS printers very
-easy. Prior to using it, you need the following settings in &smb.conf;:
-</para>
-
- <para><programlisting>[global]
- load printers = yes
- printing = cups
- printcap name = cups
-
- [printers]
- comment = All Printers
- path = /var/spool/samba
- browseable = no
- public = yes
- guest ok = yes
- writable = no
- printable = yes
- printer admin = root
-
- [print$]
- comment = Printer Drivers
- path = /etc/samba/drivers
- browseable = yes
- guest ok = no
- read only = yes
- write list = root
- </programlisting></para>
-
-<para>
-For licensing reasons the necessary files of the Adobe
-Postscript driver can not be distributed with either Samba or CUPS. You need
-to download them yourself from the Adobe website. Once extracted, create a
-<filename>drivers</filename> directory in the CUPS data directory (usually
-<filename>/usr/share/cups/</filename>). Copy the Adobe files using
-UPPERCASE filenames, to this directory as follows:
-</para>
-
- <para><programlisting>
- ADFONTS.MFM
- ADOBEPS4.DRV
- ADOBEPS4.HLP
- ADOBEPS5.DLL
- ADOBEPSU.DLL
- ADOBEPSU.HLP
- DEFPRTR2.PPD
- ICONLIB.DLL
- </programlisting></para>
-
-<para>
-Users of the ESP Print Pro software are able to install
-their "Samba Drivers" package for this purpose with no problem.
+<sect2>
+<title>Workarounds impose Heavy Limitations</title>
+
+<para>
+In many cases, in an attempt to work around this problem, site
+administrators have resorted to restrict the allowed drivers installed
+on their WTS to one generic PCL- and one PostScript driver. This
+however restricts the clients in the amount of printer options
+available for them; often they can't get out more than simplex
+prints from one standard paper tray, while their devices could do much
+better, if driven by a different driver! )
</para>
-</sect1>
+</sect2>
+<sect2>
+<title>CUPS: a "Magical Stone"?</title>
+<para>
+Using a PostScript driver, enabled with a CUPS-PPD, seems to be a very
+elegant way to overcome all these shortcomings. There are, depending
+on the version of Windows OS you use, up to 3 different PostScript
+drivers available: Adobe, Microsoft and CUPS PostScript drivers. None
+of them is known to cause major stability problems on WTS (even if
+used with many different PPDs). The clients will be able to (again)
+chose paper trays, duplex printing and other settings. However, there
+is a certain price for this too: a CUPS server acting as a PostScript
+RIP for its clients requires more CPU and RAM than when just acting as
+a "raw spooling" device. Plus, this setup is not yet widely tested,
+although the first feedbacks look very promising.
+</para>
+</sect2>
+
+<sect2>
+<title>PostScript Drivers with no major problems -- even in Kernel
+Mode</title>
+
+<para>
+More recent printer drivers on W2K and XP don't run in Kernel mode
+(unlike Win NT) any more. However, both operating systems can still
+use the NT drivers, running in Kernel mode (you can roughly tell which
+is which as the drivers in subdirectory "2" of "W32X86" are "old"
+ones). As was said before, the Adobe as well as the Microsoft
+PostScript drivers are not known to cause any stability problems. The
+CUPS driver is derived from the Microsoft one. There is a simple
+reason for this: The MS DDK (Device Development Kit) for Win NT (which
+used to be available at no cost to licensees of Visual Studio)
+includes the source code of the Microsoft driver, and licensees of
+Visual Studio are allowed to use and modify it for their own driver
+development efforts. This is what the CUPS people have done. The
+license doesn't allow them to publish the whole of the source code.
+However, they have released the "diff" under the GPL, and if you are
+owner of an "MS DDK for Win NT", you can check the driver yourself.
+</para>
+</sect2>
+</sect1>
<sect1>
-<title>Sources of CUPS drivers / PPDs</title>
+<title> Setting up CUPS for driver Download</title>
<para>
-On the internet you can find now many thousand CUPS-PPD
-files (with their companion filters), in many national languages,
-supporting more than 1.000 non-PostScript models.
+As we have said before: all previously known methods to prepare client
+printer drivers on the Samba server for download and "Point'n'Print"
+convenience of Windows workstations are working with CUPS too. These
+methods were described in the previous chapter. In reality, this is a
+pure Samba business, and only relates to the Samba/Win client
+relationship.
+</para>
+
+<sect2>
+<title><emphasis>cupsaddsmb</emphasis>: the unknown Utility</title>
+
+<para>
+The cupsaddsmb utility (shipped with all current CUPS versions) is an
+alternative method to transfer printer drivers into the Samba
+<parameter>[print$]</parameter> share. Remember, this share is where
+clients expect drivers deposited and setup for download and
+installation. It makes the sharing of any (or all) installed CUPS
+printers very easy. cupsaddsmb can use the Adobe PostScript driver as
+well as the newly developed <emphasis>CUPS PostScript Driver for
+WinNT/2K/XP</emphasis>. Note, that cupsaddsmb does
+<emphasis>not</emphasis> work with arbitrary vendor printer drivers,
+but only with the <emphasis>exact</emphasis> driver files that are
+named in its man page.
+</para>
+
+<para>
+The CUPS printer driver is available from the CUPS download site. Its
+package name is <filename>cups-samba-[version].tar.gz</filename> . It
+is preferred over the Adobe drivers since it has a number of
+advantages:
</para>
<itemizedlist>
- <listitem><para><ulink url="http://wwwl.easysw.com/printpro/">ESP PrintPro
- (http://wwwl.easysw.com/printpro/)</ulink>
- (commercial, non-Free) is packaged with more than 3.000 PPDs, ready for
- successful usage "out of the box" on Linux, IBM-AIX, HP-UX, Sun-Solaris,
- SGI-IRIX, Compaq Tru64, Digital Unix and some more commercial Unices (it
- is written by the CUPS developers themselves and its sales help finance
- the further development of CUPS, as they feed their creators)</para></listitem>
- <listitem><para>the <ulink
- url="http://gimp-print.sourceforge.net/">Gimp-Print-Project
- (http://gimp-print.sourceforge.net/)</ulink>
- (GPL, Free Software) provides around 120 PPDs (supporting nearly 300
- printers, many driven to photo quality output), to be used alongside the
- Gimp-Print CUPS filters;</para></listitem>
- <listitem><para><ulink url="http://www.turboprint.com/">TurboPrint
- (http://www.turboprint.com/)</ulink>
- (Shareware, non-Freee) supports roughly the same amount of printers in
- excellent quality;</para></listitem>
- <listitem><para><ulink
- url="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/">OMNI
- (http://www-124.ibm.com/developerworks/oss/linux/projects/omni/)</ulink>
- (LPGL, Free) is a package made by IBM, now containing support for more
- than 400 printers, stemming from the inheritance of IBM OS/2 KnowHow
- ported over to Linux (CUPS support is in a Beta-stage at present);</para></listitem>
- <listitem><para><ulink url="http://hpinkjet.sourceforge.net/">HPIJS
- (http://hpinkjet.sourceforge.net/)</ulink>
- (BSD-style licnes, Free) supports around 120 of HP's own printers and is
- also providing excellent print quality now;</para></listitem>
- <listitem><para><ulink
- url="http://www.linuxprinting.org/">Foomatic/cupsomatic (http://www.linuxprinting.org/)</ulink>
- (LPGL, Free) from Linuxprinting.org are providing PPDs for practically every
- Ghostscript filter known to the world, now usable with CUPS.</para></listitem>
+<listitem><para>it supports a much more accurate page
+accounting;</para></listitem>
+
+<listitem><para>it supports banner pages, and page labels on all
+printers;</para></listitem>
+
+<listitem><para>it supports the setting of a number of job IPP
+attributes (such as job-priority, page-label and
+job-billing)</para></listitem>
</itemizedlist>
<para>
-<emphasis>NOTE: </emphasis>the cupsomatic trick from Linuxprinting.org is
-working different from the other drivers. While the other drivers take the
-generic CUPS raster (produced by CUPS' own pstoraster PostScript RIP) as
-their input, cupsomatic "kidnaps" the PostScript inside CUPS, before
-RIP-ping, deviates it to an external Ghostscript installation (which now
-becomes the RIP) and gives it back to a CUPS backend once Ghostscript is
-finished. -- CUPS versions from 1.1.15 and later will provide their pstoraster
-PostScript RIP function again inside a system-wide Ghostscript
-installation rather than in "their own" pstoraster filter. (This
-CUPS-enabling Ghostscript version may be installed either as a
-patch to GNU or AFPL Ghostscript, or as a complete ESP Ghostscript package).
-However, this will not change the cupsomatic approach of guiding the printjob
-along a different path through the filtering system than the standard CUPS
-way...
+However, currently only Windows NT, 2000, and XP are supported by the
+CUPS drivers. You will need to get the respective part of Adobe driver
+too if you need to support Windows 95, 98, and ME clients.
+</para>
+</sect2>
+
+<sect2>
+<title>Prepare your <filename>smb.conf</filename> for
+cupsaddsmb</title>
+
+<para>
+Prior to running cupsaddsmb, you need the following settings in
+<filename>smb.conf</filename>:
+</para>
+
+<para><screen>
+
+ [global]
+ load printers = yes
+ printing = cups
+ printcap name = cups
+
+ [printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+ public = yes
+ guest ok = yes # setting depends on your requirements
+ writable = no
+ printable = yes
+ printer admin = root
+
+ [print$]
+ comment = Printer Drivers
+ path = /etc/samba/drivers
+ browseable = yes
+ guest ok = no
+ read only = yes
+ write list = root
+
+</screen></para>
+</sect2>
+
+<sect2>
+<title>CUPS Package of "PostScript Driver for WinNT/2k/XP"</title>
+
+<para>
+CUPS users may get the exactly same packages from<ulink
+url="http://www.cups.org/software.html"><emphasis>http://www.cups.org/software.html</emphasis></ulink>.
+It is a separate package from the CUPS base software files, tagged as
+<emphasis>CUPS 1.1.x Windows NT/2k/XP Printer Driver for SAMBA
+(tar.gz, 192k)</emphasis>. The filename to download is
+<filename>cups-samba-1.1.x.tar.gz</filename>. Upon untar-/unzip-ing,
+it will reveal these files:
+</para>
+
+<para><screen>
+
+# tar xvzf cups-samba-1.1.19.tar.gz
+
+ cups-samba.install
+ cups-samba.license
+ cups-samba.readme
+ cups-samba.remove
+ cups-samba.ss
+
+</screen></para>
+
+<para>
+These have been packaged with the ESP meta packager software
+"EPM". The <filename>*.install</filename> and
+<filename>*.remove</filename> files are simple shell scripts, which
+untars the <filename>*.ss</filename> (the <filename>*.ss</filename> is
+nothing else but a tar-archive, which can be untar-ed by "tar"
+too). Then it puts the content into
+<filename>/usr/share/cups/drivers/</filename>. This content includes 3
+files:
</para>
+<para><screen>
+
+# tar tv cups-samba.ss
+
+ cupsdrvr.dll
+ cupsui.dll
+ cups.hlp
+
+</screen></para>
+
<para>
-Once you installed a printer inside CUPS with one of the
-recommended methods (the lpadmin command, the web browser interface or one of
-the available GUI wizards), you can use <command>cupsaddsmb</command> to share the
-printer via Samba. <command>cupsaddsmb</command> prepares the driver files for
-comfortable client download and installation upon their first contact with
-this printer share.
+The <emphasis>cups-samba.install</emphasis> shell scripts is easy to
+handle:
</para>
+<para><screen>
+
+# ./cups-samba.install
+
+ [....]
+ Installing software...
+ Updating file permissions...
+ Running post-install commands...
+ Installation is complete.
+
+</screen></para>
+
+<para>
+The script should automatically put the driver files into the
+<filename>/usr/share/cups/drivers/</filename> directory.
+</para>
+<warning><para>
+Due to a bug, one recent CUPS release puts the
+<filename>cups.hlp</filename> driver file
+into<filename>/usr/share/drivers/</filename> instead of
+<filename>/usr/share/cups/drivers/</filename>. To work around this,
+copy/move the file (after running the
+<command>./cups-samba.install</command> script) manually to the
+right place.
+</para></warning>
+
+<para><screen>
+
+ cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/
+
+</screen></para>
+
+<para>
+This new CUPS PostScript driver is currently binary-only, but free of
+charge. No complete source code is provided (yet). The reason is this:
+it has been developed with the help of the <emphasis>Microsoft Driver
+Developer Kit</emphasis> (DDK) and compiled with Microsoft Visual
+Studio 6. Driver developers are not allowed to distribute the whole of
+the source code as Free Software. However, CUPS developers released
+the "diff" in source code under the GPL, so anybody with a license of
+Visual Studio and a DDK will be able to compile for him/herself.
+</para>
+</sect2>
<sect2>
-<title><command>cupsaddsmb</command></title>
+<title>Recognize the different Driver Files</title>
+<para>
+The CUPS drivers don't support the "older" Windows 95/98/ME, but only
+the Windows NT/2000/XP client:
+</para>
+
+<para><screen>
+
+ [Windows NT, 2000, and XP are supported by:]
+ cups.hlp
+ cupsdrvr.dll
+ cupsui.dll
+
+</screen></para>
<para>
-The <command>cupsaddsmb</command> command copies the needed files
-for convenient Windows client installations from the previously prepared CUPS
-data directory to your [print$] share. Additionally, the PPD
-associated with this printer is copied from <filename>/etc/cups/ppd/</filename> to
-[print$].
+Adobe drivers are available for the older Windows 95/98/ME as well as
+the Windows NT/2000/XP clients. The set of files is different for the
+different platforms.
</para>
-<para><programlisting>
-<prompt>root# </prompt> <command>cupsaddsmb -U root infotec_IS2027</command>
-Password for root required to access localhost via
-SAMBA: <userinput>[type in password 'secret']</userinput>
-</programlisting></para>
+<para><screen>
+
+ [Windows 95, 98, and Me are supported by:]
+ ADFONTS.MFM
+ ADOBEPS4.DRV
+ ADOBEPS4.HLP
+ DEFPRTR2.PPD
+ ICONLIB.DLL
+ PSMON.DLL
+
+ [Windows NT, 2000, and XP are supported by:]
+ ADOBEPS5.DLL
+ ADOBEPSU.DLL
+ ADOBEPSU.HLP
+
+</screen></para>
+
+<note><para>
+If both, the Adobe driver files and the CUPS driver files for the
+support of WinNT/2k/XP are present in , the Adobe ones will be ignored
+and the CUPS ones will be used. If you prefer -- for whatever reason
+-- to use Adobe-only drivers, move away the 3 CUPS driver files. The
+Win95/98/ME clients use the Adobe drivers in any case.
+</para></note>
+</sect2>
+
+<sect2>
+<title>Acquiring the Adobe Driver Files</title>
<para>
-To share all printers and drivers, use the <parameter>-a</parameter>
-parameter instead of a printer name.
+Acquiring the Adobe driver files seems to be unexpectedly difficult
+for many users. They are not available on the Adobe website as single
+files and the self-extracting and/or self-installing Windows-exe is
+not easy to locate either. Probably you need to use the included
+native installer and run the installation process on one client
+once. This will install the drivers (and one Generic PostScript
+printer) locally on the client. When they are installed, share the
+Generic PostScript printer. After this, the client's
+<parameter>[print$]</parameter> share holds the Adobe files, from
+where you can get them with smbclient from the CUPS host. A more
+detailed description about this is in the next (the CUPS printing)
+chapter.
</para>
+</sect2>
+<sect2>
+<title>ESP Print Pro Package of "PostScript Driver for
+WinNT/2k/XP"</title>
<para>
-Probably you want to see what's going on. Use the
-<parameter>-v</parameter> parameter to get a more verbose output:
+Users of the ESP Print Pro software are able to install their "Samba
+Drivers" package for this purpose with no problem. Retrieve the driver
+files from the normal download area of the ESP Print Pro software
+at<ulink
+url="http://www.easysw.com/software.html">http://www.easysw.com/software.html</ulink>.
+You need to locate the link labelled "SAMBA" amongst the
+<emphasis>Download Printer Drivers for ESP Print Pro 4.x</emphasis>
+area and download the package. Once installed, you can prepare any
+driver by simply highlighting the printer in the Printer Manager GUI
+and select <emphasis>Export Driver...</emphasis> from the menu. Of
+course you need to have prepared Samba beforehand too to handle the
+driver files; i.e. mainly setup the <parameter>[print$]</parameter>
+share, etc. The ESP Print Pro package includes the CUPS driver files
+as well as a (licensed) set of Adobe drivers for the Windows 95/98/ME
+client family.
+</para>
+</sect2>
+
+<sect2>
+<title>Caveats to be considered</title>
+
+<para>
+Once you have run the install script (and possibly manually
+moved the <filename>cups.hlp</filename> file to
+<filename>/usr/share/cups/drivers/</filename>), the driver is
+ready to be put into Samba's <parameter>[print$]</parameter> share (which often maps to
+<filename>/etc/samba/drivers/</filename> and contains a subdir
+tree with <emphasis>WIN40</emphasis> and
+<emphasis>W32X86</emphasis> branches): You do this by running
+"cupsaddsmb" (see also <command>man cupsaddsmb</command> for
+CUPS since release 1.1.16).
+</para>
+
+<tip><para>
+You may need to put root into the smbpasswd file by running
+<command>smbpasswd</command>; this is especially important if you
+should run this whole procedure for the first time, and are not
+working in an environment where everything is configured for
+<emphasis>Single Sign On</emphasis> to a Windows Domain Controller.
+</para></tip>
+
+<para>
+Once the driver files are in the <parameter>[print$]</parameter> share
+and are initialized, they are ready to be downloaded and installed by
+the Win NT/2k/XP clients.
+</para>
+
+<note><para>
+<orderedlist>
+<listitem><para>
+Win 9x/ME clients won't work with the CUPS PostScript driver. For
+these you'd still need to use the <filename>ADOBE*.*</filename>
+drivers as previously.
+</para></listitem>
+
+<listitem><para>
+It is not harmful if you still have the
+<filename>ADOBE*.*</filename> driver files from previous
+installations in the <filename>/usr/share/cups/drivers/</filename>
+directory. The new <emphasis>cupsaddsmb</emphasis> (from 1.1.16) will
+automatically prefer "its own" drivers if it finds both.
+</para></listitem>
+
+<listitem><para>
+Should your Win clients have had the old <filename>ADOBE*.*</filename>
+files for the Adobe PostScript driver installed, the download and
+installation of the new CUPS PostScript driver for Windows NT/2k/XP
+will fail at first. You need to wipe the old driver from the clients
+first. It is not enough to "delete" the printer, as the driver files
+will still be kept by the clients and re-used if you try to re-install
+the printer. To really get rid of the Adobe driver files on the
+clients, open the "Printers" folder (possibly via <emphasis>Start
+--&gt; Settings --&gt; Control Panel --&gt; Printers</emphasis>),
+right-click onto the folder background and select <emphasis>Server
+Properties</emphasis>. When the new dialog opens, select the
+<emphasis>Drivers</emphasis> tab. On the list select the driver you
+want to delete and click on the <emphasis>Delete</emphasis>
+button. This will only work if there is not one single printer left
+which uses that particular driver. You need to "delete" all printers
+using this driver in the "Printers" folder first. You will need
+Administrator privileges to do this.
+</para></listitem>
+
+<listitem><para>
+Once you have successfully downloaded the CUPS PostScript driver to a
+client, you can easily switch all printers to this one by proceeding
+as described elsewhere in the "Samba HOWTO Collection": either change
+a driver for an existing printer by running the "Printer Properties"
+dialog, or use <command>rpcclient</command> with the
+<command>setdriver</command> sub-command.
+</para></listitem>
+</orderedlist>
+</para></note>
+</sect2>
+
+<sect2>
+<title>What are the Benefits of using the "CUPS PostScript Driver for
+Windows NT/2k/XP" as compared to the Adobe Driver?</title>
+
+<para>
+You are interested in a comparison between the CUPS and the Adobe
+PostScript drivers? For our purposes these are the most important
+items which weigh in favor of the CUPS ones:
</para>
+<itemizedlist>
+<listitem><para>no hassle with the Adobe EULA</para></listitem>
+
+<listitem><para>no hassle with the question <quote>Where do I
+get the ADOBE*.* driver files from?</quote></para></listitem>
+
+<listitem><para>the Adobe drivers (on request of the printer PPD
+associated with them) often put a PJL header in front of the main
+PostScript part of the print file. Thus the printfile starts with
+<parameter>&lt;1B &gt;%-12345X</parameter> or
+<parameter>&lt;escape&gt;%-12345X</parameter> instead
+of <parameter>%!PS</parameter>). This leads to the
+CUPS daemon auto-typing the incoming file as a print-ready file,
+not initiating a pass through the "pstops" filter (to speak more
+technically, it is not regarded as the generic MIME type
+<emphasis>application/postscript</emphasis>, but as
+the more special MIME type
+<emphasis>application/cups.vnd-postscript</emphasis>),
+which therefore also leads to the page accounting in
+<emphasis>/var/log/cups/page_log</emphasis> not
+receiving the exact number of pages; instead the dummy page number
+of "1" is logged in a standard setup)</para></listitem>
+
+<listitem><para>the Adobe driver has more options to "mis-configure" the
+PostScript generated by it (like setting it inadvertently to
+<emphasis>Optimize for Speed</emphasis>, instead of
+<emphasis>Optimize for Portability</emphasis>, which
+could lead to CUPS being unable to process it)</para></listitem>
+
+<listitem><para>the CUPS PostScript driver output sent by Windows
+clients to the CUPS server will be guaranteed to be auto-typed always
+as generic MIME type <emphasis>application/postscript</emphasis>,
+thusly passing through the CUPS "pstops" filter and logging the
+correct number of pages in the <filename>page_log</filename> for
+accounting and quota purposes</para></listitem>
+
+<listitem><para>the CUPS PostScript driver supports the sending of
+additional standard (IPP) print options by Win NT/2k/XP clients. Such
+additional print options are: naming the CUPS standard
+<emphasis>banner pages</emphasis> (or the custom ones, should they be
+installed at the time of driver download), using the CUPS
+<emphasis>page-label</emphasis> option, setting a
+<emphasis>job-priority</emphasis> and setting the <emphasis>scheduled
+time of printing</emphasis> (with the option to support additional
+useful IPP job attributes in the future).</para></listitem>
+
+<listitem><para>the CUPS PostScript driver supports the inclusion of
+the new <emphasis>*cupsJobTicket</emphasis> comments at the
+beginning of the PostScript file (which could be used in the future
+for all sort of beneficial extensions on the CUPS side, but which will
+not disturb any other applications as they will regard it as a comment
+and simply ignore it).</para></listitem>
+
+<listitem><para>the CUPS PostScript driver will be the heart of the
+fully fledged CUPS IPP client for Windows NT/2K/XP to be released soon
+(probably alongside the first Beta release for CUPS
+1.2).</para></listitem>
+</itemizedlist>
+
+</sect2>
+
+<sect2>
+<title>Run "cupsaddsmb" (quiet Mode)</title>
+
+<para>
+The cupsaddsmb command copies the needed files into your
+<parameter>[print$]</parameter> share. Additionally, the PPD
+associated with this printer is copied from
+<filename>/etc/cups/ppd/</filename> to
+<parameter>[print$]</parameter>. There the files wait for convenient
+Windows client installations via Point'n'Print. Before we can run the
+command successfully, we need to be sure that we can authenticate
+towards Samba. If you have a small network you are probably using user
+level security (<parameter>security = user</parameter>). Probably your
+root has already a Samba account. Otherwise, create it now, using
+<command>smbpasswd</command>:
+</para>
+
+<para><screen>
+
+ # smbpasswd -a root
+ New SMB password: [type in password 'secret']
+ Retype new SMB password: [type in password 'secret']
+
+</screen></para>
+
+<para>
+Here is an example of a successfully run cupsaddsmb command.
+</para>
+
+<para><screen>
+
+ # cupsaddsmb -U root infotec_IS2027
+ Password for root required to access localhost via SAMBA: [type in password 'secret']
+
+</screen></para>
+
+<para>
+To share <emphasis>all</emphasis> printers and drivers, use the
+<parameter>-a</parameter> parameter instead of a printer name. Since
+cupsaddsmb "exports" the printer drivers to Samba, it should be
+obvious that it only works for queues with a CUPS driver associated.
+</para>
+</sect2>
+
+<sect2>
+<title>Run "cupsaddsmb" with verbose Output</title>
+
<para>
Probably you want to see what's going on. Use the
-<parameter>-v</parameter> parameter to get a more verbose output:
+<parameter>-v</parameter> parameter to get a more verbose output. The
+output below was edited for better readability: all "\" at the end of
+a line indicate that I inserted an artificial line break plus some
+indentation here:
</para>
-<para><programlisting>
-Note: The following line shave been wrapped so that information is not lost.
-
-<prompt>root# </prompt> cupsaddsmb -v -U root infotec_IS2027
- Password for root required to access localhost via SAMBA:
- Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put
- /var/spool/cups/tmp/3cd1cc66376c0 W32X86/infotec_IS2027.PPD;put
- /usr/share/cups/drivers/
- ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLLr
- W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
- added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
- added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0
- added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0
- Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs]
- NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
- putting file /var/spool/cups/tmp/3cd1cc66376c0 as
- \W32X86/infotec_IS2027.PPD (17394.6 kb/s) (average 17395.2 kb/s)
- putting file /usr/share/cups/drivers/ADOBEPS5.DLL as
- \W32X86/ADOBEPS5.DLL (10877.4 kb/s) (average 11343.0 kb/s)
- putting file /usr/share/cups/drivers/ADOBEPSU.DLL as
- \W32X86/ADOBEPSU.DLL (5095.2 kb/s) (average 9260.4 kb/s)
- putting file /usr/share/cups/drivers/ADOBEPSU.HLP as
- \W32X86/ADOBEPSU.HLP (8828.7 kb/s) (average 9247.1 kb/s)
-
- Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put
- /var/spool/cups/tmp/3cd1cc66376c0 WIN40/infotec_IS2027.PPD;put
- /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put
- /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put
- /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put
- /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put
- /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put
- /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
- added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
- added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0
- added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0
- Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs]
- NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
- putting file /var/spool/cups/tmp/3cd1cc66376c0 as
- \WIN40/infotec_IS2027.PPD (26091.5 kb/s) (average 26092.8 kb/s)
- putting file /usr/share/cups/drivers/ADFONTS.MFM as
- \WIN40/ADFONTS.MFM (11241.6 kb/s) (average 11812.9 kb/s)
- putting file /usr/share/cups/drivers/ADOBEPS4.DRV as
- \WIN40/ADOBEPS4.DRV (16640.6 kb/s) (average 14679.3 kb/s)
- putting file /usr/share/cups/drivers/ADOBEPS4.HLP as
- \WIN40/ADOBEPS4.HLP (11285.6 kb/s) (average 14281.5 kb/s)
- putting file /usr/share/cups/drivers/DEFPRTR2.PPD as
- \WIN40/DEFPRTR2.PPD (823.5 kb/s) (average 12944.0 kb/s)
- putting file /usr/share/cups/drivers/ICONLIB.DLL as
- \WIN40/ICONLIB.DLL (19226.2 kb/s) (average 13169.7 kb/s)
- putting file /usr/share/cups/drivers/PSMON.DLL as
- \WIN40/PSMON.DLL (18666.1 kb/s) (average 13266.7 kb/s)
-
- Running command: rpcclient localhost -N -U'root%secret'
- -c 'adddriver "Windows NT x86"
- "infotec_IS2027:ADOBEPS5.DLL:infotec_IS2027.PPD:ADOBEPSU.DLL:
- ADOBEPSU.HLP:NULL:RAW:NULL"'
- cmd = adddriver "Windows NT x86"
- "infotec_IS2027:ADOBEPS5.DLL:infotec_IS2027.PPD:ADOBEPSU.DLL:
- ADOBEPSU.HLP:NULL:RAW:NULL"
- Printer Driver infotec_IS2027 successfully installed.
-
- Running command: rpcclient localhost -N -U'root%secret'
- -c 'adddriver "Windows 4.0"
- "infotec_IS2027:ADOBEPS4.DRV:infotec_IS2027.PPD:NULL:
- ADOBEPS4.HLP:PSMON.DLL:RAW: ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
- cmd = adddriver "Windows 4.0" "infotec_IS2027:ADOBEPS4.DRV:
- infotec_IS2027.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:
- ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
- Printer Driver infotec_IS2027 successfully installed.
-
- Running command: rpcclient localhost -N -U'root%secret'
- -c 'setdriver infotec_IS2027 infotec_IS2027'
- cmd = setdriver infotec_IS2027 infotec_IS2027
- Succesfully set infotec_IS2027 to driver infotec_IS2027.
-
- <prompt>root# </prompt>
-</programlisting></para>
-
-<para>
-If you look closely, you'll discover your root password was transfered unencrypted over
-the wire, so beware! Also, if you look further her, you'll discover error messages like
-<constant>NT_STATUS_OBJECT_NAME_COLLISION</constant> in between. They occur, because
-the directories <filename>WIN40</filename> and <filename>W32X86</filename> already
-existed in the [print$] driver download share (from a previous driver
-installation). They are harmless here.
-</para>
-
-<para>
-Now your printer is prepared for the clients to use. From
-a client, browse to the CUPS/Samba server, open the "Printers"
-share, right-click on this printer and select "Install..." or
-"Connect..." (depending on the Windows version you use). Now their
-should be a new printer in your client's local "Printers" folder,
-named (in my case) "infotec_IS2027 on kdebitshop"
-</para>
-
-<para>
-<emphasis>NOTE: </emphasis>
-<command>cupsaddsmb</command> will only reliably work i
-with CUPS version 1.1.15 or higher
+<warning><para>
+You will see the root password for the Samba account printed on
+screen. If you use remote access, the password will go over the wire
+unencrypted!
+</para></warning>
+
+<para><screen>
+
+ # cupsaddsmb -U root -v infotec_2105
+ Password for root required to access localhost via SAMBA:
+ Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put \
+ /var/spool/cups/tmp/3e98bf2d333b5 W32X86/infotec_2105.ppd;put \
+ /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put \
+ /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put \
+ /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp'
+ added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0
+ Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a]
+ NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
+ putting file /var/spool/cups/tmp/3e98bf2d333b5 as \W32X86/infotec_2105.ppd (2328.8 kb/s) \
+ (average 2328.8 kb/s)
+ putting file /usr/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll (9374.3 kb/s) \
+ (average 5206.6 kb/s)
+ putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll (8107.2 kb/s) \
+ (average 5984.1 kb/s)
+ putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp (3475.0 kb/s) \
+ (average 5884.7 kb/s)
+
+ Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86" \
+ "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll:cups.hlp:NULL: \
+ RAW:NULL"'
+ cmd = adddriver "Windows NT x86" "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll: \
+ cups.hlp:NULL:RAW:NULL"
+ Printer Driver infotec_2105 successfully installed.
+
+ Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put \
+ /var/spool/cups/tmp/3e98bf2d333b5 WIN40/infotec_2105.PPD; put \
+ /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put \
+ /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put \
+ /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put \
+ /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put \
+ /usr/share/cups/drivers/ICONLIB.DLL
+ WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
+ added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0
+ Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a]
+ NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
+ putting file /var/spool/cups/tmp/3e98bf2d333b5 as \WIN40/infotec_2105.PPD (2328.8 kb/s) \
+ (average 2328.8 kb/s)
+ putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (9368.0 kb/s) \
+ (average 6469.6 kb/s)
+ putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (9958.2 kb/s) \
+ (average 8404.3 kb/s)
+ putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (8341.5 kb/s) \
+ (average 8398.6 kb/s)
+ putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (2195.9 kb/s) \
+ (average 8254.3 kb/s)
+ putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (8239.9 kb/s) \
+ (average 8253.6 kb/s)
+ putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (6222.2 kb/s) \
+ (average 8188.5 kb/s)
+
+ Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows 4.0" \
+ "infotec_2105:ADOBEPS4.DRV:infotec_2105.PPD:NULL:ADOBEPS4.HLP: \
+ PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP,PSMON.DLL, \
+ ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
+ cmd = adddriver "Windows 4.0" "infotec_2105:ADOBEPS4.DRV:infotec_2105.PPD:NULL: \
+ ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP, \
+ PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
+ Printer Driver infotec_2105 successfully installed.
+
+ Running command: rpcclient localhost -N -U'root%secret' \
+ -c 'setdriver infotec_2105 infotec_2105'
+ cmd = setdriver infotec_2105 infotec_2105
+ Successfully set infotec_2105 to driver infotec_2105.
+
+</screen></para>
+
+<para>
+If you look closely, you'll discover your root password was transfered
+unencrypted over the wire, so beware! Also, if you look further her,
+you'll discover error messages like NT_STATUS_OBJECT_NAME_COLLISION in
+between. They occur, because the directories WIN40 and W32X86 already
+existed in the <parameter>[print$]</parameter> driver download share
+(from a previous driver installation). They are harmless here.
+</para>
+</sect2>
+
+<sect2>
+<title>Understanding cupsaddsmb</title>
+
+<para>
+What has happened? What did cupsaddsmb do? There are five stages of
+the procedure
+</para>
+
+<orderedlist>
+
+<listitem><para>call the CUPS server via IPP and request the
+driver files and the PPD file for the named printer;</para></listitem>
+
+<listitem><para>store the files temporarily in the local
+TEMPDIR (as defined in
+<filename>cupsd.conf</filename>);</para></listitem>
+
+<listitem><para>connect via smbclient to the Samba server's
+ <parameter>[print$]</parameter> share and put the files into the
+ share's WIN40 (for Win95/98/ME) and W32X86/ (for WinNT/2k/XP) sub
+ directories;</para></listitem>
+
+<listitem><para>connect via rpcclient to the Samba server and
+execute the "adddriver" command with the correct
+parameters;</para></listitem>
+
+<listitem><para>connect via rpcclient to the Samba server a second
+time and execute the "setdriver" command.</para></listitem>
+</orderedlist>
+
+<para>
+Note, that you can run the cupsaddsmb utility with parameters to
+specify one remote host as Samba host and a second remote host as CUPS
+host. Especially if you want to get a deeper understanding, it is a
+good idea try it and see more clearly what is going on (though in real
+life most people will have their CUPS and Samba servers run on the
+same host):
+</para>
+
+<para><screen>
+
+ # cupsaddsmb -H sambaserver -h cupsserver -v printername
+
+</screen></para>
+</sect2>
+
+<sect2>
+<title>How to recognize if cupsaddsm completed successfully</title>
+
+<para>
+You <emphasis>must</emphasis> always check if the utility completed
+successfully in all fields. You need as a minimum these 3 messages
+amongst the output:
+</para>
+
+<orderedlist>
+
+<listitem><para><emphasis>Printer Driver infotec_2105 successfully
+installed.</emphasis> # (for the W32X86 == WinNT/2K/XP
+architecture...)</para></listitem>
+
+<listitem><para><emphasis>Printer Driver infotec_2105 successfully
+installed.</emphasis> # (for the WIN40 == Win9x/ME
+architecture...)</para></listitem>
+
+<listitem><para><emphasis>Successfully set [printerXPZ] to driver
+[printerXYZ].</emphasis></para></listitem>
+</orderedlist>
+
+<para>
+These messages probably not easily recognized in the general
+output. If you run cupsaddsmb with the <parameter>-a</parameter>
+parameter (which tries to prepare <emphasis>all</emphasis> active CUPS
+printer drivers for download), you might miss if individual printers
+drivers had problems to install properly. Here a redirection of the
+output will help you analyze the results in retrospective.
+</para>
+
+<note><para>
+It is impossible to see any diagnostic output if you don't run
+cupsaddsmb in verbose mode. Therefore we strongly recommend to not
+use the default quiet mode. It will hide any problems from you which
+might occur.
+</para></note>
+</sect2>
+
+<sect2>
+<title>cupsaddsmb with a Samba PDC</title>
+
+<para>
+You can't get the standard cupsaddsmb command to run on a Samba PDC?
+You are asked for the password credential all over again and again and
+the command just will not take off at all? Try one of these
+variations:
+</para>
+
+<para><screen>
+
+ # cupsaddsmb -U DOMAINNAME\\root -v printername
+ # cupsaddsmb -H SAMBA-PDC -U DOMAINNAME\\root -v printername
+ # cupsaddsmb -H SAMBA-PDC -U DOMAINNAME\\root -h cups-server -v printername
+
+</screen></para>
+
+<para>
+(Note the two backslashes: the first one is required to
+"escape" the second one).
+</para>
+</sect2>
+
+<sect2>
+<title>cupsaddsmb Flowchart</title>
+
+<para>
+Here is a chart about the procedures, commandflows and
+dataflows of the "cupaddsmb" command. Note again: cupsaddsmb is
+not intended to, and does not work with, "raw" queues!
+</para>
+
+<para>
+<figure><title>cupsaddsmb flowchart</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/1small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/1small.png"/></imageobject>
+</mediaobject>
+</figure>
+</para>
+</sect2>
+
+<sect2>
+<title>Installing the PostScript Driver on a Client</title>
+
+<para>
+After cupsaddsmb completed, your driver is prepared for the clients to
+use. Here are the steps you must perform to download and install it
+via "Point'n'Print". From a Windows client, browse to the CUPS/Samba
+server;
+</para>
+
+<itemizedlist>
+
+<listitem><para>open the <emphasis>Printers</emphasis>
+share of Samba in Network Neighbourhood;</para></listitem>
+
+<listitem><para>right-click on the printer in
+question;</para></listitem>
+
+<listitem><para>from the opening context-menu select
+<emphasis>Install...</emphasis> or
+<emphasis>Connect...</emphasis> (depending on the Windows version you
+use).</para></listitem>
+</itemizedlist>
+
+<para>
+After a few seconds, there should be a new printer in your
+client's <emphasis>local</emphasis> "Printers" folder: On Windows
+XP it will follow a naming convention of <emphasis>PrinterName on
+SambaServer</emphasis>. (In my current case it is "infotec_2105 on
+kde-bitshop"). If you want to test it and send your first job from
+an application like Winword, the new printer will appears in a
+<filename>\\SambaServer\PrinterName</filename> entry in the
+dropdown list of available printers.
+</para>
+
+<note><para>
+cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher
and Samba from 2.2.4. If it doesn't work, or if the automatic printer
driver download to the clients doesn't succeed, you can still manually
install the CUPS printer PPD on top of the Adobe PostScript driver on
-clients and then point the client's printer queue to the Samba printer
-share for connection, should you desire to use the CUPS networked
-PostScript RIP functions.
+clients. Then point the client's printer queue to the Samba printer
+share for a UNC type of connection:
+</para></note>
+
+<para><screen>
+
+ net use lpt1: \\sambaserver\printershare /user:ntadmin
+
+</screen></para>
+
+<para>
+should you desire to use the CUPS networked PostScript RIP
+functions. (Note that user "ntadmin" needs to be a valid Samba user
+with the required privileges to access the printershare) This would
+set up the printer connection in the traditional
+<emphasis>LanMan</emphasis> way (not using MS-RPC).
+</para>
+</sect2>
+
+<sect2>
+<title>Avoiding critical PostScript Driver Settings on the
+Client</title>
+
+<para>
+Soooo: printing works, but there are still problems. Most jobs print
+well, some don't print at all. Some jobs have problems with fonts,
+which don't look very good. Some jobs print fast, and some are
+dead-slow. Many of these problems can be greatly reduced or even
+completely eliminated if you follow a few guidelines. Remember, if
+your print device is not PostScript-enabled, you are treating your
+Ghostscript installation on your CUPS host with the output your client
+driver settings produce. Treat it well:
+</para>
+
+<itemizedlist>
+<listitem><para>Avoid the <emphasis>PostScript Output Option: Optimize
+for Speed</emphasis> setting. Rather use the <emphasis>Optimize for
+Portability</emphasis> instead (Adobe PostScript
+driver).</para></listitem>
+
+<listitem><para>Don't use the <emphasis>Page Independence:
+NO</emphasis> setting. Instead use <emphasis>Page Independence
+YES</emphasis> (CUPS PostScript Driver)</para></listitem>
+
+<listitem><para>Recommended is the <emphasis>True Type Font
+Downloading Option: Native True Type</emphasis> over
+<emphasis>Automatic</emphasis> and <emphasis>Outline</emphasis>; you
+should by all means avoid <emphasis>Bitmap</emphasis> (Adobe
+PostScript Driver)</para></listitem>
+
+<listitem><para>Choose <emphasis>True Type Font: Download as Softfont
+into Printer</emphasis> over the default <emphasis>Replace by Device
+Font</emphasis> (for exotic fonts you may need to change it back to
+get a printout at all) (Adobe)</para></listitem>
+
+<listitem><para>Sometimes you can choose <emphasis>PostScript Language
+Level</emphasis>: in case of problems try <emphasis>2</emphasis>
+instead of <emphasis>3</emphasis> (the latest ESP Ghostscript package
+handles Level 3 PostScript very well) (Adobe).</para></listitem>
+
+<listitem><para>Say <emphasis>Yes</emphasis> to <emphasis>PostScript
+Error Handler</emphasis> (Adobe)</para></listitem>
+</itemizedlist>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Installing PostScript Driver Files manually (using
+rpcclient)</title>
+
+<para>
+Of course you can run all the commands which are embedded into the
+cupsaddsmb convenience utility yourself, one by one, and hereby upload
+and prepare the driver files for future client downloads.
+</para>
+
+<orderedlist>
+<listitem><para>prepare Samba (a CUPS printqueue with the name of the
+printer should be there. We are providing the driver
+now);</para></listitem>
+
+<listitem><para>copy all files to
+<parameter>[print$]:</parameter></para></listitem>
+
+<listitem><para>run <command>rpcclient adddriver</command>
+(for each client architecture you want to support):</para></listitem>
+
+<listitem><para>run <command>rpcclient
+setdriver.</command></para></listitem>
+</orderedlist>
+
+<para>
+We are going to do this now. First, read the man page on "rpcclient"
+to get a first idea. Look at all the printing related
+sub-commands. <command>enumprinters</command>,
+<command>enumdrivers</command>, <command>enumports</command>,
+<command>adddriver</command>, <command>setdriver</command> are amongst
+the most interesting ones. rpcclient implements an important part of
+the MS-RPC protocol. You can use it to query (and command) a Win NT
+(or 2K/XP) PC too. MS-RPC is used by Windows clients, amongst other
+things, to benefit from the "Point'n'Print" features. Samba can now
+mimic this too.
+</para>
+
+<sect2>
+<title>A Check of the rpcclient man Page</title>
+
+<para>
+First let's have a little check of the rpcclient man page. Here are
+two relevant passages:
+</para>
+
+<para>
+<command>adddriver &lt;arch&gt; &lt;config&gt;</command> Execute an
+AddPrinterDriver() RPC to install the printer driver information on
+the server. Note that the driver files should already exist in the
+directory returned by <command>getdriverdir</command>. Possible
+values for <parameter>arch</parameter> are the same as those for the
+<command>getdriverdir</command> command. The
+<parameter>config</parameter> parameter is defined as follows:
+</para>
+
+<para><screen>
+Long Printer Name:\
+Driver File Name:\
+Data File Name:\
+Config File Name:\
+Help File Name:\
+Language Monitor Name:\
+Default Data Type:\
+Comma Separated list of Files
+</screen></para>
+
+<para>Any empty fields should be enter as the string "NULL". </para>
+
+<para>Samba does not need to support the concept of Print Monitors
+since these only apply to local printers whose driver can make use of
+a bi-directional link for communication. This field should be "NULL".
+On a remote NT print server, the Print Monitor for a driver must
+already be installed prior to adding the driver or else the RPC will
+fail
+</para>
+
+<para>
+<command>setdriver &lt;printername&gt; &lt;drivername&gt;</command>
+Execute a <command>SetPrinter()</command> command to update the
+printer driver associated with an installed printer. The printer
+driver must already be correctly installed on the print server.
+</para>
+
+<para> See also the enumprinters and enumdrivers commands for
+obtaining a list of installed printers and drivers.
+</para>
+
+</sect2>
+
+<sect2>
+<title>Understanding the rpcclient man Page</title>
+
+<para>
+The <emphasis>exact</emphasis> format isn't made too clear by the man
+page, since you have to deal with some parameters containing
+spaces. Here is a better description for it. We have line-broken the
+command and indicated the breaks with "\". Usually you would type the
+command in one line without the linebreaks:
+</para>
+
+<para><screen>
+
+ adddriver "Architecture" \
+ "LongPrinterName:DriverFile:DataFile:ConfigFile:HelpFile:\
+ LanguageMonitorFile:DataType:ListOfFiles,Comma-separated"
+
+</screen></para>
+
+<para>
+What the man pages denotes as a simple &lt;config&gt;
+keyword, does in reality consist of 8 colon-separated fields. The
+last field may take multiple (in some, very insane, cases, even
+20 different additional files. This might sound confusing at first.
+Note, that what the man pages names the "LongPrinterName" in
+reality should rather be called the "Driver Name". You can name it
+anything you want, as long as you use this name later in the
+<emphasis>rpcclient ... setdriver</emphasis> command. For
+practical reasons, many name the driver the same as the
+printer.
+</para>
+
+<para>
+True: it isn't simple at all. I hear you asking:
+<emphasis>How do I know which files are "Driver
+File", "Data File", "Config File", "Help File" and "Language
+Monitor File" in each case?</emphasis> -- For an answer you may
+want to have a look at how a Windows NT box with a shared printer
+presents the files to us. Remember, that this whole procedure has
+to be developed by the Samba Team by overhearing the traffic caused
+by Windows computers on the wire. We may as well turn to a Windows
+box now, and access it from a UNIX workstation. We will query it
+with <command>rpcclient</command> to see what it tells us and
+try to understand the man page more clearly which we've read just
+now.
+</para>
+</sect2>
+
+<sect2>
+<title>Producing an Example by querying a Windows Box</title>
+
+<para>
+We could run <command>rpcclient</command> with a
+<command>getdriver</command> or a <command>getprinter</command>
+subcommand (in level 3 verbosity) against it. Just sit down at UNIX or
+Linux workstation with the Samba utilities installed. Then type the
+following command:
+</para>
+
+<para><screen>
+
+ rpcclient -U'USERNAME%PASSWORD' NT-SERVER-NAME -c 'getdriver printername 3'
+
+</screen></para>
+
+<para>
+From the result it should become clear which is which. Here is an
+example from my installation:
+</para>
+
+<para><screen>
+
+# rpcclient -U'Danka%xxxx' W2KSERVER -c'getdriver "DANKA InfoStream Virtual Printer" 3'
+ cmd = getdriver "DANKA InfoStream Virtual Printer" 3
+
+ [Windows NT x86]
+ Printer Driver Info 3:
+ Version: [2]
+ Driver Name: [DANKA InfoStream]
+ Architecture: [Windows NT x86]
+ Driver Path: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\PSCRIPT.DLL]
+ Datafile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\INFOSTRM.PPD]
+ Configfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\PSCRPTUI.DLL]
+ Helpfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\PSCRIPT.HLP]
+
+ Dependentfiles: []
+ Dependentfiles: []
+ Dependentfiles: []
+ Dependentfiles: []
+ Dependentfiles: []
+ Dependentfiles: []
+ Dependentfiles: []
+
+ Monitorname: []
+ Defaultdatatype: []
+
+</screen></para>
+
+<para>
+Some printer drivers list additional files under the label
+"Dependentfiles": these would go into the last field
+<emphasis>ListOfFiles,Comma-separated</emphasis>. For the CUPS
+PostScript drivers we don't need any (nor would we for the Adobe
+PostScript driver): therefore the field will get a "NULL" entry.
+</para>
+</sect2>
+
+<sect2>
+<title>What is required for adddriver and setdriver to succeed</title>
+
+<para>
+From the manpage (and from the quoted output
+of <emphasis>cupsaddsmb</emphasis>, above) it becomes clear that you
+need to have certain conditions in order to make the manual uploading
+and initializing of the driver files succeed. The two rpcclient
+subcommands (<command>adddriver</command> and
+<command>setdriver</command>) need to encounter the following
+pre-conditions to complete successfully:
+</para>
+<itemizedlist>
+
+<listitem><para>you are connected as "printer admin", or root (note,
+that this is <emphasis>not</emphasis> the "Printer Operators" group in
+NT, but the <emphasis>printer admin</emphasis> group, as defined in
+the <parameter>[global]</parameter> section of
+<filename>smb.conf</filename>);</para></listitem>
+
+<listitem><para>copy all required driver files to
+<filename>\\sambaserver\print$\w32x86</filename> and
+<filename>\\sambaserver\print$\win40</filename> as appropriate. They
+will end up in the "0" respective "2" subdirectories later -- for now
+<emphasis>don't</emphasis> put them there, they'll be automatically
+used by the <command>adddriver</command> subcommand.! (if you use
+"smbclient" to put the driver files into the share, note that you need
+to escape the "$": <command>smbclient //sambaserver/print\$ -U
+root</command>);</para></listitem>
+
+<listitem><para>the user you're connecting as must be able to write to
+the <parameter>[print$]</parameter> share and create
+subdirectories;</para></listitem>
+
+<listitem><para>the printer you are going to setup for the Windows
+clients, needs to be installed in CUPS already;</para></listitem>
+
+<listitem><para>the CUPS printer must be known to Samba, otherwise the
+<command>setdriver</command> subcommand fails with an
+NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by
+Samba you may use the <command>enumprinters</command> subcommand to
+rpcclient. A long-standing bug prevented a proper update of the
+printer list until every smbd process had received a SIGHUP or was
+restarted. Remember this in case you've created the CUPS printer just
+shortly ago and encounter problems: try restarting
+Samba.</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2>
+<title>Manual Commandline Driver Installation in 15 little Steps</title>
+
+<para>
+We are going to install a printer driver now by manually executing all
+required commands. As this may seem a rather complicated process at
+first, we go through the procedure step by step, explaining every
+single action item as it comes up.
+</para>
+
+<sect3>
+<title>First Step: Install the Printer on CUPS</title>
+
+<para><screen>
+
+# lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E -P /home/kurt/canonIR85.ppd
+
+</screen></para>
+
+<para>
+This installs printer with the name <emphasis>mysmbtstprn</emphasis>
+to the CUPS system. The printer is accessed via a socket
+(a.k.a. JetDirect or Direct TCP/IP) connection. You need to be root
+for this step
+</para>
+</sect3>
+
+<sect3>
+<title>Second Step (optional): Check if the Printer is recognized by
+Samba</title>
+
+<para><screen>
+
+ # rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep -C2 mysmbtstprn
+
+ flags:[0x800000]
+ name:[\\kde-bitshop\mysmbtstprn]
+ description:[\\kde-bitshop\mysmbtstprn,,mysmbtstprn]
+ comment:[mysmbtstprn]
+
+</screen></para>
+
+<para>
+This should show the printer in the list. If not, stop and re-start
+the Samba daemon (smbd), or send a HUP signal: <command>kill -HUP
+`pidof smbd`</command>. Check again. Troubleshoot and repeat until
+success. Note the "empty" field between the two commas in the
+"description" line. Here would the driver name appear if there was one
+already. You need to know root's Samba password (as set by the
+<command>smbpasswd</command> command) for this step and most of the
+following steps. Alternatively you can authenticate as one of the
+users from the "write list" as defined in <filename>smb.conf</filename> for
+<parameter>[print$]</parameter>.
+</para>
+</sect3>
+
+<sect3>
+<title>Third Step (optional): Check if Samba knows a Driver for the
+Printer</title>
+
+<para><screen>
+
+# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep driver
+ drivername:[]
+
+# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep -C4 driv
+ servername:[\\kde-bitshop]
+ printername:[\\kde-bitshop\mysmbtstprn]
+ sharename:[mysmbtstprn]
+ portname:[Samba Printer Port]
+ drivername:[]
+ comment:[mysmbtstprn]
+ location:[]
+ sepfile:[]
+ printprocessor:[winprint]
+
+# rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost
+ result was WERR_UNKNOWN_PRINTER_DRIVER
+
+</screen></para>
+
+<para>
+Neither method of the three commands shown above should show a driver.
+This step was done for the purpose of demonstrating this condition. An
+attempt to connect to the printer at this stage will prompt the
+message along the lines: "The server has not the required printer
+driver installed".
+</para>
+</sect3>
+
+<sect3>
+<title>Fourth Step: Put all required Driver Files into Samba's
+[print$]</title>
+
+<para><screen>
+
+# smbclient //localhost/print\$ -U 'root%xxxx' \
+ -c 'cd W32X86; \
+ put /etc/cups/ppd/mysmbtstprn.ppd mysmbtstprn.PPD; \
+ put /usr/share/cups/drivers/cupsui.dll cupsui.dll; \
+ put /usr/share/cups/drivers/cupsdrvr.dll cupsdrvr.dll; \
+ put /usr/share/cups/drivers/cups.hlp cups.hlp'
+
+</screen></para>
+
+<para>
+(Note that this command should be entered in one long single
+line. Line-breaks and the line-end indicating "\" has been inserted
+for readability reasons.) This step is <emphasis>required</emphasis>
+for the next one to succeed. It makes the driver files physically
+present in the <parameter>[print$]</parameter> share. However, clients
+would still not be able to install them, because Samba does not yet
+treat them as driver files. A client asking for the driver would still
+be presented with a "not installed here" message.
+</para>
+</sect3>
+
+<sect3>
+<title>Fifth Step: Verify where the Driver Files are now</title>
+
+<para><screen>
+
+# ls -l /etc/samba/drivers/W32X86/
+ total 669
+ drwxr-sr-x 2 root ntadmin 532 May 25 23:08 2
+ drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3
+ -rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp
+ -rwxr--r-- 1 root ntadmin 278380 May 25 23:21 cupsdrvr.dll
+ -rwxr--r-- 1 root ntadmin 215848 May 25 23:21 cupsui.dll
+ -rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD
+
+</screen></para>
+
+<para>
+The driver files now are in the W32X86 architecture "root" of
+<parameter>[print$]</parameter>.
+</para>
+</sect3>
+
+<sect3>
+<title>Sixth Step: Tell Samba that these are
+<emphasis>Driver</emphasis> Files
+(<command>adddriver</command>)</title>
+
+<para><screen>
+
+# rpcclient -Uroot%xxxx -c `adddriver "Windows NT x86" "mydrivername: \
+ cupsdrvr.dll:mysmbtstprn.PPD: \
+ cupsui.dll:cups.hlp:NULL:RAW<citation>:</citation>NULL" \
+ localhost
+
+ Printer Driver mydrivername successfully installed.
+
+</screen></para>
+
+<para>
+Note that your cannot repeat this step if it fails. It could fail even
+as a result of a simple typo. It will most likely have moved a part of
+the driver files into the "2" subdirectory. If this step fails, you
+need to go back to the fourth step and repeat it, before you can try
+this one again. In this step you need to choose a name for your
+driver. It is normally a good idea to use the same name as is used for
+the printername; however, in big installations you may use this driver
+for a number of printers which have obviously different names. So the
+name of the driver is not fixed.
+</para>
+</sect3>
+
+<sect3>
+<title>Seventh Step: Verify where the Driver Files are now</title>
+
+<para><screen>
+
+# ls -l /etc/samba/drivers/W32X86/
+ total 1
+ drwxr-sr-x 2 root ntadmin 532 May 25 23:22 2
+ drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3
+
+
+# ls -l /etc/samba/drivers/W32X86/2
+ total 5039
+ [....]
+ -rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp
+ -rwxr--r-- 1 root ntadmin 278380 May 13 13:53 cupsdrvr.dll
+ -rwxr--r-- 1 root ntadmin 215848 May 13 13:53 cupsui.dll
+ -rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD
+
+</screen></para>
+
+<para>
+Notice how step 6 did also move the driver files to the appropriate
+subdirectory. Compare with the situation after step 5.
+</para>
+</sect3>
+
+<sect3>
+<title>Eighth Step (optional): Verify if Samba now recognizes the
+Driver</title>
+
+<para><screen>
+
+# rpcclient -Uroot%xxxx -c 'enumdrivers 3' localhost | grep -B2 -A5 mydrivername
+
+ Printer Driver Info 3:
+ Version: [2]
+ Driver Name: [mydrivername]
+ Architecture: [Windows NT x86]
+ Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll]
+ Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD]
+ Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll]
+ Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp]
+
+</screen></para>
+
+<para>
+Remember, this command greps for the name you did choose for the
+driver in step Six. This command must succeed before you can proceed.
+</para>
+</sect3>
+
+<sect3>
+<title>Ninth Step: Tell Samba which Printer should use these Driver
+Files (<command>setdriver</command>)</title>
+
+<para><screen>
+
+# rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' localhost
+
+ Successfully set mysmbtstprn to driver mydrivername
+
+</screen></para>
+
+<para>
+Since you can bind any printername (=printqueue) to any driver, this
+is a very convenient way to setup many queues which use the same
+driver. You don't need to repeat all the previous steps for the
+setdriver command to succeed. The only pre-conditions are:
+<command>enumdrivers</command> must find the driver and
+<command>enumprinters</command> must find the printer.
+</para>
+</sect3>
+
+<sect3>
+<title>Tenth Step (optional): Verify if Samba has this Association
+recognized</title>
+
+<para><screen>
+
+# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep driver
+ drivername:[mydrivername]
+
+# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep -C4 driv
+ servername:[\\kde-bitshop]
+ printername:[\\kde-bitshop\mysmbtstprn]
+ sharename:[mysmbtstprn]
+ portname:[Done]
+ drivername:[mydrivername]
+ comment:[mysmbtstprn]
+ location:[]
+ sepfile:[]
+ printprocessor:[winprint]
+
+# rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost
+ [Windows NT x86]
+ Printer Driver Info 3:
+ Version: [2]
+ Driver Name: [mydrivername]
+ Architecture: [Windows NT x86]
+ Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll]
+ Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD]
+ Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll]
+ Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp]
+ Monitorname: []
+ Defaultdatatype: [RAW]
+ Monitorname: []
+ Defaultdatatype: [RAW]
+
+# rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep mysmbtstprn
+ name:[\\kde-bitshop\mysmbtstprn]
+ description:[\\kde-bitshop\mysmbtstprn,mydrivername,mysmbtstprn]
+ comment:[mysmbtstprn]
+
+</screen></para>
+
+<para>
+Compare these results with the ones from steps 2 and 3. Note that
+every single of these commands show the driver is installed. Even
+the <command>enumprinters</command> command now lists the driver
+on the "description" line.
+</para>
+</sect3>
+
+<sect3>
+<title>Eleventh Step (optional): Tickle the Driver into a correct
+Device Mode</title>
+
+<para>
+You certainly know how to install the driver on the client. In case
+you are not particularly familiar with Windows, here is a short
+recipe: browse the Network Neighbourhood, go to the Samba server, look
+for the shares. You should see all shared Samba printers.
+Double-click on the one in question. The driver should get
+installed, and the network connection set up. An alternative way is to
+open the "Printers (and Faxes)" folder, right-click on the printer in
+question and select "Connect" or "Install". As a result, a new printer
+should have appeared in your client's local "Printers (and Faxes)"
+folder, named something like "printersharename on Sambahostname".
+</para>
+
+<para>
+It is important that you execute this step as a Samba printer admin
+(as defined in <filename>smb.conf</filename>). Here is another method
+to do this on Windows XP. It uses a commandline, which you may type
+into the "DOS box" (type root's smbpassword when prompted):
+</para>
+
+<para><screen>
+
+ C:\&gt; runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /in /n \\sambacupsserver\mysmbtstprn"
+
+</screen></para>
+
+<para>
+Change any printer setting once (like <emphasis>"portrait"
+--&gt; "landscape"</emphasis>), click "Apply"; change the setting
+back.
+</para>
+</sect3>
+
+<sect3>
+<title>Twelfth Step: Install the Printer on a Client
+("Point'n'Print")</title>
+
+<para><screen>
+
+ C:\&gt; rundll32 printui.dll,PrintUIEntry /in /n "\\sambacupsserver\mysmbtstprn"
+
+</screen></para>
+
+<para>
+If it doesn't work it could be a permission problem with the
+<parameter>[print$]</parameter> share.
+</para>
+</sect3>
+
+<sect3>
+<title>Thirteenth Step (optional): Print a Test Page</title>
+
+<para><screen>
+
+ C:\&gt; rundll32 printui.dll,PrintUIEntry /p /n "\\sambacupsserver\mysmbtstprn"
+
+</screen></para>
+
+<para>
+Then hit [TAB] 5 times, [ENTER] twice, [TAB] once and [ENTER] again
+and march to the printer.
+</para>
+</sect3>
+
+<sect3>
+<title>Fourteenth Step (recommended): Study the Test Page</title>
+
+<para>
+Hmmm.... just kidding! By now you know everything about printer
+installations and you don't need to read a word. Just put it in a
+frame and bolt it to the wall with the heading "MY FIRST
+RPCCLIENT-INSTALLED PRINTER" - why not just throw it away!
+</para>
+</sect3>
+
+<sect3>
+<title>Fifteenth Step (obligatory): Enjoy. Jump. Celebrate your
+Success</title>
+
+<para><screen>
+
+# echo "Cheeeeerioooooo! Success..." &gt;&gt; /var/log/samba/log.smbd
+
+</screen></para>
+</sect3>
+</sect2>
+
+<sect2>
+<title>Troubleshooting revisited</title>
+
+<para>
+The setdriver command will fail, if in Samba's mind the queue is not
+already there. You had promising messages about the:
+</para>
+
+<para><screen>
+
+ Printer Driver ABC successfully installed.
+
+</screen></para>
+
+<para>
+after the "adddriver" parts of the procedure? But you are also seeing
+a disappointing message like this one beneath?
+</para>
+
+<para><screen>
+
+ result was NT_STATUS_UNSUCCESSFUL
+
+</screen></para>
+
+<para>
+It is not good enough that <emphasis>you</emphasis>
+can see the queue <emphasis>in CUPS</emphasis>, using
+the <command>lpstat -p ir85wm</command> command. A
+bug in most recent versions of Samba prevents the proper update of
+the queuelist. The recognition of newly installed CUPS printers
+fails unless you re-start Samba or send a HUP to all smbd
+processes. To verify if this is the reason why Samba doesn't
+execute the setdriver command successfully, check if Samba "sees"
+the printer:
+</para>
+
+<para><screen>
+
+# rpcclient transmeta -N -U'root%secret' -c 'enumprinters 0'| grep ir85wm
+ printername:[ir85wm]
+
+</screen></para>
+
+<para>
+An alternative command could be this:
+</para>
+
+<para><screen>
+
+# rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm'
+ cmd = getprinter ir85wm
+ flags:[0x800000]
+ name:[\\transmeta\ir85wm]
+ description:[\\transmeta\ir85wm,ir85wm,DPD]
+ comment:[CUPS PostScript-Treiber for WinNT/2K/XP]
+
+</screen></para>
+
+<para>
+BTW, you can use these commands, plus a few more, of course,
+to install drivers on remote Windows NT print servers too!
</para>
</sect2>
</sect1>
+<sect1>
+<title>The printing <filename>*.tdb</filename> Files</title>
+
+<para>
+Some mystery is associated with the series of files with a
+tdb-suffix appearing in every Samba installation. They are
+<filename>connections.tdb</filename>,
+<filename>printing.tdb</filename>,
+<filename>share_info.tdb</filename> ,
+<filename>ntdrivers.tdb</filename>,
+<filename>unexpected.tdb</filename>,
+<filename>brlock.tdb</filename> ,
+<filename>locking.tdb</filename>,
+<filename>ntforms.tdb</filename>,
+<filename>messages.tdb</filename> ,
+<filename>ntprinters.tdb</filename>,
+<filename>sessionid.tdb</filename> and
+<filename>secrets.tdb</filename>. What is their purpose?
+</para>
+
+<sect2>
+<title>Trivial DataBase Files</title>
+
+<para>
+A Windows NT (Print) Server keeps track of all information needed to serve
+its duty toward its clients by storing entries in the Windows
+"Registry". Client queries are answered by reading from the registry,
+Administrator or user configuration settings are saved by writing into
+the Registry. Samba and Unix obviously don't have such a kind of
+Registry. Samba instead keeps track of all client related information in a
+series of <filename>*.tdb</filename> files. (TDB = Trivial Data
+Base). These are often located in <filename>/var/lib/samba/</filename>
+or <filename>/var/lock/samba/</filename> . The printing related files
+are <filename>ntprinters.tdb</filename>,
+<filename>printing.tdb</filename>,<filename>ntforms.tdb</filename> and
+<filename>ntdrivers.tdb</filename>.
+</para>
+</sect2>
+
+<sect2>
+<title>Binary Format</title>
+
+<para>
+<filename>*.tdb</filename> files are not human readable. They are
+written in a binary format. "Why not ASCII?", you may ask. "After all,
+ASCII configuration files are a good and proofed tradition on UNIX."
+-- The reason for this design decision by the Samba Team is mainly
+performance. Samba needs to be fast; it runs a separate
+<command>smbd</command> process for each client connection, in some
+environments many thousand of them. Some of these smbds might need to
+write-access the same <filename>*.tdb</filename> file <emphasis>at the
+same time</emphasis>. The file format of Samba's
+<filename>*.tdb</filename> files allows for this provision. Many smbd
+processes may write to the same <filename>*.tdb</filename> file at the
+same time. This wouldn't be possible with pure ASCII files.
+</para>
+</sect2>
+
+<sect2>
+<title>Losing <filename>*.tdb</filename> Files</title>
+
+<para>
+It is very important that all <filename>*.tdb</filename> files remain
+consistent over all write and read accesses. However, it may happen
+that these files <emphasis>do</emphasis> get corrupted. (A
+<command>kill -9 `pidof smbd`</command> while a write access is in
+progress could do the damage as well as a power interruption,
+etc.). In cases of trouble, a deletion of the old printing-related
+<filename>*.tdb</filename> files may be the only option. You need to
+re-create all print related setup after that. Or you have made a
+backup of the <filename>*.tdb</filename> files in time.
+</para>
+</sect2>
+
+<sect2>
+<title>Using <emphasis>tdbbackup</emphasis></title>
+
+<para>
+Samba ships with a little utility which helps the root user of your
+system to back up your <filename>*.tdb</filename> files. If you run it
+with no argument, it prints a little usage message:
+</para>
+
+<para><screen>
+
+# tdbbackup
+ Usage: tdbbackup [options] &lt;fname...&gt;
+
+ Version:3.0a
+ -h this help message
+ -s suffix set the backup suffix
+ -v verify mode (restore if corrupt)
+
+</screen></para>
+
+<para>
+Here is how I backed up my printing.tdb file:
+</para>
+
+<para><screen>
+
+# ls
+ . browse.dat locking.tdb ntdrivers.tdb printing.tdb share_info.tdb
+ .. connections.tdb messages.tdb ntforms.tdb printing.tdbkp unexpected.tdb
+ brlock.tdb gmon.out namelist.debug ntprinters.tdb sessionid.tdb
+
+ kde-bitshop:/var/lock/samba # tdbbackup -s .bak printing.tdb
+ printing.tdb : 135 records
+
+ kde-bitshop:/var/lock/samba # ls -l printing.tdb*
+ -rw------- 1 root root 40960 May 2 03:44 printing.tdb
+ -rw------- 1 root root 40960 May 2 03:44 printing.tdb.bak
+
+</screen></para>
+</sect2>
+</sect1>
<sect1>
-<title>The CUPS Filter Chains</title>
+<title>CUPS Print Drivers from Linuxprinting.org</title>
+
+<para>
+CUPS ships with good support for HP LaserJet type printers. You can
+install the generic driver as follows:
+</para>
+
+<para><screen>
+
+lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd
+
+</screen></para>
+
+<para>
+The <parameter>-m</parameter> switch will retrieve the
+<filename>laserjet.ppd</filename> from the standard repository for
+not-yet-installed-PPDs, which CUPS typically stores in
+<filename>/usr/share/cups/model</filename>. Alternatively, you may use
+<parameter>-P /path/to/your.ppd</parameter>.
+</para>
+
+<para>
+The generic laserjet.ppd however does not support every special option
+for every LaserJet-compatible model. It constitutes a sort of "least
+denominator" of all the models. If for some reason it is ruled out to
+you to pay for the commercially available ESP Print Pro drivers, your
+first move should be to consult the database on <ulink
+url="http://www.linuxprinting.org/printer_list.cgi">http://www.linuxprinting.org/printer_list.cgi</ulink>.
+Linuxprinting.org has excellent recommendations about which driver is
+best used for each printer. Its database is kept current by the
+tireless work of Till Kamppeter from MandrakeSoft, who is also the
+principal author of the foomatic-rip utility.
+</para>
+
+<note><para>
+The former "cupsomatic" concept is now be replaced by the new, much
+more powerful "foomatic-rip". foomatic-rip is the successor of
+cupsomatic. cupsomatic is no longer maintained. Here is the new URL
+to the Foomatic-3.0 database:<ulink
+url="http://www.linuxprinting.org/driver_list.cgi">http://www.linuxprinting.org/driver_list.cgi</ulink>.
+If you upgrade to foomatic-rip, don't forget to also upgrade to the
+new-style PPDs for your foomatic-driven printers. foomatic-rip will
+not work with PPDs generated for the old cupsomatic. The new-style
+PPDs are 100% compliant to the Adobe PPD specification. They are
+intended to be used by Samba and the cupsaddsmb utility also, to
+provide the driver files for the Windows clients also!
+</para></note>
+
+<sect2>
+<title>foomatic-rip and Foomatic explained</title>
+
+<para>
+Nowadays most Linux distros rely on the utilities of Linuxprinting.org
+to create their printing related software (which, BTW, works on all
+UNIXes and on Mac OS X or Darwin too). It is not known as well as it
+should be, that it also has a very end-user friendly interface which
+allows for an easy update of drivers and PPDs, for all supported
+models, all spoolers, all operating systems and all package formats
+(because there is none). Its history goes back a few years.
+</para>
+
+<para>
+Recently Foomatic has achieved the astonishing milestone of <ulink
+url="http://www.linuxprinting.org/printer_list.cgi?make=Anyone">1000
+listed</ulink> printer models. Linuxprinting.org keeps all the
+important facts about printer drivers, supported models and which
+options are available for the various driver/printer combinations in
+its <ulink
+url="http://www.linuxprinting.org/foomatic.html">Foomatic</ulink>
+database. Currently there are <ulink
+url="http://www.linuxprinting.org/driver_list.cgi">245 drivers</ulink>
+in the database: many drivers support various models, and many models
+may be driven by different drivers; it's your choice!
+</para>
+
+<sect3>
+<title>690 "perfect" Printers</title>
+
+<para>
+At present there are 690 devices dubbed as working "perfectly", 181
+"mostly", 96 "partially" and 46 are "Paperweights". Keeping in mind
+that most of these are non-PostScript models (PostScript printers are
+automatically supported supported by CUPS to perfection, by using
+their own manufacturer-provided Windows-PPD...), and that a
+multifunctional device never qualifies as working "perfectly" if it
+doesn't also scan and copy and fax under GNU/Linux: then this is a
+truly astonishing achievement. Three years ago the number was not
+more than 500, and Linux or UNIX "printing" at the time wasn't
+anywhere near the quality it is today!
+</para>
+</sect3>
+
+<sect3>
+<title>How the "Printing HOWTO" started it all</title>
+
+<para>
+A few years ago <ulink
+url="http://www2.picante.com:81/~gtaylor/">Grant Taylor</ulink>
+started it all. The roots of today's Linuxprinting.org are in the
+first <ulink
+url="http://www.linuxprinting.org/foomatic2.9/howto/">Linux Printing
+HOWTO</ulink> which he authored. As a side-project to this document,
+which served many Linux users and admins to guide their first steps in
+this complicated and delicate setup (to a scientist, printing is
+"applying a structured deposition of distinct patterns of ink or toner
+particles on paper substrates" <emphasis>;-)</emphasis>, he started to
+build in a little Postgres database with information about the
+hardware and driver zoo that made up Linux printing of the time. This
+database became the core component of today's Foomatic collection of
+tools and data. In the meantime it has moved to an XML representation
+of the data.
+</para>
+</sect3>
+
+<sect3>
+<title>Foomatic's strange Name</title>
+
+<para>
+"Why the funny name?", you ask. When it really took off, around spring
+2000, CUPS was far less popular than today, and most systems used LPD,
+LPRng or even PDQ to print. CUPS shipped with a few generic "drivers"
+(good for a few hundred different printer models). These didn't
+support many device-specific options. CUPS also shipped with its own
+built-in rasterization filter ("pstoraster", derived from
+Ghostscript). On the other hand, CUPS provided brilliant support for
+<emphasis>controlling</emphasis> all printer options through
+standardized and well-defined "PPD files" (PostScript Printers
+Description files). Plus, CUPS was designed to be easily extensible.
+</para>
+
+<para>
+Grant already had in his database a respectable compilation
+of facts about a many more printers, and the Ghostscript "drivers"
+they run with. His idea, to generate PPDs from the database info
+and use them to make standard Ghostscript filters work within CUPS,
+proved to work very well. It also "killed several birds with one
+stone":
+</para>
+
+<itemizedlist>
+<listitem><para>It made all current and future Ghostscript filter
+developments available for CUPS;</para></listitem>
+
+<listitem><para>It made available a lot of additional printer models
+to CUPS users (because often the "traditional" Ghostscript way of
+printing was the only one available);</para></listitem>
+
+<listitem><para>It gave all the advanced CUPS options (web interface,
+GUI driver configurations) to users wanting (or needing) to use
+Ghostscript filters.</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3>
+<title>cupsomatic, pdqomatic, lpdomatic, directomatic</title>
+
+<para>
+CUPS worked through a quickly-hacked up filter script named <ulink
+url="http://www.linuxprinting.org/download.cgi?filename=cupsomatic&amp;show=0">cupsomatic</ulink>.
+cupsomatic ran the printfile through Ghostscript, constructing
+automatically the rather complicated command line needed. It just
+required to be copied into the CUPS system to make it work. To
+"configure" the way cupsomatic controls the Ghostscript rendering
+process, it needs a CUPS-PPD. This PPD is generated directly from the
+contents of the database. For CUPS and the respective printer/filter
+combo another Perl script named "CUPS-O-Matic" did the PPD
+generation. After that was working, Grant implemented within a few
+days a similar thing for two other spoolers. Names chosen for the
+config-generator scripts were <ulink
+url="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0">PDQ-O-Matic</ulink>
+(for PDQ) and <ulink
+url="http://www.linuxprinting.org/download.cgi?filename=lpdomatic&amp;show=0">LPD-O-Matic</ulink>
+(for - you guessed it - LPD); the configuration here didn't use PPDs
+but other spooler-specific files.
+</para>
+
+<para>
+From late summer of that year, <ulink
+url="http://www.linuxprinting.org/till/">Till Kamppeter</ulink>
+started to put work into the database. Till had been newly employed by
+<ulink url="http://www.mandrakesoft.com/">MandrakeSoft</ulink> to
+convert their printing system over to CUPS, after they had seen his
+<ulink url="http://www.fltk.org/">FLTK</ulink>-based <ulink
+url="http://cups.sourceforge.net/xpp/">XPP</ulink> (a GUI frontend to
+the CUPS lp-command). He added a huge amount of new information and new
+printers. He also developed the support for other spoolers, like
+<ulink url="http://ppr.sourceforge.net/">PPR</ulink> (via ppromatic),
+<ulink url="http://sourceforge.net/projects/lpr/">GNUlpr</ulink> and
+<ulink url="http://www.lprng.org/">LPRng</ulink> (both via an extended
+lpdomatic) and "spoolerless" printing (<ulink
+url="http://www.linuxprinting.org/download.cgi?filename=directomatic&amp;show=0">directomatic</ulink>)....
+</para>
+
+<para>
+So, to answer your question: "Foomatic" is the general name for all
+the overlapping code and data behind the "*omatic" scripts.... --
+Foomatic up to versions 2.0.x required (ugly) Perl data structures
+attached the Linuxprinting.org PPDs for CUPS. It had a different
+"*omatic" script for every spooler, as well as different printer
+configuration files..
+</para>
+</sect3>
+
+<sect3>
+<title>7.13.1.5.The <emphasis>Grand Unification</emphasis>
+achieved...</title>
+
+<para>
+This all has changed in Foomatic versions 2.9 (Beta) and released as
+"stable" 3.0. This has now achieved the convergence of all *omatic
+scripts: it is called the <ulink
+url="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=0">foomatic-rip</ulink>.
+This single script is the unification of the previously different
+spooler-specific *omatic scripts. foomatic-rip is used by all the
+different spoolers alike. Because foomatic-rip can read PPDs (both the
+original PostScript printer PPDs and the Linuxprinting.org-generated
+ones), all of a sudden all supported spoolers can have the power of
+PPDs at their disposal; users only need to plug "foomatic-rip" into
+their system.... For users there is improved media type and source
+support; paper sizes and trays are easier to configure.
+</para>
+
+<para>
+Also, the New Generation of Linuxprinting.org PPDs doesn't contain
+Perl data structures any more. If you are a distro maintainer and have
+used the previous version of Foomatic, you may want to give the new
+one a spin: but don't forget to generate a new-version set of PPDs,
+via the new <ulink
+url="http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-3.0.0beta1.tar.gz">foomatic-db-engine</ulink>!
+Individual users just need to generate a single new PPD specific to
+their model by <ulink
+url="http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/II.Foomatic-User/II.tutorial-handout-foomatic-user.html">following
+the steps</ulink> outlined in the Foomatic tutorial or further
+below. This new development is truly amazing.
+</para>
+
+<para>
+foomatic-rip is a very clever wrapper around the need to run
+Ghostscript with a different syntax, different options, different
+device selections and/or different filters for each different printer
+or different spooler. At the same time it can read the PPD associated
+with a print queue and modify the print job according to the user
+selections. Together with this comes the 100% compliance of the new
+Foomatic PPDs with the Adobe spec. Some really innovative features of
+the Foomatic concept will surprise users: it will support custom paper
+sizes for many printers; and it will support printing on media drawn
+from different paper trays within the same job (in both cases: even
+where there is no support for this from Windows-based vendor printer
+drivers).
+</para>
+</sect3>
+
+<sect3>
+<title>Driver Development outside</title>
+
+<para>
+Most driver development itself does not happen within
+Linuxprinting.org. Drivers are written by independent maintainers.
+Linuxprinting.org just pools all the information, and stores it in its
+database. In addition, it also provides the Foomatic glue to integrate
+the many drivers into any modern (or legacy) printing system known to
+the world.
+</para>
+
+<para>
+Speaking of the different driver development groups: most of
+the work is currently done in three projects. These are:
+</para>
+
+<itemizedlist>
+<listitem><para><ulink
+url="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/">Omni</ulink>
+-- a Free Software project by IBM which tries to convert their printer
+driver knowledge from good-ol' OS/2 times into a modern, modular,
+universal driver architecture for Linux/Unix (still Beta). This
+currently supports 437 models.</para></listitem>
+
+<listitem><para><ulink url="http://hpinkjet.sf.net/">HPIJS</ulink> --
+a Free Software project by HP to provide the support for their own
+range of models (very mature, printing in most cases is perfect and
+provides true photo quality). This currently supports 369
+models.</para></listitem>
+
+<listitem><para><ulink
+url="http://gimp-print.sf.net/">Gimp-Print</ulink> -- a Free software
+effort, started by Michael Sweet (also lead developer for CUPS), now
+directed by Robert Krawitz, which has achieved an amazing level of
+photo print quality (many Epson users swear that its quality is
+better than the vendor drivers provided by Epson for the Microsoft
+platforms). This currently supports 522 models.</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3>
+<title>Forums, Downloads, Tutorials, Howtos -- also for Mac OS X and
+commercial Unix</title>
+
+<para>
+Linuxprinting.org today is the one-stop "shop" to download printer
+drivers. Look for printer information and <ulink
+url="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/">tutorials</ulink>
+or solve printing problems in its popular <ulink
+url="http://www.linuxprinting.org/newsportal/">forums</ulink>. But
+it's not just for GNU/Linux: users and admins of <ulink
+url="http://www.linuxprinting.org/macosx/">commercial UNIX
+systems</ulink> are also going there, and the relatively new <ulink
+url="http://www.linuxprinting.org/newsportal/thread.php3?name=linuxprinting.macosx.general">Mac
+OS X forum</ulink> has turned out to be one of the most frequented
+fora after only a few weeks.
+</para>
+
+<para>
+Linuxprinting.org and the Foomatic driver wrappers around Ghostscript
+are now a standard toolchain for printing on all the important
+distros. Most of them also have CUPS underneath. While in recent years
+most printer data had been added by Till (who works at Mandrake), many
+additional contributions came from engineers with SuSE, RedHat,
+Connectiva, Debian and others. Vendor-neutrality is an important goal
+of the Foomatic project.
+</para>
+
+<note><para>
+Till Kamppeter from MandrakeSoft is doing an excellent job in his
+spare time to maintain Linuxprinting.org and Foomatic. So if you use
+it often, please send him a note showing your appreciation.
+</para></note>
+</sect3>
+
+<sect3>
+<title>Foomatic Database generated PPDs</title>
+
+<para>
+The Foomatic database is an amazing piece of ingenuity in itself. Not
+only does it keep the printer and driver information, but it is
+organized in a way that it can generate "PPD" files "on the fly" from
+its internal XML-based datasets. While these PPDs are modelled to the
+Adobe specification of "PostScript Printer Descriptions" (PPDs), the
+Linuxprinting.org/Foomatic-PPDs don't normally drive PostScript
+printers: they are used to describe all the bells and whistles you
+could ring or blow on an Epson Stylus inkjet, or a HP Photosmart or
+what-have-you. The main "trick" is one little additional line, not
+envisaged by the PPD specification, starting with the "*cupsFilter"
+keyword: it tells the CUPS daemon how to proceed with the PostScript
+print file (old-style Foomatic-PPDs named the
+<emphasis>cupsomatic</emphasis> filter script, while the new-style
+PPDs now call <emphasis>foomatic-rip</emphasis>). This filter
+script calls Ghostscript on the host system (the recommended variant
+is ESP Ghostscript) to do the rendering work. foomatic-rip knows which
+filter or internal device setting it should ask from Ghostscript to
+convert the PostScript printjob into a raster format ready for the
+target device. This usage of PPDs to describe the options of non-PS
+printers was the invention of the CUPS developers. The rest is easy:
+GUI tools (like KDE's marvellous <ulink
+url="http://printing.kde.org/overview/kprinter.phtml">"kprinter"</ulink>,
+or the GNOME <ulink
+url="http://gtklp.sourceforge.net/">"gtklp"</ulink>, "xpp" and the CUPS
+web interface) read the PPD too and use this information to present
+the available settings to the user as an intuitive menu selection.
+</para>
+</sect3>
+</sect2>
+
+<sect2>
+<title>foomatic-rip and Foomatic-PPD Download and Installation</title>
+
+<para>
+Here are the steps to install a foomatic-rip driven "LaserJet 4 Plus"
+compatible printer in CUPS (note that recent distributions of SuSE,
+UnitedLinux and Mandrake may ship with a complete package of
+Foomatic-PPDs plus the foomatic-rip utility. going directly to
+Linuxprinting.org ensures you to get the latest driver/PPD files):
+</para>
+<itemizedlist>
+<listitem><para>Surf to <ulink
+url="http://www.linuxprinting.org/printer_list.cgi">http://www.linuxprinting.org/printer_list.cgi</ulink>
+</para></listitem>
+
+<listitem><para>Check the complete list of printers in the database:
+<ulink
+url="http://www.linuxprinting.org/printer_list.cgi?make=Anyone">http://www.linuxprinting.org/printer_list.cgi?make=Anyone</ulink>
+</para></listitem>
+
+<listitem><para>There select your model and click on the
+link.</para></listitem>
+
+<listitem><para>You'll arrive at a page listing all drivers working
+with this model (for all printers, there will always be
+<emphasis>one</emphasis> recommended driver. Try this one
+first).</para></listitem>
+
+<listitem><para>In our case ("HP LaserJet 4 Plus"), we'll arrive here:
+<ulink
+url="http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus">http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus</ulink>
+</para></listitem>
+
+<listitem><para>The recommended driver is "ljet4".</para></listitem>
+
+<listitem><para>There are several links provided here. You should
+visit them all, if you are not familiar with the Linuxprinting.org
+database.</para></listitem>
+
+<listitem><para>There is a link to the database page for the "ljet4":
+<ulink
+url="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4">http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</ulink>
+On the driver's page, you'll find important and detailed information
+about how to use that driver within the various available
+spoolers.</para></listitem>
+
+<listitem><para>Another link may lead you to the homepage of the
+driver author or the driver.</para></listitem>
+
+<listitem><para>Important links are the ones which provide hints with
+setup instructions for CUPS (<ulink
+url="http://www.linuxprinting.org/cups-doc.html">http://www.linuxprinting.org/cups-doc.html</ulink>),
+PDQ (<ulink
+url="http://www.linuxprinting.org/pdq-doc.html">http://www.linuxprinting.org/pdq-doc.html</ulink>),
+LPD, LPRng and GNUlpr (<ulink
+url="http://www.linuxprinting.org/lpd-doc.html">http://www.linuxprinting.org/lpd-doc.html</ulink>)
+as well as PPR (<ulink
+url="http://www.linuxprinting.org/ppr-doc.html">http://www.linuxprinting.org/ppr-doc.html)</ulink>
+or "spooler-less" printing (<ulink
+url="http://www.linuxprinting.org/direct-doc.html">http://www.linuxprinting.org/direct-doc.html</ulink>
+).</para></listitem>
+
+<listitem><para>You can view the PPD in your browser through this
+link: <ulink
+url="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1">http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=1</ulink>
+</para></listitem> <listitem><para>You can also (most importantly)
+generate and download the PPD: <ulink
+url="http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=0">http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&amp;printer=HP-LaserJet_4_Plus&amp;show=0</ulink>
+</para></listitem>
+
+<listitem><para>The PPD contains all the information needed to use our
+model and the driver; this is, once installed, working transparently
+for the user. Later you'll only need to choose resolution, paper size
+etc. from the web-based menu, or from the print dialog GUI, or from
+the commandline.</para></listitem>
+
+<listitem><para>Should you have ended up on the driver's page (<ulink
+url="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4">http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</ulink>),
+you can choose to use the "PPD-O-Matic" online PPD generator
+program.</para></listitem>
+
+<listitem><para>Select the exact model and check either "download" or
+"display PPD file" and click on "Generate PPD file".</para></listitem>
+
+<listitem><para>If you save the PPD file from the browser view, please
+don't use "cut'n'past" (since it could possibly damage line endings
+and tabs, which makes the PPD likely to fail its duty), but use "Save
+as..." in your browser's menu. (Best is to use the "download" option
+from the web page directly).</para></listitem>
+
+<listitem><para>Another very interesting part on each driver page is
+the <emphasis>Show execution details</emphasis> button. If you
+select your printer model and click that button, you will get
+displayed a complete Ghostscript command line, enumerating all options
+available for that driver/printermodel combo. This is a great way to
+"Learn Ghostscript By Doing". It is also an excellent "cheat sheet"
+for all experienced users who need to re-construct a good command line
+for that damn printing script, but can't remember the exact
+syntax. ;-)</para></listitem>
+
+<listitem><para>Some time during your visit to Linuxprinting.org, save
+the PPD to a suitable place on your harddisk, say
+<filename>/path/to/my-printer.ppd</filename> (if you prefer to install
+your printers with the help of the CUPS web interface, save the PPD to
+the <filename>/usr/share/cups/model/</filename> path and re-start
+cupsd).</para></listitem>
+
+<listitem><para>Then install the printer with a suitable commandline,
+e.g.:
+</para>
+
+<para><screen>
+
+lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -P path/to/my-printer.ppd
+
+</screen></para></listitem>
+
+<listitem><para>Note again this: for all the new-style "Foomatic-PPDs"
+from Linuxprinting.org, you also need a special "CUPS filter" named
+"foomatic-rip".Get the latest version of "foomatic-rip" from: <ulink
+url="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=0">http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=0</ulink>
+</para></listitem>
+
+<listitem><para>The foomatic-rip Perlscript itself also makes some
+interesting reading (<ulink
+url="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=1">http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&amp;show=1</ulink>),
+because it is very well documented by Till's inline comments (even
+non-Perl hackers will learn quite a bit about printing by reading
+it... ;-)</para></listitem>
+
+<listitem><para>Save foomatic-rip either directly in
+<filename>/usr/lib/cups/filter/foomatic-rip</filename> or somewhere in
+your $PATH (and don't forget to make it world-executable). Again,
+don't save by "copy'n'paste" but use the appropriate link, or the
+"Save as..." menu item in your browser.</para></listitem>
+
+<listitem><para>If you save foomatic-rip in your $PATH, create a symlink:
+<command>cd /usr/lib/cups/filter/ ; ln -s `which
+foomatic-rip`</command>. For CUPS to discover this new
+available filter at startup, you need to re-start
+cupsd.</para></listitem>
+</itemizedlist>
+
+<para>
+Once you print to a printqueue set up with the Foomatic-PPD, CUPS will
+insert the appropriate commands and comments into the resulting
+PostScript jobfile. foomatic-rip is able to read and act upon
+these. foomatic-rip uses some specially encoded Foomatic comments,
+embedded in the jobfile. These in turn are used to construct
+(transparently for you, the user) the complicated ghostscript command
+line telling for the printer driver how exactly the resulting raster
+data should look like and which printer commands to embed into the
+data stream.
+</para>
+
+<para>
+You need:
+</para>
+
+<itemizedlist>
+
+<listitem><para>A "foomatic+something" PPD -- but it this not enough
+to print with CUPS (it is only <emphasis>one</emphasis> important
+component)</para></listitem>
+
+<listitem><para>The "foomatic-rip" filter script (Perl) in
+/usr/lib/cups/filters/</para></listitem>
+
+<listitem><para>Perl to make foomatic-rip run</para></listitem>
+
+<listitem><para>Ghostscript (because it is doing the main work,
+controlled by the PPD/foomatic-rip combo) to produce the raster data
+fit for your printermodel's consumption</para></listitem>
+
+<listitem><para>Ghostscript <emphasis>must</emphasis> (depending on
+the driver/model) contain support for a certain "device", representing
+the selected "driver" for your model (as shown by "gs
+-h")</para></listitem>
+
+<listitem><para>foomatic-rip needs a new version of PPDs (PPD versions
+produced for cupsomatic don't work with
+foomatic-rip).</para></listitem>
+</itemizedlist>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Page Accounting with CUPS</title>
+
+<para>
+Often there are questions regarding "print quotas" wherein Samba users
+(that is, Windows clients) should not be able to print beyond a
+certain amount of pages or data volume per day, week or month. This
+feature is dependent on the real print subsystem you're using.
+Samba's part is always to receive the job files from the clients
+(filtered <emphasis>or</emphasis> unfiltered) and hand it over to this
+printing subsystem.
+</para>
+
+<para>
+Of course one could "hack" things with one's own scripts. But then
+there is CUPS. CUPS supports "quotas" which can be based on sizes of
+jobs or on the number of pages or both, and are spanning any time
+period you want.
+</para>
+
+<sect2>
+<title>Setting up Quotas</title>
+
+<para>
+This is an example command how root would set a print quota in CUPS,
+assuming an existing printer named "quotaprinter":
+</para>
+
+<para><screen>
+
+ lpadmin -p quotaprinter -o job-quota-period=604800 -o job-k-limit=1024 -o job-page-limit=100
+
+</screen></para>
+
+<para>
+This would limit every single user to print 100 pages or 1024 KB of
+data (whichever comes first) within the last 604,800 seconds ( = 1
+week).
+</para>
+</sect2>
+
+<sect2>
+<title>Correct and incorrect Accounting</title>
+
+<para>
+For CUPS to count correctly, the printfile needs to pass the CUPS
+"pstops" filter, otherwise it uses a "dummy" count of "1". Some
+printfiles don't pass it (eg: image files) but then those are mostly 1
+page jobs anyway. This also means that proprietary drivers for the
+target printer running on the client computers and CUPS/Samba, which
+then spool these files as "raw" (i.e. leaving them untouched, not
+filtering them), will be counted as "1-pagers" too!
+</para>
+
+<para>
+You need to send PostScript from the clients (i.e. run a PostScript
+driver there) to have the chance to get accounting done. If the
+printer is a non-PostScript model, you need to let CUPS do the job to
+convert the file to a print-ready format for the target printer. This
+will be working for currently about 1,000 different printer models,
+see <ulink
+url="http://www.linuxprinting.org/printer_list.cgi">http://www.linuxprinting.org/printer_list.cgi</ulink>).
+</para>
+</sect2>
+
+<sect2>
+<title>Adobe and CUPS PostScript Drivers for Windows Clients</title>
+
+<para>
+Before CUPS-1.1.16 your only option was to use the Adobe PostScript
+Driver on the Windows clients. The output of this driver was not
+always passed through the "pstops" filter on the CUPS/Samba side, and
+therefore was not counted correctly (the reason is that it often,
+depending on the "PPD" being used, wrote a "PJL"-header in front of
+the real PostScript which caused CUPS to skip pstops and go directly
+to the "pstoraster" stage).
+</para>
+
+<para>
+From CUPS-1.1.16 onward you can use the "CUPS PostScript Driver for
+Windows NT/2K/XP clients" (which is tagged in the download area of
+http://www.cups.org/ as the "cups-samba-1.1.16.tar.gz" package). It does
+<emphasis>not</emphasis> work for Win9x/ME clients. But it guarantees:
+</para>
+
+<itemizedlist>
+
+<listitem><para>to not write an PJL-header</para></listitem>
+
+<listitem><para>to still read and support all PJL-options named in the
+driver PPD with its own means</para></listitem>
+
+<listitem><para> that the file will pass through the "pstops" filter
+on the CUPS/Samba server</para></listitem>
+
+<listitem><para>to page-count correctly the
+printfile</para></listitem>
+</itemizedlist>
+
+<para>
+You can read more about the setup of this combination in the manpage
+for "cupsaddsmb" (which is only present with CUPS installed, and only
+current from CUPS 1.1.16).
+</para>
+</sect2>
+
+<sect2>
+<title>The page_log File Syntax</title>
+
+<para>
+These are the items CUPS logs in the "page_log" for every
+single <emphasis>page</emphasis> of a job:
+</para>
+
+<itemizedlist>
+<listitem><para>Printer name</para></listitem>
+
+<listitem><para>User name</para></listitem>
+
+<listitem><para>Job ID</para></listitem>
+
+<listitem><para>Time of printing</para></listitem>
+
+<listitem><para>the page number</para></listitem>
+
+<listitem><para>the number of copies</para></listitem>
+
+<listitem><para>a billing information string
+(optional)</para></listitem>
+
+<listitem><para>the host which sent the job (included since version
+1.1.19)</para></listitem>
+</itemizedlist>
+
+<para>
+Here is an extract of my CUPS server's page_log file to illustrate the
+format and included items:
+</para>
+
+<para><screen>
+
+ infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 1 3 #marketing 10.160.50.13
+ infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 2 3 #marketing 10.160.50.13
+ infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 3 3 #marketing 10.160.50.13
+ infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 4 3 #marketing 10.160.50.13
+ DigiMaster9110 boss 402 [22/Apr/2003:10:33:22 +0100] 1 440 finance-dep 10.160.51.33
+
+</screen></para>
+
+<para>
+This was job ID "401", printed on "infotec_IS2027" by user "kurt", a
+64-page job printed in 3 copies and billed to "#marketing", sent
+from IP address 10.160.50.13. The next job had ID "402", was sent by
+user "boss" from IP address 10.160.51.33,printed from one page 440
+copies and is set to be billed to "finance-dep".
+</para>
+</sect2>
+
+<sect2>
+<title>Possible Shortcomings</title>
+
+<para>
+What flaws or shortcomings are there with this quota system?
+</para>
+
+<itemizedlist>
+<listitem><para>the ones named above (wrongly logged job in case of
+printer hardware failure, etc.)</para></listitem>
+
+<listitem><para>in reality, CUPS counts the job pages that are being
+processed in <emphasis>software</emphasis> (that is, going through the
+"RIP") rather than the physical sheets successfully leaving the
+printing device. Thus if there is a jam while printing the 5th sheet out
+of 1000 and the job is aborted by the printer, the "page count" will
+still show the figure of 1000 for that job</para></listitem>
+
+<listitem><para>all quotas are the same for all users (no flexibility
+to give the boss a higher quota than the clerk) no support for
+groups</para></listitem>
+
+<listitem><para>no means to read out the current balance or the
+"used-up" number of current quota</para></listitem>
+
+<listitem><para>a user having used up 99 sheets of 100 quota will
+still be able to send and print a 1,000 sheet job</para></listitem>
+
+<listitem><para>a user being denied a job because of a filled-up quota
+doesn't get a meaningful error message from CUPS other than
+"client-error-not-possible".</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2>
+<title>Future Developments</title>
+
+<para>
+This is the best system currently available, and there are huge
+improvements under development for CUPS 1.2:
+</para>
+
+<itemizedlist>
+<listitem><para>page counting will go into the "backends" (these talk
+directly to the printer and will increase the count in sync with the
+actual printing process: thus a jam at the 5th sheet will lead to a
+stop in the counting)</para></listitem>
+
+<listitem><para>quotas will be handled more flexibly</para></listitem>
+
+<listitem><para>probably there will be support for users to inquire
+their "accounts" in advance</para></listitem>
+
+<listitem><para>probably there will be support for some other tools
+around this topic</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2>
+<title>Other Accounting Tools</title>
+
+<para>
+PrintAnalyzer, pyKota, printbill, LogReport.
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Additional Material</title>
+
+<para>
+A printer queue with <emphasis>no</emphasis> PPD associated to it is a
+"raw" printer and all files will go directly there as received by the
+spooler. The exceptions are file types "application/octet-stream"
+which need "passthrough feature" enabled. "Raw" queues don't do any
+filtering at all, they hand the file directly to the CUPS backend.
+This backend is responsible for the sending of the data to the device
+(as in the "device URI" notation: <filename>lpd://, socket://,
+smb://, ipp://, http://, parallel:/, serial:/, usb:/</filename> etc.)
+</para>
+
+<para>
+"cupsomatic"/Foomatic are <emphasis>not</emphasis> native CUPS drivers
+and they don't ship with CUPS. They are a Third Party add-on,
+developed at Linuxprinting.org. As such, they are a brilliant hack to
+make all models (driven by Ghostscript drivers/filters in traditional
+spoolers) also work via CUPS, with the same (good or bad!) quality as
+in these other spoolers. "cupsomatic" is only a vehicle to execute a
+ghostscript commandline at that stage in the CUPS filtering chain,
+where "normally" the native CUPS "pstoraster" filter would kick
+in. cupsomatic by-passes pstoraster, "kidnaps" the printfile from CUPS
+away and re-directs it to go through Ghostscript. CUPS accepts this,
+because the associated CUPS-O-Matic-/Foomatic-PPD specifies:
+</para>
+
+<para><screen>
+
+ *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic"
+
+</screen></para>
+
+<para>
+This line persuades CUPS to hand the file to cupsomatic, once it has
+successfully converted it to the MIME type
+"application/vnd.cups-postscript". This conversion will not happen for
+Jobs arriving from Windows which are auto-typed
+"application/octet-stream", with the according changes in
+<filename>/etc/cups/mime.types</filename> in place.
+</para>
+
+<para>
+CUPS is widely configurable and flexible, even regarding its filtering
+mechanism. Another workaround in some situations would be to have in
+<filename>/etc/cups/mime.types</filename> entries as follows:
+</para>
+
+<para><screen>
+
+ application/postscript application/vnd.cups-raw 0 -
+ application/vnd.cups-postscript application/vnd.cups-raw 0 -
+
+</screen></para>
+
+<para>
+This would prevent all Postscript files from being filtered (rather,
+they will through the virtual <emphasis>nullfilter</emphasis>
+denoted with "-"). This could only be useful for PS printers. If you
+want to print PS code on non-PS printers (provided they support ASCII
+text printing) an entry as follows could be useful:
+</para>
+
+<para><screen>
+
+ */* application/vnd.cups-raw 0 -
+
+</screen></para>
+
+<para>
+and would effectively send <emphasis>all</emphasis> files to the
+backend without further processing.
+</para>
+
+<para>
+Lastly, you could have the following entry:
+</para>
+
+<para><screen>
+
+ application/vnd.cups-postscript application/vnd.cups-raw 0 my_PJL_stripping_filter
+
+</screen></para>
+
+<para>
+You will need to write a <emphasis>my_PJL_stripping_filter</emphasis>
+(could be a shellscript) that parses the PostScript and removes the
+unwanted PJL. This would need to conform to CUPS filter design
+(mainly, receive and pass the parameters printername, job-id,
+username, jobtitle, copies, print options and possibly the
+filename). It would be installed as world executable into
+<filename>/usr/lib/cups/filters/</filename> and will be called by CUPS
+if it encounters a MIME type "application/vnd.cups-postscript".
+</para>
+
+<para>
+CUPS can handle <emphasis>-o job-hold-until=indefinite</emphasis>.
+This keeps the job in the queue "on hold". It will only be printed
+upon manual release by the printer operator. This is a requirement in
+many "central reproduction departments", where a few operators manage
+the jobs of hundreds of users on some big machine, where no user is
+allowed to have direct access (such as when the operators often need
+to load the proper paper type before running the 10,000 page job
+requested by marketing for the mailing, etc.).
+</para>
+</sect1>
+
+<sect1>
+<title>Auto-Deletion or Preservation of CUPS Spool Files</title>
+
+<para>
+Samba print files pass through two "spool" directories. One is the
+incoming directory managed by Samba, (set in the <emphasis>path =
+/var/spool/samba</emphasis> directive in the
+<emphasis>[printers]</emphasis> section of
+<filename>smb.conf</filename>). The other is the spool directory of
+your UNIX print subsystem. For CUPS it is normally
+<filename>/var/spool/cups/</filename>, as set by the cupsd.conf
+directive <filename>RequestRoot /var/spool/cups</filename>.
+</para>
+
+<sect2>
+<title>CUPS Configuration Settings explained</title>
+
+<para>
+Some important parameter settings in the CUPS configuration file
+<filename>cupsd.conf</filename> are:
+</para>
+
+<variablelist>
+
+<varlistentry><term>PreserveJobHistory Yes</term>
+<listitem><para>
+This keeps some details of jobs in cupsd's mind (well it keeps the
+"c12345", "c12346" etc. files in the CUPS spool directory, which do a
+similar job as the old-fashioned BSD-LPD control files). This is set
+to "Yes" as a default.
+</para></listitem></varlistentry>
+
+<varlistentry><term>PreserveJobFiles Yes</term>
+<listitem><para>
+This keeps the job files themselves in cupsd's mind
+(well it keeps the "d12345", "d12346" etc. files in the CUPS spool
+directory...). This is set to "No" as the CUPS
+default.
+</para></listitem></varlistentry>
+
+<varlistentry><term><emphasis>"MaxJobs 500"</emphasis></term>
+<listitem><para>
+This directive controls the maximum number of jobs
+that are kept in memory. Once the number of jobs reaches the limit,
+the oldest completed job is automatically purged from the system to
+make room for the new one. If all of the known jobs are still
+pending or active then the new job will be rejected. Setting the
+maximum to 0 disables this functionality. The default setting is
+0.
+</para></listitem></varlistentry>
+</variablelist>
+
+<para>
+(There are also additional settings for "MaxJobsPerUser" and
+"MaxJobsPerPrinter"...)
+</para>
+</sect2>
+
+<sect2>
+<title>Pre-conditions</title>
+
+<para>
+For everything to work as announced, you need to have three
+things:
+</para>
+
+<itemizedlist>
+<listitem><para>a Samba-smbd which is compiled against "libcups" (Check
+on Linux by running "ldd `which smbd`")</para></listitem>
+
+<listitem><para>a Samba-<filename>smb.conf</filename> setting of
+"printing = cups"</para></listitem>
+
+<listitem><para>another Samba-<filename>smb.conf</filename> setting of
+"printcap = cups"</para></listitem>
+</itemizedlist>
+
+<note><para>
+In this case all other manually set printing-related commands (like
+"print command", "lpq command", "lprm command", "lppause command" or
+"lpresume command") are ignored and they should normally have no
+influence what-so-ever on your printing.
+</para></note>
+</sect2>
+
+<sect2>
+<title>Manual Configuration</title>
+
+<para>
+If you want to do things manually, replace the "printing =
+cups" by "printing = bsd". Then your manually set commands may work
+(haven't tested this), and a "print command = lp -d %P %s; rm %s"
+may do what you need.
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>When <emphasis>not</emphasis> to use Samba to print to
+CUPS</title>
+
+<para>
+[TO BE DONE]
+</para>
+</sect1>
+
+<sect1>
+<title>In Case of Trouble.....</title>
+
+<para>
+If you have more problems, post the output of these commands
+to the CUPS or Samba mailing lists (choose the one which seems more
+relevant to your problem):
+</para>
+
+<para><screen>
+
+ grep -v ^# /etc/cups/cupsd.conf | grep -v ^$
+ grep -v ^# /etc/samba/smb.conf | grep -v ^$ | grep -v "^;"
+
+</screen></para>
+
+<para>
+(adapt paths as needed). These commands leave out the empty
+lines and lines with comments, providing the "naked settings" in a
+compact way. Don't forget to name the CUPS and Samba versions you
+are using! This saves bandwidth and makes for easier readability
+for experts (and you are expecting experts to read them, right?
+;-)
+</para>
+
+<sect2>
+<title>Where to find Documentation</title>
+
+<para>
+[TO BE DONE]
+</para>
+</sect2>
+
+<sect2>
+<title>How to ask for Help</title>
+
+<para>
+[TO BE DONE]
+</para>
+</sect2>
+
+<sect2>
+<title>Where to find Help</title>
+
+<para>
+[TO BE DONE]
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Appendix</title>
+
+<sect2>
+<title>Printing <emphasis>from</emphasis> CUPS to Windows attached
+Printers</title>
+
+<para>
+From time to time the question arises, how you can print
+<emphasis>to</emphasis> a Windows attached printer
+<emphasis>from</emphasis> Samba. Normally the local connection
+"Windows host &lt;--&gt; printer" would be done by USB or parallel
+cable, but this doesn't matter to Samba. From here only an SMB
+connection needs to be opened to the Windows host. Of course, this
+printer must be "shared" first. As you have learned by now, CUPS uses
+<emphasis>backends</emphasis> to talk to printers and other
+servers. To talk to Windows shared printers you need to use the
+<emphasis>smb</emphasis> (surprise, surprise!) backend. Check if this
+is in the CUPS backend directory. This resides usually in
+<filename>/usr/lib/cups/backend/</filename>. You need to find a "smb"
+file there. It should be a symlink to <filename>smbspool</filename>
+which file must exist and be executable:
+</para>
+
+<para><screen>
+
+ # ls -l /usr/lib/cups/backend/
+ total 253
+ drwxr-xr-x 3 root root 720 Apr 30 19:04 .
+ drwxr-xr-x 6 root root 125 Dec 19 17:13 ..
+ -rwxr-xr-x 1 root root 10692 Feb 16 21:29 canon
+ -rwxr-xr-x 1 root root 10692 Feb 16 21:29 epson
+ lrwxrwxrwx 1 root root 3 Apr 17 22:50 http -&gt; ipp
+ -rwxr-xr-x 1 root root 17316 Apr 17 22:50 ipp
+ -rwxr-xr-x 1 root root 15420 Apr 20 17:01 lpd
+ -rwxr-xr-x 1 root root 8656 Apr 20 17:01 parallel
+ -rwxr-xr-x 1 root root 2162 Mar 31 23:15 pdfdistiller
+ lrwxrwxrwx 1 root root 25 Apr 30 19:04 ptal -&gt; /usr/local/sbin/ptal-cups
+ -rwxr-xr-x 1 root root 6284 Apr 20 17:01 scsi
+ lrwxrwxrwx 1 root root 17 Apr 2 03:11 smb -&gt; /usr/bin/smbspool
+ -rwxr-xr-x 1 root root 7912 Apr 20 17:01 socket
+ -rwxr-xr-x 1 root root 9012 Apr 20 17:01 usb
+
+# ls -l `which smbspool`
+ -rwxr-xr-x 1 root root 563245 Dec 28 14:49 /usr/bin/smbspool
+
+</screen></para>
+
+<para>
+If this symlink doesn't exist, create it:
+</para>
+
+<para><screen>
+
+# ln -s `which smbspool` /usr/lib/cups/backend/smb
+
+</screen></para>
+
+<para>
+smbspool has been written by Mike Sweet from the CUPS folks. It is
+included and ships with Samba. It may also be used with print
+subsystems other than CUPS, to spool jobs to Windows printer shares. To
+set up printer "winprinter" on CUPS, you need to have a "driver" for
+it. Essentially this means to convert the print data on the CUPS/Samba
+host to a format that the printer can digest (the Windows host is
+unable to convert any files you may send). This also means you should
+be able to print to the printer if it were hooked directly at your
+Samba/CUPS host. For troubleshooting purposes, this is what you
+should do, to determine if that part of the process chain is in
+order. Then proceed to fix the network connection/authentication to
+the Windows host, etc.
+</para>
+
+<para>
+To install a printer with the smb backend on CUPS, use this command:
+</para>
+
+<para><screen>
+
+# lpadmin -p winprinter -v smb://WINDOWSNETBIOSNAME/printersharename -P /path/to/PPD
+
+</screen></para>
+
+<para>
+The <emphasis>PPD</emphasis> must be able to direct CUPS to generate
+the print data for the target model. For PostScript printers just use
+the PPD that would be used with the Windows NT PostScript driver. But
+what can you do if the printer is only accessible with a password? Or
+if the printer's host is part of another workgroup? This is provided
+for: you can include the required parameters as part of the
+<filename>smb://</filename> device-URI. Like this:
+</para>
+
+<para><screen>
+
+ smb://WORKGROUP/WINDOWSNETBIOSNAME/printersharename
+ smb://username:password@WORKGROUP/WINDOWSNETBIOSNAME/printersharename
+ smb://username:password@WINDOWSNETBIOSNAME/printersharename
+
+</screen></para>
+
+<para>
+Note that the device-URI will be visible in the process list of the
+Samba server (e.g. when someone uses the <command>ps -aux</command>
+command on Linux), even if the username and passwords are sanitized
+before they get written into the log files. So this is an inherently
+insecure option. However it is the only one. Don't use it if you want
+to protect your passwords. Better share the printer in a way that
+doesn't require a password! Printing will only work if you have a
+working netbios name resolution up and running. Note that this is a
+feature of CUPS and you don't necessarily need to have smbd running
+(but who wants that? :-).
+</para>
+</sect2>
+
+<sect2>
+<title>More CUPS filtering Chains</title>
<para>
The following diagrams reveal how CUPS handles print jobs.
</para>
-<programlisting>
+<screen>
#########################################################################
#
# CUPS in and of itself has this (general) filter chain (CAPITAL
# letters are FILE-FORMATS or MIME types, other are filters (this is
# true for pre-1.1.15 of pre-4.3 versions of CUPS and ESP PrintPro):
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT
# |
-# |
# V
# pstoraster # as shipped with CUPS, independent from any Ghostscipt
# | # installation on the system
# | (= "postscipt interpreter")
-# |
# V
# APPLICATION/VND.CUPS-RASTER
# |
-# |
# V
-# rasterto<replaceable>something</replaceable> (f.e. Gimp-Print filters may be plugged in here)
+# rastertosomething (e.g. Gimp-Print filters may be plugged in here)
# | (= "raster driver")
-# |
# V
# SOMETHING-DEVICE-SPECIFIC
# |
-# |
# V
# backend
#
#
-# ESP PrintPro has some enhanced "rasterto<replaceable>something</replaceable>" filters as compared to
+# ESP PrintPro has some enhanced "rastertosomething" filters as compared to
# CUPS, and also a somewhat improved "pstoraster" filter.
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
#########################################################################
-</programlisting>
+</screen>
-<programlisting>
+<screen>
#########################################################################
#
# This is how "cupsomatic" comes into play:
# =========================================
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT ----------------+
-# | |
# | V
# V cupsomatic
# pstoraster (constructs complicated
# | (= "postscipt interpreter") Ghostscript commandline
# | to let the file be
# V processed by a
-# APPLICATION/VND.CUPS-RASTER "-sDEVICE=<replaceable>s.th.</replaceable>"
+# APPLICATION/VND.CUPS-RASTER "-sDEVICE=s.th."
# | call...)
-# | |
# V |
-# rasterto<replaceable>something</replaceable> V
+# rastertosomething V
# | (= "raster driver") +-------------------------+
# | | Ghostscript at work.... |
# V | |
# SOMETHING-DEVICE-SPECIFIC *-------------------------+
# | |
-# | |
# V |
-# backend &gt;------------------------------------+
-# |
+# backend &lt;------------------------------------+
# |
# V
# THE PRINTER
#
#
# Note, that cupsomatic "kidnaps" the printfile after the
-# "APPLICATION/VND.CUPS-POSTSCRPT" stage and deviates it through
+# "APPLICATION/VND.CUPS-POSTSCRPT" stage and deviates it gh
# the CUPS-external, systemwide Ghostscript installation, bypassing the
-# "pstoraster" filter (therefor also bypassing the CUPS-raster-drivers
-# "rasterto<replaceable>something</replaceable>", and hands the rasterized file directly to the CUPS
+# "pstoraster" filter (therefore also bypassing the CUPS-raster-drivers
+# "rastertosomething", and hands the rasterized file directly to the CUPS
# backend...
#
# cupsomatic is not made by the CUPS developers. It is an independent
@@ -801,140 +5246,118 @@ The following diagrams reveal how CUPS handles print jobs.
# Linuxprinting.org. (see also http://www.cups.org/cups-help.html)
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
#########################################################################
-</programlisting>
+</screen>
-<programlisting>
+<screen>
#########################################################################
#
# And this is how it works for ESP PrintPro from 4.3:
# ===================================================
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT
# |
-# |
# V
# gsrip
# | (= "postscipt interpreter")
-# |
# V
# APPLICATION/VND.CUPS-RASTER
# |
-# |
# V
-# rasterto<replaceable>something</replaceable> (f.e. Gimp-Print filters may be plugged in here)
+# rastertosomething (e.g. Gimp-Print filters may be plugged in here)
# | (= "raster driver")
-# |
# V
# SOMETHING-DEVICE-SPECIFIC
# |
-# |
# V
# backend
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
#########################################################################
-</programlisting>
+</screen>
-<programlisting>
+<screen>
#########################################################################
#
# This is how "cupsomatic" would come into play with ESP PrintPro:
# ================================================================
#
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT ----------------+
-# | |
# | V
# V cupsomatic
# gsrip (constructs complicated
# | (= "postscipt interpreter") Ghostscript commandline
# | to let the file be
# V processed by a
-# APPLICATION/VND.CUPS-RASTER "-sDEVICE=<replaceable>s.th.</replaceable>"
+# APPLICATION/VND.CUPS-RASTER "-sDEVICE=s.th."
# | call...)
-# | |
# V |
-# rasterto<replaceable>something</replaceable> V
+# rastertosomething V
# | (= "raster driver") +-------------------------+
# | | Ghostscript at work.... |
# V | |
# SOMETHING-DEVICE-SPECIFIC *-------------------------+
# | |
-# | |
# V |
-# backend &gt;------------------------------------+
-# |
+# backend &lt;------------------------------------+
# |
# V
# THE PRINTER
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
#########################################################################
-</programlisting>
+</screen>
-<programlisting>
+<screen>
#########################################################################
#
# And this is how it works for CUPS from 1.1.15:
# ==============================================
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT-----+
-# |
# +------------------v------------------------------+
# | Ghostscript |
# | at work... |
@@ -945,18 +5368,14 @@ The following diagrams reveal how CUPS handles print jobs.
# | |
# +------------------v------------------------------+
# |
-# |
# APPLICATION/VND.CUPS-RASTER &gt;-------+
# |
-# |
# V
-# rasterto<replaceable>something</replaceable>
+# rastertosomething
# | (= "raster driver")
-# |
# V
# SOMETHING-DEVICE-SPECIFIC
# |
-# |
# V
# backend
#
@@ -967,46 +5386,41 @@ The following diagrams reveal how CUPS handles print jobs.
# "gs -h" needs to show up a "cups" device. pstoraster is now a
# calling an appropriate "gs -sDEVICE=cups..." commandline to do
# the job. It will output "application/vnd.cup-raster", which will
-# be finally processed by a CUPS raster driver "rasterto<replaceable>something</replaceable>"
-# Note the difference to "cupsomatic", which will *not* output
+# be finally processed by a CUPS raster driver "rastertosomething"
+# Note the difference to "cupsomatic", which will <emphasis>not</emphasis> output
# CUPS-raster, but a final version of the printfile, ready to be
# sent to the printer. cupsomatic also doesn't use the "cups"
# devicemode in Ghostscript, but one of the classical devicemodes....
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
#########################################################################
-</programlisting>
+</screen>
-<programlisting>
+<screen>
#########################################################################
#
# And this is how it works for CUPS from 1.1.15, with cupsomatic included:
# ========================================================================
#
-# <replaceable>SOMETHNG</replaceable>-FILEFORMAT
-# |
+# SOMETHNG-FILEFORMAT
# |
# V
-# <replaceable>something</replaceable>tops
-# |
+# somethingtops
# |
# V
# APPLICATION/POSTSCRIPT
# |
-# |
# V
# pstops
# |
-# |
# V
# APPLICATION/VND.CUPS-POSTSCRIPT-----+
-# |
# +------------------v------------------------------+
# | Ghostscript . Ghostscript at work.... |
# | at work... . (with "-sDEVICE= |
-# | (with . <replaceable>s.th.</replaceable>" |
+# | (with . s.th." |
# | "-sDEVICE=cups") . |
# | . |
# | (CUPS standard) . (cupsomatic) |
@@ -1015,779 +5429,379 @@ The following diagrams reveal how CUPS handles print jobs.
# | . |
# +------------------v--------------v---------------+
# | |
-# | |
# APPLICATION/VND.CUPS-RASTER &gt;-------+ |
# | |
-# | |
# V |
-# rasterto<replaceable>something</replaceable> |
+# rastertosomething |
# | (= "raster driver") |
-# | |
# V |
# SOMETHING-DEVICE-SPECIFIC &gt;------------------------+
# |
-# |
# V
# backend
#
#
# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
-# CUPS and ESP PrintPro plug-in where rasterto<replaceable>something</replaceable> is noted.
+# CUPS and ESP PrintPro plug-in where rastertosomething is noted.
#
##########################################################################
-</programlisting>
-
-</sect1>
-
-
-<sect1>
-<title>CUPS Print Drivers and Devices</title>
-
-<para>
-CUPS ships with good support for HP LaserJet type printers. You can install
-the driver as follows:
-
-<itemizedlist>
- <listitem><para>
- lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd
- </para></listitem>
-</itemizedlist>
-
-(The "-m" switch will retrieve the "laserjet.ppd" from the standard repository
-for not-yet-installed-PPDs, which CUPS typically stores in
-<filename>/usr/share/cups/model</filename>. Alternatively, you may use
-"-P /absolute/filesystem/path/to/where/there/is/PPD/your.ppd").
-</para>
+</screen>
+</sect2>
<sect2>
-<title>Further printing steps</title>
-
-<para>
-Always also consult the database on linuxprinting.org for all recommendations
-about which driver is best used for each printer:
-</para>
-
-<para><ulink url="http://www.linuxprinting.org/printer_list.cgi">http://www.linuxprinting.org/printer_list.cgi</ulink></para>
-
-<para>
-There select your model and click on "Show". You'll arrive at a page listing
-all drivers working with your model. There will always be *one*
-<emphasis>recommended</emphasis> one. Try this one first. In your case
-("HP LaserJet 4 Plus"), you'll arrive here:
-</para>
-
-<para><ulink url="http://www.linuxprinting.org/show_printer.cgi?recnum=75104">http://www.linuxprinting.org/show_printer.cgi?recnum=75104</ulink></para>
-
-<para>
-The recommended driver is "ljet4". It has a link to the page for the ljet4
-driver too:
-</para>
-
-<para><ulink url="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4">http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</ulink></para>
-
-<para>
-On the driver's page, you'll find important and detailed info about how to use
-that driver within the various available spoolers. You can generate a PPD for
-CUPS. The PPD contains all the info about how to use your model and the driver;
-this is, once installed, working transparently for the user -- you'll only
-need to choose resolution, paper size etc. from the web-based menu or from
-the print dialog GUI or from the commandline...
-</para>
-
-<para>
-On the driver's page, choose to use the "PPD-O-Matic" online PPD generator
-program. Select your model and click "Generate PPD file". When you safe the
-appearing ASCII text file, don't use "cut'n'past" (as it could possiblly corrupt
-line endings and tabs), but use "Save as..." in your browser's menu. Save it
-at "/some/path/on/your/filesystem/somewhere/my-name-for-my-printer.ppd"
-</para>
-
-<para>
-Then install the printer:
-</para>
-<para><programlisting>
- "lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E \
- -P /some/path/on/your/filesystem/somewhere/my-name-for-my-printer.ppd"
-</programlisting></para>
+<title>Trouble Shooting Guidelines to fix typical Samba printing
+Problems</title>
<para>
-Note, that for all the "Foomatic-PPDs" from Linuxprinting.org, you also need
-a special "CUPS filter" named "cupsomatic". Get the latest version of
-"cupsomatic" from:
+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.
</para>
-<para><ulink url="http://www.linuxprinting.org/cupsomatic">http://www.linuxprinting.org/cupsomatic</ulink></para>
-
-<para>
-This needs to be copied to <filename>/usr/lib/cups/filter/cupsomatic</filename>
-and be made world executable. This filter is needed to read and act upon the
-specially encoded Foomatic comments, embedded in the printfile, which in turn
-are used to construct (transparently for you, the user) the complicated
-ghostscript command line needed for your printer/driver combo.
+<variablelist>
+<varlistentry><term>Win9x client can't install driver</term>
+<listitem><para>For Win9x clients require the printer names to be 8
+chars (or "8 plus 3 chars suffix") max; otherwise the driver files
+won't get transferred when you want to download them from
+Samba.</para></listitem></varlistentry>
+
+<varlistentry><term>testparm</term>
+<listitem><para>Run <command>testparm</command>: It will tell you if
+<filename>smb.conf</filename> parameters are in the wrong
+section. Many people have had the "printer admin" parameter in the
+<parameter>[printers]</parameter> section and experienced
+problems. "testparm" will tell you if it sees
+this.</para></listitem></varlistentry>
+
+<varlistentry><term>"cupsaddsmb" keeps asking for a root password in a
+neverending loop</term>
+<listitem><para>Have you <parameter>security = user</parameter>? Have
+you used <command>smbpasswd</command> to give root a Samba account?
+You can do 2 things: open another terminal and execute
+<command>smbpasswd -a root</command> to create the account, and
+continue with entering the password into the first terminal. Or break
+out of the loop by hitting ENTER twice (without trying to type a
+password).</para></listitem></varlistentry>
+
+<varlistentry><term>"cupsaddsmb" gives "No PPD file for printer..."
+message (but I swear there is one!)</term>
+
+<listitem>
+<itemizedlist>
+<listitem><para>Have you enabled printer sharing on CUPS? This means:
+do you have a <parameter>&lt;Location
+/printers&gt;....&lt;/Location&gt;</parameter> section in CUPS
+server's <filename>cupsd.conf</filename> which doesn't deny access to
+the host you run "cupsaddsmb" from? It <emphasis>could</emphasis> be
+an issue if you use cupsaddsmb remotely, or if you use it with a
+<parameter>-h</parameter> parameter: <command>cupsaddsmb -H
+sambaserver -h cupsserver -v printername</command>.
+</para></listitem>
+<listitem><para>Is your
+"TempDir" directive in
+<emphasis>cupsd.conf</emphasis>
+set to a valid value and is it writeable?
+</para></listitem></itemizedlist>
+</listitem></varlistentry>
+
+<varlistentry><term>I can't connect client to Samba printer.</term>
+<listitem><para>Use <command>smbstatus</command> to check which user
+you are from Samba's point of view. Do you have the privileges to
+write into the <parameter>[print$]</parameter>
+share?</para></listitem></varlistentry>
+
+<varlistentry><term>I can't reconnect to Samba under a new account
+from Win2K/XP</term>
+<listitem><para>Once you are connected as the "wrong" user (for
+example as "nobody", which often occurs if you have <parameter>map to
+guest = bad user</parameter>), Windows Explorer will not accept an
+attempt to connect again as a different user. There won't be any byte
+transfered on the wire to Samba, but still you'll see a stupid error
+message which makes you think that Samba has denied access. Use
+<command>smbstatus</command> to check for active connections. Kill the
+PIDs. You still can't re-connect and get the dreaded
+<computeroutput>You can't connect with a second account from the same
+machine</computeroutput> message, as soon as you are trying? And you
+don't see any single byte arriving at Samba (see logs; use "ethereal")
+indicating a renewed connection attempt? Shut all Explorer Windows.
+This makes Windows forget what it has cached in its memory as
+established connections. Then re-connect as the right user. Best
+method is to use a DOS terminal window and <emphasis>first</emphasis>
+do <command>net use z: \\SAMBAHOST\print$ /user:root</command>. Check
+with <command>smbstatus</command> that you are connected under a
+different account. Now open the "Printers" folder (on the Samba server
+in the <emphasis>Network Neighbourhood</emphasis>), right-click the
+printer in question and select
+<emphasis>Connect...</emphasis></para></listitem></varlistentry>
+
+<varlistentry><term>Avoid being connected to the Samba server as the
+"wrong" user</term>
+<listitem><para>You see per <command>smbstatus</command> that you are
+connected as user "nobody"; while you wanted to be "root" or
+"printeradmin"? This is probably due to <parameter>map to guest = bad
+user</parameter>, which silently connects you under the guest account,
+when you gave (maybe by accident) an incorrect username. Remove
+<parameter>map to guest</parameter>, if you want to prevent
+this.</para></listitem></varlistentry>
+
+<varlistentry><term>Upgrading to CUPS drivers from Adobe drivers on
+NT/2K/XP clients gives problems</term>
+<listitem><para>First delete all "old" Adobe-using printers. Then
+delete all "old" Adobe drivers. (On Win2K/XP, right-click in
+background of "Printers" folder, select "Server Properties...", select
+tab "Drivers" and delete here).</para></listitem></varlistentry>
+
+<varlistentry><term>I can't use "cupsaddsmb"on a Samba server which is
+a PDC</term>
+<listitem><para>Do you use the "naked" root user name? Try to do it
+this way: <emphasis>cupsaddsmb -U DOMAINNAME\\root -v
+printername</emphasis> (note the two backslashes: the first one is
+required to "escape" the second one).</para></listitem></varlistentry>
+
+<varlistentry><term>I deleted a printer on Win2K; but I still see
+its driver</term>
+<listitem><para>Deleting a printer on the client won't delete the
+driver too (to verify, right-click on the white background of the
+"Printers" folder, select "Server Properties" and click on the
+"Drivers" tab). These same old drivers will be re-used when you try to
+install a printer with the same name. If you want to update to a new
+driver, delete the old ones first. Deletion is only possible if no
+other printer uses the same driver.</para></listitem></varlistentry>
+
+<varlistentry><term>Win2K/XP "Local Security
+Policies"</term>
+<listitem><para><emphasis>Local Security Policies</emphasis> may not
+allow the installation of unsigned drivers. "Local Security Policies"
+may not allow the installation of printer drivers at
+all.</para></listitem></varlistentry>
+
+<varlistentry><term>WinXP clients: "Administrator can not install
+printers for all local users"</term>
+<listitem><para>Windows XP handles SMB printers on a "per-user" basis.
+This means every user needs to install the printer himself. To have a
+printer available for everybody, you might want to use the built-in
+IPP client capabilities of WinXP. Add a printer with the print path of
+<emphasis>http://cupsserver:631/printers/printername</emphasis>.
+Still looking into this one: maybe a "logon script" could
+automatically install printers for all
+users.</para></listitem></varlistentry>
+
+<varlistentry><term>"Print Change Notify" functions on
+NT-clients</term>
+<listitem><para>For "print change notify" functions on NT++ clients,
+these need to run the "Server" service first (re-named to
+<emphasis>File &amp; Print Sharing for MS Networks</emphasis> in
+XP).</para></listitem></varlistentry>
+
+<varlistentry><term>WinXP-SP1</term>
+<listitem><para>WinXP-SP1 introduced a <emphasis>Point and Print
+Restriction Policy</emphasis> (this restriction doesn't apply to
+"Administrator" or "Power User" groups of users). In Group Policy
+Object Editor: go to <emphasis>User Configuration --&gt;
+Administrative Templates --&gt; Control Panel --&gt;
+Printers</emphasis>. The policy is automatically set to
+<emphasis>Enabled</emphasis> and the <emphasis>Users can only Point
+and Print to machines in their Forest</emphasis> . You probably need
+to change it to <emphasis>Disabled</emphasis> or <emphasis>Users can
+only Point and Print to these servers</emphasis> in order to make
+driver downloads from Samba possible.</para></listitem></varlistentry>
+
+<varlistentry><term>I can't set and save default print options for all
+users on Win2K/XP</term>
+
+<listitem><para>How are you doing it? I bet the wrong way (it is not
+very easy to find out, though). There are 3 different ways to bring
+you to a dialog that <emphasis>seems</emphasis> to set everything. All
+three dialogs <emphasis>look</emphasis> the same. Only one of them
+<emphasis>does</emphasis> what you intend. You need to be
+Administrator or Print Administrator to do this for all users. Here
+is how I do in on XP:
</para>
-<para>
-You can have a look at all the options for the Ghostscript commandline supported
-by your printer and the ljet4 driver by going to the section "Execution details",
-selecting your model (Laserjet 4 Plus) and clicking on "Show execution details".
-This will bring up this web page:
-</para>
+<orderedlist numeration="upperalpha">
-<para><ulink url="http://www.linuxprinting.org/execution.cgi?driver=ljet4&amp;printer=75104&amp;.submit=Show+execution+details">http://www.linuxprinting.org/execution.cgi?driver=ljet4&amp;printer=75104&amp;.submit=Show+execution+details</ulink></para>
+<listitem><para>The first "wrong" way:
-<para>
-The ingenious thing is that the database is kept current. If there
-is a bug fix and an improvement somewhere in the database, you will
-always get the most current and stable and feature-rich driver by following
-the steps described above.
-</para>
+<orderedlist numeration="arabic">
+<listitem><para>Open the <emphasis>Printers</emphasis>
+folder.</para></listitem>
-<note><para>
-Till Kamppeter from MandrakeSoft is doing an excellent job here that too few
-people are aware of. (So if you use it often, please send him a note showing
-your appreciation).</para></note>
+<listitem><para>Right-click on the printer
+(<emphasis>remoteprinter on cupshost</emphasis>) and
+select in context menu <emphasis>Printing
+Preferences...</emphasis></para></listitem>
-<para>
-The latest and greatest improvement now is support for "custom page sizes"
-for all those printers which support it.
+<listitem><para>Look at this dialog closely and remember what it looks
+like.</para></listitem>
+</orderedlist>
</para>
+</listitem>
-<para>
-"cupsomatic" is documented here:
-</para>
+<listitem><para>The second "wrong" way:
-<para><ulink url="http://www.linuxprinting.org/cups-doc.html">http://www.linuxprinting.org/cups-doc.html</ulink></para>
+<orderedlist numeration="arabic">
+<listitem><para>Open the <emphasis>Printers</emphasis>
+folder.</para></listitem>
-<para>
-More printing tutorial info may be found here:
-</para>
+<listitem><para>Right-click on the printer (<emphasis>remoteprinter on
+cupshost</emphasis>) and select in the context menu
+<emphasis>Properties</emphasis></para></listitem>
-<para><ulink url="http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/">http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/</ulink></para>
+<listitem><para>Click on the <emphasis>General</emphasis>
+tab</para></listitem>
-<para>
-Note, that *all* the Foomatic drivers listed on Linuxprinting.org (now
-approaching the "all-time high" number of 1.000 for the supported models)
-are using a special filtering chain involving Ghostscript, as described
-in this document.
-</para>
+<listitem><para>Click on the button <emphasis>Printing
+Preferences...</emphasis></para></listitem>
-<para>
-Summary - You need:
+<listitem><para>A new dialog opens. Keep this dialog open and go back
+to the parent dialog.</para></listitem>
+</orderedlist>
</para>
+</listitem>
-<para>
-<simplelist>
- <member>A "foomatic+<replaceable>something</replaceable>" PPD is not enough to print with CUPS (but it is *one* important component)</member>
- <member>The "cupsomatic" filter script (Perl) in <filename>/usr/lib/cups/filters/</filename></member>
- <member>Perl to make cupsomatic run</member>
- <member>Ghostscript (because it is called and controlled by the PPD/cupsomatic combo in a way to fit your printermodel/driver combo.</member>
- <member>Ghostscript *must*, depending on the driver/model, contain support for a certain "device" (as shown by "gs -h")</member>
-</simplelist>
-</para>
+<listitem><para>The third, the "correct" way: (should you do
+this from the beginning, just carry out steps 1. and 2. from second
+"way" above)
-<para>
-In the case of the "hpijs" driver, you need a Ghostscript version, which
-has "ijs" amongst its supported devices in "gs -h". In the case of
-"hpijs+foomatic", a valid ghostscript commandline would be reading like this:
-</para>
+<orderedlist numeration="arabic">
+<listitem><para>Click on the <emphasis>Advanced</emphasis>
+tab. (Hmmm... if everything is "Grayed Out", then you are not logged
+in as a user with enough privileges).</para></listitem>
-<para><programlisting>
- gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs \
- -sIjsServer=hpijs<replaceable>PageSize</replaceable> -dDuplex=<replaceable>Duplex</replaceable> <replaceable>Model</replaceable> \
- -r<replaceable>Resolution</replaceable>,PS:MediaPosition=<replaceable>InputSlot</replaceable> -dIjsUseOutputFD \
- -sOutputFile=- -
-</programlisting></para>
+<listitem><para>Click on the <emphasis>Printing
+Defaults...</emphasis> button.</para></listitem>
-<note><para>
-Note, that with CUPS and the "hpijs+foomatic" PPD (plus Perl and cupsomatic)
-you don't need to remember this. You can choose the available print options
-thru a GUI print command (like "glp" from ESP's commercially supported
-PrintPro software, or KDE's "kprinter", or GNOME's "gtklp" or the independent
-"xpp") or the CUPS web interface via human-readable drop-down selection
-menus.
-</para></note>
+<listitem><para>On any of the two new tabs, click on the
+<emphasis>Advanced...</emphasis>
+button.</para></listitem>
-<para>
-If you use "ESP Ghostscript" (also under the GPL, provided by Easy Software
-Products, the makers of CUPS, downloadable from
-<ulink url="http://www.cups.org/software.html">http://www.cups.org/software.html</ulink>,
-co-maintained by the developers of linuxprinting.org), you are guaranteed to
-have in use the most uptodate, bug-fixed, enhanced and stable version of a Free
-Ghostscript. It contains support for ~300 devices, whereas plain vanilla
-GNU Ghostscript 7.05 only has ~200.
+<listitem><para>A new dialog opens. Compare this one to the other,
+identical looking one from "B.5" or A.3".</para></listitem>
+</orderedlist>
</para>
+</listitem>
+</orderedlist>
<para>
-If you print only one CUPS test page, from the web interface and when you try to
-print a windows test page, it acts like the job was never sent:
-
-<simplelist>
- <member>Can you print "standard" jobs from the CUPS machine?</member>
- <member>Are the jobs from Windows visible in the Web interface on CUPS (http://localhost:631/)?</member>
- <member><emphasis>Most important:</emphasis> What kind of printer driver are you using on the Windows clients?</member>
-</simplelist>
-
-You can try to get a more detailed debugging info by setting "LogLevel debug" in
-<filename>/etc/cups/cupsd.conf</filename>, re-start cupsd and investigate <filename>/var/log/cups/error_log</filename>
-for the whereabouts of your Windows-originating printjobs:
-</para>
-
-<simplelist>
- <member>what does the "auto-typing" line say? which is the "MIME type" CUPS thinks is arriving from the Windows clients?</member>
- <member>are there "filter" available for this MIME type?</member>
- <member>are there "filter rules" defined in "/etc/cups/mime.convs" for this MIME type?</member>
-</simplelist>
-
+Do you see any difference? I don't either... However, only the last
+one, which you arrived at with steps "C.1.-6." will save any settings
+permanently and be the defaults for new users. If you want all clients
+to get the same defaults, you need to conduct these steps <emphasis>as
+Administrator</emphasis> (<parameter>printer admin</parameter> in
+<filename>smb.conf</filename>) <emphasis>before</emphasis> a client
+downloads the driver (the clients can later set their own
+<emphasis>per-user defaults</emphasis> by following the
+procedures <emphasis>A.</emphasis> or <emphasis>B.</emphasis>
+above).</para></listitem></varlistentry>
+
+<varlistentry><term>What are the most common blunders in driver
+settings on Windows clients?</term>
+<listitem><para>Don't use <emphasis>Optimize for
+Speed</emphasis>: use <emphasis>Optimize for
+Portability</emphasis> instead (Adobe PS Driver) Don't use
+<emphasis>Page Independence: No</emphasis>: always
+settle with <emphasis>Page Independence:
+Yes</emphasis> (Microsoft PS Driver and CUPS PS Driver for
+WinNT/2K/XP) If there are problems with fonts: use
+<emphasis>Download as Softfont into
+printer</emphasis> (Adobe PS Driver). For
+<emphasis>TrueType Download Options</emphasis>
+choose <emphasis>Outline</emphasis>. Use PostScript
+Level 2, if you are having trouble with a non-PS printer, and if
+there is a choice.</para></listitem></varlistentry>
+
+<varlistentry><term>I can't make <command>cupsaddsmb</command> work
+with newly installed printer</term>
+<listitem><para>Symptom: the last command of
+<command>cupsaddsmb</command> doesn't complete successfully:
+<command>cmd = setdriver printername printername</command> result was
+NT_STATUS_UNSUCCESSFUL then possibly the printer was not yet
+"recognized" by Samba. Did it show up in <emphasis>Network
+Neighbourhood</emphasis>? Did it show up in <command>rpcclient
+hostname -c 'enumprinters'</command>? Restart smbd (or send a
+<command>kill -HUP</command> to all processes listed by
+<command>smbstatus</command> and try
+again.</para></listitem></varlistentry>
+
+<varlistentry><term>My permissions on
+<filename>/var/spool/samba/</filename> get reset after each
+reboot</term>
+<listitem><para>Have you by accident set the CUPS spool directory to
+the same location? (<parameter>RequestRoot
+/var/spool/samba/</parameter> in <filename>cupsd.conf</filename> or
+the other way round: <filename>/var/spool/cups/</filename> is set as
+<parameter>path</parameter> in the <parameter>[printers]</parameter>
+section). These <emphasis>must</emphasis> be different. Set
+<parameter>RequestRoot /var/spool/cups/</parameter> in
+<filename>cupsd.conf</filename> and <parameter>path =
+/var/spool/samba</parameter> in the <parameter>[printers]</parameter>
+section of <filename>smb.conf</filename>. Otherwise cupsd will
+sanitize permissions to its spool directory with each restart, and
+printing will not work reliably.</para></listitem></varlistentry>
+
+<varlistentry><term>My printers work fine: just the printer named "lp"
+intermittently swallows jobs and spits out completely different
+ones</term>
+<listitem><para>It is a very bad idea to name any printer "lp". This
+is the traditional Unix name for the default printer. CUPS may be set
+up to do an automatic creation of "Implicit Classes". This means, to
+group all printers with the same name to a pool of devices, and
+loadbalancing the jobs across them in a round-robin fashion. Chances
+are high that someone else has an "lp" named printer too. You may
+receive his jobs and send your own to his device unwittingly. To have
+tight control over the printer names, set <parameter>BrowseShortNames
+No</parameter>. It will present any printer as "printername@cupshost"
+then, giving you a better control over what may happen in a large
+networked environment.</para></listitem></varlistentry>
+
+<varlistentry><term>How do I "watch" my Samba server?</term>
+<listitem><para>You can use <command>tail -f
+/var/log/samba/log.smbd</command> (you may need a different path) to
+see a live scrolling of all log messages. <command>smbcontrol smbd
+debuglevel</command> tells you which verbosity goes into the
+logs. <command>smbcontrol smbd debug 3</command> sets the verbosity to
+a quite high level (you can choose from 0 to 10 or 100). This works
+"on the fly", without the need to restart the smbd daemon. Don't use
+more than 3 initially; or you'll drown in an ocean of
+messages.</para></listitem></varlistentry>
+
+<varlistentry><term>I can't use Samba from my WinXP Home box, while
+access from WinXP Prof works flawlessly</term>
+<listitem><para>You have our condolences! WinXP home has been
+completely neutered by Microsoft as compared to WinXP Prof: you can
+not log into a WinNT domain. It cannot join a Win NT domain as a
+member server. While it is possible to access domain resources, users
+don't have "single sign-on". They need to supply username and password
+each time they connect to a resource. Logon scripts and roaming
+profiles are not supported. It can serve file and print shares; but
+only in "share-mode security" level. It can not use "user-mode
+security" (what Windows 95/98/ME still can
+do).</para></listitem></varlistentry>
+
+<varlistentry><term>Where do I find the Adobe PostScript driver files
+I need for "cupsaddsmb"?</term>
+<listitem><para>Use <command>smbclient</command> to connect to any
+Windows box with a shared PostScript printer: <command>smbclient
+//windowsbox/print\$ -U guest</command>. You can navigate to the
+<filename>W32X86/2</filename> subdir to <command>mget ADOBE*</command>
+and other files or to <filename>WIN40/0</filename> to do the same. --
+Another option is to download the <filename>*.exe</filename> packaged
+files from the Adobe website.</para></listitem></varlistentry>
+</variablelist>
</sect2>
-</sect1>
-
-
-<sect1>
-<title>Limiting the number of pages users can print</title>
-
-<para>
-The feature you want is dependent on the real print subsystem you're using.
-Samba's part is always to receive the job files from the clients (filtered
-*or* unfiltered) and hand it over to this printing subsystem.
-</para>
-
-<para>
-Of course one could "hack" things with one's own scripts.
-</para>
-
-<para>
-But there is CUPS (Common Unix Printing System). CUPS supports "quotas".
-Quotas can be based on sizes of jobs or on the number of pages or both,
-and are spanning any time period you want.
-</para>
-
-<para>
-This is an example command how root would set a print quota in CUPS,
-assuming an existing printer named "quotaprinter":
-</para>
-
-<programlisting>
- lpadmin -p quotaprinter -o job-quota-period=604800 -o job-k-limit=1024 \
- -o job-page-limit=100
-</programlisting>
-
-<para>
-This would limit every single user to print 100 pages or 1024 KB of
-data (whichever comes first) within the last 604.800 seconds ( = 1 week).
-</para>
-
-<para>
-For CUPS to count correctly, the printfile needs to pass the CUPS "pstops" filter,
-otherwise it uses a "dummy" count of "1". Some printfiles don't pass it
-(eg: image files) but then those are mostly 1 page jobs anyway. This also means,
-proprietary drivers for the target printer running on the client computers and
-CUPS/Samba then spooling these files as "raw" (i.e. leaving them untouched, not
-filtering them), will be counted as "1-pagers" too!
-</para>
-
-<para>
-You need to send PostScript from the clients (i.e. run a PostScript driver there)
-for having the chance to get accounting done. If the printer is a non-PostScript model,
-you need to let CUPS do the job to convert the file to a print-ready format for the
-target printer. This will be working for currently ~1.000 different printer models, see
-</para>
-
-<programlisting>
- http://www.linuxprinting.org/printer_list.cgi
-</programlisting>
-
-<para>
-Before CUPS-1.1.16 your only option was to use the Adobe PostScript
-Driver on the Windows clients. The output of this driver was not always
-passed thru the "pstops" filter on the CUPS/Samba side, and therefor was
-not counted correctly (the reason is that it often --- depending on the
-"PPD" being used --- did write a "PJL"-header in front of the real
-PostScript which made CUPS to skip the pstops and go directy to
-the "pstoraster" stage).
-</para>
-
-<para>
-From CUPS-1.1.16 onward you can use the "CUPS PostScript Driver
-for Windows NT/2K/XP clients" (it is tagged in the download area of
-http://www.cups.org/ as the "cups-samba-1.1.16.tar.gz" package).
-It is *not* working for Win9x/ME clients. But it:
-</para>
-
-<simplelist>
- <member>it guarantees to not write an PJL-header</member>
- <member>it guarantees to still read and support all PJL-options named in the driver PPD with its own means</member>
- <member>it guarantees the file going thru the "pstops" filter on the CUPS/Samba server</member>
- <member>it guarantees to page-count correctly the printfile</member>
-</simplelist>
-
-<para>
-You can read more about the setup of this combination in the
-manpage for "cupsaddsmb" (only present with CUPS installed, only
-current with CUPS 1.1.16).
-</para>
-
-<para>
-These are the items CUPS logs in the "page_log" for every single *page* of a job:
-</para>
-
-<para><simplelist>
-<member>Printer name</member>
-<member>User name</member>
-<member>Job ID</member>
-<member>Time of printing</member>
-<member>the page number</member>
-<member>the number of copies</member>
-<member>a billing info string (optional)</member>
-</simplelist>
-</para>
-
-<para>
-Here is an extract of my CUPS server's page_log file to illustrate
-the format and included items:
-</para>
-
-<para><computeroutput>
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 1 2 #marketing
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 2 2 #marketing
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 3 2 #marketing
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 4 2 #marketing
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 5 2 #marketing
- infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 6 2 #marketing
-</computeroutput></para>
-
-<para>
-This was Job ID "40", printed on "infotec_IS2027" by user "kurt", a 6-page job
-printed in 2 copies and billed to "#marketing"...
-</para>
-
-<para>
-What flaws or shortcomings are there?
-</para>
-
-<simplelist>
- <member>the ones named above</member>
-
- <member>
- CUPS really counts the job pages being *processsed in software*
- (going thru the "RIP") rather than the physical sheets successfully
- leaving the printing device -- if there is a jam while printing
- the 5th sheet out of 1000 and the job is aborted by the printer,
- the "page count" will still show the figure of 1000 for that job
- </member>
-
- <member>
- all quotas are the same for all users (no flexibility to give the
- boss a higher quota than the clerk) no support for groups
- </member>
-
- <member>
- no means to read out the current balance or "used-up" number of current quota
- </member>
-
- <member>
- a user having used up 99 sheets of 100 quota will still be able to send and print a 1.000 sheet job
- </member>
-
- <member>
- a user being denied a job because of a filled-up quota doesn't get a meaningful
- error message from CUPS other than "client-error-not-possible".
- </member>
-</simplelist>
-
-<para>
-But this is the best system out there currently. And there are
-huge improvements under development:
-</para>
-
-<simplelist>
- <member>page counting will go into the "backends" (these talk
- directly to the printer and will increase the count in sync with the
- actual printing process -- a jam at the 5th sheet will lead to a stop in the counting)</member>
-
- <member>quotas will be handled more flexibly</member>
-
- <member>probably there will be support for users to inquire their "accounts" in advance</member>
-
- <member>probably there will be support for some other tools around this topic</member>
-</simplelist>
-
-<para>
-Other than the current stage of the CUPS development, I don't
-know any other ready-to-use tool which you could consider.
-</para>
-
-<para>
-You can download the driver files from
-<ulink url="http://www.cups.org/software.html">http://www.cups.org/software.html</ulink>.
-It is a separate package from the CUPS base software files, tagged as "CUPS 1.1.16
-Windows NT/2k/XP Printer Driver for SAMBA (tar.gz, 192k)". The filename to
-download is "cups-samba-1.1.16.tar.gz". Upon untar-/unzip-ping it will reveal
-the files:
-</para>
-
-<para>
-<computeroutput>
- cups-samba.install
- cups-samba.license
- cups-samba.readme
- cups-samba.remove
- cups-samba.ss
-</computeroutput>
-</para>
-
-<para>
-These have been packaged with the ESP meta packager software "EPM". The
-*.install and *.remove files are simple shell script, which untars the
-*.ss (which is nothing else than a tar-archive) and puts its contents
-into <filename>/usr/share/cups/drivers/</filename>. Its contents are 3 files:
-</para>
-
-<para>
-<computeroutput>
- cupsdrvr.dll
- cupsui.dll
- cups.hlp
-</computeroutput>
-</para>
-
-<caution><para>
-Due to a bug one CUPS release puts the <filename>cups.hlp</filename>
-into <filename>/usr/share/drivers/</filename> instead of
-<filename>/usr/share/cups/drivers/</filename>. To work around this, copy/move
-the file after running the "./cups-samba.install" script manually to the right place:
-</para>
-
- <para>
-<userinput> cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/
-</userinput>
- </para></caution>
-
-<note>
-<para>
-This new CUPS PostScript driver is currently binary-only, but free
-no source code is provided (yet). The reason is this: it has
-been developed with the help of the Microsoft Driver Developer Kit (DDK)
-and compiled with Microsoft Visual Studio 6. It is not clear to the driver
-developers if they are allowed to distribute the whole of the source code
-as Free Software. However, they will likely release the "diff" in source
-code under the GPL, so anybody with a license of Visual Studio and a DDK
-will be able to compile for him/herself.
-</para>
-
-<para>
-Once you have run the install script (and possibly manually moved the
-"cups.hlp" file to "/usr/share/cups/drivers/"), the driver is ready to be
-put into Samba's [print$] share (which often maps to "/etc/samba/drivers/"
-and contains a subdir tree with WIN40 and W32X86 branches), by running
-"cupsaddsmb" (see also "man cupsaddsmb" for CUPS 1.1.16). [Don't forget to
-put root into the smbpasswd file by running "smbpasswd" should you run
-this whole procedure for the first time.] Once the driver files are in the
-[print$] share, they are ready to be downloaded and installed by the
-Win NT/2k/XP clients.
-</para></note>
-
-
- <note><para>
- Win 9x/ME clients won't work with this driver. For these you'd
- still need to use the ADOBE*.* drivers as previously.
- </para></note>
-
- <note><para>
- It is not harming if you've still the ADOBE*.* driver files from
- previous installations in the "/usr/share/cups/drivers/" directory.
- The new cupsaddsmb (from 1.1.16) will automatically use the
- "newest" installed driver (which here then is the CUPS drivers).
- </para></note>
-
- <note><para>
- Should your Win clients have had the old ADOBE*.* files and the
- Adobe PostScript drivers installed, the download and installation
- of the new CUPS PostScript driver for Windows NT/2k/XP will fail
- at first.
- </para>
- <para>
- It is not enough to "delete" the printer (as the driver files
- will still be kept by the clients and re-used if you try to
- re-install the printer). To really get rid of the Adobe driver
- files on the clients, open the "Printers" folder (possibly via
- "Start --> Settings --> Control Panel --> Printers"), right-click
- onto the folder background and select "Server Properties". A
- new dialog opens; select the "Drivers" tab; on the list select
- the driver you want to delete and click on the "Delete" button.
- (This will only work if there is no single printer left which
- uses that particular driver -- you need to "delete" all printers
- using this driver in the "Printers" folder first.)
- </para>
- </note>
-
- <note><para>
- Once you have successfully downloaded the CUPS PostScript driver
- to a client, you can easily switch all printers to this one
- by proceeding as described elsewhere in the "Samba HOWTO
- Collection" to change a driver for an existing printer.
- </para></note>
-
-<para>
-What are the benefits with the "CUPS PostScript driver for Windows NT/2k/XP"
-as compared to the Adobe drivers?
-</para>
-
-<para>
-<simplelist>
- <member><para>
- no hassle with the Adobe EULA
- </para></member>
-
- <member><para>
- no hassle with the question "where do I get the ADOBE*.* driver files from?"
- </para></member>
-
- <member><para>
- the Adobe drivers (depending on the printer PPD associated with them)
- often put a PJL header in front of the core PostScript part of the print
- file (thus the file starts with "<replaceable>1B</replaceable>%-12345X"
- or "<replaceable>escape</replaceable>%-12345X"
- instead of "%!PS"). This leads to the CUPS daemon autotyping the
- arriving file as a print-ready file, not requiring a pass thru the
- "pstops" filter (to speak more technical, it is not regarded as the
- generic MIME type "application/postscript", but as the more special
- MIME type "application/cups.vnd-postscript"), which therefore also
- leads to the page accounting in "/var/log/cups/page_log" not receiving
- the exact mumber of pages; instead the dummy page number of "1" is
- logged in a standard setup)
- </para></member>
-
- <member><para>
- the Adobe driver has more options to "mis-configure" the PostScript
- generated by it (like setting it inadvertedly to "Optimize for Speed",
- instead of "Optimize for Portability", which could lead to CUPS being
- unable to process it)
- </para></member>
-
- <member><para>
- the CUPS PostScript driver output sent by Windows clients to the CUPS
- server will be guaranteed to be auto-typed as generic MIME type
- "application/postscript", thusly passing thru the CUPS "pstops" filter
- and logging the correct number of pages in the page_log for accounting
- and quota purposes
- </para></member>
-
- <member><para>
- the CUPS PostScript driver supports the sending of additional print
- options by the Win NT/2k/XP clients, such as naming the CUPS standard
- banner pages (or the custom ones, should they be installed at the time
- of driver download), using the CUPS "page-label" option, setting a
- job-priority and setting the scheduled time of printing (with the option
- to support additional useful IPP job attributes in the future).
- </para></member>
-
- <member><para>
- the CUPS PostScript driver supports the inclusion of the new
- "*cupsJobTicket" comments at the beginnig of the PostScript file (which
- could be used in the future for all sort of beneficial extensions on
- the CUPS side, but which will not disturb any other application as those
- will regard it as a comment and simply ignore it).
- </para></member>
-
- <member><para>
- the CUPS PostScript driver will be the heart of the fully fledged CUPS
- IPP client for Windows NT/2k/XP to be released soon (probably alongside
- the first Beta release for CUPS 1.2).
- </para></member>
-
-</simplelist>
-</para>
-</sect1>
-
-<sect1>
-<title>Advanced Postscript Printing from MS Windows</title>
-
-<para>
-Let the Windows Clients use a PostScript driver to deliver poistscript to
-the samba print server (just like any Linux or Unix Client would also use
-PostScript to send to the server)
-</para>
-
-<para>
-Make the Unix printing subsystem to which Samba sends the job convert the
-incoming PostScript files to the native print format of the target printers
-(would be PCL if you have an HP printer)
-</para>
-
-<para>
-Now if you are afraid that this would just mean using a *Generic* PostScript
-driver for the clients that has no Simplex/Duplex selection, and no paper tray
-choice, but you need them to be able to set up print jobs, with all the bells
-and whistles of your printers:-
-</para>
-
-<simplelist>
- <member>Not possible with traditional spooling systems</member>
-
- <member>
- But perfectly supported by CUPS (which uses "PPD" files to
- describe how to control the print options for PostScript and
- non-PostScript devices alike...
- </member>
-</simplelist>
-
-<para>
-CUPS PPDs are working perfectly on Windows clients who use Adobe PostScript
-drivers (or the new CUPS PostScript driver for Windows NT/2K/XP). Clients can use
-them to setup the job to their liking and CUPS will use the received job options
-to make the (PCL-, ESC/P- or PostScript-) printer behave as required.
-</para>
-
-<para>
-If you want to have the additional benefit of page count logging and accounting
-then the CUPS PostScript driver is the best choice (better than the Adobe one).
-</para>
-
-<para>
-If you want to make the drivers downloadable for the clients then "cupsaddsmb" is
-your friend. It will setup the [print$] share on the Samba host to be ready to serve
-the clients for a "point and print" driver installation.
-</para>
-
-<warning>
-<para>What strings are attached?</para></warning>
-
-<para>
-There are some. But, given the sheer CPU power you can buy nowadays,
-these can be overcome easily. The strings:
-</para>
+<sect2>
+<title>An Overview of the CUPS Printing Processes</title>
<para>
-Well, if the CUPS/Samba side will have to print to many printers serving many users,
-you probably will need to set up a second server (which can do automatic load balancing
-with the first one, plus a degree of fail-over mechanism). Converting the incoming
-PostScript jobs, "interpreting" them for non-PostScript printers, amounts to the work
-of a "RIP" (Raster Image Processor) done in software. This requires more CPU and RAM
-than for the mere "raw spooling" task your current setup is solving. It all depends
-on the avarage and peak printing load the server should be able to handle.
+<figure><title>CUPS Printing Overview</title>
+<mediaobject>
+ <imageobject role="latex"><imagedata fileref="projdoc/imagefiles/a_small"/></imageobject>
+ <imageobject><imagedata fileref="projdoc/imagefiles/a_small.png"/></imageobject>
+</mediaobject>
+</figure>
</para>
-
+</sect2>
</sect1>
-<sect1>
-<title>Auto-Deletion of CUPS spool files</title>
-
-<para>
-Samba print files pass thru two "spool" directories. One the incoming directory
-managed by Samba, (set eg: in the <command>path = /var/spool/samba</command> directive in the [printers]
-section of &smb.conf;). Second is the spool directory of your UNIX print subsystem.
-For CUPS it is normally "/var/spool/cups/", as set by the cupsd.conf directive
-"RequestRoot /var/spool/cups".
-</para>
-
-<para>
-I am not sure, which one of your directories keeps the files. From what you say,
-it is most likely the Samba part.
-</para>
-
-<para>
-For the CUPS part, you may want to consult:
-</para>
-
-<simplelist>
-<member>http://localhost:631/sam.html#PreserveJobFiles</member>
-<member>http://localhost:631/sam.html#PreserveJobHistory</member>
-<member>http://localhost:631/sam.html#MaxJobs</member>
-</simplelist>
-
-<para>
-There are the settings described for your CUPS daemon, which could lead to completed
-job files not being deleted.
-</para>
-
-<para>
-"PreserveJobHistory Yes" -- keeps some details of jobs in
-cupsd's mind (well it keeps the "c12345", "c12346" etc. files
-in the CUPS spool directory, which do a similar job as the
-old-fashioned BSD-LPD control files). This is set to "Yes"
-as a default.
-</para>
-
-<para>
-"PreserveJobFiles Yes" -- keeps the job files themselves in
-cupsd's mind (well it keeps the "d12345", "d12346" etc. files
-in the CUPS spool directory...). This is set to "No" as the
-CUPS default.
-</para>
-
-<para>
-"MaxJobs 500" -- this directive controls the maximum number
-of jobs that are kept in memory. Once the number of jobs
-reaches the limit, the oldest completed job is automatically
-purged from the system to make room for the new one. If all
-of the known jobs are still pending or active then the new
-job will be rejected. Setting the maximum to 0 disables this
-functionality. The default setting is 0.
-</para>
-
-<para>
-(There are also additional settings for "MaxJobsPerUser" and
-"MaxJobsPerPrinter"...)
-</para>
-
-<para>
-For everything to work as announced, you need to have three things:
-</para>
-
-<simplelist>
-
- <member>
- a Samba-&smbd; which is compiled against "libcups" (Check on Linux by running <userinput>ldd `which smbd`</userinput>)
- </member>
-
- <member>
- a Samba-&smb.conf; setting of <command>printing = cups</command>
- </member>
-
- <member>
- another Samba-&smb.conf; setting of <command>printcap = cups</command>
- </member>
-
-</simplelist>
-
-<note><para>
-Note, that in this case all other manually set printing-related
-commands (like "print command", "lpq command", "lprm command",
-"lppause command" or "lpresume command") are ignored and they
-should normally have no influence what-so-ever on your printing.
-</para></note>
-
-<para>
-If you want to do things manually, replace the "printing = cups"
-by "printing = bsd". Then your manually set commands may work
-(haven't tested this), and a "print command = lp -d %P %s; rm %s"
-may do what you need.
-</para>
-
-<para>
-You forgot to mention the CUPS version you're using. If you did
-set things up as described in the man pages, then the Samba
-spool files should be deleted. Otherwise it may be a bug. On
-the CUPS side, you can control the behaviour as described
-above.
-</para>
-
-<para>
-If you have more problems, post the output of these commands:
-</para>
-
-<para>
-<userinput>
- grep -v ^# /etc/cups/cupsd.conf | grep -v ^$
- grep -v ^# /etc/samba/smb.conf | grep -v ^$ | grep -v "^;"
-</userinput>
-</para>
-
-<para>
-(adapt paths as needed). These commands sanitize the files
-and cut out the empty lines and lines with comments, providing
-the "naked settings" in a compact way.
-</para>
-</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/Compiling.xml b/docs/docbook/projdoc/Compiling.xml
index 9638663dde..279be2fdb4 100644
--- a/docs/docbook/projdoc/Compiling.xml
+++ b/docs/docbook/projdoc/Compiling.xml
@@ -1,20 +1,17 @@
<chapter id="compiling">
<chapterinfo>
- <author>
- <affiliation>
- <orgname>Samba Team</orgname>
- </affiliation>
- </author>
&author.jelmer;
+ <author><surname>Someone; Jerry perhaps?</surname></author>
- <pubdate> (22 May 2001) </pubdate>
+ <pubdate> 22 May 2001 </pubdate>
<pubdate> 18 March 2003 </pubdate>
</chapterinfo>
<title>How to compile SAMBA</title>
<para>
-You can obtain the samba source from the <ulink url="http://samba.org/">samba website</ulink>. To obtain a development version,
+You can obtain the samba source from the
+<ulink url="http://samba.org/">samba website</ulink>. To obtain a development version,
you can download samba from CVS or using rsync.
</para>
@@ -45,8 +42,8 @@ This chapter is a modified version of the instructions found at
<para>
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.
+including samba, rsync, distcc, ccache and jitterbug. There are two main ways
+of accessing the CVS server on this host.
</para>
<sect3>
@@ -80,11 +77,12 @@ just a casual browser.
<para>
To download the latest cvs source code, point your
-browser at the URL : <ulink url="http://www.cyclic.com/">http://www.cyclic.com/</ulink>.
+browser at the URL :
+<ulink url="http://www.cyclic.com/">http://www.cyclic.com/</ulink>.
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.
+Links to theses clients are also available from the Cyclic website.
</para>
<para>
@@ -94,16 +92,17 @@ samba source code. For the other source code repositories
on this system just substitute the correct package name
</para>
-<orderedlist>
-<listitem>
+<procedure>
+ <title>Retrieving samba using CVS</title>
+
+ <step>
<para>
Install a recent copy of cvs. All you really need is a
copy of the cvs client binary.
</para>
-</listitem>
-
+ </step>
-<listitem>
+ <step>
<para>
Run the command
</para>
@@ -111,14 +110,16 @@ on this system just substitute the correct package name
<para>
<userinput>cvs -d :pserver:cvs@samba.org:/cvsroot login</userinput>
</para>
+ </step>
+
+ <step>
<para>
When it asks you for a password type <userinput>cvs</userinput>.
</para>
-</listitem>
+ </step>
-
-<listitem>
+ <step>
<para>
Run the command
</para>
@@ -134,18 +135,19 @@ on this system just substitute the correct package name
</para>
<para>
- CVS branches other then HEAD can be obtained by using the <parameter>-r</parameter>
- 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 userinput.
+ CVS branches other then HEAD can be obtained by using the
+ <option>-r</option> 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 3.0 release code. This could be done by
+ using the following command:
</para>
<para>
- <userinput>cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_2_2 samba</userinput>
+ <userinput>cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_3_0 samba</userinput>
</para>
-</listitem>
+ </step>
-<listitem>
+ <step>
<para>
Whenever you want to merge in the latest code changes use
the following command from within the samba directory:
@@ -154,8 +156,8 @@ on this system just substitute the correct package name
<para>
<userinput>cvs update -d -P</userinput>
</para>
-</listitem>
-</orderedlist>
+ </step>
+</procedure>
</sect3>
</sect2>
@@ -166,16 +168,16 @@ on this system just substitute the correct package name
<title>Accessing the samba sources via rsync and ftp</title>
<para>
- pserver.samba.org also exports unpacked copies of most parts of the CVS tree at <ulink url="ftp://pserver.samba.org/pub/unpacked">ftp://pserver.samba.org/pub/unpacked</ulink> and also via anonymous rsync at rsync://pserver.samba.org/ftp/unpacked/. I recommend using rsync rather than ftp.
+ pserver.samba.org also exports unpacked copies of most parts of the CVS
+ tree at <ulink url="ftp://pserver.samba.org/pub/unpacked">ftp://pserver.samba.org/pub/unpacked</ulink> and also via anonymous rsync at
+ <ulink url="rsync://pserver.samba.org/ftp/unpacked/">rsync://pserver.samba.org/ftp/unpacked/</ulink>. I recommend using rsync rather than ftp.
See <ulink url="http://rsync.samba.org/">the rsync homepage</ulink> for more info on rsync.
</para>
<para>
- The disadvantage of the unpacked trees
- is that they do not support automatic
- merging of local changes like CVS does.
- rsync access is most convenient for an
- initial install.
+ The disadvantage of the unpacked trees is that they do not support automatic
+ merging of local changes like CVS does. rsync access is most convenient
+ for an initial install.
</para>
</sect1>
@@ -183,11 +185,10 @@ on this system just substitute the correct package name
<title>Verifying Samba's PGP signature</title>
<para>
-In these days of insecurity, it's strongly recommended that you verify the PGP signature for any
-source file before installing it. According to Jerry Carter of the Samba Team, only about 22% of
-all Samba downloads have had a corresponding PGP signature download (a very low percentage, which
-should be considered a bad thing). Even if you're not downloading from a mirror site, verifying PGP
-signatures should be a standard reflex.
+In these days of insecurity, it's strongly recommended that you verify the PGP
+signature for any source file before installing it. Even if you're not
+downloading from a mirror site, verifying PGP signatures should be a
+standard reflex.
</para>
@@ -195,38 +196,39 @@ signatures should be a standard reflex.
With that said, go ahead and download the following files:
</para>
-<para><programlisting>
- $ wget http://us1.samba.org/samba/ftp/samba-2.2.8a.tar.asc
- $ wget http://us1.samba.org/samba/ftp/samba-pubkey.asc
-</programlisting></para>
+<para><screen>
+<prompt>$ </prompt><userinput> wget http://us1.samba.org/samba/ftp/samba-2.2.8a.tar.asc</userinput>
+<prompt>$ </prompt><userinput> wget http://us1.samba.org/samba/ftp/samba-pubkey.asc</userinput>
+</screen></para>
<para>
The first file is the PGP signature for the Samba source file; the other is the Samba public
PGP key itself. Import the public PGP key with:
</para>
-<programlisting>
- $ gpg --import samba-pubkey.asc
-</programlisting>
+<screen>
+ <prompt>$ </prompt><userinput>gpg --import samba-pubkey.asc</userinput>
+</screen>
<para>
And verify the Samba source code integrity with:
</para>
-<programlisting>
- $ gzip -d samba-2.2.8a.tar.gz
- $ gpg --verify samba-2.2.8a.tar.asc
-</programlisting>
+<screen>
+ <prompt>$ </prompt><userinput>gzip -d samba-2.2.8a.tar.gz</userinput>
+ <prompt>$ </prompt><userinput>gpg --verify samba-2.2.8a.tar.asc</userinput>
+</screen>
<para>
-If you receive a message like, "Good signature from Samba Distribution Verification Key..."
-then all is well. The warnings about trust relationships can be ignored. An example of what
-you would not want to see would be:
+If you receive a message like, "Good signature from Samba Distribution
+Verification Key..."
+then all is well. The warnings about trust relationships can be ignored. An
+example of what you would not want to see would be:
</para>
-<programlisting>
+<computeroutput>
gpg: BAD signature from "Samba Distribution Verification Key"
-</programlisting>
+</computeroutput>
</sect1>
@@ -238,28 +240,28 @@ you would not want to see would be:
configure Samba for your operating system. If you have unusual
needs then you may wish to run</para>
- <para><prompt>root# </prompt><userinput>./configure --help
+ <para>&rootprompt;<userinput>./configure --help
</userinput></para>
<para>first to see what special options you can enable.
Then executing</para>
- <para><prompt>root# </prompt><userinput>make</userinput></para>
+ <para>&rootprompt;<userinput>make</userinput></para>
<para>will create the binaries. Once it's successfully
compiled you can use </para>
- <para><prompt>root# </prompt><userinput>make install</userinput></para>
+ <para>&rootprompt;<userinput>make install</userinput></para>
<para>to install the binaries and manual pages. You can
separately install the binaries and/or man pages using</para>
- <para><prompt>root# </prompt><userinput>make installbin
+ <para>&rootprompt;<userinput>make installbin
</userinput></para>
<para>and</para>
- <para><prompt>root# </prompt><userinput>make installman
+ <para>&rootprompt;<userinput>make installman
</userinput></para>
<para>Note that if you are upgrading for a previous version
@@ -267,7 +269,7 @@ you would not want to see would be:
the binaries will be renamed with a ".old" extension. You
can go back to the previous version with</para>
- <para><prompt>root# </prompt><userinput>make revert
+ <para>&rootprompt;<userinput>make revert
</userinput></para>
<para>if you find this version a disaster!</para>
@@ -281,35 +283,38 @@ you would not want to see would be:
<listitem><para>the MIT kerberos development libraries
(either install from the sources or use a package). The
- heimdal libraries will not work.</para></listitem>
+ Heimdal libraries will not work.</para></listitem>
<listitem><para>the OpenLDAP development libraries.</para></listitem>
</itemizedlist>
<para>If your kerberos libraries are in a non-standard location then
- remember to add the configure option --with-krb5=DIR.</para>
+ remember to add the configure option
+ <option>--with-krb5=<replaceable>DIR</replaceable></option>.</para>
- <para>After you run configure make sure that <filename>include/config.h</filename> it generates contains lines like this:</para>
+ <para>After you run configure make sure that
+ <filename>include/config.h</filename> it generates contains lines like
+ this:</para>
- <para><programlisting>
+<para><programlisting>
#define HAVE_KRB5 1
#define HAVE_LDAP 1
</programlisting></para>
- <para>If it doesn't then configure did not find your krb5 libraries or
- your ldap libraries. Look in config.log to figure out why and fix
- it.</para>
+ <para>If it doesn't then configure did not find your krb5 libraries or
+ your ldap libraries. Look in <filename>config.log</filename> to figure
+ out why and fix it.</para>
<sect3>
<title>Installing the required packages for Debian</title>
<para>On Debian you need to install the following packages:</para>
<para>
- <itemizedlist>
- <listitem>libkrb5-dev</listitem>
- <listitem>krb5-user</listitem>
- </itemizedlist>
+ <simplelist>
+ <member>libkrb5-dev</member>
+ <member>krb5-user</member>
+ </simplelist>
</para>
</sect3>
@@ -318,11 +323,11 @@ you would not want to see would be:
<para>On RedHat this means you should have at least: </para>
<para>
- <itemizedlist>
- <listitem>krb5-workstation (for kinit)</listitem>
- <listitem>krb5-libs (for linking with)</listitem>
- <listitem>krb5-devel (because you are compiling from source)</listitem>
- </itemizedlist>
+ <simplelist>
+ <member>krb5-workstation (for kinit)</member>
+ <member>krb5-libs (for linking with)</member>
+ <member>krb5-devel (because you are compiling from source)</member>
+ </simplelist>
</para>
<para>in addition to the standard development environment.</para>
@@ -337,10 +342,10 @@ you would not want to see would be:
</sect1>
<sect1>
- <title>Starting the smbd and nmbd</title>
+ <title>Starting the &smbd; and &nmbd;</title>
- <para>You must choose to start smbd and nmbd either
- as daemons or from <application>inetd</application>Don't try
+ <para>You must choose to start &smbd; and &nmbd; either
+ as daemons or from <application>inetd</application>. Don't try
to do both! Either you can put them in <filename>
inetd.conf</filename> and have them started on demand
by <application>inetd</application>, or you can start them as
@@ -350,26 +355,28 @@ you would not want to see would be:
the bit about what user you need to be in order to start
Samba. In many cases you must be root.</para>
- <para>The main advantage of starting <application>smbd</application>
- and <application>nmbd</application> using the recommended daemon method
+ <para>The main advantage of starting &smbd;
+ and &nmbd; using the recommended daemon method
is that they will respond slightly more quickly to an initial connection
request.</para>
<sect2>
<title>Starting from inetd.conf</title>
- <para>NOTE; The following will be different if
+ <note>
+ <para>The following will be different if
you use NIS, NIS+ or LDAP to distribute services maps.</para>
+ </note>
<para>Look at your <filename>/etc/services</filename>.
What is defined at port 139/tcp. If nothing is defined
then add a line like this:</para>
- <para><userinput>netbios-ssn 139/tcp</userinput></para>
+ <para><programlisting>netbios-ssn 139/tcp</programlisting></para>
<para>similarly for 137/udp you should have an entry like:</para>
- <para><userinput>netbios-ns 137/udp</userinput></para>
+ <para><programlisting>netbios-ns 137/udp</programlisting></para>
<para>Next edit your <filename>/etc/inetd.conf</filename>
and add two lines something like this:</para>
@@ -386,11 +393,13 @@ you would not want to see would be:
<note><para>Some unixes already have entries like netbios_ns
(note the underscore) in <filename>/etc/services</filename>.
You must either edit <filename>/etc/services</filename> or
- <filename>/etc/inetd.conf</filename> to make them consistent.</para></note>
+ <filename>/etc/inetd.conf</filename> to make them consistent.
+ </para></note>
<note><para>On many systems you may need to use the
- <command>interfaces</command> option in &smb.conf; to specify the IP address
- and netmask of your interfaces. Run <application>ifconfig</application>
+ <parameter>interfaces</parameter> option in &smb.conf; to specify the IP
+ address and netmask of your interfaces. Run
+ <application>ifconfig</application>
as root if you don't know what the broadcast is for your
net. &nmbd; tries to determine it at run
time, but fails on some unixes.
@@ -402,9 +411,9 @@ you would not want to see would be:
arguments, or you should use a script, and start the script
from <command>inetd</command>.</para></warning>
- <para>Restart <command>inetd</command>, perhaps just send
- it a HUP. If you have installed an earlier version of <application>
- nmbd</application> then you may need to kill nmbd as well.</para>
+ <para>Restart <application>inetd</application>, perhaps just send
+ it a HUP. If you have installed an earlier version of &nmbd; then
+ you may need to kill &nmbd; as well.</para>
</sect2>
<sect2>
@@ -428,11 +437,29 @@ you would not want to see would be:
</para>
<para>To kill it send a kill signal to the processes
- <command>nmbd</command> and <command>smbd</command>.</para>
+ &nmbd; and &smbd;.</para>
<note><para>If you use the SVR4 style init system then
you may like to look at the <filename>examples/svr4-startup</filename>
script to make Samba fit into that system.</para></note>
</sect2>
</sect1>
+
+<sect1>
+<title>Common Errors</title>
+
+<para><quote>
+I'm using gcc 3 and I've compiled Samba-3 from the CVS and the
+binaries are very large files (40 Mb and 20 Mb). I've the same result with
+<option>--enable-shared</option> ?
+</quote>
+</para>
+
+<para>
+The dwarf format used by GCC 3 for storing debugging symbols is very inefficient.
+Strip the binaries, don't compile with -g or compile with -gstabs.
+</para>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/DOMAIN_MEMBER.xml b/docs/docbook/projdoc/DOMAIN_MEMBER.xml
index ecb8a3afb3..0af934faab 100644
--- a/docs/docbook/projdoc/DOMAIN_MEMBER.xml
+++ b/docs/docbook/projdoc/DOMAIN_MEMBER.xml
@@ -4,40 +4,48 @@
&author.jht;
&author.jeremy;
&author.jerry;
+
+<!-- Authors of the ADS-HOWTO -->
+ &author.tridge;
+ &author.jelmer;
</chapterinfo>
<title>Domain Membership</title>
<para>
-Domain Membership is a subject of vital concern, Samba must be able to participate
-as a member server in a Microsoft Domain security context, and Samba must be capable of
-providing Domain machine member trust accounts, otherwise it would not be capable of offering
-a viable option for many users.
+Domain Membership is a subject of vital concern, Samba must be able to
+participate as a member server in a Microsoft Domain security context, and
+Samba must be capable of providing Domain machine member trust accounts,
+otherwise it would not be capable of offering a viable option for many users.
</para>
<para>
-This chapter covers background information pertaining to domain membership, Samba
-configuration for it, and MS Windows client procedures for joining a domain. Why is
-this necessary? Because both are areas in which there exists within the current MS
-Windows networking world and particularly in the Unix/Linux networking and administration
-world, a considerable level of mis-information, incorrect understanding, and a lack of
-knowledge. Hopefully this chapter will fill the voids.
+This chapter covers background information pertaining to domain membership,
+Samba configuration for it, and MS Windows client procedures for joining a
+domain. Why is this necessary? Because both are areas in which there exists
+within the current MS Windows networking world and particularly in the
+Unix/Linux networking and administration world, a considerable level of
+mis-information, incorrect understanding, and a lack of knowledge. Hopefully
+this chapter will fill the voids.
</para>
<sect1>
<title>Features and Benefits</title>
<para>
-MS Windows workstations and servers that want to participate in domain security need to
+MS Windows workstations and servers that want to participate in domain
+security need to
be made Domain members. Participating in Domain security is often called
-<emphasis>Single Sign On</emphasis> or SSO for short. This chapter describes the process
-that must be followed to make a workstation (or another server - be it an MS Windows NT4 / 200x
+<emphasis>Single Sign On</emphasis> or <acronym>SSO</acronym> for short. This
+chapter describes the process that must be followed to make a workstation
+(or another server - be it an <application>MS Windows NT4 / 200x</application>
server) or a Samba server a member of an MS Windows Domain security context.
</para>
<para>
-Samba-3 can join an MS Windows NT4 style domain as a native member server, an MS Windows
-Active Directory Domain as a native member server, or a Samba Domain Control network.
+Samba-3 can join an MS Windows NT4 style domain as a native member server, an
+MS Windows Active Directory Domain as a native member server, or a Samba Domain
+Control network.
</para>
<para>
@@ -50,31 +58,34 @@ Domain membership has many advantages:
</para></listitem>
<listitem><para>
- Domain user access rights and file ownership / access controls can be set from
- the single Domain SAM (Security Accounts Management) database (works with Domain member
- servers as well as with MS Windows workstations that are domain members)
+ Domain user access rights and file ownership / access controls can be set
+ from the single Domain SAM (Security Account Manager) database
+ (works with Domain member servers as well as with MS Windows workstations
+ that are domain members)
</para></listitem>
<listitem><para>
- Only MS Windows NT4 / 200x / XP Professional workstations that are Domain members
+ Only <application>MS Windows NT4 / 200x / XP Professional</application>
+ workstations that are Domain members
can use network logon facilities
</para></listitem>
<listitem><para>
- Domain Member workstations can be better controlled through the use of Policy files
- (NTConfig.POL) and Desktop Profiles.
+ Domain Member workstations can be better controlled through the use of
+ Policy files (<filename>NTConfig.POL</filename>) and Desktop Profiles.
</para></listitem>
<listitem><para>
- Through the use of logon scripts users can be given transparent access to network
+ Through the use of logon scripts, users can be given transparent access to network
applications that run off application servers
</para></listitem>
<listitem><para>
- Network administrators gain better application and user access management abilities
- because there is no need to maintain user accounts on any network client or server,
- other than the central Domain database (either NT4/Samba SAM style Domain, NT4 Domain
- that is back ended with an LDAP directory, or via an Active Directory infrastructure)
+ Network administrators gain better application and user access management
+ abilities because there is no need to maintain user accounts on any network
+ client or server, other than the central Domain database
+ (either NT4/Samba SAM style Domain, NT4 Domain that is back ended with an
+ LDAP directory, or via an Active Directory infrastructure)
</para></listitem>
</itemizedlist>
@@ -84,7 +95,8 @@ Domain membership has many advantages:
<title>MS Windows Workstation/Server Machine Trust Accounts</title>
<para>
-A machine trust account is an account that is used to authenticate a client machine
+A machine trust account is an account that is used to authenticate a client
+machine
(rather than a user) to the Domain Controller server. In Windows terminology,
this is known as a "Computer Account."
</para>
@@ -113,10 +125,10 @@ as follows:
<itemizedlist>
<listitem><para>
- A Domain Security Account (stored in the <emphasis>passdb backend</emphasis>
- that has been configured in the &smb.conf; file. The precise nature of the
- account information that is stored depends on the type of backend database
- that has been chosen.
+ A Domain Security Account (stored in the
+ <parameter>passdb backend</parameter> that has been configured in the
+ &smb.conf; file. The precise nature of the account information that is
+ stored depends on the type of backend database that has been chosen.
</para>
<para>
@@ -127,15 +139,17 @@ as follows:
</para>
<para>
- The two newer database types are called <emphasis>ldapsam, tdbsam</emphasis>.
- Both store considerably more data than the older <filename>smbpasswd</filename>
- file did. The extra information enables new user account controls to be used.
+ The two newer database types are called <emphasis>ldapsam</emphasis>,
+ <emphasis>tdbsam</emphasis>. Both store considerably more data than the
+ older <filename>smbpasswd</filename> file did. The extra information
+ enables new user account controls to be used.
</para></listitem>
<listitem><para>
- A corresponding Unix account, typically stored in <filename>/etc/passwd</filename>.
- Work is in progress to allow a simplified mode of operation that does not require
- Unix user accounts, but this may not be a feature of the early releases of Samba-3.
+ A corresponding Unix account, typically stored in
+ <filename>/etc/passwd</filename>. Work is in progress to allow a
+ simplified mode of operation that does not require Unix user accounts, but
+ this may not be a feature of the early releases of Samba-3.
</para></listitem>
</itemizedlist>
</para>
@@ -146,20 +160,22 @@ There are three ways to create machine trust accounts:
<itemizedlist>
<listitem><para>
- Manual creation from the Unix/Linux command line. Here, both the Samba and corresponding
- Unix account are created by hand.
+ Manual creation from the Unix/Linux command line. Here, both the Samba and
+ corresponding Unix account are created by hand.
</para></listitem>
<listitem><para>
- Using the MS Windows NT4 Server Manager (either from an NT4 Domain member server, or using
- the Nexus toolkit available from the Microsoft web site. This tool can be run from any
- MS Windows machine so long as the user is logged on as the administrator account.
+ Using the MS Windows NT4 Server Manager (either from an NT4 Domain member
+ server, or using the Nexus toolkit available from the Microsoft web site.
+ This tool can be run from any MS Windows machine so long as the user is
+ logged on as the administrator account.
</para></listitem>
<listitem><para>
- "On-the-fly" creation. The Samba machine trust account is automatically created by
- Samba at the time the client is joined to the domain. (For security, this is the
- recommended method.) The corresponding Unix account may be created automatically or manually.
+ "On-the-fly" creation. The Samba machine trust account is automatically
+ created by Samba at the time the client is joined to the domain.
+ (For security, this is the recommended method.) The corresponding Unix
+ account may be created automatically or manually.
</para></listitem>
</itemizedlist>
@@ -167,26 +183,26 @@ There are three ways to create machine trust accounts:
<title>Manual Creation of Machine Trust Accounts</title>
<para>
-The first step in manually creating a machine trust account is to manually create the
-corresponding Unix account in <filename>/etc/passwd</filename>. This can be done using
-<command>vipw</command> or other 'add user' command that is normally used to create new
-Unix accounts. The following is an example for a Linux based Samba server:
+The first step in manually creating a machine trust account is to manually
+create the corresponding Unix account in <filename>/etc/passwd</filename>.
+This can be done using <command>vipw</command> or another 'add user' command
+that is normally used to create new Unix accounts. The following is an example for a Linux based Samba server:
</para>
<para>
-<prompt>root# </prompt><command>/usr/sbin/useradd -g 100 -d /dev/null -c <replaceable>"machine nickname"</replaceable> -s /bin/false <replaceable>machine_name</replaceable>$ </command>
+&rootprompt;<userinput>/usr/sbin/useradd -g 100 -d /dev/null -c <replaceable>"machine nickname"</replaceable> -s /bin/false <replaceable>machine_name</replaceable>$ </userinput>
</para>
<para>
-<prompt>root# </prompt><command>passwd -l <replaceable>machine_name</replaceable>$</command>
+&rootprompt;<userinput>passwd -l <replaceable>machine_name</replaceable>$</userinput>
</para>
<para>
-On *BSD systems, this can be done using the 'chpass' utility:
+On *BSD systems, this can be done using the <command>chpass</command> utility:
</para>
<para>
-<prompt>root# </prompt><command>chpass -a "<replaceable>machine_name</replaceable>$:*:101:100::0:0:Workstation <replaceable>machine_name</replaceable>:/dev/null:/sbin/nologin"</command>
+&rootprompt;<userinput>chpass -a "<replaceable>machine_name</replaceable>$:*:101:100::0:0:Workstation <replaceable>machine_name</replaceable>:/dev/null:/sbin/nologin"</userinput>
</para>
<para>
@@ -196,9 +212,9 @@ home directory. For example a machine named 'doppy' would have an
<filename>/etc/passwd</filename> entry like this:
</para>
-<para>
+<programlisting>
doppy$:x:505:501:<replaceable>machine_nickname</replaceable>:/dev/null:/bin/false
-</para>
+</programlisting>
<para>
Above, <replaceable>machine_nickname</replaceable> can be any
@@ -218,9 +234,9 @@ as shown here:
</para>
<para>
-<programlisting>
-<prompt>root# </prompt><userinput>smbpasswd -a -m <replaceable>machine_name</replaceable></userinput>
-</programlisting>
+<screen>
+&rootprompt;<userinput>smbpasswd -a -m <replaceable>machine_name</replaceable></userinput>
+</screen>
</para>
<para>
@@ -235,11 +251,11 @@ the corresponding Unix account.
<para>
Manually creating a machine trust account using this method is the
equivalent of creating a machine trust account on a Windows NT PDC using
- the "Server Manager". From the time at which the account is created
- to the time which the client joins the domain and changes the password,
- your domain is vulnerable to an intruder joining your domain using
- a machine with the same NetBIOS name. A PDC inherently trusts
- members of the domain and will serve out a large degree of user
+ the <application>Server Manager</application>. From the time at which the
+ account is created to the time which the client joins the domain and
+ changes the password, your domain is vulnerable to an intruder joining
+ your domain using a machine with the same NetBIOS name. A PDC inherently
+ trusts members of the domain and will serve out a large degree of user
information to such clients. You have been warned!
</para>
</warning>
@@ -249,16 +265,19 @@ the corresponding Unix account.
<title>Using NT4 Server Manager to Add Machine Accounts to the Domain</title>
<para>
-If the machine from which you are trying to manage the domain is an MS Windows NT4 workstation
-then the tool of choice is the package called SRVTOOLS.EXE. When executed in the target directory
-this will unpack SrvMge.exe and UsrMgr.exe (both are Domain Management tools for MS Windows NT4
-workstation.
+If the machine from which you are trying to manage the domain is an
+<application>MS Windows NT4 workstation</application>
+then the tool of choice is the package called <command>SRVTOOLS.EXE</command>.
+When executed in the target directory this will unpack
+<command>SrvMge.exe</command> and <command>UsrMgr.exe</command> (both are
+Domain Management tools for MS Windows NT4 workstation.
</para>
<para>
-If your workstation is any other MS Windows product you should download the Nexus.exe package
-from the Microsoft web site. When executed from the target directory this will unpack the same
-tools but for use on MS Windows 9x/Me/200x/XP.
+If your workstation is any other MS Windows product you should download the
+<command>Nexus.exe</command> package from the Microsoft web site. When executed
+from the target directory this will unpack the same tools but for use on
+<application>MS Windows 9x/Me/200x/XP</application>.
</para>
<para>
@@ -268,29 +287,32 @@ Launch the <command>srvmgr.exe</command> (Server Manager for Domains) and follow
<procedure>
<title>Server Manager Account Machine Account Management</title>
<step><para>
- From the menu select Computer
+ From the menu select <guimenu>Computer</guimenu>
</para></step>
<step><para>
- Click on "Select Domain"
+ Click on <guimenuitem>Select Domain</guimenuitem>
</para></step>
<step><para>
- Click on the name of the domain you wish to administer in the "Select Domain" panel
- and then Click OK.
+ Click on the name of the domain you wish to administer in the
+ <guilabel>Select Domain</guilabel> panel and then click
+ <guibutton>OK</guibutton>.
</para></step>
<step><para>
- Again from the menu select Computer
+ Again from the menu select <guimenu>Computer</guimenu>
</para></step>
<step><para>
- Select "Add to Domain"
+ Select <guimenuitem>Add to Domain</guimenuitem>
</para></step>
<step><para>
- In the dialog box, click on the radio button to "Add NT Workstation of Server", then
- enter the machine name in the field provided, then Click the "Add" button.
+ In the dialog box, click on the radio button to
+ <guilabel>Add NT Workstation of Server</guilabel>, then
+ enter the machine name in the field provided, then click the
+ <guibutton>Add</guibutton> button.
</para></step>
</procedure>
@@ -334,8 +356,8 @@ The procedure for making an MS Windows workstation of server a member of the dom
with the version of Windows:
</para>
-<itemizedlist>
- <listitem><para><emphasis>Windows 200x XP Professional</emphasis></para>
+<sect3>
+ <title>Windows 200x XP Professional</title>
<para>
When the user elects to make the client a domain member, Windows 200x prompts for
@@ -353,9 +375,9 @@ with the version of Windows:
<para>
The name of the account that is used to create domain member machine accounts can be
- anything the network administrator may choose. If it is other than <command>root</command>
+ anything the network administrator may choose. If it is other than <emphasis>root</emphasis>
then this is easily mapped to root using the file pointed to be the &smb.conf; parameter
- <emphasis>username map =</emphasis> <command>/etc/samba/smbusers</command>.
+ <parameter>username map = /etc/samba/smbusers</parameter>.
</para>
<para>
@@ -363,73 +385,84 @@ with the version of Windows:
encryption key for setting the password of the machine trust
account. The machine trust account will be created on-the-fly, or
updated if it already exists.
- </para></listitem>
+ </para>
+</sect3>
- <listitem><para><emphasis>Windows NT4</emphasis></para>
+<sect3>
+ <title>Windows NT4</title>
<para>
If the machine trust account was created manually, on the
Identification Changes menu enter the domain name, but do not
- check the box "Create a Computer Account in the Domain." In this case,
- the existing machine trust account is used to join the machine to
- the domain.
+ check the box <guilabel>Create a Computer Account in the Domain</guilabel>.
+ In this case, the existing machine trust account is used to join the machine
+ to the domain.
</para>
<para>
If the machine trust account is to be created
on-the-fly, on the Identification Changes menu enter the domain
- name, and check the box "Create a Computer Account in the Domain." In
- this case, joining the domain proceeds as above for Windows 2000
- (i.e., you must supply a Samba administrative account when
+ name, and check the box <guilabel>Create a Computer Account in the
+ Domain</guilabel>. In this case, joining the domain proceeds as above
+ for Windows 2000 (i.e., you must supply a Samba administrative account when
prompted).
- </para></listitem>
+ </para>
+</sect3>
- <listitem><para><emphasis>Samba</emphasis></para>
- <para>Joining a samba client to a domain is documented in
- the <link linkend="domain-member">Domain Member</link> chapter.
- </para></listitem>
-</itemizedlist>
+<sect3>
+ <title>Samba</title>
+
+ <para>Joining a Samba client to a domain is documented in
+ the <link linkend="domain-member-server">Domain Member Server</link> section of this chapter chapter.
+ </para>
+</sect3>
</sect2>
</sect1>
-<sect1>
+<sect1 id="domain-member-server">
<title>Domain Member Server</title>
<para>
-This mode of server operation involves the samba machine being made a member
-of a domain security context. This means by definition that all user authentication
-will be done from a centrally defined authentication regime. The authentication
-regime may come from an NT3/4 style (old domain technology) server, or it may be
-provided from an Active Directory server (ADS) running on MS Windows 2000 or later.
+This mode of server operation involves the Samba machine being made a member
+of a domain security context. This means by definition that all user
+authentication will be done from a centrally defined authentication regime.
+The authentication regime may come from an NT3/4 style (old domain technology)
+server, or it may be provided from an Active Directory server (ADS) running on
+MS Windows 2000 or later.
</para>
<para>
<emphasis>
-Of course it should be clear that the authentication back end itself could be from any
-distributed directory architecture server that is supported by Samba. This can be
-LDAP (from OpenLDAP), or Sun's iPlanet, of NetWare Directory Server, etc.
+Of course it should be clear that the authentication back end itself could be
+from any distributed directory architecture server that is supported by Samba.
+This can be LDAP (from OpenLDAP), or Sun's iPlanet, of NetWare Directory
+Server, etc.
</emphasis>
</para>
<para>
-Please refer to the section on Howto configure Samba as a Primary Domain Controller
-and for more information regarding how to create a domain machine account for a
-domain member server as well as for information regarding how to enable the samba
-domain member machine to join the domain and to be fully trusted by it.
+Please refer to the <link linkend="samba-pdc">Domain Control chapter</link>
+for more information regarding how to create a domain
+machine account for a domain member server as well as for information
+regarding how to enable the Samba domain member machine to join the domain and
+to be fully trusted by it.
</para>
<sect2>
<title>Joining an NT4 type Domain with Samba-3</title>
<para>
-<emphasis>Assumptions:</emphasis>
-<programlisting>
- NetBIOS name: SERV1
- Win2K/NT domain name: DOM
- Domain's PDC NetBIOS name: DOMPDC
- Domain's BDC NetBIOS names: DOMBDC1 and DOMBDC2
-</programlisting>
+ <table frame="all"><title>Assumptions</title>
+<tgroup align="left" cols="2">
+ <tbody>
+ <row><entry>NetBIOS name:</entry><entry>SERV1</entry></row>
+ <row><entry>Win2K/NT domain name:</entry><entry>DOM</entry></row>
+ <row><entry>Domain's PDC NetBIOS name:</entry><entry>DOMPDC</entry></row>
+ <row><entry>Domain's BDC NetBIOS names:</entry><entry>DOMBDC1 and DOMBDC2</entry></row>
+</tbody>
+</tgroup>
+</table>
</para>
<para>
@@ -439,24 +472,25 @@ now use domain security.
<para>
Change (or add) your <ulink url="smb.conf.5.html#SECURITY">
-<parameter>security =</parameter></ulink> line in the [global] section
+<parameter>security</parameter></ulink> line in the [global] section
of your &smb.conf; to read:
</para>
<para>
<programlisting>
- <command>security = domain</command>
+security = domain
</programlisting>
</para>
<para>
Next change the <ulink url="smb.conf.5.html#WORKGROUP"><parameter>
-workgroup =</parameter></ulink> line in the [global] section to read:
+workgroup</parameter></ulink> line in the <parameter>[global]</parameter>
+section to read:
</para>
<para>
<programlisting>
- <command>workgroup = DOM</command>
+workgroup = DOM
</programlisting>
</para>
@@ -472,13 +506,13 @@ You must also have the parameter <ulink url="smb.conf.5.html#ENCRYPTPASSWORDS">
<para>
Finally, add (or modify) a <ulink url="smb.conf.5.html#PASSWORDSERVER">
-<parameter>password server =</parameter></ulink> line in the [global]
+<parameter>password server</parameter></ulink> line in the [global]
section to read:
</para>
<para>
<programlisting>
- <command>password server = DOMPDC DOMBDC1 DOMBDC2</command>
+password server = DOMPDC DOMBDC1 DOMBDC2
</programlisting>
</para>
@@ -498,12 +532,12 @@ set this line to be:
<para>
<programlisting>
- <command>password server = *</command>
+password server = *
</programlisting>
</para>
<para>
-This method, allows Samba to use exactly the same mechanism that NT does. This
+This method 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.
</para>
@@ -513,20 +547,21 @@ In order to actually join the domain, you must run this command:
</para>
<para>
-<programlisting>
- <prompt>root# </prompt><userinput>net join -S DOMPDC -U<replaceable>Administrator%password</replaceable></userinput>
-</programlisting>
+<screen>
+<prompt>root# </prompt><userinput>net join -S DOMPDC -U<replaceable>Administrator%password</replaceable></userinput>
+</screen>
</para>
<para>
-If the <userinput>-S DOMPDC</userinput> argument is not given then
-the domain name will be obtained from smb.conf.
+If the <option>-S DOMPDC</option> argument is not given then
+the domain name will be obtained from &smb.conf;.
</para>
<para>
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 <replaceable>Administrator%password</replaceable> is
+is DOMPDC, we use it for the <option>-S</option> option.
+The <replaceable>Administrator%password</replaceable> 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:
@@ -551,7 +586,7 @@ trust account on the PDC beforehand.
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 :
+in which an smbpasswd file would be stored - normally:
</para>
<para>
@@ -588,8 +623,8 @@ NT server in the same way as a Windows 95 or Windows 98 server would.
</para>
<para>
-Please refer to the <ulink url="winbind.html">Winbind
-paper</ulink> for information on a system to automatically
+Please refer to the <link linkend="winbind">Winbind</link> chapter
+for information on a system to automatically
assign UNIX uids and gids to Windows NT Domain users and groups.
</para>
@@ -604,11 +639,11 @@ domain PDC to an account domain PDC).
</para>
<para>
-In addition, with <command>security = server</command> every Samba
+In addition, with <parameter>security = server</parameter> 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 <command>security = domain</command>,
+out of available connections. With <parameter>security = domain</parameter>,
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.
@@ -624,8 +659,8 @@ as the user SID, the list of NT groups the user belongs to, etc.
<note>
<para>
Much of the text of this document
-was first published in the Web magazine <ulink url="http://www.linuxworld.com">
-LinuxWorld</ulink> as the article <ulink
+was first published in the Web magazine
+<ulink url="http://www.linuxworld.com">LinuxWorld</ulink> as the article <ulink
url="http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html">Doing
the NIS/NT Samba</ulink>.
</para>
@@ -634,19 +669,19 @@ the NIS/NT Samba</ulink>.
</sect2>
</sect1>
-<sect1>
+<sect1 id="ads-member">
<title>Samba ADS Domain Membership</title>
<para>
-This is a rough guide to setting up Samba 3.0 with kerberos authentication against a
-Windows2000 KDC.
+This is a rough guide to setting up Samba 3.0 with Kerberos authentication against a
+Windows2000 KDC. A familiarity with Kerberos is assumed.
</para>
<sect2>
<title>Setup your <filename>smb.conf</filename></title>
<para>
-You must use at least the following 3 options in smb.conf:
+You must use at least the following 3 options in &smb.conf;:
</para>
<para><programlisting>
@@ -657,17 +692,18 @@ You must use at least the following 3 options in smb.conf:
<para>
In case samba can't figure out your ads server using your realm name, use the
-<command>ads server</command> option in <filename>smb.conf</filename>:
+<parameter>ads server</parameter> option in <filename>smb.conf</filename>:
<programlisting>
ads server = your.kerberos.server
</programlisting>
</para>
<note><para>
-You do *not* need a smbpasswd file, and older clients will be authenticated as if
-<command>security = domain</command>, although it won't do any harm and allows you
-to have local users not in the domain. I expect that the above required options will
-change soon when we get better active directory integration.
+You do <emphasis>not</emphasis> need a smbpasswd file, and older clients will be authenticated as
+if <parameter>security = domain</parameter>, although it won't do any harm and
+allows you to have local users not in the domain. It is expected that the above
+required options will change soon when active directory integration will get
+better.
</para></note>
</sect2>
@@ -676,14 +712,13 @@ change soon when we get better active directory integration.
<title>Setup your <filename>/etc/krb5.conf</filename></title>
<para>
-Note: you will need the krb5 workstation, devel, and libs installed
-</para>
-
-<para>
The minimal configuration for <filename>krb5.conf</filename> is:
</para>
<para><programlisting>
+ [libdefaults]
+ default_realm = YOUR.KERBEROS.REALM
+
[realms]
YOUR.KERBEROS.REALM = {
kdc = your.kerberos.server
@@ -697,37 +732,37 @@ making sure that your password is accepted by the Win2000 KDC.
</para>
<note><para>
-The realm must be uppercase or you will get "Cannot find KDC for requested
-realm while getting initial credentials" error
+The realm must be uppercase or you will get <errorname>Cannot find KDC for
+requested realm while getting initial credentials</errorname> error.
</para></note>
<note><para>
Time between the two servers must be synchronized. You will get a
-"kinit(v5): Clock skew too great while getting initial credentials" if the time
-difference is more than five minutes.
+<errorname>kinit(v5): Clock skew too great while getting initial credentials</errorname>
+if the time difference is more than five minutes.
</para></note>
<para>
You also must ensure that you can do a reverse DNS lookup on the IP
address of your KDC. Also, the name that this reverse lookup maps to
-must either be the netbios name of the KDC (ie. the hostname with no
-domain attached) or it can alternatively be the netbios name
+must either be the NetBIOS name of the KDC (ie. the hostname with no
+domain attached) or it can alternatively be the NetBIOS name
followed by the realm.
</para>
<para>
The easiest way to ensure you get this right is to add a
<filename>/etc/hosts</filename> entry mapping the IP address of your KDC to
-its netbios name. If you don't get this right then you will get a
-"local error" when you try to join the realm.
+its NetBIOS name. If you don't get this right then you will get a
+<errorname>local error</errorname> when you try to join the realm.
</para>
<para>
-If all you want is kerberos support in &smbclient; then you can skip
+If all you want is Kerberos support in &smbclient; then you can skip
straight to <link linkend="ads-test-smbclient">Test with &smbclient;</link> now.
<link linkend="ads-create-machine-account">Creating a computer account</link>
and <link linkend="ads-test-server">testing your servers</link>
-is only needed if you want kerberos support for &smbd; and &winbindd;.
+is only needed if you want Kerberos support for &smbd; and &winbindd;.
</para>
</sect2>
@@ -739,7 +774,7 @@ is only needed if you want kerberos support for &smbd; and &winbindd;.
As a user that has write permission on the Samba private directory
(usually root) run:
<programlisting>
- <userinput>net join -U Administrator%password</userinput>
+ &rootprompt;<userinput>net join -U Administrator%password</userinput>
</programlisting>
</para>
@@ -748,12 +783,12 @@ As a user that has write permission on the Samba private directory
<para>
<variablelist>
- <varlistentry><term>"ADS support not compiled in"</term>
+ <varlistentry><term><errorname>ADS support not compiled in</errorname></term>
<listitem><para>Samba must be reconfigured (remove config.cache) and recompiled
- (make clean all install) after the kerberos libs and headers are installed.
+ (make clean all install) after the Kerberos libs and headers are installed.
</para></listitem></varlistentry>
- <varlistentry><term>net join prompts for user name</term>
+ <varlistentry><term><errorname>net join prompts for user name</errorname></term>
<listitem><para>You need to login to the domain using <userinput>kinit
<replaceable>USERNAME</replaceable>@<replaceable>REALM</replaceable></userinput>.
<replaceable>USERNAME</replaceable> must be a user who has rights to add a machine
@@ -776,7 +811,7 @@ folder under Users and Computers.
<para>
On a Windows 2000 client try <userinput>net use * \\server\share</userinput>. You should
-be logged in with kerberos without needing to know a password. If
+be logged in with Kerberos without needing to know a password. If
this fails then run <userinput>klist tickets</userinput>. Did you get a ticket for the
server? Does it have an encoding type of DES-CBC-MD5 ?
</para>
@@ -788,8 +823,8 @@ server? Does it have an encoding type of DES-CBC-MD5 ?
<para>
On your Samba server try to login to a Win2000 server or your Samba
-server using &smbclient; and kerberos. Use &smbclient; as usual, but
-specify the <parameter>-k</parameter> option to choose kerberos authentication.
+server using &smbclient; and Kerberos. Use &smbclient; as usual, but
+specify the <parameter>-k</parameter> option to choose Kerberos authentication.
</para>
</sect2>
@@ -803,7 +838,7 @@ install, to create the right encoding types
</para>
<para>
-w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
+W2k doesn't seem to create the _kerberos._udp and _ldap._tcp in
their defaults DNS setup. Maybe fixed in service packs?
</para>
@@ -815,7 +850,7 @@ their defaults DNS setup. Maybe fixed in service packs?
<para>
In the process of adding / deleting / re-adding domain member machine accounts there are
-many traps for the unwary player and there are many "little" things that can go wrong.
+many traps for the unwary player and there are many <quote>little</quote> things that can go wrong.
It is particularly interesting how often subscribers on the samba mailing list have concluded
after repeated failed attempts to add a machine account that it is necessary to "re-install"
MS Windows on t he machine. In truth, it is seldom necessary to reinstall because of this type
@@ -830,7 +865,7 @@ networking functions. easily overcome.
<emphasis>Problem:</emphasis> A Windows workstation was reinstalled. The original domain machine
account was deleted and added immediately. The workstation will not join the domain if I use
the same machine name. Attempts to add the machine fail with a message that the machine already
-exists on the network - I know it doen't. Why is this failing?
+exists on the network - I know it doesn't. Why is this failing?
</para>
<para>
@@ -846,14 +881,14 @@ the old account and then to add the machine with a new name.
<para>
Adding a Windows 200x or XP Professional machine to the Samba PDC Domain fails with a
-message that, "The machine could not be added at this time, there is a network problem.
-Please try again later." Why?
+message that, <errorname>The machine could not be added at this time, there is a network problem.
+Please try again later.</errorname> Why?
</para>
<para>
-You should check that there is an <emphasis>add machine script</emphasis> in your &smb.conf;
+You should check that there is an <parameter>add machine script</parameter> in your &smb.conf;
file. If there is not, please add one that is appropriate for your OS platform. If a script
-has been defined you will need to debug it's operation. Increase the <emphasis>log level</emphasis>
+has been defined you will need to debug it's operation. Increase the <parameter>log level</parameter>
in the &smb.conf; file to level 10, then try to rejoin the domain. Check the logs to see which
operation is failing.
</para>
diff --git a/docs/docbook/projdoc/Diagnosis.xml b/docs/docbook/projdoc/Diagnosis.xml
index 150f071b78..7e3656c0f3 100644
--- a/docs/docbook/projdoc/Diagnosis.xml
+++ b/docs/docbook/projdoc/Diagnosis.xml
@@ -5,7 +5,7 @@
<pubdate>Wed Jan 15</pubdate>
</chapterinfo>
-<title>The samba checklist</title>
+<title>The Samba checklist</title>
<sect1>
<title>Introduction</title>
@@ -129,7 +129,7 @@ run ping.
</para>
<para>
-If you get a message saying "host not found" or similar then your DNS
+If you get a message saying <errorname>host not found</errorname> or similar then your DNS
software or <filename>/etc/hosts</filename> file is not correctly setup.
It is possible to
run samba without DNS entries for the server and client, but I assume
@@ -143,10 +143,12 @@ in question, perhaps by allowing access from another subnet (on Linux
this is done via the <application>ipfwadm</application> program.)
</para>
+<note>
<para>
-Note: Modern Linux distributions install ipchains/iptables by default.
+Modern Linux distributions install ipchains/iptables by default.
This is a common problem that is often overlooked.
</para>
+</note>
</step>
<step performance="required">
@@ -165,7 +167,7 @@ temporarily remove any <command>hosts allow</command>, <command>hosts deny</comm
</para>
<para>
-If you get a "connection refused" response then the smbd server may
+If you get a <errorname>connection refused</errorname> 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
@@ -180,7 +182,7 @@ this network super daemon.
</para></note>
<para>
-If you get a "session request failed" then the server refused the
+If you get a <errorname>session request failed</errorname> 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
@@ -203,7 +205,7 @@ the following &smb.conf; file entries:
<para>
In the above, no allowance has been made for any session requests that
-will automatically translate to the loopback adaptor address 127.0.0.1.
+will automatically translate to the loopback adapter address 127.0.0.1.
To solve this problem change these lines to:
</para>
@@ -213,7 +215,7 @@ To solve this problem change these lines to:
</programlisting></para>
<para>
-Do NOT use the <command>bind interfaces only</command> parameter where you
+Do <emphasis>not</emphasis> use the <command>bind interfaces only</command> parameter where you
may wish to
use the samba password change facility, or where &smbclient; may need to
access a local service for name resolution or for local resource
@@ -224,7 +226,8 @@ fixed soon).
<para>
Another common cause of these two errors is having something already running
-on port 139, such as Samba (ie: smbd is running from <application>inetd</application> already) or
+on port <constant>139</constant>, such as Samba
+(ie: &smbd; is running from <application>inetd</application> already) or
something like Digital's Pathworks. Check your <filename>inetd.conf</filename> file before trying
to start &smbd; as a daemon, it can avoid a lot of frustration!
</para>
@@ -233,7 +236,7 @@ to start &smbd; as a daemon, it can avoid a lot of frustration!
And yet another possible cause for failure of this test 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 <filename>log.nmb</filename> file.
+correct and that Samba has correctly noted these in the <filename>log.nmbd</filename> file.
</para>
</step>
@@ -286,10 +289,10 @@ Run the command <userinput>nmblookup -d 2 '*'</userinput>
<para>
This time we are trying the same as the previous test but are trying
it via a broadcast to the default broadcast address. A number of
-Netbios/TCPIP hosts on the network should respond, although Samba may
+NetBIOS / TCP/IP 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.
+should see <errorname>got a positive name query response</errorname>
+messages from several hosts.
</para>
<para>
@@ -332,18 +335,18 @@ as follows:
<para>
Once you enter the password you should get the <prompt>smb></prompt> 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;.
+don't then look at the error message. If it says <errorname>invalid network
+name</errorname> then the service <emphasis>"tmp"</emphasis> is not correctly setup in your &smb.conf;.
</para>
<para>
-If it says "bad password" then the likely causes are:
+If it says <errorname>bad password</errorname> then the likely causes are:
</para>
<orderedlist>
<listitem>
<para>
- you have shadow passords (or some other password system) but didn't
+ you have shadow passwords (or some other password system) but didn't
compile in support for them in &smbd;
</para>
</listitem>
@@ -369,8 +372,7 @@ If it says "bad password" then the likely causes are:
<listitem>
<para>
- you enabled password encryption but didn't create the SMB encrypted
- password file
+ you enabled password encryption but didn't map unix to samba users
</para>
</listitem>
</orderedlist>
@@ -394,7 +396,7 @@ list of available shares on the server.
</para>
<para>
-If you get a "network name not found" or similar error then netbios
+If you get a <errorname>network name not found</errorname> 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):
@@ -407,12 +409,12 @@ to choose one of them):
<listitem><para>
add the IP address of BIGSERVER to the <command>wins server</command> box in the
- advanced tcp/ip setup on the PC.
+ advanced TCP/IP setup on the PC.
</para></listitem>
<listitem><para>
enable windows name resolution via DNS in the advanced section of
- the tcp/ip setup
+ the TCP/IP setup
</para></listitem>
<listitem><para>
@@ -421,7 +423,7 @@ to choose one of them):
</orderedlist>
<para>
-If you get a "invalid network name" or "bad password error" then the
+If you get a <errorname>invalid network name</errorname> or <errorname>bad password error</errorname> then the
same fixes apply as they did for the <userinput>smbclient -L</userinput> test above. In
particular, make sure your <command>hosts allow</command> line is correct (see the man
pages)
@@ -436,7 +438,7 @@ name and password.
</para>
<para>
-If you get "specified computer is not receiving requests" or similar
+If you get <errorname>specified computer is not receiving requests</errorname> 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 <filename>hosts.allow</filename> file for your client (or subnet, etc.)
@@ -448,16 +450,16 @@ the <filename>hosts.allow</filename> file for your client (or subnet, etc.)
<para>
Run the command <userinput>net use x: \\BIGSERVER\TMP</userinput>. You should
-be prompted for a password then you should get a "command completed
-successfully" message. If not then your PC software is incorrectly
+be prompted for a password then you should get a <computeroutput>command completed
+successfully</computeroutput> message. If not then your PC software is incorrectly
installed or your smb.conf is incorrect. make sure your <command>hosts allow</command>
and other config lines in &smb.conf; are correct.
</para>
<para>
It's also possible that the server can't work out what user name to
-connect you as. To see if this is the problem add the line <command>user =
-<replaceable>username</replaceable></command> to the <command>[tmp]</command> section of
+connect you as. To see if this is the problem add the line <parameter>user =
+<replaceable>username</replaceable></parameter> to the <parameter>[tmp]</parameter> section of
&smb.conf; where <replaceable>username</replaceable> is the
username corresponding to the password you typed. If you find this
fixes things you may need the username mapping option.
@@ -465,7 +467,7 @@ fixes things you may need the username mapping option.
<para>
It might also be the case that your client only sends encrypted passwords
-and you have <command>encrypt passwords = no</command> in &smb.conf;
+and you have <parameter>encrypt passwords = no</parameter> in &smb.conf;
Turn it back on to fix.
</para>
@@ -484,7 +486,7 @@ master browser for that workgroup.
If you don't then the election process has failed. Wait a minute to
see if it is just being slow then try again. If it still fails after
that then look at the browsing options you have set in &smb.conf;. Make
-sure you have <command>preferred master = yes</command> to ensure that
+sure you have <parameter>preferred master = yes</parameter> to ensure that
an election is held at startup.
</para>
@@ -500,9 +502,9 @@ of the server and get a list of shares. If you get a "invalid
password" error when you do then you are probably running WinNT and it
is refusing to browse a server that has no encrypted password
capability and is in user level security mode. In this case either set
-<command>security = server</command> AND
-<command>password server = Windows_NT_Machine</command> in your
-&smb.conf; file, or make sure <command>encrypted passwords</command> is
+<parameter>security = server</parameter> AND
+<parameter>password server = Windows_NT_Machine</parameter> in your
+&smb.conf; file, or make sure <parameter>encrypted passwords</parameter> is
set to "yes".
</para>
diff --git a/docs/docbook/projdoc/Further-Resources.xml b/docs/docbook/projdoc/Further-Resources.xml
index 9f193e3b8d..4294ffa38a 100644
--- a/docs/docbook/projdoc/Further-Resources.xml
+++ b/docs/docbook/projdoc/Further-Resources.xml
@@ -7,6 +7,9 @@
<title>Further Resources</title>
+<sect1>
+ <title>Websites</title>
+
<itemizedlist>
<listitem><para>
@@ -74,6 +77,102 @@
</ulink>
</para></listitem>
+ <listitem><para>
+ <ulink url="http://ru.samba.org/samba/ftp/docs/Samba24Hc13.pdf">
+ <emphasis>PDF version of the Troubleshooting Techniques chapter</emphasis>
+ from the second edition of Sam's Teach Yourself Samba in 24 Hours
+ (publishing date of Dec. 12, 2001)</ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://ru.samba.org/samba/ftp/slides/">
+ <emphasis>Slide presentations</emphasis> by Samba Team members
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://www.atmarkit.co.jp/flinux/special/samba3/samba3a.html">
+ <emphasis>Introduction to Samba 3.0</emphasis> by Motonobu Takahashi
+ (written in Japanese). </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://www.linux-mag.com/2001-05/smb_01.html">
+ <emphasis>Understanding the Network Neighborhood</emphasis>, by team member
+ Chris Hertel. This article appeared in the May 2001 issue of
+ Linux Magazine.
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="ftp://ftp.stratus.com/pub/vos/customers/samba/">
+ <emphasis>Samba 2.0.x Troubleshooting guide</emphasis> from Paul Green
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://samba.org/samba/docs/10years.html">
+ <emphasis>Ten Years of Samba</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://tldp.org/HOWTO/Samba-Authenticated-Gateway-HOWTO.html">
+ <emphasis>Samba Authenticated Gateway HOWTO</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://samba.org/samba/docs/SambaIntro.html">
+ <emphasis>An Introduction to Samba</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://www.samba.org/cifs/">
+ <emphasis>What is CIFS?</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://support.microsoft.com/support/kb/articles/q92/5/88.asp">
+ <emphasis>WFWG: Password Caching and How It Affects LAN Manager
+ Security</emphasis> at Microsoft Knowledge Base
+ </ulink>
+ </para></listitem>
+
</itemizedlist>
+</sect1>
+
+<sect1>
+ <title>Related updates from Microsoft</title>
+
+<itemizedlist>
+ <listitem><para>
+ <ulink url="http://support.microsoft.com/support/kb/articles/q92/5/88.asp">
+ <emphasis>Enhanced Encryption for Windows 95 Password Cache</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://support.microsoft.com/support/kb/articles/q136/4/18.asp">
+ <emphasis>Windows '95 File Sharing Updates</emphasis>
+ </ulink>
+ </para></listitem>
+
+ <listitem><para>
+ <ulink url="http://support.microsoft.com/support/kb/articles/q136/4/18.asp">
+ <emphasis>Windows for Workgroups Sharing Updates</emphasis>
+ </ulink>
+ </para></listitem>
+
+</itemizedlist>
+</sect1>
+
+<sect1>
+ <title>Books</title>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/GROUP-MAPPING-HOWTO.xml b/docs/docbook/projdoc/GROUP-MAPPING-HOWTO.xml
index af6ddff9bf..a13a43675b 100644
--- a/docs/docbook/projdoc/GROUP-MAPPING-HOWTO.xml
+++ b/docs/docbook/projdoc/GROUP-MAPPING-HOWTO.xml
@@ -5,100 +5,309 @@
<firstname>Jean François</firstname><surname>Micouleau</surname>
</author>
&author.jerry;
+ &author.jht;
</chapterinfo>
+<title>Mapping MS Windows and Unix Groups</title>
-<title>Configuring Group Mapping</title>
+ <para>
+ Starting with Samba-3, new group mapping functionality is available to create associations
+ between Windows group SIDs and UNIX groups. The <parameter>groupmap</parameter> subcommand
+ included with the &net; tool can be used to manage these associations.
+ </para>
-<para>
-Starting with Samba 3.0 alpha 2, new group mapping functionality
-is available to create associations between Windows SIDs and UNIX
-groups. The <parameter>groupmap</parameter> subcommand included with
-the <command>net</command> tool can be used to manage these associations.
-</para>
+ <warning>
+ <para>
+ The first immediate reason to use the group mapping on a Samba PDC, is that
+ the <parameter>domain admin group</parameter> has been removed and should no longer
+ be specified in &smb.conf;. This parameter was used to give the listed users membership
+ in the <constant>Domain Admins</constant> Windows group which gave local admin rights on their workstations
+ (in default configurations).
+ </para>
+ </warning>
-<para>
-The first immediate reason to use the group mapping on a Samba PDC, is that
-the <parameter>domain admin group</parameter> &smb.conf; has been removed.
-This parameter was used to give the listed users membership in the "Domain Admins"
-Windows group which gave local admin rights on their workstations (in
-default configurations).
-</para>
+<sect1>
+<title>Features and Benefits</title>
-<para>
-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'.
-</para>
+ <para>
+ Samba allows the administrator to create MS Windows NT4 / 200x group accounts and to
+ arbitrarily associate them with Unix/Linux group accounts.
+ </para>
-<para>
-When a NT/W2K machine is joined to a domain, the "Domain Adminis" group of the
-PDC is added to the local 'Administrators' group of the workstation. Every
-member of the 'Domain Administrators' group 'inherit' the
-rights of the local 'Administrators' group when logging on the workstation.
+ <para>
+ Group accounts can be managed using the MS Windows NT4 or MS Windows 200x MMC tools
+ so long as appropriate interface scripts have been provided to &smb.conf;.
+ </para>
+
+ <para>
+ Administrators should be aware that where &smb.conf; group interface scripts make
+ direct calls to the Unix/Linux system tools (eg: the shadow utilities, <command>groupadd</command>,
+ <command>groupdel</command>, <command>groupmod</command>) then the resulting Unix/Linux group names will be subject
+ to any limits imposed by these tools. If the tool does NOT allow upper case characters
+ or space characters, then the creation of an MS Windows NT4 / 200x style group of
+ <parameter>Engineering Managers</parameter> will attempt to create an identically named
+ Unix/Linux group, an attempt that will of course fail!
+ </para>
+
+ <para>
+ There are several possible work-arounds for the operating system tools limitation. One
+ method is to use a script that generates a name for the Unix/Linux system group that
+ fits the operating system limits, and that then just passes the Unix/Linux group id (GID)
+ back to the calling Samba interface. This will provide a dynamic work-around solution.
+ </para>
+
+ <para>
+ Another work-around is to manually create a Unix/Linux group, then manually create the
+ MS Windows NT4 / 200x group on the Samba server and then use the <command>net groupmap</command>
+ tool to connect the two to each other.
+ </para>
+
+</sect1>
+
+<sect1>
+<title>Discussion</title>
+
+ <para>
+ When installing <application>MS Windows NT4 / 200x</application> on a computer, the installation
+ program creates default users and groups, notably the <constant>Administrators</constant> group,
+ and gives that group privileges necessary privileges to perform essential system tasks.
+ eg: Ability to change the date and time or to kill (or close) any process running on the
+ local machine.
+ </para>
+
+ <para>
+ The 'Administrator' user is a member of the 'Administrators' group, and thus inherits
+ 'Administrators' group privileges. If a 'joe' user is created to be a member of the
+ 'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.
+ </para>
+
+ <para>
+ When an MS Windows NT4 / W200x is made a domain member, the "Domain Admins" group of the
+ PDC is added to the local 'Administrators' group of the workstation. Every member of the
+ 'Domain Administrators' group inherits the rights of the local 'Administrators' group when
+ logging on the workstation.
+ </para>
+
+ <para>
+ The following steps describe how to make Samba PDC users members of the 'Domain Admins' group?
+ </para>
+
+ <orderedlist>
+ <listitem><para>
+ create a unix group (usually in <filename>/etc/group</filename>), let's call it domadm
+ </para></listitem>
+
+ <listitem><para>add to this group the users that must be Administrators. For example
+ if you want joe, john and mary, your entry in <filename>/etc/group</filename> will
+ look like:
+ </para>
+
+ <para><programlisting>
+ domadm:x:502:joe,john,mary
+ </programlisting>
+ </para></listitem>
+
+ <listitem><para>
+ Map this domadm group to the "Domain Admins" group by running the command:
+ </para>
+
+ <para>
+ <screen>
+ &rootprompt;<userinput>net groupmap add ntgroup="Domain Admins" unixgroup=domadm</userinput>
+ </screen>
+ </para>
+
+ <para>
+ The quotes around "Domain Admins" are necessary due to the space in the group name.
+ Also make sure to leave no whitespace surrounding the equal character (=).
+ </para></listitem>
+ </orderedlist>
+
+ <para>
+ Now joe, john and mary are domain administrators!
+ </para>
+
+ <para>
+ It is possible to map any arbitrary UNIX group to any Windows NT4 / 200x group as well as
+ making any UNIX group a Windows domain group. For example, if you wanted to include a
+ UNIX group (e.g. acct) in a ACL on a local file or printer on a domain member machine,
+ you would flag that group as a domain group by running the following on the Samba PDC:
+ </para>
+
+ <para>
+ <screen>
+ &rootprompt;<userinput>net groupmap add rid=1000 ntgroup="Accounting" unixgroup=acct</userinput>
+ </screen>
+ </para>
+
+ <para>
+ Be aware that the RID parameter is a unsigned 32 bit integer that should
+ normally start at 1000. However, this rid must not overlap with any RID assigned
+ to a user. Verifying this is done differently depending on on the passdb backend
+ you are using. Future versions of the tools may perform the verification automatically,
+ but for now the burden is on you.
+ </para>
+
+ <sect2>
+ <title>Example Configuration</title>
+
+ <para>
+ You can list the various groups in the mapping database by executing
+ <command>net groupmap list</command>. Here is an example:
+ </para>
+
+ <para>
+ <screen>
+ &rootprompt; <userinput>net groupmap list</userinput>
+ System Administrators (S-1-5-21-2547222302-1596225915-2414751004-1002) -> sysadmin
+ Domain Admins (S-1-5-21-2547222302-1596225915-2414751004-512) -> domadmin
+ Domain Users (S-1-5-21-2547222302-1596225915-2414751004-513) -> domuser
+ Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -> domguest
+ </screen>
+ </para>
+
+ <para>
+ For complete details on <command>net groupmap</command>, refer to the net(8) man page.
+ </para>
+
+ </sect2>
+
+</sect1>
+
+<sect1>
+<title>Configuration Scripts</title>
+
+ <para>
+ Everyone needs tools. Some of us like to create our own, others prefer to use canned tools
+ (ie: prepared by someone else for general use).
+ </para>
+
+ <sect2>
+ <title>Sample &smb.conf; add group script</title>
+
+ <para>
+ A script to great complying group names for use by the Samba group interfaces:
+ </para>
+
+ <para>
+<example>
+ <title>smbgrpadd.sh</title>
+<programlisting>
+
+#!/bin/bash
+
+# Add the group using normal system groupadd tool.
+groupadd smbtmpgrp00
+
+thegid=`cat /etc/group | grep smbtmpgrp00 | cut -d ":" -f3`
+
+# Now change the name to what we want for the MS Windows networking end
+cp /etc/group /etc/group.bak
+cat /etc/group.bak | sed s/smbtmpgrp00/$1/g > /etc/group
+
+# Now return the GID as would normally happen.
+echo $thegid
+exit 0
+</programlisting>
+</example>
</para>
+ <para>
+ The &smb.conf; entry for the above script would look like:
+ <programlisting>
+ add group script = /path_to_tool/smbgrpadd.sh %g
+ </programlisting>
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Script to configure Group Mapping</title>
+
+ <para>
+ In our example we have created a Unix/Linux group called <parameter>ntadmin</parameter>.
+ Our script will create the additional groups <parameter>Engineers, Marketoids, Gnomes</parameter>:
+ </para>
+
<para>
-The following steps describe how to make samba PDC users members of the
-'Domain Admins' group?
-</para>
+<programlisting>
+#!/bin/bash
-<orderedlist>
-<listitem><para>create a unix group (usually in <filename>/etc/group</filename>),
- let's call it domadm</para></listitem>
-<listitem><para>add to this group the users that must be Administrators. For example
- if you want joe,john and mary, your entry in <filename>/etc/group</filename> will
- look like:</para>
+net groupmap modify ntgroup="Domain Admins" unixgroup=ntadmin
+net groupmap modify ntgroup="Domain Users" unixgroup=users
+net groupmap modify ntgroup="Domain Guests" unixgroup=nobody
+net groupmap modify ntgroup="Administrators" unixgroup=root
+net groupmap modify ntgroup="Users" unixgroup=users
+net groupmap modify ntgroup="Guests" unixgroup=nobody
+net groupmap modify ntgroup="System Operators" unixgroup=sys
+net groupmap modify ntgroup="Account Operators" unixgroup=root
+net groupmap modify ntgroup="Backup Operators" unixgroup=bin
+net groupmap modify ntgroup="Print Operators" unixgroup=lp
+net groupmap modify ntgroup="Replicators" unixgroup=daemon
+net groupmap modify ntgroup="Power Users" unixgroup=sys
- <para><programlisting>
- domadm:x:502:joe,john,mary
- </programlisting></para>
+#groupadd Engineers
+#groupadd Marketoids
+#groupadd Gnomes
- </listitem>
+#net groupmap add ntgroup="Engineers" unixgroup=Engineers type=d
+#net groupmap add ntgroup="Marketoids" unixgroup=Marketoids type=d
+#net groupmap add ntgroup="Gnomes" unixgroup=Gnomes type=d
+</programlisting>
+</para>
-<listitem><para>Map this domadm group to the "Domain Admins" group
- by running the command:</para>
+ <para>
+ Of course it is expected that the administrator will modify this to suit local needs.
+ For information regarding the use of the <command>net groupmap</command> tool please
+ refer to the man page.
+ </para>
- <para><prompt>root# </prompt><userinput>net groupmap add ntgroup="Domain Admins" unixgroup=domadm</userinput></para>
-
- <para>The quotes around "Domain Admins" are necessary due to the space in the group name. Also make
- sure to leave no whitespace surrounding the equal character (=).</para>
- </listitem>
+ </sect2>
-</orderedlist>
+</sect1>
-<para>Now joe, john and mary are domain administrators!</para>
+<sect1>
+<title>Common Errors</title>
<para>
-It is possible to map any arbitrary UNIX group to any Windows NT
-group as well as making any UNIX group a Windows domain group.
-For example, if you wanted to include a UNIX group (e.g. acct) in a ACL on a
-local file or printer on a domain member machine, you would flag
-that group as a domain group by running the following on the Samba PDC:
+At this time there are many little surprises for the unwary administrator. In a real sense
+it is imperative that every step of automated control scripts must be carefully tested
+manually before putting them into active service.
</para>
-<para><prompt>root# </prompt><userinput>net groupmap add rid=1000 ntgroup="Accounting" unixgroup=acct</userinput></para>
+ <sect2>
+ <title>Adding Groups Fails</title>
+
+ <para>
+ This is a common problem when the <command>groupadd</command> is called directly
+ by the Samba interface script for the <parameter>add group script</parameter> in
+ the &smb.conf; file.
+ </para>
+
+ <para>
+ The most common cause of failure is an attempt to add an MS Windows group account
+ that has either an upper case character and/or a space character in it.
+ </para>
+
+ <para>
+ There are three possible work-arounds. Firstly, use only group names that comply
+ with the limitations of the Unix/Linux <command>groupadd</command> system tool.
+ The second involves use of the script mentioned earlier in this chapter, and the
+ third option is to manually create a Unix/Linux group account that can substitute
+ for the MS Windows group name, then use the procedure listed above to map that group
+ to the MS Windows group.
+ </para>
+
+ </sect2>
-<para>Be aware that the rid parmeter is a unsigned 32 bit integer that should
-normally start at 1000. However, this rid must not overlap with any RID assigned
-to a user. Verifying this is done differently depending on on the passdb backend
-you are using. Future versions of the tools may perform the verification automatically,
-but for now the burden in on you.</para>
+ <sect2>
+ <title>Adding MS Windows Groups to MS Windows Groups Fails</title>
-<para>You can list the various groups in the mapping database by executing
-<command>net groupmap list</command>. Here is an example:</para>
+ <para>
+ Samba-3 does NOT support nested groups from the MS Windows control environment.
+ </para>
-<para><programlisting><prompt>root# </prompt>net groupmap list
-System Administrators (S-1-5-21-2547222302-1596225915-2414751004-1002) -> sysadmin
-Domain Admins (S-1-5-21-2547222302-1596225915-2414751004-512) -> domadmin
-Domain Users (S-1-5-21-2547222302-1596225915-2414751004-513) -> domuser
-Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -> domguest
-</programlisting></para>
+ </sect2>
-<para>For complete details on <command>net groupmap</command>, refer to the
-net(8) man page.</para>
+</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/Integrating-with-Windows.xml b/docs/docbook/projdoc/Integrating-with-Windows.xml
index 9f0de0a56a..8d07b8a3fd 100644
--- a/docs/docbook/projdoc/Integrating-with-Windows.xml
+++ b/docs/docbook/projdoc/Integrating-with-Windows.xml
@@ -24,6 +24,26 @@ NetBIOS over TCP/IP then this section may help you to resolve networking problem
</para>
</note>
+<sect1>
+<title>Features and Benefits</title>
+
+<para>
+Many MS Windows network administrators have never been exposed to basic TCP/IP
+networking as it is implemented in a Unix/Linux operating system. Likewise, many Unix and
+Linux administrators have not been exposed to the intricacies of MS Windows TCP/IP based
+networking (and may have no desire to be either).
+</para>
+
+<para>
+This chapter gives a short introduction to the basics of how a name can be resolved to
+it's IP address for each operating system environment.
+</para>
+
+</sect1>
+
+<sect1>
+<title>Background Information</title>
+
<para>
Since the introduction of MS Windows 2000 it is possible to run MS Windows networking
without the use of NetBIOS over TCP/IP. NetBIOS over TCP/IP uses UDP port 137 for NetBIOS
@@ -48,6 +68,7 @@ Use of DHCP with ADS is recommended as a further means of maintaining central co
over client workstation network configuration.
</para>
+</sect1>
<sect1>
<title>Name Resolution in a pure Unix/Linux world</title>
@@ -67,13 +88,13 @@ The key configuration files covered in this section are:
<title><filename>/etc/hosts</filename></title>
<para>
-Contains a static list of IP Addresses and names.
+Contains a static list of IP addresses and names.
eg:
</para>
-<para><programlisting>
+<para><screen>
127.0.0.1 localhost localhost.localdomain
192.168.1.1 bigbox.caldera.com bigbox alias4box
-</programlisting></para>
+</screen></para>
<para>
The purpose of <filename>/etc/hosts</filename> is to provide a
@@ -85,9 +106,9 @@ IP addresses.
<para>
Network packets that are sent over the physical network transport
layer communicate not via IP addresses but rather using the Media
-Access Control address, or MAC address. IP Addresses are currently
+Access Control address, or MAC address. IP addresses are currently
32 bits in length and are typically presented as four (4) decimal
-numbers that are separated by a dot (or period). eg: 168.192.1.1
+numbers that are separated by a dot (or period). eg: 168.192.1.1.
</para>
<para>
@@ -97,10 +118,10 @@ as two digit hexadecimal numbers separated by colons. eg:
</para>
<para>
-Every network interfrace must have an MAC address. Associated with
+Every network interface must have an MAC address. Associated with
a MAC address there may be one or more IP addresses. There is NO
relationship between an IP address and a MAC address, all such assignments
-are arbitary or discretionary in nature. At the most basic level all
+are arbitrary or discretionary in nature. At the most basic level all
network communications takes place using MAC addressing. Since MAC
addresses must be globally unique, and generally remains fixed for
any particular interface, the assignment of an IP address makes sense
@@ -133,7 +154,7 @@ interface.
<para>
The <filename>/etc/hosts</filename> file is foundational to all
-Unix/Linux TCP/IP installations and as a minumum will contain
+Unix/Linux TCP/IP installations and as a minimum will contain
the localhost and local network interface IP addresses and the
primary names by which they are known within the local machine.
This file helps to prime the pump so that a basic level of name
@@ -178,13 +199,13 @@ This file tells the name resolution libraries:
<filename>/etc/host.conf</filename> is the primary means by
which the setting in /etc/resolv.conf may be affected. It is a
critical configuration file. This file controls the order by
-which name resolution may procede. The typical structure is:
+which name resolution may proceed. The typical structure is:
</para>
-<para><programlisting>
+<para><screen>
order hosts,bind
multi on
-</programlisting></para>
+</screen></para>
<para>
then both addresses should be returned. Please refer to the
@@ -205,7 +226,7 @@ file typically has resolver object specifications as follows:
</para>
-<para><programlisting>
+<para><screen>
# /etc/nsswitch.conf
#
# Name Service Switch configuration file.
@@ -219,14 +240,14 @@ file typically has resolver object specifications as follows:
hosts: files nis dns
# Alternative entries for host name resolution are:
- # hosts: files dns nis nis+ hesoid db compat ldap wins
+ # hosts: files dns nis nis+ hesiod db compat ldap wins
networks: nis files dns
ethers: nis files
protocols: nis files
rpc: nis files
services: nis files
-</programlisting></para>
+</screen></para>
<para>
Of course, each of these mechanisms requires that the appropriate
@@ -244,12 +265,12 @@ Starting with version 2.2.0 samba has Linux support for extensions to
the name service switch infrastructure so that linux clients will
be able to obtain resolution of MS Windows NetBIOS names to IP
Addresses. To gain this functionality Samba needs to be compiled
-with appropriate arguments to the make command (ie: <command>make
-nsswitch/libnss_wins.so</command>). The resulting library should
+with appropriate arguments to the make command (i.e.: <userinput>make
+nsswitch/libnss_wins.so</userinput>). The resulting library should
then be installed in the <filename>/lib</filename> directory and
the "wins" parameter needs to be added to the "hosts:" line in
the <filename>/etc/nsswitch.conf</filename> file. At this point it
-will be possible to ping any MS Windows machine by it's NetBIOS
+will be possible to ping any MS Windows machine by its NetBIOS
machine name, so long as that machine is within the workgroup to
which both the samba machine and the MS Windows machine belong.
</para>
@@ -265,10 +286,10 @@ which both the samba machine and the MS Windows machine belong.
MS Windows networking is predicated about the name each machine
is given. This name is known variously (and inconsistently) as
the "computer name", "machine name", "networking name", "netbios name",
-"SMB name". All terms mean the same thing with the exception of
+or "SMB name". All terms mean the same thing with the exception of
"netbios name" which can apply also to the name of the workgroup or the
domain name. The terms "workgroup" and "domain" are really just a
-simply name with which the machine is associated. All NetBIOS names
+simple name with which the machine is associated. All NetBIOS names
are exactly 16 characters in length. The 16th character is reserved.
It is used to store a one byte value that indicates service level
information for the NetBIOS name that is registered. A NetBIOS machine
@@ -280,7 +301,7 @@ the client/server.
The following are typical NetBIOS name/service type registrations:
</para>
-<para><programlisting>
+<para><screen>
Unique NetBIOS Names:
MACHINENAME&lt;00&gt; = Server Service is running on MACHINENAME
MACHINENAME&lt;03&gt; = Generic Machine Name (NetBIOS name)
@@ -292,7 +313,7 @@ The following are typical NetBIOS name/service type registrations:
WORKGROUP&lt;1c&gt; = Domain Controllers / Netlogon Servers
WORKGROUP&lt;1d&gt; = Local Master Browsers
WORKGROUP&lt;1e&gt; = Internet Name Resolvers
-</programlisting></para>
+</screen></para>
<para>
It should be noted that all NetBIOS machines register their own
@@ -311,8 +332,8 @@ wants to locate a domain logon server. It finds this service and the IP
address of a server that provides it by performing a lookup (via a
NetBIOS broadcast) for enumeration of all machines that have
registered the name type *&lt;1c&gt;. A logon request is then sent to each
-IP address that is returned in the enumerated list of IP addresses. Which
-ever machine first replies then ends up providing the logon services.
+IP address that is returned in the enumerated list of IP addresses.
+Whichever machine first replies then ends up providing the logon services.
</para>
<para>
@@ -372,7 +393,7 @@ frustrating for users - but it is a characteristic of the protocol.
<para>
The MS Windows utility that allows examination of the NetBIOS
name cache is called "nbtstat". The Samba equivalent of this
-is called "nmblookup".
+is called <command>nmblookup</command>.
</para>
</sect2>
@@ -392,7 +413,7 @@ to IP address mapping.
It typically looks like:
</para>
-<para><programlisting>
+<para><screen>
# Copyright (c) 1998 Microsoft Corp.
#
# This is a sample LMHOSTS file used by the Microsoft Wins Client (NetBIOS
@@ -401,7 +422,7 @@ It typically looks like:
# This file contains the mappings of IP addresses to NT computernames
# (NetBIOS) names. Each entry should be kept on an individual line.
# The IP address should be placed in the first column followed by the
- # corresponding computername. The address and the comptername
+ # corresponding computername. The address and the computername
# should be separated by at least one space or tab. The "#" character
# is generally used to denote the start of a comment (see the exceptions
# below).
@@ -433,7 +454,7 @@ It typically looks like:
# centralized lmhosts file to be maintained on a server.
# It is ALWAYS necessary to provide a mapping for the IP address of the
# server prior to the #INCLUDE. This mapping must use the #PRE directive.
- # In addtion the share "public" in the example below must be in the
+ # In addition the share "public" in the example below must be in the
# LanManServer list of "NullSessionShares" in order for client machines to
# be able to read the lmhosts file successfully. This key is under
# \machine\system\currentcontrolset\services\lanmanserver\parameters\nullsessionshares
@@ -469,7 +490,7 @@ It typically looks like:
# so keeping the number of comments to a minimum will improve performance.
# Therefore it is not advisable to simply add lmhosts file entries onto the
# end of this file.
-</programlisting></para>
+</screen></para>
</sect2>
@@ -492,10 +513,10 @@ every way the equivalent of the Unix/Linux <filename>/etc/hosts</filename> file.
<para>
This capability is configured in the TCP/IP setup area in the network
-configuration facility. If enabled an elaborate name resolution sequence
-is followed the precise nature of which is dependant on what the NetBIOS
-Node Type parameter is configured to. A Node Type of 0 means use
-NetBIOS broadcast (over UDP broadcast) is first used if the name
+configuration facility. If enabled, an elaborate name resolution sequence
+is followed the precise nature of which is dependant on how the NetBIOS
+Node Type parameter is configured. A Node Type of 0 means that
+NetBIOS broadcast (over UDP broadcast) is used if the name
that is the subject of a name lookup is not found in the NetBIOS name
cache. If that fails then DNS, HOSTS and LMHOSTS are checked. If set to
Node Type 8, then a NetBIOS Unicast (over UDP Unicast) is sent to the
@@ -509,7 +530,7 @@ lookup is used.
<title>WINS Lookup</title>
<para>
-A WINS (Windows Internet Name Server) service is the equivaent of the
+A WINS (Windows Internet Name Server) service is the equivalent of the
rfc1001/1002 specified NBNS (NetBIOS Name Server). A WINS server stores
the names and IP addresses that are registered by a Windows client
if the TCP/IP setup has been given at least one WINS Server IP Address.
@@ -520,19 +541,19 @@ To configure Samba to be a WINS server the following parameter needs
to be added to the &smb.conf; file:
</para>
-<para><programlisting>
+<para><screen>
wins support = Yes
-</programlisting></para>
+</screen></para>
<para>
To configure Samba to use a WINS server the following parameters are
needed in the &smb.conf; file:
</para>
-<para><programlisting>
+<para><screen>
wins support = No
wins server = xxx.xxx.xxx.xxx
-</programlisting></para>
+</screen></para>
<para>
where <replaceable>xxx.xxx.xxx.xxx</replaceable> is the IP address
@@ -542,4 +563,114 @@ of the WINS server.
</sect2>
</sect1>
+<sect1>
+<title>Common Errors</title>
+
+<para>
+TCP/IP network configuration problems find every network administrator sooner or later.
+The cause can be anything from keyboard mishaps, forgetfulness, simple mistakes, and
+carelessness. Of course, no one is every deliberately careless!
+</para>
+
+ <sect2>
+ <title>My Boomerang Won't Come Back</title>
+
+ <para>
+ Well, the real complaint said, "I can ping my samba server from Windows, but I can
+ not ping my Windows machine from the samba server."
+ </para>
+
+ <para>
+ The Windows machine was at IP Address 192.168.1.2 with netmask 255.255.255.0, the
+ Samba server (Linux) was at IP Address 192.168.1.130 with netmask 255.255.255.128.
+ The machines were on a local network with no external connections.
+ </para>
+
+ <para>
+ Due to inconsistent netmasks, the Windows machine was on network 192.168.1.0/24, while
+ the Samba server was on network 192.168.1.128/25 - logically a different network.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Very Slow Network Connections</title>
+
+ <para>
+ A common causes of slow network response includes:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>Client is configured to use DNS and DNS server is down</para></listitem>
+ <listitem><para>Client is configured to use remote DNS server, but remote connection is down</para></listitem>
+ <listitem><para>Client is configured to use a WINS server, but there is no WINS server</para></listitem>
+ <listitem><para>Client is NOT configured to use a WINS server, but there is a WINS server</para></listitem>
+ <listitem><para>Firewall is filtering our DNS or WINS traffic</para></listitem>
+ </itemizedlist>
+
+ </sect2>
+
+ <sect2>
+ <title>Samba server name change problem</title>
+
+ <para>
+ The name of the samba server was changed, samba was restarted, samba server can not be
+ pinged by new name from MS Windows NT4 Workstation, but it does still respond to ping using
+ the old name. Why?
+ </para>
+
+ <para>
+ From this description three (3) things are rather obvious:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>WINS is NOT in use, only broadcast based name resolution is used</para></listitem>
+ <listitem><para>The samba server was renamed and restarted within the last 10-15 minutes</para></listitem>
+ <listitem><para>The old samba server name is still in the NetBIOS name cache on the MS Windows NT4 Workstation</para></listitem>
+ </itemizedlist>
+
+ <para>
+ To find what names are present in the NetBIOS name cache on the MS Windows NT4 machine,
+ open a cmd shell, then:
+ </para>
+
+ <para>
+ <screen>
+ C:\temp\&gt;nbtstat -n
+
+ NetBIOS Local Name Table
+
+ Name Type Status
+ ------------------------------------------------
+ SLACK &lt;03&gt; UNIQUE Registered
+ ADMINISTRATOR &lt;03&gt; UNIQUE Registered
+ SLACK &lt;00&gt; UNIQUE Registered
+ SARDON &lt;00&gt; GROUP Registered
+ SLACK &lt;20&gt; UNIQUE Registered
+ SLACK &lt;1F&gt; UNIQUE Registered
+
+
+ C:\Temp\&gt;nbtstat -c
+
+ NetBIOS Remote Cache Name Table
+
+ Name Type Host Address Life [sec]
+ --------------------------------------------------------------
+ FRODO &lt;20&gt; UNIQUE 192.168.1.1 240
+
+ C:\Temp\&gt;
+ </screen>
+ </para>
+
+ <para>
+ In the above example, FRODO is the Samba server and SLACK is the MS Windows NT4 Workstation.
+ The first listing shows the contents of the Local Name Table (i.e.: Identity information on
+ the MS Windows workstation), the second shows the NetBIOS name in the NetBIOS name cache.
+ The name cache contains the remote machines known to this workstation.
+ </para>
+
+ </sect2>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/InterdomainTrusts.xml b/docs/docbook/projdoc/InterdomainTrusts.xml
index 2c492d4ac0..31f9697bf3 100644
--- a/docs/docbook/projdoc/InterdomainTrusts.xml
+++ b/docs/docbook/projdoc/InterdomainTrusts.xml
@@ -16,6 +16,25 @@ possible for Samba-3 to NT4 trust (and vice versa), as well as Samba3 to Samba3
</para>
<sect1>
+<title>Features and Benefits</title>
+
+<para>
+Samba-3 can participate in Samba-to-Samba as well as in Samba-to-MS Windows NT4 style
+trust relationships. This imparts to Samba similar scalability as is possible with
+MS Windows NT4.
+</para>
+
+<para>
+Given that Samba-3 has the capability to function with a scalable backend authentication
+database such as LDAP, and given it's ability to run in Primary as well as Backup Domain control
+modes, the administrator would be well advised to consider alternatives to the use of
+Interdomain trusts simply because by the very nature of how this works it is fragile.
+That was, after all, a key reason for the development and adoption of Microsoft Active Directory.
+</para>
+
+</sect1>
+
+<sect1>
<title>Trust Relationship Background</title>
<para>
@@ -76,13 +95,15 @@ There are two steps to creating an interdomain trust relationship.
<title>NT4 as the Trusting Domain (ie. creating the trusted account)</title>
<para>
-For MS Windows NT4, all domain trust relationships are configured using the Domain User Manager.
-To affect a two way trust relationship it is necessary for each domain administrator to make
-available (for use by an external domain) it's security resources. This is done from the Domain
-User Manager Policies entry on the menu bar. From the Policy menu, select Trust Relationships, then
-next to the lower box that is labelled "Permitted to Trust this Domain" are two buttons, "Add" and
-"Remove". The "Add" button will open a panel in which needs to be entered the remote domain that
-will be able to assign user rights to your domain. In addition it is necessary to enter a password
+For MS Windows NT4, all domain trust relationships are configured using the
+<application>Domain User Manager</application>. To affect a two way trust relationship it is
+necessary for each domain administrator to make available (for use by an external domain) it's
+security resources. This is done from the Domain User Manager Policies entry on the menu bar.
+From the <guimenu>Policy</guimenu> menu, select <guimenuitem>Trust Relationships</guimenuitem>, then
+next to the lower box that is labelled <guilabel>Permitted to Trust this Domain</guilabel> are two
+buttons, <guibutton>Add</guibutton> and <guibutton>Remove</guibutton>. The <guibutton>Add</guibutton>
+button will open a panel in which needs to be entered the remote domain that will be able to assign
+user rights to your domain. In addition it is necessary to enter a password
that is specific to this trust relationship. The password needs to be
typed twice (for standard confirmation).
</para>
@@ -94,10 +115,11 @@ typed twice (for standard confirmation).
<para>
A trust relationship will work only when the other (trusting) domain makes the appropriate connections
-with the trusted domain. To consumate the trust relationship the administrator will launch the
+with the trusted domain. To consummate the trust relationship the administrator will launch the
Domain User Manager, from the menu select Policies, then select Trust Relationships, then click on the
-"Add" button that is next to the box that is labelled "Trusted Domains". A panel will open in
-which must be entered the name of the remote domain as well as the password assigned to that trust.
+<guibutton>Add</guibutton> button that is next to the box that is labelled
+<guilabel>Trusted Domains</guilabel>. A panel will open in which must be entered the name of the remote
+domain as well as the password assigned to that trust.
</para>
</sect2>
@@ -126,21 +148,21 @@ between domains in purely Samba environment.
In order to set the Samba PDC to be the trusted party of the relationship first you need
to create special account for the domain that will be the trusting party. To do that,
you can use the 'smbpasswd' utility. Creating the trusted domain account is very
-similiar to creating a trusted machine account. Suppose, your domain is
+similar to creating a trusted machine account. Suppose, your domain is
called SAMBA, and the remote domain is called RUMBA. The first step
will be to issue this command from your favourite shell:
</para>
<para>
<screen>
-<prompt>deity#</prompt> <userinput>smbpasswd -a -i rumba</userinput>
+&rootprompt; <userinput>smbpasswd -a -i rumba</userinput>
New SMB password: XXXXXXXX
Retype SMB password: XXXXXXXX
Added user rumba$
</screen>
-where <parameter>-a</parameter> means to add a new account into the
-passdb database and <parameter>-i</parameter> means: ''create this
+where <option>-a</option> means to add a new account into the
+passdb database and <option>-i</option> means: ''create this
account with the InterDomain trust flag''
</para>
@@ -153,18 +175,21 @@ After issuing this command you'll be asked to enter the password for
the account. You can use any password you want, but be aware that Windows NT will
not change this password until 7 days following account creation.
After the command returns successfully, you can look at the entry for the new account
-(in the stardard way depending on your configuration) and see that account's name is
+(in the standard way depending on your configuration) and see that account's name is
really RUMBA$ and it has 'I' flag in the flags field. Now you're ready to confirm
the trust by establishing it from Windows NT Server.
</para>
<para>
-Open 'User Manager for Domains' and from menu 'Policies' select 'Trust Relationships...'.
-Right beside 'Trusted domains' list box press 'Add...' button. You will be prompted for
+Open <application>User Manager for Domains</application> and from menu
+<guimenu>Policies</guimenu> select <guimenuitem>Trust Relationships...</guimenuitem>.
+Right beside <guilabel>Trusted domains</guilabel> list box press the
+<guimenu>Add...</guimenu> button. You will be prompted for
the trusted domain name and the relationship password. Type in SAMBA, as this is
your domain name, and the password used at the time of account creation.
-Press OK and, if everything went without incident, you will see 'Trusted domain relationship
-successfully established' message.
+Press OK and, if everything went without incident, you will see
+<computeroutput>Trusted domain relationship successfully
+established</computeroutput> message.
</para>
</sect2>
@@ -181,9 +206,11 @@ The very first thing requirement is to add an account for the SAMBA domain on RU
</para>
<para>
-Launch the Domain User Manager, then from the menu select 'Policies', 'Trust Relationships'.
-Now, next to 'Trusted Domains' box press the 'Add' button, and type in the name of the trusted
-domain (SAMBA) and password securing the relationship.
+Launch the <application>Domain User Manager</application>, then from the menu select
+<guimenu>Policies</guimenu>, <guimenuitem>Trust Relationships</guimenuitem>.
+Now, next to <guilabel>Trusted Domains</guilabel> box press the <guibutton>Add</guibutton>
+button, and type in the name of the trusted domain (SAMBA) and password securing
+the relationship.
</para>
<para>
@@ -197,7 +224,7 @@ Using your favourite shell while being logged in as root, issue this command:
</para>
<para>
-<prompt>deity# </prompt><userinput>net rpc trustdom establish rumba</userinput>
+&rootprompt;<userinput>net rpc trustdom establish rumba</userinput>
</para>
<para>
@@ -207,8 +234,8 @@ Do not worry if you see an error message that mentions a returned code of
password you gave is correct and the NT4 Server says the account is
ready for interdomain connection and not for ordinary
connection. After that, be patient it can take a while (especially
-in large networks), you should see the 'Success' message. Congratulations! Your trust
-relationship has just been established.
+in large networks), you should see the <computeroutput>Success</computeroutput> message.
+Congratulations! Your trust relationship has just been established.
</para>
<note><para>
@@ -219,4 +246,48 @@ the <filename>secrets.tdb</filename> file.
</sect2>
</sect1>
+<sect1>
+<title>Common Errors</title>
+
+<para>
+Interdomain trust relationships should NOT be attempted on networks that are unstable
+or that suffer regular outages. Network stability and integrity are key concerns with
+distributed trusted domains.
+</para>
+
+ <sect2>
+ <title>Tell me about Trust Relationships using Samba</title>
+
+ <para>
+ Like many, I administer multiple LANs connected together using NT trust
+ relationships. This was implemented about 4 years ago. I now have the
+ occasion to consider performing this same task again, but this time, I
+ would like to implement it solely through samba - no Microsoft PDCs
+ anywhere.
+ </para>
+
+ <para>
+ I have read documentation on samba.org regarding NT-style trust
+ relationships and am now wondering, can I do what I want to? I already
+ have successfully implemented 2 samba servers, but they are not PDCs.
+ They merely act as file servers. I seem to remember, and it appears to
+ be true (according to samba.org) that trust relationships are a
+ challenge.
+ </para>
+
+ <para>
+ Please provide any helpful feedback that you may have.
+ </para>
+
+ <para>
+ These are almost complete in Samba 3.0 snapshots. The main catch
+ is getting winbindd to be able to allocate UID/GIDs for trusted
+ users/groups. See the updated Samba HOWTO collection for more
+ details.
+ </para>
+
+ </sect2>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/IntroSMB.xml b/docs/docbook/projdoc/IntroSMB.xml
index 38e40ae239..bc9fa9ce1b 100644
--- a/docs/docbook/projdoc/IntroSMB.xml
+++ b/docs/docbook/projdoc/IntroSMB.xml
@@ -6,10 +6,10 @@
<title>Introduction to Samba</title>
-<para><emphasis>
+<para><quote>
"If you understand what you're doing, you're not learning anything."
-- Anonymous
-</emphasis></para>
+</quote></para>
<para>
Samba is a file and print server for Windows-based clients using TCP/IP as the underlying
@@ -132,7 +132,7 @@ thinking?
</itemizedlist>
<para>If you plan on getting help, make sure to subscribe to the Samba Mailing List (available at
-http://www.samba.org). Optionally, you could just search mailing.unix.samba at http://groups.google.com
+<ulink url="http://www.samba.org/">http://www.samba.org</ulink>).
</para>
</sect1>
@@ -157,7 +157,7 @@ related to Samba: SMBFS and CIFS VFS. These are both available in the Linux ker
<listitem><para>
CIFS VFS (Common Internet File System Virtual File System) is the successor to SMBFS, and
is being actively developed for the upcoming version of the Linux kernel. The intent of this module
- is to provide advanced network file system functionality including support for dfs (heirarchical
+ is to provide advanced network file system functionality including support for dfs (hierarchical
name space), secure per-user session establishment, safe distributed caching (oplock),
optional packet signing, Unicode and other internationalization improvements, and optional
Winbind (nsswitch) integration.
@@ -171,8 +171,9 @@ nothing to do with acting as a file and print server for SMB/CIFS clients.
</para>
<para>
-There are other Open Source CIFS client implementations, such as the jCIFS project
-(jcifs.samba.org) which provides an SMB client toolkit written in Java.
+There are other Open Source CIFS client implementations, such as the
+<ulink url="http://jcifs.samba.org/">jCIFS project</ulink>
+which provides an SMB client toolkit written in Java.
</para>
@@ -226,9 +227,9 @@ up a single file. In general, SMB sessions are established in the following orde
</itemizedlist>
<para>
-A good way to examine this process in depth is to try out SecurityFriday's SWB program
-at http://www.securityfriday.com/ToolDownload/SWB/swb_doc.html. It allows you to
-walk through the establishment of a SMB/CIFS session step by step.
+A good way to examine this process in depth is to try out
+<ulink url="http://www.securityfriday.com/ToolDownload/SWB/swb_doc.html">SecurityFriday's SWB program</ulink>.
+It allows you to walk through the establishment of a SMB/CIFS session step by step.
</para>
</sect1>
@@ -236,8 +237,8 @@ walk through the establishment of a SMB/CIFS session step by step.
<sect1>
<title>Epilogue</title>
-<para><emphasis>
-"What's fundamentally wrong is that nobody ever had any taste when they
+<para><quote>
+What's fundamentally wrong is that nobody ever had any taste when they
did it. Microsoft has been very much into making the user interface look good,
but internally it's just a complete mess. And even people who program for Microsoft
and who have had years of experience, just don't know how it works internally.
@@ -246,16 +247,16 @@ mess that fixing one bug might just break a hundred programs that depend on
that bug. And Microsoft isn't interested in anyone fixing bugs -- they're interested
in making money. They don't have anybody who takes pride in Windows 95 as an
operating system.
-</emphasis></para>
+</quote></para>
-<para><emphasis>
+<para><quote>
People inside Microsoft know it's a bad operating system and they still
continue obviously working on it because they want to get the next version out
because they want to have all these new features to sell more copies of the
system.
-</emphasis></para>
+</quote></para>
-<para><emphasis>
+<para><quote>
The problem with that is that over time, when you have this kind of approach,
and because nobody understands it, because nobody REALLY fixes bugs (other than
when they're really obvious), the end result is really messy. You can't trust
@@ -265,11 +266,11 @@ fine and then once in a blue moon for some completely unknown reason, it's dead,
and nobody knows why. Not Microsoft, not the experienced user and certainly
not the completely clueless user who probably sits there shivering thinking
"What did I do wrong?" when they didn't do anything wrong at all.
-</emphasis></para>
+</quote></para>
-<para><emphasis>
+<para><quote>
That's what's really irritating to me."
-</emphasis></para>
+</quote></para>
<para>--
<ulink url="http://hr.uoregon.edu/davidrl/boot.txt">Linus Torvalds, from an interview with BOOT Magazine, Sept 1998</ulink>
@@ -280,15 +281,10 @@ That's what's really irritating to me."
<sect1>
<title>Miscellaneous</title>
-<para>
-This chapter was lovingly handcrafted on a Dell Latitude C400 laptop running Slackware Linux 9.0,
-in case anyone asks.
-</para>
-
-<!-- This really needs to go... -->
+<!--FIXME: This really needs to go... -->
<para>
-This chapter is Copyright &copy; 2003 David Lechnyr (david at lechnyr dot com).
+This chapter is Copyright 2003 David Lechnyr (david at lechnyr dot com).
Permission is granted to copy, distribute and/or modify this document under the terms
of the GNU Free Documentation License, Version 1.2 or any later version published by the Free
Software Foundation. A copy of the license is available at http://www.gnu.org/licenses/fdl.txt.
diff --git a/docs/docbook/projdoc/NT4Migration.xml b/docs/docbook/projdoc/NT4Migration.xml
index 585cfe6a47..8c2d0e19f3 100644
--- a/docs/docbook/projdoc/NT4Migration.xml
+++ b/docs/docbook/projdoc/NT4Migration.xml
@@ -16,8 +16,8 @@ Samba-3 based domain control.
<para>
In the IT world there is often a saying that all problems are encountered because of
-poor planning. The corrollary to this saying is that not all problems can be anticpated
-and planned for. Then again, good planning will anticpate most show stopper type situations.
+poor planning. The corollary to this saying is that not all problems can be anticipated
+and planned for. Then again, good planning will anticipate most show stopper type situations.
</para>
<para>
@@ -44,26 +44,14 @@ should know precisely <emphasis>why</emphasis> the change is important for the o
Possible motivations to make a change include:
</para>
-<itemizedlist>
-<listitem>
- <para>Improve network manageability</para>
-</listitem>
-<listitem>
- <para>Obtain better user level functionality</para>
-</listitem>
-<listitem>
- <para>Reduce network operating costs</para>
-</listitem>
-<listitem>
- <para>Reduce exposure caused by Microsoft withdrawal of NT4 support</para>
-</listitem>
-<listitem>
- <para>Avoid MS License 6 implications</para>
-</listitem>
-<listitem>
- <para>Reduce organisation's dependency on Microsoft</para>
-</listitem>
-</itemizedlist>
+<simplelist>
+ <member>Improve network manageability</member>
+ <member>Obtain better user level functionality</member>
+ <member>Reduce network operating costs</member>
+ <member>Reduce exposure caused by Microsoft withdrawal of NT4 support</member>
+ <member>Avoid MS License 6 implications</member>
+ <member>Reduce organisation's dependency on Microsoft</member>
+</simplelist>
<para>
It is vital that it be well recognised that Samba-3 is NOT MS Windows NT4. Samba-3 offers
@@ -77,61 +65,31 @@ MS Windows 2000 and beyond (with or without Active Directory services).
What are the features that Samba-3 can NOT provide?
</para>
-<itemizedlist>
-<listitem>
- <para>Active Directory Server</para>
-</listitem>
-<listitem>
- <para>Group Policy Objects (in Active Direcrtory)</para>
-</listitem>
-<listitem>
- <para>Machine Policy objects</para>
-</listitem>
-<listitem>
- <para>Logon Scripts in Active Directorty</para>
-</listitem>
-<listitem>
- <para>Software Application and Access Controls in Active Directory</para>
-</listitem>
-</itemizedlist>
+<simplelist>
+ <member>Active Directory Server</member>
+ <member>Group Policy Objects (in Active Directory)</member>
+ <member>Machine Policy objects</member>
+ <member>Logon Scripts in Active Directory</member>
+ <member>Software Application and Access Controls in Active Directory</member>
+</simplelist>
<para>
The features that Samba-3 DOES provide and that may be of compelling interest to your site
includes:
</para>
-<itemizedlist>
-<listitem>
- <para>Lower Cost of Ownership</para>
-</listitem>
-<listitem>
- <para>Global availability of support with no strings attached</para>
-</listitem>
-<listitem>
- <para>Dynamic SMB Servers (ie:Can run more than one server per Unix/Linux system)</para>
-</listitem>
-<listitem>
- <para>Creation of on-the-fly logon scripts</para>
-</listitem>
-<listitem>
- <para>Creation of on-the-fly Policy Files</para>
-</listitem>
-<listitem>
- <para>Greater Stability, Reliability, Performance and Availability</para>
-</listitem>
-<listitem>
- <para>Manageability via an ssh connection</para>
-</listitem>
-<listitem>
- <para>Flexible choices of back-end authentication technologies (tdbsam, ldapsam, mysqlsam)</para>
-</listitem>
-<listitem>
- <para>Ability to implement a full single-signon architecture</para>
-</listitem>
-<listitem>
- <para>Ability to distribute authentication systems for absolute minimum wide area network bandwidth demand</para>
-</listitem>
-</itemizedlist>
+<simplelist>
+ <member>Lower Cost of Ownership</member>
+ <member>Global availability of support with no strings attached</member>
+ <member>Dynamic SMB Servers (ie:Can run more than one server per Unix/Linux system)</member>
+ <member>Creation of on-the-fly logon scripts</member>
+ <member>Creation of on-the-fly Policy Files</member>
+ <member>Greater Stability, Reliability, Performance and Availability</member>
+ <member>Manageability via an ssh connection</member>
+ <member>Flexible choices of back-end authentication technologies (tdbsam, ldapsam, mysqlsam)</member>
+ <member>Ability to implement a full single-sign-on architecture</member>
+ <member>Ability to distribute authentication systems for absolute minimum wide area network bandwidth demand</member>
+</simplelist>
<para>
Before migrating a network from MS Windows NT4 to Samba-3 it is vital that all necessary factors are
@@ -164,7 +122,7 @@ and network bandwidth.
A physical network segment may house several domains, each of which may span multiple network segments.
Where domains span routed network segments it is most advisable to consider and test the performance
implications of the design and layout of a network. A Centrally located domain controller that is being
-designed to serve mulitple routed network segments may result in severe performance problems if the
+designed to serve multiple routed network segments may result in severe performance problems if the
response time (eg: ping timing) between the remote segment and the PDC is more than 100 ms. In situations
where the delay is too long it is highly recommended to locate a backup controller (BDC) to serve as
the local authentication and access control server.
@@ -212,20 +170,20 @@ make sure that users will never be interrupted by the stupidity of complexity.
<title>Logon Scripts</title>
<para>
-Please refer to the section of this document on Advanced Network Adminsitration for information
+Please refer to the section of this document on Advanced Network Administration for information
regarding the network logon script options for Samba-3. Logon scripts can help to ensure that
all users gain share and printer connections they need.
</para>
<para>
Logon scripts can be created on-the-fly so that all commands executed are specific to the
-rights and privilidges granted to the user. The preferred controls should be affected through
-group membership so that group information can be used to custom create a logong script using
-the <filename>root preexec</filename> parameters to the <filename>NETLOGON</filename> share.
+rights and privileges granted to the user. The preferred controls should be affected through
+group membership so that group information can be used to custom create a logon script using
+the <parameter>root preexec</parameter> parameters to the <filename>NETLOGON</filename> share.
</para>
<para>
-Some sites prefer to use a tool such as <filename>kixstart</filename> to establish a controlled
+Some sites prefer to use a tool such as <command>kixstart</command> to establish a controlled
user environment. In any case you may wish to do a google search for logon script process controls.
In particular, you may wish to explore the use of the Microsoft knowledgebase article KB189105 that
deals with how to add printers without user intervention via the logon script process.
@@ -241,7 +199,7 @@ Management.
</para>
<para>
-Profiles may also be managed using the Samba-3 tool <filename>profiles</filename>. This tool allows
+Profiles may also be managed using the Samba-3 tool <command>profiles</command>. This tool allows
the MS Windows NT style security identifiers (SIDs) that are stored inside the profile NTuser.DAT file
to be changed to the SID of the Samba-3 domain.
</para>
@@ -283,39 +241,39 @@ Samba-3 set up as a DC with netlogon share, profile share, etc.
<substeps><step><para>Samba must NOT be running</para></step></substeps></step>
<step>
- <para>rpcclient NT4PDC -U Administrator%passwd</para>
+ <para><userinput>rpcclient <replaceable>NT4PDC</replaceable> -U Administrator%<replaceable>passwd</replaceable></userinput></para>
<substeps><step><para>lsaquery</para></step>
<step><para>Note the SID returned</para></step>
</substeps>
</step>
- <step><para>net getsid -S NT4PDC -w DOMNAME -U Administrator%passwd</para>
+ <step><para><userinput>net getsid -S <replaceable>NT4PDC</replaceable> -w <replaceable>DOMNAME</replaceable> -U Administrator%<replaceable>passwd</replaceable></userinput></para>
<substeps><step><para>Note the SID</para></step></substeps>
</step>
- <step><para>net getlocalsid</para>
+ <step><para><userinput>net getlocalsid</userinput></para>
<substeps>
<step><para>Note the SID, now check that all three SIDS reported are the same!</para></step>
</substeps>
</step>
- <step><para>net rpc join -S NT4PDC -w DOMNAME -U Administrator%passwd</para></step>
+ <step><para><userinput>net rpc join -S <replaceable>NT4PDC</replaceable> -w <replaceable>DOMNAME</replaceable> -U Administrator%<replaceable>passwd</replaceable></userinput></para></step>
- <step><para>net rpc vampire -S NT4PDC -U administrator%passwd</para></step>
+ <step><para><userinput>net rpc vampire -S <replaceable>NT4PDC</replaceable> -U administrator%<replaceable>passwd</replaceable></userinput></para></step>
- <step><para>pdbedit -l</para>
+ <step><para><userinput>pdbedit -L</userinput></para>
<substeps><step><para>Note - did the users migrate?</para></step></substeps>
</step>
- <step><para>initGrps.sh DOMNAME</para></step>
+ <step><para><userinput>initGrps.sh <replaceable>DOMNAME</replaceable></userinput></para></step>
- <step><para>net groupmap list</para>
+ <step><para><userinput>net groupmap list</userinput></para>
<substeps><step><para>Now check that all groups are recognised</para></step></substeps>
</step>
- <step><para>net rpc campire -S NT4PDC -U administrator%passwd</para></step>
+ <step><para><userinput>net rpc vampire -S <replaceable>NT4PDC</replaceable> -U administrator%<replaceable>passwd</replaceable></userinput></para></step>
- <step><para>pdbedit -lv</para>
+ <step><para><userinput>pdbedit -Lv</userinput></para>
<substeps><step>
<para>Note - check that all group membership has been migrated</para>
</step></substeps>
@@ -356,7 +314,7 @@ based solution fit into three basic categories.
<title>Planning for Success</title>
<para>
-There are three basic choices for sites that intend to migrate from MS Windwows NT4
+There are three basic choices for sites that intend to migrate from MS Windows NT4
to Samba-3.
</para>
@@ -440,6 +398,7 @@ No matter what choice you make, the following rules will minimise down-stream pr
<sect2>
<title>Samba Implementation Choices</title>
+<!-- FIXME: Either a better layout or more written-out text-->
<para><programlisting>
Authentication database back end
Winbind (external Samba or NT4/200x server)
@@ -447,13 +406,13 @@ Authentication database back end
External server could use Active Directory or NT4 Domain
Database type
- smbpasswd, tdbsam, ldapsam, MySQLsam
+ smbpasswd, tdbsam, ldapsam, mysqlsam
Access Control Points
On the Share itself (Use NT4 Server Manager)
On the file system
Unix permissions on files and directories
- Posix ACLs enablement in file system?
+ Enable Posix ACLs in file system?
Through Samba share parameters
Not recommended - except as only resort
diff --git a/docs/docbook/projdoc/NetworkBrowsing.xml b/docs/docbook/projdoc/NetworkBrowsing.xml
index 8648bfa256..c87ede5906 100644
--- a/docs/docbook/projdoc/NetworkBrowsing.xml
+++ b/docs/docbook/projdoc/NetworkBrowsing.xml
@@ -10,7 +10,7 @@
<para>
This document contains detailed information as well as a 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
+WINS is the best tool for resolution of NetBIOS names to IP addresses. WINS is
NOT involved in browse list handling except by way of name to address resolution.
</para>
@@ -32,10 +32,10 @@ hope it never returns!</emphasis>.
</para>
<para>
-For many MS Windows network administrators that statement sums up their feelings about
-NetBIOS networking precisely. For those who mastered NetBIOS networking it's fickle
-nature was just par for the course. For those who never quite managed to tame it's
-lusty features NetBIOS is like Paterson's Curse.
+For many MS Windows network administrators, that statement sums up their feelings about
+NetBIOS networking precisely. For those who mastered NetBIOS networking, its fickle
+nature was just par for the course. For those who never quite managed to tame its
+lusty features, NetBIOS is like Paterson's Curse.
</para>
<para>
@@ -49,7 +49,7 @@ features which make it such a persistent weed.
<para>
In this chapter we explore vital aspects of SMB (Server Message Block) networking with
-a particular focus on SMB as implmented through running NetBIOS (Network Basic
+a particular focus on SMB as implemented through running NetBIOS (Network Basic
Input / Output System) over TCP/IP. Since Samba does NOT implement SMB or NetBIOS over
any other protocols we need to know how to configure our network environment and simply
remember to use nothing but TCP/IP on all our MS Windows network clients.
@@ -98,11 +98,12 @@ The technologies (or methods) employed in making all of this work includes:
</simplelist>
<para>
-The samba application that controls/manages browse list management and name resolution is
+The Samba application that controls browse list management and name resolution is
called <filename>nmbd</filename>. The configuration parameters involved in nmbd's operation are:
</para>
<para><programlisting>
+ <!--FIXME-->
Browsing options:
-----------------
* os level
@@ -128,9 +129,9 @@ called <filename>nmbd</filename>. The configuration parameters involved in nmbd'
</programlisting></para>
<para>
-For Samba the WINS Server and WINS Support are mutually exclusive options. Those marked with
+For Samba, the WINS Server and WINS Support are mutually exclusive options. Those marked with
an '*' are the only options that commonly MAY need to be modified. Even if not one of these
-parameters is set nmbd will still do it's job.
+parameters is set <filename>nmbd</filename> will still do it's job.
</para>
</sect1>
@@ -141,7 +142,7 @@ parameters is set nmbd will still do it's job.
<para>
Firstly, all MS Windows networking uses SMB (Server Message Block) based messaging.
SMB messaging may be implemented with or without NetBIOS. MS Windows 200x supports
-NetBIOS over TCP/IP for backwards compatibility. Microsoft are intent on phasing out NetBIOS
+NetBIOS over TCP/IP for backwards compatibility. Microsoft is intent on phasing out NetBIOS
support.
</para>
@@ -151,7 +152,7 @@ support.
<para>
Samba implements NetBIOS, as does MS Windows NT / 200x / XP, 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.
+affect browse list management. When running NetBIOS over TCP/IP, this uses UDP based messaging.
UDP messages can be broadcast or unicast.
</para>
@@ -164,7 +165,7 @@ implements browse list collation using unicast UDP.
</para>
<para>
-Secondly, in those networks where Samba is the only SMB server technology
+Secondly, in those networks where Samba is the only SMB server technology,
wherever possible <filename>nmbd</filename> 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
@@ -183,11 +184,11 @@ the use of the <command>remote announce</command> and the
As of Samba 3 WINS replication is being worked on. The bulk of the code has
been committed, but it still needs maturation. This is NOT a supported feature
of the Samba-3.0.0 release. Hopefully, this will become a supported feature
-of one of the samba-3 release series.
+of one of the Samba-3 release series.
</para>
<para>
-Right now samba WINS does not support MS-WINS replication. This means that
+Right now Samba WINS does not support MS-WINS replication. This means that
when setting up Samba as a WINS server there must only be one <filename>nmbd</filename>
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
@@ -260,7 +261,7 @@ force register with a Dynamic DNS server in Windows 200x / XP using:
<para>
With Active Directory (ADS), a correctly functioning DNS server is absolutely
-essential. In the absence of a working DNS server that has been correctly configured
+essential. In the absence of a working DNS server that has been correctly configured,
MS Windows clients and servers will be totally unable to locate each other,
consequently network services will be severely impaired.
</para>
@@ -323,7 +324,7 @@ The following are some of the default service records that Active Directory requ
<listitem><para>_ldap._tcp.<emphasis>Site</emphasis>.gc.ms-dcs.<emphasis>DomainTree</emphasis></para>
<para>
- Used by MS Windows clients to locate site configuration dependant
+ Used by MS Windows clients to locate site configuration dependent
Global Catalog server.
</para>
</listitem>
@@ -346,11 +347,11 @@ is enabled, or if DNS for NetBIOS name resolution is enabled, etc.
</para>
<para>
-In the case where there is no WINS server all name registrations as
+In the case where there is no WINS server, all name registrations as
well as name lookups are done by UDP broadcast. This isolates name
resolution to the local subnet, unless LMHOSTS is used to list all
names and IP addresses. In such situations Samba provides a means by
-which the samba server name may be forcibly injected into the browse
+which the Samba server name may be forcibly injected into the browse
list of a remote MS Windows network (using the
<command>remote announce</command> parameter).
</para>
@@ -389,7 +390,7 @@ inability to use the network services.
</para>
<para>
-Samba supports a feature that allows forced synchonisation
+Samba supports a feature that allows forced synchronisation
of browse lists across routed networks using the <command>remote
browse sync</command> parameter in the <filename>smb.conf</filename> file.
This causes Samba to contact the local master browser on a remote network and
@@ -418,7 +419,7 @@ 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
+subnet. It is the presence of a domain master browser that makes
cross subnet browsing possible for a workgroup.
</para>
@@ -426,7 +427,8 @@ cross subnet browsing possible for a workgroup.
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 :
+set the following option in the <parameter>[global]</parameter> section
+of the &smb.conf; file :
</para>
<para>
@@ -438,7 +440,7 @@ set the following option in the [global] section of the &smb.conf; file :
<para>
The domain master browser should also preferrably be the local master
browser for its own subnet. In order to achieve this set the following
-options in the [global] section of the &smb.conf; file :
+options in the <parameter>[global]</parameter> section of the &smb.conf; file :
</para>
<para>
@@ -462,7 +464,7 @@ workgroup. Any MS Windows NT/2K/XP/2003 machine should be
able to do this, as will Windows 9x 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
+set the following options in the <parameter>[global]</parameter> section of the
&smb.conf; file :
</para>
@@ -482,9 +484,9 @@ master browser.
</para>
<para>
-The <command>local master</command> parameter allows Samba to act as a
-local master browser. The <command>preferred master</command> causes nmbd
-to force a browser election on startup and the <command>os level</command>
+The <parameter>local master</parameter> parameter allows Samba to act as a
+local master browser. The <parameter>preferred master</parameter> causes nmbd
+to force a browser election on startup and the <parameter>os level</parameter>
parameter sets Samba high enough so that it should win any browser elections.
</para>
@@ -492,7 +494,7 @@ parameter sets Samba high enough so that it should win any browser elections.
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 <command>[global]</command> section of the
+options in the <parameter>[global]</parameter> section of the
&smb.conf; file :
</para>
@@ -513,8 +515,8 @@ options in the <command>[global]</command> section of the
<para>
If you are adding Samba servers to a Windows NT Domain then
you must not set up a Samba server as a domain master browser.
-By default, a Windows NT Primary Domain Controller for a Domain
-name is also the Domain master browser for that name, and many
+By default, a Windows NT Primary Domain Controller for a domain
+is also the Domain master browser for that domain, and many
things will break if a Samba server registers the Domain master
browser NetBIOS name (<replaceable>DOMAIN</replaceable>&lt;1B&gt;)
with WINS instead of the PDC.
@@ -539,11 +541,11 @@ of the &smb.conf; file :
<para>
If you wish to have a Samba server fight the election with machines
-on the same subnet you may set the <command>os level</command> parameter
+on the same subnet you may set the <parameter>os level</parameter> 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 <link linkend="browse-force-master">
-Forcing samba to be the master browser</link>
+Forcing Samba to be the master browser</link>
below.
</para>
@@ -552,7 +554,7 @@ 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 <command>[global]</command> section of the &smb.conf;
+in the <parameter>[global]</parameter> section of the &smb.conf;
file :
</para>
@@ -568,10 +570,10 @@ file :
</sect2>
<sect2 id="browse-force-master">
-<title>Forcing samba to be the master</title>
+<title>Forcing Samba to be the master</title>
<para>
-Who becomes the <command>master browser</command> is determined by an election
+Who becomes the <parameter>master browser</parameter> 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
@@ -579,44 +581,44 @@ elections to just about anyone else.
</para>
<para>
-If you want Samba to win elections then just set the <command>os level</command> global
+If you want Samba to win elections then just set the <parameter>os level</parameter> global
option in &smb.conf; to a higher number. It defaults to 0. Using 34
would make it win all elections over every other system (except other
samba systems!)
</para>
<para>
-A <command>os level</command> of 2 would make it beat WfWg and Win95, but not MS Windows
+A <parameter>os level</parameter> of 2 would make it beat WfWg and Win95, but not MS Windows
NT/2K Server. A MS Windows NT/2K Server domain controller uses level 32.
</para>
<para>The maximum os level is 255</para>
<para>
-If you want samba to force an election on startup, then set the
-<command>preferred master</command> global option in &smb.conf; to "yes". Samba will
+If you want Samba to force an election on startup, then set the
+<parameter>preferred master</parameter> global option in &smb.conf; to <constant>yes</constant>. 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 <command>preferred master</command> to
-"yes", then periodically and continually they will force an election
+care, as if you have two hosts (whether they are Windows 95 or NT or
+Samba) on the same local subnet both set with <parameter>preferred master</parameter> to
+<constant>yes</constant>, then periodically and continually they will force an election
in order to become the local master browser.
</para>
<para>
-If you want samba to be a <command>domain master browser</command>, then it is
-recommended that you also set <command>preferred master</command> to "yes", because
-samba will not become a domain master browser for the whole of your
+If you want Samba to be a <parameter>domain master browser</parameter>, then it is
+recommended that you also set <parameter>preferred master</parameter> to <constant>yes</constant>, because
+Samba will not become a domain master browser for the whole of your
LAN or WAN if it is not also a local master browser on its own
broadcast isolated subnet.
</para>
<para>
-It is possible to configure two samba servers to attempt to become
+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
+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
+will find that another Samba server is already the domain master
browser and will fail. This provides automatic redundancy, should
the current domain master browser fail.
</para>
@@ -624,36 +626,36 @@ the current domain master browser fail.
</sect2>
<sect2>
-<title>Making samba the domain master</title>
+<title>Making Samba the domain master</title>
<para>
The domain master is responsible for collating the browse lists of
multiple subnets so that browsing can occur between subnets. You can
-make samba act as the domain master by setting <command>domain master = yes</command>
+make Samba act as the domain master by setting <parameter>domain master = yes</parameter>
in &smb.conf;. By default it will not be a domain master.
</para>
<para>
-Note that you should NOT set Samba to be the domain master for a
+Note that you should <emphasis>not</emphasis> set Samba to be the domain master for a
workgroup that has the same name as an NT Domain.
</para>
<para>
-When samba is the domain master and the master browser it will listen
+When Samba is the domain master and the master browser, it will listen
for master announcements (made roughly every twelve minutes) from local
master browsers on other subnets and then contact them to synchronise
browse lists.
</para>
<para>
-If you want samba to be the domain master then I suggest you also set
-the <command>os level</command> high enough to make sure it wins elections, and set
-<command>preferred master</command> to "yes", to get samba to force an election on
+If you want Samba to be the domain master then I suggest you also set
+the <parameter>os level</parameter> high enough to make sure it wins elections, and set
+<parameter>preferred master</parameter> to <constant>yes</constant>, to get Samba to force an election on
startup.
</para>
<para>
-Note that all your servers (including samba) and clients should be
+Note that all your servers (including Samba) and clients should be
using a WINS server to resolve NetBIOS names. If your clients are only
using broadcasting to resolve NetBIOS names, then two things will occur:
</para>
@@ -676,15 +678,15 @@ using broadcasting to resolve NetBIOS names, then two things will occur:
</orderedlist>
<para>
-If, however, both samba and your clients are using a WINS server, then:
+If, however, both Samba and your clients are using a WINS server, then:
</para>
<orderedlist>
<listitem>
<para>
your local master browsers will contact the WINS server and, as long as
- samba has registered that it is a domain master browser with the WINS
- server, your local master browser will receive samba's ip address
+ Samba has registered that it is a domain master browser with the WINS
+ server, your local master browser will receive Samba's IP address
as its domain master browser.
</para>
</listitem>
@@ -723,16 +725,16 @@ option in &smb.conf; to configure them.
</para>
</sect2>
<sect2>
-<title>Use of the <command>Remote Announce</command> parameter</title>
+<title>Use of the Remote Announce parameter</title>
<para>
-The <command>remote announce</command> parameter of
+The <parameter>remote announce</parameter> parameter of
<filename>smb.conf</filename> can be used to forcibly ensure
that all the NetBIOS names on a network get announced to a remote network.
-The syntax of the <command>remote announce</command> parameter is:
+The syntax of the <parameter>remote announce</parameter> parameter is:
<programlisting>
remote announce = a.b.c.d [e.f.g.h] ...
</programlisting>
-_or_
+<emphasis>or</emphasis>
<programlisting>
remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...
</programlisting>
@@ -742,12 +744,12 @@ where:
<varlistentry><term><replaceable>a.b.c.d</replaceable> and
<replaceable>e.f.g.h</replaceable></term>
<listitem><para>is either the LMB (Local Master Browser) IP address
-or the broadcst address of the remote network.
+or the broadcast 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
+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>
@@ -769,18 +771,18 @@ name resolution problems and should be avoided.
</sect2>
<sect2>
-<title>Use of the <command>Remote Browse Sync</command> parameter</title>
+<title>Use of the Remote Browse Sync parameter</title>
<para>
-The <command>remote browse sync</command> parameter of
+The <parameter>remote browse sync</parameter> parameter of
<filename>smb.conf</filename> is used to announce to
-another LMB that it must synchronise it's NetBIOS name list with our
+another LMB that it must synchronise its 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.
+simultaneously the LMB on its network segment.
</para>
<para>
-The syntax of the <command>remote browse sync</command> parameter is:
+The syntax of the <parameter>remote browse sync</parameter> parameter is:
<programlisting>
remote browse sync = <replaceable>a.b.c.d</replaceable>
@@ -798,11 +800,11 @@ remote LMB or else is the network broadcast address of the remote segment.
<title>WINS - The Windows Internetworking Name Server</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
+Use of WINS (either Samba WINS <emphasis>or</emphasis> MS Windows NT Server WINS) is highly
+recommended. Every NetBIOS machine registers its name together with a
+name_type value for each of several types of service it has available.
+eg: It registers its name directly as a unique (the type 0x03) name.
+It also registers its 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>
@@ -821,7 +823,7 @@ 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
+information can only be provided via WINS <emphasis>or</emphasis> via statically configured
<filename>lmhosts</filename> files that must reside on all clients in the
absence of WINS.
</para>
@@ -848,18 +850,18 @@ errors.
<para>
To configure Samba as a WINS server just add
-<command>wins support = yes</command> to the <filename>smb.conf</filename>
+<parameter>wins support = yes</parameter> to the <filename>smb.conf</filename>
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.
+<parameter>wins server = a.b.c.d</parameter> to your &smb.conf; file <parameter>[globals]</parameter> section.
</para>
<important><para>
-Never use both <command>wins support = yes</command> together
-with <command>wins server = a.b.c.d</command>
+Never use both <parameter>wins support = yes</parameter> together
+with <parameter>wins server = a.b.c.d</parameter>
particularly not using it's own IP address.
Specifying both will cause &nmbd; to refuse to start!
</para></important>
@@ -871,7 +873,7 @@ Specifying both will cause &nmbd; to refuse to start!
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
+in the <parameter>[globals]</parameter> section add the line
</para>
<para>
@@ -888,13 +890,13 @@ least set the parameter to 'no' on all these machines.
</para>
<para>
-Machines with <command>wins support = yes</command> will keep a list of
+Machines with <parameter>wins support = yes</parameter> will keep a list of
all NetBIOS names registered with them, acting as a DNS for NetBIOS names.
</para>
<para>
-You should set up only ONE wins server. Do NOT set the
-<command>wins support = yes</command> option on more than one Samba
+You should set up only ONE WINS server. Do NOT set the
+<parameter>wins support = yes</parameter> option on more than one Samba
server.
</para>
@@ -903,22 +905,22 @@ 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
+refuses 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
-<command>wins support = yes</command> parameter set.
+<parameter>wins support = yes</parameter> parameter set.
</para>
<para>
After the WINS server has been configured you must ensure that all
machines participating on the network are configured with the address
of this WINS server. If your WINS server is a Samba machine, fill in
-the Samba machine IP address in the "Primary WINS Server" field of
-the "Control Panel->Network->Protocols->TCP->WINS Server" dialogs
+the Samba machine IP address in the <guilabel>Primary WINS Server</guilabel> field of
+the <guilabel>Control Panel->Network->Protocols->TCP->WINS Server</guilabel> 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
+of the WINS server add the following line to the <parameter>[global]</parameter> section of
all &smb.conf; files :
</para>
@@ -936,8 +938,8 @@ machine or its IP address.
<para>
Note that this line MUST NOT BE SET in the &smb.conf; file of the Samba
server acting as the WINS server itself. If you set both the
-<command>wins support = yes</command> option and the
-<command>wins server = &lt;name&gt;</command> option then
+<parameter>wins support = yes</parameter> option and the
+<parameter>wins server = &lt;name&gt;</parameter> option then
nmbd will fail to start.
</para>
@@ -966,14 +968,41 @@ section of the documentation to provide usage and technical details.
<title>Static WINS Entries</title>
<para>
-New to Samba-3 is a tool called <filename>winsedit</filename> that may be used to add
-static WINS entries to the WINS database. This tool can be used also to modify entries
-existing in the WINS database.
+Adding static entries to your Samba-3 WINS server is actually fairly easy.
+All you have to do is add a line to <filename>wins.dat</filename>, typically
+located in <filename class="directory">/usr/local/samba/var/locks</filename>.
</para>
<para>
-The development of the winsedit tool was made necessary due to the migration
-of the older style wins.dat file into a new tdb binary backend data store.
+Entries in <filename>wins.dat</filename> take the form of
+
+<programlisting>
+"NAME#TYPE" TTL ADDRESS+ FLAGS
+</programlisting>
+
+where NAME is the NetBIOS name, TYPE is the NetBIOS type, TTL is the
+time-to-live as an absolute time in seconds, ADDRESS+ is one or more
+addresses corresponding to the registration and FLAGS are the NetBIOS
+flags for the registration.
+</para>
+
+<para>
+A typical dynamic entry looks like:
+<programlisting>
+"MADMAN#03" 1055298378 192.168.1.2 66R
+</programlisting>
+
+To make it static, all that has to be done is set the TTL to 0:
+
+<programlisting>
+"MADMAN#03" 0 192.168.1.2 66R
+</programlisting>
+</para>
+
+<para>
+Though this method works with early Samba-3 versions, there's a
+possibility that it may change in future versions if WINS replication
+is added.
</para>
</sect2>
@@ -1002,7 +1031,7 @@ one protocol on an MS Windows machine.
<para>
Every NetBIOS machine takes 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
+of precedence 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>
@@ -1040,7 +1069,8 @@ The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!
<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:</para>
+are:
+</para>
<simplelist>
<member>WINS: the best tool!</member>
@@ -1049,26 +1079,28 @@ are:</para>
</simplelist>
<para>
-Alternative means of name resolution includes:</para>
+Alternative means of name resolution includes:
+</para>
<simplelist>
-<member>/etc/hosts: is static, hard to maintain, and lacks name_type info</member>
+<member><filename>/etc/hosts</filename>: 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>
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:
+resolution traffic. The <parameter>name resolve order</parameter> parameter is
+of great help here. The syntax of the <parameter>name resolve order</parameter>
+parameter is:
<programlisting>
name resolve order = wins lmhosts bcast host
</programlisting>
-_or_
+<emphasis>or</emphasis>
<programlisting>
name resolve order = wins lmhosts (eliminates bcast and host)
</programlisting>
The default is:
<programlisting>
-name resolve order = host lmhost wins bcast
+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
@@ -1082,7 +1114,7 @@ controlled by <filename>/etc/host.conf</filename>, <filename>/etc/nsswitch.conf<
<para>
SMB networking provides a mechanism by which clients can access a list
-of machines in a network, a so-called <command>browse list</command>. This list
+of machines in a network, a so-called <parameter>browse list</parameter>. 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
@@ -1093,7 +1125,7 @@ document.
<para>
MS Windows 2000 and later, as with Samba 3 and later, can be
-configured to not use NetBIOS over TCP/IP. When configured this way
+configured to not use NetBIOS over TCP/IP. When configured this way,
it is imperative that name resolution (using DNS/LDAP/ADS) be correctly
configured and operative. Browsing will NOT work if name resolution
from SMB machine names to IP addresses does not function correctly.
@@ -1107,7 +1139,7 @@ that can NOT be provided by any other means of name resolution.
</para>
<sect2>
-<title>Browsing support in samba</title>
+<title>Browsing support in Samba</title>
<para>
Samba facilitates browsing. The browsing is supported by &nmbd;
@@ -1121,7 +1153,7 @@ 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.
+both Samba and your clients use a WINS server.
</para>
<para>
@@ -1134,17 +1166,17 @@ that is providing this service.
<note><para>
Nmbd can be configured as a WINS server, but it is not
-necessary to specifically use samba as your WINS server. MS Windows
+necessary to specifically use Samba as your WINS server. MS Windows
NT4, Server or Advanced Server 2000 or 2003 can be configured as
-your WINS server. In a mixed NT/2000/2003 server and samba environment on
+your WINS server. In a mixed NT/2000/2003 server and Samba environment on
a Wide Area Network, it is recommended that you use the Microsoft
-WINS server capabilities. In a samba-only environment, it is
+WINS server capabilities. In a Samba-only environment, it is
recommended that you use one and only one Samba server as your WINS server.
</para></note>
<para>
To get browsing to work you need to run nmbd as usual, but will need
-to use the <command>workgroup</command> option in &smb.conf;
+to use the <parameter>workgroup</parameter> option in &smb.conf;
to control what workgroup Samba becomes a part of.
</para>
@@ -1152,7 +1184,7 @@ to control what workgroup Samba becomes a part of.
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 <command>remote announce</command> in the
+example. See <parameter>remote announce</parameter> in the
&smb.conf; man page.
</para>
</sect2>
@@ -1161,7 +1193,7 @@ example. See <command>remote announce</command> in the
<title>Problem resolution</title>
<para>
-If something doesn't work then hopefully the log.nmb file will help
+If something doesn't work then hopefully the log.nmbd 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 <filename>browse.dat</filename>.
@@ -1175,7 +1207,7 @@ hit enter and filemanager should display the list of available shares.
<para>
Some people find browsing fails because they don't have the global
-<command>guest account</command> set to a valid account. Remember that the
+<parameter>guest account</parameter> set to a valid account. Remember that the
IPC$ connection that lists the shares is done as guest, and thus you must
have a valid guest account.
</para>
@@ -1199,16 +1231,14 @@ in &smb.conf;)
<sect2>
<title>Browsing across subnets</title>
<para>
-Since the release of Samba 1.9.17(alpha1) 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.
+Since the release of Samba 1.9.17(alpha1), Samba has supported the
+replication of browse lists across subnet boundaries. This section
+describes how to set this feature up in different settings.
</para>
<para>
To see browse lists that span TCP/IP subnets (ie. networks separated
-by routers that don't pass broadcast traffic) you must set up at least
+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
@@ -1242,6 +1272,7 @@ Consider a network set up as follows :
</para>
<para>
+ <!-- FIXME: Convert this to diagram -->
<programlisting>
(DMB)
N1_A N1_B N1_C N1_D N1_E
@@ -1265,7 +1296,7 @@ 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
+same workgroup (for simplicity's 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
@@ -1312,15 +1343,20 @@ you looked in it on a particular network right now).
</para>
<para>
-<programlisting>
-Subnet Browse Master List
------- ------------- ----
-Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E
+<table frame="all">
+ <title>Browse subnet example 1</title>
+ <tgroup align="left" cols="3">
+ <thead>
+ <row><entry>Subnet</entry><entry>Browse Master</entry><entry>List</entry></row>
+ </thead>
-Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
-
-Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
-</programlisting>
+ <tbody>
+ <row><entry>Subnet1</entry><entry>N1_C</entry><entry>N1_A, N1_B, N1_C, N1_D, N1_E</entry></row>
+ <row><entry>Subnet2</entry><entry>N2_B</entry><entry>N2_A, N2_B, N2_C, N2_D</entry></row>
+ <row><entry>Subnet3</entry><entry>N3_D</entry><entry>N3_A, N3_B, N3_C, N3_D</entry></row>
+ </tbody>
+ </tgroup>
+</table>
</para>
<para>
@@ -1333,7 +1369,7 @@ 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&lt;1B&gt;. This name was registerd by the Domain master
+WORKGROUP&lt;1B&gt;. This name was registered by the Domain master
browser (N1_C) with the WINS server as soon as it was booted.
</para>
@@ -1350,19 +1386,22 @@ are done the browse lists look like :
</para>
<para>
-<programlisting>
-Subnet Browse Master List
------- ------------- ----
-Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
- N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+<table frame="all">
+ <title>Browse subnet example 2</title>
+ <tgroup align="left" cols="3">
+ <thead>
+ <row><entry>Subnet</entry><entry>Browse Master</entry><entry>List</entry></row>
+ </thead>
-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
+ <tbody>
+ <row><entry>Subnet1</entry><entry>N1_C</entry><entry>N1_A, N1_B, N1_C, N1_D, N1_E, N2_A(*), N2_B(*), N2_C(*), N2_D(*)</entry></row>
+ <row><entry>Subnet2</entry><entry>N2_B</entry><entry>N2_A, N2_B, N2_C, N2_D, N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)</entry></row>
+ <row><entry>Subnet3</entry><entry>N3_D</entry><entry>N3_A, N3_B, N3_C, N3_D</entry></row>
+ </tbody>
+ </tgroup>
+</table>
Servers with a (*) after them are non-authoritative names.
-</programlisting>
</para>
<para>
@@ -1381,55 +1420,54 @@ the browse lists look like.
</para>
<para>
-<programlisting>
-Subnet Browse Master List
------- ------------- ----
-Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
- N2_A(*), N2_B(*), N2_C(*), N2_D(*),
- N3_A(*), N3_B(*), N3_C(*), N3_D(*)
-
-Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
- N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+<table frame="all">
+ <title>Browse subnet example 3</title>
+ <tgroup cols="3" align="left">
+ <thead>
+ <row><entry>Subnet</entry><entry>Browse Master</entry><entry>List</entry></row>
+ </thead>
-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(*)
+ <tbody>
+ <row><entry>Subnet1</entry><entry>N1_C</entry><entry>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(*)</entry></row>
+ <row><entry>Subnet2</entry><entry>N2_B</entry><entry>N2_A, N2_B, N2_C, N2_D, N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)</entry></row>
+ <row><entry>Subnet3</entry><entry>N3_D</entry><entry>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(*)</entry></row>
+ </tbody>
+ </tgroup>
+</table>
Servers with a (*) after them are non-authoritative names.
-</programlisting>
</para>
<para>
At this point users looking in their network neighborhood on
-subnets 1 or 3 will see all the servers on all sunbets, users on
+subnets 1 or 3 will see all the servers on all subnets, users on
subnet 2 will still only see the servers on subnets 1 and 2, but not 3.
</para>
<para>
Finally, the local master browser for subnet 2 (N2_B) will sync again
-with the domain master browser (N1_C) and will recieve the missing
+with the domain master browser (N1_C) and will receive the missing
server entries. Finally - and as a steady state (if no machines
are removed or shut off) the browse lists will look like :
</para>
<para>
-<programlisting>
-Subnet Browse Master List
------- ------------- ----
-Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E,
- N2_A(*), N2_B(*), N2_C(*), N2_D(*),
- N3_A(*), N3_B(*), N3_C(*), N3_D(*)
-
-Subnet2 N2_B N2_A, N2_B, N2_C, N2_D
- N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
- N3_A(*), N3_B(*), N3_C(*), N3_D(*)
-
-Subnet3 N3_D N3_A, N3_B, N3_C, N3_D
- N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
- N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+<table frame="all">
+ <title>Browse subnet example 4</title>
+ <tgroup cols="3" align="left">
+ <thead>
+ <row><entry>Subnet</entry><entry>Browse Master</entry><entry>List</entry></row>
+ </thead>
+
+ <tbody>
+ <row><entry>Subnet1</entry><entry>N1_C</entry><entry>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(*)</entry></row>
+ <row><entry>Subnet2</entry><entry>N2_B</entry><entry>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(*)</entry></row>
+ <row><entry>Subnet3</entry><entry>N3_D</entry><entry>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(*)</entry></row>
+ </tbody>
+ </tgroup>
+</table>
Servers with a (*) after them are non-authoritative names.
-</programlisting>
</para>
<para>
@@ -1475,17 +1513,17 @@ If either router R1 or R2 fails the following will occur:
<title>Common Errors</title>
<para>
-Many questions are sked on the mailing lists regarding browsing. The majority of browsing
+Many questions are asked on the mailing lists regarding browsing. The majority of browsing
problems originate out of incorrect configuration of NetBIOS name resolution. Some are of
particular note.
</para>
<sect2>
-<title>How can one flush the Samba NetBIOS name cache without restarting samba?</title>
+<title>How can one flush the Samba NetBIOS name cache without restarting Samba?</title>
<para>
-Sambas' nmbd process controls all browse list handling. Under normal circumstances it is
-safe to restart nmbd. This will effectively flush the samba NetBIOS name cache and cause it
+Samba's nmbd process controls all browse list handling. Under normal circumstances it is
+safe to restart nmbd. This will effectively flush the Samba NetBIOS name cache and cause it
to be rebuilt. Note that this does NOT make certain that a rogue machine name will not re-appear
in the browse list. When nmbd is taken out of service another machine on the network will
become the browse master. This new list may still have the rogue entry in it. If you really
@@ -1496,5 +1534,19 @@ This may take a long time on some networks (months).
</para>
</sect2>
+
+<sect2>
+<title>My client reports "This server is not configured to list shared resources"</title>
+
+<para>
+Your guest account is probably invalid for some reason. Samba uses the
+guest account for browsing in smbd. Check that your guest account is
+valid.
+</para>
+
+<para>See also <parameter>guest account</parameter> in the &smb.conf; man page.</para>
+
+</sect2>
+
</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/Other-Clients.xml b/docs/docbook/projdoc/Other-Clients.xml
index b9f4cf3a93..d05c58c89d 100644
--- a/docs/docbook/projdoc/Other-Clients.xml
+++ b/docs/docbook/projdoc/Other-Clients.xml
@@ -14,7 +14,7 @@
<title>Macintosh clients?</title>
<para>
-Yes. <ulink url="http://www.thursby.com/">Thursby</ulink> now have a CIFS Client / Server called <ulink url="http://www.thursby.com/products/dave.html">DAVE</ulink>
+Yes. <ulink url="http://www.thursby.com/">Thursby</ulink> now has a CIFS Client / Server called <ulink url="http://www.thursby.com/products/dave.html">DAVE</ulink>
</para>
<para>
@@ -27,10 +27,10 @@ enhanced, and there are bug-fixes included).
<para>
Alternatives - There are two free implementations of AppleTalk for
-several kinds of UNIX machnes, and several more commercial ones.
+several kinds of UNIX machines, 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
+the Macintosh. The two free implementations are
<ulink url="http://www.umich.edu/~rsug/netatalk/">Netatalk</ulink>, and
<ulink url="http://www.cs.mu.oz.au/appletalk/atalk.html">CAP</ulink>.
What Samba offers MS
@@ -54,14 +54,11 @@ packages, Samba, and Linux (and other UNIX-based systems) see
<para>Basically, you need three components:</para>
- <itemizedlist>
- <listitem><para>The File and Print Client ('IBM Peer')
- </para></listitem>
- <listitem><para>TCP/IP ('Internet support')
- </para></listitem>
- <listitem><para>The "NetBIOS over TCP/IP" driver ('TCPBEUI')
- </para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>The File and Print Client ('IBM Peer')</member>
+ <member>TCP/IP ('Internet support') </member>
+ <member>The "NetBIOS over TCP/IP" driver ('TCPBEUI')</member>
+ </simplelist>
<para>Installing the first two together with the base operating
system on a blank system is explained in the Warp manual. If Warp
@@ -114,40 +111,26 @@ packages, Samba, and Linux (and other UNIX-based systems) see
</sect2>
<sect2>
- <title>Are there any other issues when OS/2 (any version)
- is used as a client?</title>
-
- <para>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 <ulink
- url="http://carol.wins.uva.nl/~leeuw/samba/fix.html">
- http://carol.wins.uva.nl/~leeuw/samba/fix.html</ulink>.
- 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. </para>
- </sect2>
-
- <sect2>
<title>How do I get printer driver download working
for OS/2 clients?</title>
- <para>First, create a share called [PRINTDRV] that is
+ <para>First, create a share called <parameter>[PRINTDRV]</parameter> 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.</para>
<para>Install the NT driver first for that printer. Then,
- add to your smb.conf a parameter, os2 driver map =
- <replaceable>filename</replaceable>". Then, in the file
+ add to your &smb.conf; a parameter, <parameter>os2 driver map =
+ <replaceable>filename</replaceable></parameter>. Then, in the file
specified by <replaceable>filename</replaceable>, map the
name of the NT driver name to the OS/2 driver name as
follows:</para>
- <para><command>nt driver name = os2 "driver
- name"."device name"</command>, e.g.:
- HP LaserJet 5L = LASERJET.HP LaserJet 5L</para>
+ <para><parameter><replaceable>nt driver name</replaceable> = <replaceable>os2 driver name</replaceable>.<replaceable>device name</replaceable></parameter>, e.g.:</para>
+
+ <para><parameter>
+ HP LaserJet 5L = LASERJET.HP LaserJet 5L</parameter></para>
<para>You can have multiple drivers mapped in this file.</para>
@@ -167,8 +150,8 @@ packages, Samba, and Linux (and other UNIX-based systems) see
<sect2>
<title>Use latest TCP/IP stack from Microsoft</title>
-<para>Use the latest TCP/IP stack from microsoft if you use Windows
-for workgroups.
+<para>Use the latest TCP/IP stack from Microsoft if you use Windows
+for Workgroups.
</para>
<para>The early TCP/IP stacks had lots of bugs.</para>
@@ -176,10 +159,16 @@ for workgroups.
<para>
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.
+ftp.microsoft.com, located in <filename>/peropsys/windows/public/tcpip/wfwt32.exe</filename>.
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.
+fixed. New files include <filename>WINSOCK.DLL</filename>,
+<filename>TELNET.EXE</filename>,
+<filename>WSOCK.386</filename>,
+<filename>VNBT.386</filename>,
+<filename>WSTCP.386</filename>,
+<filename>TRACERT.EXE</filename>,
+<filename>NETSTAT.EXE</filename>, and
+<filename>NBTSTAT.EXE</filename>.
</para>
</sect2>
@@ -210,10 +199,11 @@ Often WfWg will totally ignore a password you give it in a dialog box.
<para>
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 <command>security = user</command>
+type <userinput>EXPAND A:\ADMINCFG.EX_ C:\WINDOWS\ADMINCFG.EXE</userinput>.
+Then add an icon
+for it via the <application>Program Manager</application> <guimenu>New</guimenu> Menu.
+This program allows you to control how WFW handles passwords. ie disable Password Caching etc
+for use with <parameter>security = user</parameter>
</para>
</sect2>
@@ -221,7 +211,7 @@ for use with <command>security = user</command>
<sect2>
<title>Case handling of passwords</title>
-<para>Windows for Workgroups uppercases the password before sending it to the server. Unix passwords can be case-sensitive though. Check the <ulink url="smb.conf.5.html">smb.conf(5)</ulink> information on <command>password level</command> to specify what characters samba should try to uppercase when checking.</para>
+<para>Windows for Workgroups uppercases the password before sending it to the server. Unix passwords can be case-sensitive though. Check the <ulink url="smb.conf.5.html">smb.conf(5)</ulink> information on <parameter>password level</parameter> to specify what characters samba should try to uppercase when checking.</para>
</sect2>
@@ -230,7 +220,7 @@ for use with <command>security = user</command>
<para>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
+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.</para>
@@ -240,15 +230,16 @@ It is presumably a WfWg bug.</para>
<title>Speed improvement</title>
<para>
-Note that some people have found that setting DefaultRcvWindow in
-the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a
+Note that some people have found that setting <parameter>DefaultRcvWindow</parameter> in
+the <parameter>[MSTCP]</parameter> section of the
+<filename>SYSTEM.INI</filename> file under WfWg to 3072 gives a
big improvement. I don't know why.
</para>
<para>
-My own experience wth DefaultRcvWindow is that I get much better
+My own experience with 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
+reported that anything over 3072 slows things down enormously. One
person even reported a speed drop of a factor of 30 when he went from
3072 to 8192. I don't know why.
</para>
@@ -270,18 +261,19 @@ Microsoft Web site for all currently available updates to your specific version
of Windows 95.
</para>
-<orderedlist>
-<listitem><para>Kernel Update: KRNLUPD.EXE</para></listitem>
-<listitem><para>Ping Fix: PINGUPD.EXE</para></listitem>
-<listitem><para>RPC Update: RPCRTUPD.EXE</para></listitem>
-<listitem><para>TCP/IP Update: VIPUPD.EXE</para></listitem>
-<listitem><para>Redirector Update: VRDRUPD.EXE</para></listitem>
-</orderedlist>
+<simplelist>
+<member>Kernel Update: KRNLUPD.EXE</member>
+<member>Ping Fix: PINGUPD.EXE</member>
+<member>RPC Update: RPCRTUPD.EXE</member>
+<member>TCP/IP Update: VIPUPD.EXE</member>
+<member>Redirector Update: VRDRUPD.EXE</member>
+</simplelist>
<para>
-Also, if using MS OutLook it is desirable to install the OLEUPD.EXE fix. This
+Also, if using <application>MS Outlook</application> it is desirable to
+install the <command>OLEUPD.EXE</command> 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
+Outlook and you may also notice a significant speedup when accessing network
neighborhood services.
</para>
@@ -290,7 +282,7 @@ neighborhood services.
<para>
Configure the win95 TCPIP registry settings to give better
-performance. I use a program called MTUSPEED.exe which I got off the
+performance. I use a program called <command>MTUSPEED.exe</command> which I got off the
net. There are various other utilities of this type freely available.
</para>
@@ -312,7 +304,7 @@ likely occur if it is not.
<para>
In order to serve profiles successfully to Windows 2000 SP2
clients (when not operating as a PDC), Samba must have
-<command>nt acl support = no</command>
+<parameter>nt acl support = no</parameter>
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
@@ -320,7 +312,7 @@ Denied) and create multiple copies of it on disk (DOMAIN.user.001,
DOMAIN.user.002, etc...). See the
<ulink url="smb.conf.5.html">smb.conf(5)</ulink> man page
for more details on this option. Also note that the
-<command>nt acl support</command> parameter was formally a global parameter in
+<parameter>nt acl support</parameter> parameter was formally a global parameter in
releases prior to Samba 2.2.2.
</para>
@@ -343,17 +335,17 @@ 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.
+for the <errorname>access denied</errorname> message.
</para>
<para>
-By disabling the <command>nt acl support</command> parameter, Samba will send
+By disabling the <parameter>nt acl support</parameter> 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
</para>
-<para><command>DOMAIN\user "Full Control"</command></para>
+<para><emphasis>DOMAIN\user "Full Control"</emphasis>></para>
<note><para>This bug does not occur when using winbind to
create accounts on the Samba host for Domain users.</para></note>
diff --git a/docs/docbook/projdoc/PAM-Authentication-And-Samba.xml b/docs/docbook/projdoc/PAM-Authentication-And-Samba.xml
index 4b5179acc7..660efdd295 100644
--- a/docs/docbook/projdoc/PAM-Authentication-And-Samba.xml
+++ b/docs/docbook/projdoc/PAM-Authentication-And-Samba.xml
@@ -1,46 +1,462 @@
<chapter id="pam">
<chapterinfo>
&author.jht;
- <pubdate> (Jun 21 2001) </pubdate>
+ <author>
+ <firstname>Stephen</firstname><surname>Langasek</surname>
+ <affiliation>
+ <address><email>vorlon@netexpress.net</email></address>
+ </affiliation>
+ </author>
+ <pubdate>May 31, 2003</pubdate>
</chapterinfo>
-<title>PAM Configuration for Centrally Managed Authentication</title>
+<title>PAM based Distributed Authentication</title>
+
+<para>
+This chapter you should help you to deploy winbind based authentication on any PAM enabled
+Unix/Linux system. Winbind can be used to enable user level application access authentication
+from any MS Windows NT Domain, MS Windows 200x Active Directory based domain, or any Samba
+based domain environment. It will also help you to configure PAM based local host access
+controls that are appropriate to your Samba configuration.
+</para>
+
+<para>
+In addition to knowing how to configure winbind into PAM, you will learn generic PAM management
+possibilities and in particular how to deploy tools like pam_smbpass.so to your advantage.
+</para>
+
+<note><para>
+The use of Winbind require more than PAM configuration alone. Please refer to <link linkend="winbind">the Winbind chapter</link>.
+</para></note>
<sect1>
-<title>Samba and PAM</title>
-
-<para>
-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 (<filename>/etc/passwd</filename>)
-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: <command>login</command>,
+<title>Features and Benefits</title>
+
+<para>
+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 (<filename>/etc/passwd</filename>)
+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: <command>login</command>,
<command>passwd</command>, <command>chown</command>, etc.
</para>
<para>
-PAM provides a mechanism that disconnects these security programs
-from the underlying authentication/authorization infrastructure.
-PAM is configured either through one file <filename>/etc/pam.conf</filename> (Solaris),
-or by editing individual files that are located in <filename>/etc/pam.d</filename>.
+PAM provides a mechanism that disconnects these security programs from the underlying
+authentication/authorization infrastructure. PAM is configured either through one file
+<filename>/etc/pam.conf</filename> (Solaris), or by editing individual files that are
+located in <filename>/etc/pam.d</filename>.
</para>
-<note>
- <para>
- If the PAM authentication module (loadable link library file) is located in the
- default location then it is not necessary to specify the path. In the case of
- Linux, the default location is <filename>/lib/security</filename>. If the module
- is located outside the default then the path must be specified as:
-
- <programlisting>
- auth required /other_path/pam_strange_module.so
- </programlisting>
- </para>
-</note>
+<para>
+On PAM enabled Unix/Linux systems it is an easy matter to configure the system to use any
+authentication backend, so long as the appropriate dynamically loadable library modules
+are available for it. The backend may be local to the system, or may be centralised on a
+remote server.
+</para>
+
+<para>
+PAM support modules are available for:
+</para>
+
+<variablelist>
+ <varlistentry><term><filename>/etc/passwd</filename></term><listitem><para>-</para>
+ <para>
+ There are several PAM modules that interact with this standard Unix user
+ database. The most common are called: pam_unix.so, pam_unix2.so, pam_pwdb.so
+ and pam_userdb.so.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>Kerberos</term><listitem><para>-</para>
+ <para>
+ The pam_krb5.so module allows the use of any Kerberos compliant server.
+ This tool is used to access MIT Kerberos, Heimdal Kerberos, and potentially
+ Microsoft Active Directory (if enabled).
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>LDAP</term><listitem><para>-</para>
+ <para>
+ The pam_ldap.so module allows the use of any LDAP v2 or v3 compatible backend
+ server. Commonly used LDAP backend servers include: OpenLDAP v2.0 and v2.1,
+ Sun ONE iDentity server, Novell eDirectory server, Microsoft Active Directory.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>NetWare Bindery</term><listitem><para>-</para>
+ <para>
+ The pam_ncp_auth.so module allows authentication off any bindery enabled
+ NetWare Core Protocol based server.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>SMB Password</term><listitem><para>-</para>
+ <para>
+ This module, called pam_smbpass.so, will allow user authentication off
+ the passdb backend that is configured in the Samba &smb.conf; file.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>SMB Server</term><listitem><para>-</para>
+ <para>
+ The pam_smb_auth.so module is the original MS Windows networking authentication
+ tool. This module has been somewhat outdated by the Winbind module.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>Winbind</term><listitem><para>-</para>
+ <para>
+ The pam_winbind.so module allows Samba to obtain authentication from any
+ MS Windows Domain Controller. It can just as easily be used to authenticate
+ users for access to any PAM enabled application.
+ </para>
+ </listitem></varlistentry>
+
+ <varlistentry><term>RADIUS</term><listitem><para>-</para>
+ <para>
+ There is a PAM RADIUS (Remote Access Dial-In User Service) authentication
+ module. In most cases the administrator will need to locate the source code
+ for this tool and compile and install it themselves. RADIUS protocols are
+ used by many routers and terminal servers.
+ </para>
+ </listitem></varlistentry>
+</variablelist>
+
+<para>
+Of the above, Samba provides the pam_smbpasswd.so and the pam_winbind.so modules alone.
+</para>
+
+<para>
+Once configured, these permit a remarkable level of flexibility in the location and use
+of distributed samba domain controllers that can provide wide are network bandwidth
+efficient authentication services for PAM capable systems. In effect, this allows the
+deployment of centrally managed and maintained distributed authentication from a single
+user account database.
+</para>
+
+</sect1>
+
+<sect1>
+<title>Technical Discussion</title>
+
+<para>
+PAM is designed to provide the system administrator with a great deal of flexibility in
+configuration of the privilege granting applications of their system. The local
+configuration of system security controlled by PAM is contained in one of two places:
+either the single system file, /etc/pam.conf; or the /etc/pam.d/ directory.
+</para>
+
+<sect2>
+<title>PAM Configuration Syntax</title>
+
+<para>
+In this section we discuss the correct syntax of and generic options respected by entries to these files.
+PAM specific tokens in the configuration file are case insensitive. The module paths, however, are case
+sensitive since they indicate a file's name and reflect the case dependence of typical file-systems.
+The case-sensitivity of the arguments to any given module is defined for each module in turn.
+</para>
+
+<para>
+In addition to the lines described below, there are two special characters provided for the convenience
+of the system administrator: comments are preceded by a `#' and extend to the next end-of-line; also,
+module specification lines may be extended with a `\' escaped newline.
+</para>
+
+<para>
+If the PAM authentication module (loadable link library file) is located in the
+default location then it is not necessary to specify the path. In the case of
+Linux, the default location is <filename>/lib/security</filename>. If the module
+is located outside the default then the path must be specified as:
+</para>
+
+<para>
+<screen>
+auth required /other_path/pam_strange_module.so
+</screen>
+</para>
+
+<sect3>
+<title>Anatomy of <filename>/etc/pam.d</filename> Entries</title>
+
+<para>
+The remaining information in this subsection was taken from the documentation of the Linux-PAM
+project. For more information on PAM, see
+<ulink url="http://ftp.kernel.org/pub/linux/libs/pam/">
+http://ftp.kernel.org/pub/linux/libs/pam</ulink> The Official Linux-PAM home page.
+</para>
+
+<para>
+A general configuration line of the /etc/pam.conf file has the following form:
+</para>
+
+<para>
+<screen>
+service-name module-type control-flag module-path args
+</screen>
+</para>
+
+<para>
+Below, we explain the meaning of each of these tokens. The second (and more recently adopted)
+way of configuring Linux-PAM is via the contents of the <filename>/etc/pam.d/</filename> directory.
+Once we have explained the meaning of the above tokens, we will describe this method.
+</para>
+
+<variablelist>
+ <varlistentry><term>service-name</term><listitem><para>-</para>
+ <para>
+ The name of the service associated with this entry. Frequently the service name is the conventional
+ name of the given application. For example, `ftpd', `rlogind' and `su', etc. .
+ </para>
+
+ <para>
+ There is a special service-name, reserved for defining a default authentication mechanism. It has
+ the name `OTHER' and may be specified in either lower or upper case characters. Note, when there
+ is a module specified for a named service, the `OTHER' entries are ignored.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>module-type</term><listitem><para>-</para>
+ <para>
+ One of (currently) four types of module. The four types are as follows:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>auth:</emphasis> this module type provides two aspects of authenticating the user.
+ Firstly, it establishes that the user is who they claim to be, by instructing the application
+ to prompt the user for a password or other means of identification. Secondly, the module can
+ grant group membership (independently of the <filename>/etc/groups</filename> file discussed
+ above) or other privileges through its credential granting properties.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>account:</emphasis> this module performs non-authentication based account management.
+ It is typically used to restrict/permit access to a service based on the time of day, currently
+ available system resources (maximum number of users) or perhaps the location of the applicant
+ user `root' login only on the console.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>session:</emphasis> primarily, this module is associated with doing things that need
+ to be done for the user before/after they can be given service. Such things include the logging
+ of information concerning the opening/closing of some data exchange with a user, mounting
+ directories, etc.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>password:</emphasis> this last module type is required for updating the authentication
+ token associated with the user. Typically, there is one module for each `challenge/response'
+ based authentication (auth) module-type.
+ </para></listitem>
+ </itemizedlist></listitem>
+ </varlistentry>
+
+ <varlistentry><term>control-flag</term><listitem><para>-</para>
+ <para>
+ The control-flag is used to indicate how the PAM library will react to the success or failure of the
+ module it is associated with. Since modules can be stacked (modules of the same type execute in series,
+ one after another), the control-flags determine the relative importance of each module. The application
+ is not made aware of the individual success or failure of modules listed in the
+ <filename>/etc/pam.conf</filename> file. Instead, it receives a summary success or fail response from
+ the Linux-PAM library. The order of execution of these modules is that of the entries in the
+ <filename>/etc/pam.conf</filename> file; earlier entries are executed before later ones.
+ As of Linux-PAM v0.60, this control-flag can be defined with one of two syntaxes.
+ </para>
+
+ <para>
+ The simpler (and historical) syntax for the control-flag is a single keyword defined to indicate the
+ severity of concern associated with the success or failure of a specific module. There are four such
+ <emphasis>keywords: required, requisite, sufficient and optional</emphasis>.
+ </para>
+
+ <para>
+ The Linux-PAM library interprets these keywords in the following manner:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>required:</emphasis> this indicates that the success of the module is required for the
+ module-type facility to succeed. Failure of this module will not be apparent to the user until all
+ of the remaining modules (of the same module-type) have been executed.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>requisite:</emphasis> like required, however, in the case that such a module returns a
+ failure, control is directly returned to the application. The return value is that associated with
+ the first required or requisite module to fail. Note, this flag can be used to protect against the
+ possibility of a user getting the opportunity to enter a password over an unsafe medium. It is
+ conceivable that such behavior might inform an attacker of valid accounts on a system. This
+ possibility should be weighed against the not insignificant concerns of exposing a sensitive
+ password in a hostile environment.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>sufficient:</emphasis> the success of this module is deemed `sufficient' to satisfy
+ the Linux-PAM library that this module-type has succeeded in its purpose. In the event that no
+ previous required module has failed, no more `stacked' modules of this type are invoked. (Note,
+ in this case subsequent required modules are not invoked.). A failure of this module is not deemed
+ as fatal to satisfying the application that this module-type has succeeded.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>optional:</emphasis> as its name suggests, this control-flag marks the module as not
+ being critical to the success or failure of the user's application for service. In general,
+ Linux-PAM ignores such a module when determining if the module stack will succeed or fail.
+ However, in the absence of any definite successes or failures of previous or subsequent stacked
+ modules this module will determine the nature of the response to the application. One example of
+ this latter case, is when the other modules return something like PAM_IGNORE.
+ </para></listitem>
+ </itemizedlist>
+
+ <para>
+ The more elaborate (newer) syntax is much more specific and gives the administrator a great deal of control
+ over how the user is authenticated. This form of the control flag is delimited with square brackets and
+ consists of a series of value=action tokens:
+ </para>
+
+ <para><screen>
+ [value1=action1 value2=action2 ...]
+ </screen></para>
+
+ <para>
+ Here, value1 is one of the following return values: success; open_err; symbol_err; service_err;
+ system_err; buf_err; perm_denied; auth_err; cred_insufficient; authinfo_unavail; user_unknown; maxtries;
+ new_authtok_reqd; acct_expired; session_err; cred_unavail; cred_expired; cred_err; no_module_data; conv_err;
+ authtok_err; authtok_recover_err; authtok_lock_busy; authtok_disable_aging; try_again; ignore; abort;
+ authtok_expired; module_unknown; bad_item; and default. The last of these (default) can be used to set
+ the action for those return values that are not explicitly defined.
+ </para>
+
+ <para>
+ The action1 can be a positive integer or one of the following tokens: ignore; ok; done; bad; die; and reset.
+ A positive integer, J, when specified as the action, can be used to indicate that the next J modules of the
+ current module-type will be skipped. In this way, the administrator can develop a moderately sophisticated
+ stack of modules with a number of different paths of execution. Which path is taken can be determined by the
+ reactions of individual modules.
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>ignore:</emphasis> when used with a stack of modules, the module's return status will not
+ contribute to the return code the application obtains.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>bad:</emphasis> this action indicates that the return code should be thought of as indicative
+ of the module failing. If this module is the first in the stack to fail, its status value will be used
+ for that of the whole stack.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>die:</emphasis> equivalent to bad with the side effect of terminating the module stack and
+ PAM immediately returning to the application.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>ok:</emphasis> this tells PAM that the administrator thinks this return code should
+ contribute directly to the return code of the full stack of modules. In other words, if the former
+ state of the stack would lead to a return of PAM_SUCCESS, the module's return code will override
+ this value. Note, if the former state of the stack holds some value that is indicative of a modules
+ failure, this 'ok' value will not be used to override that value.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>done:</emphasis> equivalent to ok with the side effect of terminating the module stack and
+ PAM immediately returning to the application.
+ </para></listitem>
+
+ <listitem><para>
+ <emphasis>reset:</emphasis> clear all memory of the state of the module stack and start again with
+ the next stacked module.
+ </para></listitem>
+ </itemizedlist>
+
+ <para>
+ Each of the four keywords: required; requisite; sufficient; and optional, have an equivalent expression in
+ terms of the [...] syntax. They are as follows:
+ </para>
+
+ <para>
+ <itemizedlist>
+ <listitem><para>
+ required is equivalent to [success=ok new_authtok_reqd=ok ignore=ignore default=bad]
+ </para></listitem>
+
+ <listitem><para>
+ requisite is equivalent to [success=ok new_authtok_reqd=ok ignore=ignore default=die]
+ </para></listitem>
+
+ <listitem><para>
+ sufficient is equivalent to [success=done new_authtok_reqd=done default=ignore]
+ </para></listitem>
+
+ <listitem><para>
+ optional is equivalent to [success=ok new_authtok_reqd=ok default=ignore]
+ </para></listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ Just to get a feel for the power of this new syntax, here is a taste of what you can do with it. With Linux-PAM-0.63,
+ the notion of client plug-in agents was introduced. This is something that makes it possible for PAM to support
+ machine-machine authentication using the transport protocol inherent to the client/server application. With the
+ <emphasis>[ ... value=action ... ]</emphasis> control syntax, it is possible for an application to be configured
+ to support binary prompts with compliant clients, but to gracefully fall over into an alternative authentication
+ mode for older, legacy, applications.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>module-path</term><listitem><para>-</para>
+ <para>
+ The path-name of the dynamically loadable object file; the pluggable module itself. If the first character of the
+ module path is `/', it is assumed to be a complete path. If this is not the case, the given module path is appended
+ to the default module path: <filename>/lib/security</filename> (but see the notes above).
+ </para>
+
+ <para>
+ The args are a list of tokens that are passed to the module when it is invoked. Much like arguments to a typical
+ Linux shell command. Generally, valid arguments are optional and are specific to any given module. Invalid arguments
+ are ignored by a module, however, when encountering an invalid argument, the module is required to write an error
+ to syslog(3). For a list of generic options see the next section.
+ </para>
+
+ <para>
+ Note, if you wish to include spaces in an argument, you should surround that argument with square brackets. For example:
+ </para>
+
+<para><screen>
+squid auth required pam_mysql.so user=passwd_query passwd=mada \
+ db=eminence [query=select user_name from internet_service where \
+ user_name='%u' and password=PASSWORD('%p') and \
+ service='web_proxy']
+</screen></para>
+
+ <para>
+ Note, when using this convention, you can include `[' characters inside the string, and if you wish to include a `]'
+ character inside the string that will survive the argument parsing, you should use `\['. In other words:
+ </para>
+
+<para><screen>
+[..[..\]..] --> ..[..]..
+</screen></para>
+
+ <para>
+ Any line in (one of) the configuration file(s), that is not formatted correctly, will generally tend (erring on the
+ side of caution) to make the authentication process fail. A corresponding error is written to the system log files
+ with a call to syslog(3).
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+
+</sect3>
+
+</sect2>
+
+<sect2>
+<title>Example System Configurations</title>
<para>
The following is an example <filename>/etc/pam.d/login</filename> configuration file.
@@ -50,43 +466,50 @@ of the login process. Essentially all conditions can be disabled
by commenting them out except the calls to <filename>pam_pwdb.so</filename>.
</para>
-<para><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
-</programlisting></para>
+<sect3>
+<title>PAM: original login config</title>
+
+<para><screen>
+#%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
+</screen></para>
+
+</sect3>
+
+<sect3>
+<title>PAM: login using pam_smbpass</title>
<para>
-PAM allows use of replacable modules. Those available on a
-sample system include:
+PAM allows use of replaceable modules. Those available on a sample system include:
</para>
<para><prompt>$</prompt><userinput>/bin/ls /lib/security</userinput>
-<programlisting>
- 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
-</programlisting></para>
+<screen>
+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
+</screen></para>
<para>
The following example for the login program replaces the use of
@@ -102,37 +525,37 @@ hashes. This database is stored in either
Samba implementation for your Unix/Linux system. The
<filename>pam_smbpass.so</filename> module is provided by
Samba version 2.2.1 or later. It can be compiled by specifying the
-<command>--with-pam_smbpass</command> options when running Samba's
-<filename>configure</filename> script. For more information
+<option>--with-pam_smbpass</option> options when running Samba's
+<command>configure</command> script. For more information
on the <filename>pam_smbpass</filename> module, see the documentation
in the <filename>source/pam_smbpass</filename> directory of the Samba
source distribution.
</para>
-<para><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
-</programlisting></para>
+<para><screen>
+#%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
+</screen></para>
<para>
The following is the PAM configuration file for a particular
Linux system. The default condition uses <filename>pam_pwdb.so</filename>.
</para>
-<para><programlisting>
- #%PAM-1.0
- # The PAM configuration file for the `samba' service
- #
- auth required pam_pwdb.so nullok nodelay shadow audit
- account required pam_pwdb.so audit nodelay
- session required pam_pwdb.so nodelay
- password required pam_pwdb.so shadow md5
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# The PAM configuration file for the `samba' service
+#
+auth required pam_pwdb.so nullok nodelay shadow audit
+account required pam_pwdb.so audit nodelay
+session required pam_pwdb.so nodelay
+password required pam_pwdb.so shadow md5
+</screen></para>
<para>
In the following example the decision has been made to use the
@@ -142,21 +565,21 @@ thus allow the smbpasswd passwords to be changed using the passwd
program.
</para>
-<para><programlisting>
- #%PAM-1.0
- # The PAM configuration file for the `samba' service
- #
- auth required pam_smbpass.so nodelay
- account required pam_pwdb.so audit nodelay
- session required pam_pwdb.so nodelay
- password required pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# The PAM configuration file for the `samba' service
+#
+auth required pam_smbpass.so nodelay
+account required pam_pwdb.so audit nodelay
+session required pam_pwdb.so nodelay
+password required pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf
+</screen></para>
<note><para>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
+capabilities of PAM in this environment. Some Linux implementations also
provide the <filename>pam_stack.so</filename> module that allows all
authentication to be configured in a single central file. The
<filename>pam_stack.so</filename> method has some very devoted followers
@@ -165,8 +588,12 @@ life though, every decision makes trade-offs, so you may want examine the
PAM documentation for further helpful information.
</para></note>
+</sect3>
+
+</sect2>
+
<sect2>
-<title>PAM Configuration in smb.conf</title>
+<title>smb.conf PAM Configuration</title>
<para>
There is an option in smb.conf called <ulink
@@ -175,8 +602,8 @@ The following is from the on-line help for this option in SWAT;
</para>
<para>
-When Samba is configured to enable PAM support (i.e.
-<constant>--with-pam</constant>), this parameter will
+When Samba-3 is configured to enable PAM support (i.e.
+<option>--with-pam</option>), 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
@@ -188,12 +615,53 @@ authentication mechanism needed in the presence of SMB
password encryption.
</para>
-<para>Default: <command>obey pam restrictions = no</command></para>
+<para>Default: <parameter>obey pam restrictions = no</parameter></para>
</sect2>
<sect2>
-<title>Password Synchronisation using pam_smbpass.so</title>
+<title>Remote CIFS Authentication using winbindd.so</title>
+
+<para>
+All operating systems depend on the provision of users credentials acceptable to the platform.
+Unix requires the provision of a user identifier (UID) as well as a group identifier (GID).
+These are both simple integer type numbers that are obtained from a password backend such
+as <filename>/etc/passwd</filename>.
+</para>
+
+<para>
+Users and groups on a Windows NT server are assigned a relative id (rid) which is unique for
+the domain when the user or group is created. To convert the Windows NT user or group into
+a unix user or group, a mapping between rids and unix user and group ids is required. This
+is one of the jobs that winbind performs.
+</para>
+
+<para>
+As winbind users and groups are resolved from a server, user and group ids are allocated
+from a specified range. This is done on a first come, first served basis, although all
+existing users and groups will be mapped as soon as a client performs a user or group
+enumeration command. The allocated unix ids are stored in a database file under the Samba
+lock directory and will be remembered.
+</para>
+
+<para>
+The astute administrator will realize from this that the combination of <filename>pam_smbpass.so</filename>,
+<command>winbindd</command>, and a distributed passdb backend, such as ldap, 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.
+</para>
+
+<warning><para>
+The rid to unix id database is the only location where the user and group mappings are
+stored by winbindd. If this file is deleted or corrupted, there is no way for winbindd
+to determine which user and group ids correspond to Windows NT user and group rids.
+</para></warning>
+
+</sect2>
+
+<sect2>
+<title>Password Synchronization using pam_smbpass.so</title>
<para>
pam_smbpass is a PAM module which can be used on conforming systems to
@@ -204,62 +672,48 @@ generic interface to authentication mechanisms.
</para>
<para>
-For more information on PAM, see http://ftp.kernel.org/pub/linux/libs/pam/
-</para>
-
-<para>
This module authenticates a local smbpasswd user database. If you require
support for authenticating against a remote SMB server, or if you're
concerned about the presence of suid root binaries on your system, it is
recommended that you use pam_winbind instead.
</para>
-<para><programlisting>
+<para>
Options recognized by this module are as follows:
+<table frame="all">
+ <title>Options recognized by pam_smbpass</title>
+ <tgroup cols="2" align="left">
+ <tbody>
+ <row><entry>debug</entry><entry>log more debugging info</entry></row>
+ <row><entry>audit</entry><entry>like debug, but also logs unknown usernames</entry></row>
+ <row><entry>use_first_pass</entry><entry>don't prompt the user for passwords; take them from PAM_ items instead</entry></row>
+ <row><entry>try_first_pass</entry><entry>try to get the password from a previous PAM module, fall back to prompting the user</entry></row>
+ <row><entry>use_authtok</entry><entry>like try_first_pass, but *fail* if the new PAM_AUTHTOK has not been previously set. (intended for stacking password modules only)</entry></row>
+ <row><entry>not_set_pass</entry><entry>don't make passwords used by this module available to other modules.</entry></row>
+ <row><entry>nodelay</entry><entry>don't insert ~1 second delays on authentication failure.</entry></row>
+ <row><entry>nullok</entry><entry>null passwords are allowed.</entry></row>
+ <row><entry>nonull</entry><entry>null passwords are not allowed. Used to override the Samba configuration.</entry></row>
+ <row><entry>migrate</entry><entry>only meaningful in an "auth" context; used to update smbpasswd file with a password used for successful authentication.</entry></row>
+ <row><entry>smbconf=<replaceable>file</replaceable></entry><entry>specify an alternate path to the &smb.conf; file.</entry></row>
+ </tbody>
+</tgroup>
+</table>
+</para>
- debug - log more debugging info
- audit - like debug, but also logs unknown usernames
- use_first_pass - don't prompt the user for passwords;
- take them from PAM_ items instead
- try_first_pass - try to get the password from a previous
- PAM module, fall back to prompting the user
- use_authtok - like try_first_pass, but *fail* if the new
- PAM_AUTHTOK has not been previously set.
- (intended for stacking password modules only)
- not_set_pass - don't make passwords used by this module
- available to other modules.
- nodelay - don't insert ~1 second delays on authentication
- failure.
- nullok - null passwords are allowed.
- nonull - null passwords are not allowed. Used to
- override the Samba configuration.
- migrate - only meaningful in an "auth" context;
- used to update smbpasswd file with a
- password used for successful authentication.
- smbconf=&lt; file &gt; - specify an alternate path to the smb.conf
- file.
-</programlisting></para>
-
-<para><programlisting>
+<para>
Thanks go to the following people:
+<simplelist>
+ <member><ulink url="mailto:morgan@transmeta.com">Andrew Morgan</ulink>, for providing the Linux-PAM
+ framework, without which none of this would have happened</member>
- * Andrew Morgan &lt; morgan@transmeta.com &gt;, for providing the Linux-PAM
- framework, without which none of this would have happened
-
- * Christian Gafton &lt; gafton@redhat.com &gt; and Andrew Morgan again, for the
- pam_pwdb module upon which pam_smbpass was originally based
+ <member><ulink url="gafton@redhat.com">Christian Gafton</ulink> and Andrew Morgan again, for the
+ pam_pwdb module upon which pam_smbpass was originally based</member>
- * Luke Leighton &lt; lkcl@switchboard.net &gt; for being receptive to the idea,
+ <member><ulink url="lkcl@switchboard.net">Luke Leighton</ulink> for being receptive to the idea,
and for the occasional good-natured complaint about the project's status
- that keep me working on it :)
-
- * and of course, all the other members of the Samba team
- &lt;http://www.samba.org/samba/team.html&gt;, for creating a great product
- and for giving this project a purpose
-
- ---------------------
- Stephen Langasek &lt; vorlon@netexpress.net &gt;
-</programlisting></para>
+ that keep me working on it :)</member>
+</simplelist>.
+</para>
<para>
The following are examples of the use of pam_smbpass.so in the format of Linux
@@ -268,7 +722,7 @@ tool on other platforms will need to adapt this appropriately.
</para>
<sect3>
-<title>Password Synchonisation Configuration</title>
+<title>Password Synchronisation Configuration</title>
<para>
A sample PAM configuration that shows the use of pam_smbpass to make
@@ -277,18 +731,18 @@ is changed. Useful when an expired password might be changed by an
application (such as ssh).
</para>
-<para><programlisting>
- #%PAM-1.0
- # password-sync
- #
- auth requisite pam_nologin.so
- auth required pam_unix.so
- account required pam_unix.so
- password requisite pam_cracklib.so retry=3
- password requisite pam_unix.so shadow md5 use_authtok try_first_pass
- password required pam_smbpass.so nullok use_authtok try_first_pass
- session required pam_unix.so
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# password-sync
+#
+auth requisite pam_nologin.so
+auth required pam_unix.so
+account required pam_unix.so
+password requisite pam_cracklib.so retry=3
+password requisite pam_unix.so shadow md5 use_authtok try_first_pass
+password required pam_smbpass.so nullok use_authtok try_first_pass
+session required pam_unix.so
+</screen></para>
</sect3>
<sect3>
@@ -302,20 +756,20 @@ password migration takes place when users ftp in, login using ssh, pop
their mail, etc.
</para>
-<para><programlisting>
- #%PAM-1.0
- # password-migration
- #
- auth requisite pam_nologin.so
- # pam_smbpass is called IFF pam_unix succeeds.
- auth requisite pam_unix.so
- auth optional pam_smbpass.so migrate
- account required pam_unix.so
- password requisite pam_cracklib.so retry=3
- password requisite pam_unix.so shadow md5 use_authtok try_first_pass
- password optional pam_smbpass.so nullok use_authtok try_first_pass
- session required pam_unix.so
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# password-migration
+#
+auth requisite pam_nologin.so
+# pam_smbpass is called IF pam_unix succeeds.
+auth requisite pam_unix.so
+auth optional pam_smbpass.so migrate
+account required pam_unix.so
+password requisite pam_cracklib.so retry=3
+password requisite pam_unix.so shadow md5 use_authtok try_first_pass
+password optional pam_smbpass.so nullok use_authtok try_first_pass
+session required pam_unix.so
+</screen></para>
</sect3>
<sect3>
@@ -327,18 +781,18 @@ private/smbpasswd is fully populated, and we consider it an error if
the smbpasswd doesn't exist or doesn't match the Unix password.
</para>
-<para><programlisting>
- #%PAM-1.0
- # password-mature
- #
- auth requisite pam_nologin.so
- auth required pam_unix.so
- account required pam_unix.so
- password requisite pam_cracklib.so retry=3
- password requisite pam_unix.so shadow md5 use_authtok try_first_pass
- password required pam_smbpass.so use_authtok use_first_pass
- session required pam_unix.so
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# password-mature
+#
+auth requisite pam_nologin.so
+auth required pam_unix.so
+account required pam_unix.so
+password requisite pam_cracklib.so retry=3
+password requisite pam_unix.so shadow md5 use_authtok try_first_pass
+password required pam_smbpass.so use_authtok use_first_pass
+session required pam_unix.so
+</screen></para>
</sect3>
<sect3>
@@ -350,40 +804,71 @@ pam_krb5. This could be useful on a Samba PDC that is also a member of
a Kerberos realm.
</para>
-<para><programlisting>
- #%PAM-1.0
- # kdc-pdc
- #
- auth requisite pam_nologin.so
- auth requisite pam_krb5.so
- auth optional pam_smbpass.so migrate
- account required pam_krb5.so
- password requisite pam_cracklib.so retry=3
- password optional pam_smbpass.so nullok use_authtok try_first_pass
- password required pam_krb5.so use_authtok try_first_pass
- session required pam_krb5.so
-</programlisting></para>
+<para><screen>
+#%PAM-1.0
+# kdc-pdc
+#
+auth requisite pam_nologin.so
+auth requisite pam_krb5.so
+auth optional pam_smbpass.so migrate
+account required pam_krb5.so
+password requisite pam_cracklib.so retry=3
+password optional pam_smbpass.so nullok use_authtok try_first_pass
+password required pam_krb5.so use_authtok try_first_pass
+session required pam_krb5.so
+</screen></para>
+
</sect3>
</sect2>
+
</sect1>
<sect1>
-<title>Distributed Authentication</title>
+<title>Common Errors</title>
<para>
-The astute administrator will realize from this that the
-combination of <filename>pam_smbpass.so</filename>,
-<command>winbindd</command>, and a distributed
-passdb backend, such as ldap, 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.
+PAM can be a very fickle and sensitive to configuration glitches. Here we look at a few cases from
+the Samba mailing list.
</para>
+ <sect2>
+ <title>pam_winbind problem</title>
+
+ <para>
+ I have the following PAM configuration:
+ </para>
+
+<para>
+<screen>
+auth required /lib/security/pam_securetty.so
+auth sufficient /lib/security/pam_winbind.so
+auth sufficient /lib/security/pam_unix.so use_first_pass nullok
+auth required /lib/security/pam_stack.so service=system-auth
+auth required /lib/security/pam_nologin.so
+account required /lib/security/pam_stack.so service=system-auth
+account required /lib/security/pam_winbind.so
+password required /lib/security/pam_stack.so service=system-auth
+</screen>
+</para>
+
+ <para>
+ When I open a new console with [ctrl][alt][F1], then I cant log in with my user "pitie".
+ I've tried with user "scienceu+pitie" also.
+ </para>
+
+ <para>
+ Answer: The problem may lie with your inclusion of <parameter>pam_stack.so
+ service=system-auth</parameter>. That file often contains a lot of stuff that may
+ duplicate what you're already doing. Try commenting out the pam_stack lines
+ for auth and account and see if things work. If they do, look at
+ <filename>/etc/pam.d/system-auth</filename> and copy only what you need from it into your
+ <filename>/etc/pam.d/login</filename> file. Alternatively, if you want all services to use
+ winbind, you can put the winbind-specific stuff in <filename>/etc/pam.d/system-auth</filename>.
+ </para>
+
+ </sect2>
+
</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/PolicyMgmt.xml b/docs/docbook/projdoc/PolicyMgmt.xml
index 2ae3fa5ea7..12289df7c3 100644
--- a/docs/docbook/projdoc/PolicyMgmt.xml
+++ b/docs/docbook/projdoc/PolicyMgmt.xml
@@ -3,8 +3,51 @@
&author.jht;
<pubdate>April 3 2003</pubdate>
</chapterinfo>
+
<title>System and Account Policies</title>
+<para>
+This chapter summarises the current state of knowledge derived from personal
+practice and knowledge from samba mailing list subscribers. Before reproduction
+of posted information effort has been made to validate the information provided.
+Where additional information was uncovered through this validation it is provided
+also.
+</para>
+
+<sect1>
+<title>Features and Benefits</title>
+
+<para>
+When MS Windows NT3.5 was introduced the hot new topic was the ability to implement
+Group Policies for users and group. Then along came MS Windows NT4 and a few sites
+started to adopt this capability. How do we know that? By way of the number of "booboos"
+(or mistakes) administrators made and then requested help to resolve.
+</para>
+
+<para>
+By the time that MS Windows 2000 and Active Directory was released, administrators
+got the message: Group Policies are a good thing! They can help reduce administrative
+costs and actually can help to create happier users. But adoption of the true
+potential of MS Windows 200x Active Directory and Group Policy Objects (GPOs) for users
+and machines were picked up on rather slowly. This was very obvious from the samba
+mailing list as in 2000 and 2001 there were very few postings regarding GPOs and
+how to replicate them in a Samba environment.
+</para>
+
+<para>
+Judging by the traffic volume since mid 2002, GPOs have become a standard part of
+the deployment in many sites. This chapter reviews techniques and methods that can
+be used to exploit opportunities for automation of control over user desktops and
+network client workstations.
+</para>
+
+<para>
+A tool new to Samba-3 may become an important part of the future Samba Administrators'
+arsenal. The <command>editreg</command> tool is described in this document.
+</para>
+
+</sect1>
+
<sect1>
<title>Creating and Managing System Policies</title>
@@ -21,7 +64,7 @@ affect users, groups of users, or machines.
For MS Windows 9x/Me this file must be called <filename>Config.POL</filename> and may
be generated using a tool called <filename>poledit.exe</filename>, better known as the
Policy Editor. The policy editor was provided on the Windows 98 installation CD, but
-dissappeared again with the introduction of MS Windows Me (Millenium Edition). From
+disappeared again with the introduction of MS Windows Me (Millennium Edition). From
comments from MS Windows network administrators it would appear that this tool became
a part of the MS Windows Me Resource Kit.
</para>
@@ -55,194 +98,193 @@ What follows is a very brief discussion with some helpful notes. The information
here is incomplete - you are warned.
</para>
-<sect2>
-<title>Windows 9x/Me Policies</title>
-
-<para>
-You need the Win98 Group Policy Editor to set Group Profiles up under Windows 9x/Me.
-It can be found on the Original full product Win98 installation CD under
-<filename>tools/reskit/netadmin/poledit</filename>. Install this using the
-Add/Remove Programs facility and then click on the 'Have Disk' tab.
-</para>
-
-<para>
-Use the Group Policy Editor to create a policy file that specifies the location of
-user profiles and/or the <filename>My Documents</filename> etc. stuff. Then
-save these settings in a file called <filename>Config.POL</filename> that needs to
-be placed in the root of the [NETLOGON] share. If Win98 is configured to log onto
-the Samba Domain, it will automatically read this file and update the Win9x/Me registry
-of the machine as it logs on.
-</para>
-
-<para>
-Further details are covered in the Win98 Resource Kit documentation.
-</para>
-
-<para>
-If you do not take the right steps, then every so often Win9x/Me will check the
-integrity of the registry and will restore it's settings from the back-up
-copy of the registry it stores on each Win9x/Me machine. Hence, you will
-occasionally notice things changing back to the original settings.
-</para>
+ <sect2>
+ <title>Windows 9x/Me Policies</title>
-<para>
-Install the group policy handler for Win9x to pick up group policies. Look on the
-Win98 CD in <filename>\tools\reskit\netadmin\poledit</filename>.
-Install group policies on a Win9x client by double-clicking
-<filename>grouppol.inf</filename>. Log off and on again a couple of times and see
-if Win98 picks up group policies. Unfortunately this needs to be done on every
-Win9x/Me machine that uses group policies.
-</para>
-
-</sect2>
-<sect2>
-<title>Windows NT4 Style Policy Files</title>
-
-<para>
-To create or edit <filename>ntconfig.pol</filename> you must use the NT Server
-Policy Editor, <command>poledit.exe</command> which is included with NT4 Server
-but <emphasis>not NT Workstation</emphasis>. There is a Policy Editor on a NT4
-Workstation but it is not suitable for creating <emphasis>Domain Policies</emphasis>.
-Further, although the Windows 95 Policy Editor can be installed on an NT4
-Workstation/Server, it will not work with NT clients. However, the files from
-the NT Server will run happily enough on an NT4 Workstation.
-</para>
-
-<para>
-You need <filename>poledit.exe, common.adm</filename> and <filename>winnt.adm</filename>.
-It is convenient to put the two *.adm files in the <filename>c:\winnt\inf</filename>
-directory which is where the binary will look for them unless told otherwise. Note also that that
-directory is normally 'hidden'.
-</para>
+ <para>
+ You need the Win98 Group Policy Editor to set Group Profiles up under Windows 9x/Me.
+ It can be found on the Original full product Win98 installation CD under
+ <filename>tools/reskit/netadmin/poledit</filename>. Install this using the
+ Add/Remove Programs facility and then click on the 'Have Disk' tab.
+ </para>
-<para>
-The Windows NT policy editor is also included with the Service Pack 3 (and
-later) for Windows NT 4.0. Extract the files using <command>servicepackname /x</command>,
-i.e. that's <command>Nt4sp6ai.exe /x</command> for service pack 6a. The policy editor,
-<command>poledit.exe</command> and the associated template files (*.adm) should
-be extracted as well. It is also possible to downloaded the policy template
-files for Office97 and get a copy of the policy editor. Another possible
-location is with the Zero Administration Kit available for download from Microsoft.
-</para>
+ <para>
+ Use the Group Policy Editor to create a policy file that specifies the location of
+ user profiles and/or the <filename>My Documents</filename> etc. Then save these
+ settings in a file called <filename>Config.POL</filename> that needs to be placed in the
+ root of the <parameter>[NETLOGON]</parameter> share. If Win98 is configured to log onto
+ the Samba Domain, it will automatically read this file and update the Win9x/Me registry
+ of the machine as it logs on.
+ </para>
-<sect3>
-<title>Registry Tattoos</title>
+ <para>
+ Further details are covered in the Win98 Resource Kit documentation.
+ </para>
<para>
- With NT4 style registry based policy changes, a large number of settings are not
- automatically reversed as the user logs off. Since the settings that were in the
- NTConfig.POL file were applied to the client machine registry and that apply to the
- hive key HKEY_LOCAL_MACHINE are permanent until explicitly reversed. This is known
- as tattooing. It can have serious consequences down-stream and the administrator must
- be extremely careful not to lock out the ability to manage the machine at a later date.
+ If you do not take the right steps, then every so often Win9x/Me will check the
+ integrity of the registry and will restore it's settings from the back-up
+ copy of the registry it stores on each Win9x/Me machine. Hence, you will
+ occasionally notice things changing back to the original settings.
</para>
+ <para>
+ Install the group policy handler for Win9x to pick up group policies. Look on the
+ Win98 CD in <filename>\tools\reskit\netadmin\poledit</filename>.
+ Install group policies on a Win9x client by double-clicking
+ <filename>grouppol.inf</filename>. Log off and on again a couple of times and see
+ if Win98 picks up group policies. Unfortunately this needs to be done on every
+ Win9x/Me machine that uses group policies.
+ </para>
-</sect3>
-</sect2>
-<sect2>
-<title>MS Windows 200x / XP Professional Policies</title>
+ </sect2>
+ <sect2>
+ <title>Windows NT4 Style Policy Files</title>
-<para>
-Windows NT4 System policies allows setting of registry parameters specific to
-users, groups and computers (client workstations) that are members of the NT4
-style domain. Such policy file will work with MS Windows 2000 / XP clients also.
-</para>
+ <para>
+ To create or edit <filename>ntconfig.pol</filename> you must use the NT Server
+ Policy Editor, <command>poledit.exe</command> which is included with NT4 Server
+ but <emphasis>not NT Workstation</emphasis>. There is a Policy Editor on a NT4
+ Workstation but it is not suitable for creating <emphasis>Domain Policies</emphasis>.
+ Further, although the Windows 95 Policy Editor can be installed on an NT4
+ Workstation/Server, it will not work with NT clients. However, the files from
+ the NT Server will run happily enough on an NT4 Workstation.
+ </para>
-<para>
-New to MS Windows 2000 Microsoft introduced a new style of group policy that confers
-a superset of capabilities compared with NT4 style policies. Obviously, the tool used
-to create them is different, and the mechanism for implementing them is much changed.
-</para>
+ <para>
+ You need <filename>poledit.exe</filename>, <filename>common.adm</filename> and <filename>winnt.adm</filename>.
+ It is convenient to put the two *.adm files in the <filename>c:\winnt\inf</filename>
+ directory which is where the binary will look for them unless told otherwise. Note also that that
+ directory is normally 'hidden'.
+ </para>
-<para>
-The older NT4 style registry based policies are known as <emphasis>Administrative Templates</emphasis>
-in MS Windows 2000/XP Group Policy Objects (GPOs). The later includes ability to set various security
-configurations, enforce Internet Explorer browser settings, change and redirect aspects of the
-users' desktop (including: the location of <emphasis>My Documents</emphasis> files (directory), as
-well as intrinsics of where menu items will appear in the Start menu). An additional new
-feature is the ability to make available particular software Windows applications to particular
-users and/or groups.
-</para>
+ <para>
+ The Windows NT policy editor is also included with the Service Pack 3 (and
+ later) for Windows NT 4.0. Extract the files using <command>servicepackname /x</command>,
+ i.e. that's <command>Nt4sp6ai.exe /x</command> for service pack 6a. The policy editor,
+ <command>poledit.exe</command> and the associated template files (*.adm) should
+ be extracted as well. It is also possible to downloaded the policy template
+ files for Office97 and get a copy of the policy editor. Another possible
+ location is with the Zero Administration Kit available for download from Microsoft.
+ </para>
-<para>
-Remember: NT4 policy files are named <filename>NTConfig.POL</filename> and are stored in the root
-of the NETLOGON share on the domain controllers. A Windows NT4 user enters a username, a password
-and selects the domain name to which the logon will attempt to take place. During the logon
-process the client machine reads the NTConfig.POL file from the NETLOGON share on the authenticating
-server, modifies the local registry values according to the settings in this file.
-</para>
+ <sect3>
+ <title>Registry Spoiling</title>
-<para>
-Windows 2K GPOs are very feature rich. They are NOT stored in the NETLOGON share, rather part of
-a Windows 200x policy file is stored in the Active Directory itself and the other part is stored
-in a shared (and replicated) volume called the SYSVOL folder. This folder is present on all Active
-Directory domain controllers. The part that is stored in the Active Directory itself is called the
-group policy container (GPC), and the part that is stored in the replicated share called SYSVOL is
-known as the group policy template (GPT).
-</para>
+ <para>
+ With NT4 style registry based policy changes, a large number of settings are not
+ automatically reversed as the user logs off. Since the settings that were in the
+ NTConfig.POL file were applied to the client machine registry and that apply to the
+ hive key HKEY_LOCAL_MACHINE are permanent until explicitly reversed. This is known
+ as tattooing. It can have serious consequences down-stream and the administrator must
+ be extremely careful not to lock out the ability to manage the machine at a later date.
+ </para>
-<para>
-With NT4 clients the policy file is read and executed upon only as each user logs onto the network.
-MS Windows 200x policies are much more complex - GPOs are processed and applied at client machine
-startup (machine specific part) and when the user logs onto the network the user specific part
-is applied. In MS Windows 200x style policy management each machine and/or user may be subject
-to any number of concurently applicable (and applied) policy sets (GPOs). Active Directory allows
-the administrator to also set filters over the policy settings. No such equivalent capability
-exists with NT4 style policy files.
-</para>
-<sect3>
-<title>Administration of Win2K / XP Policies</title>
+ </sect3>
+ </sect2>
+ <sect2>
+ <title>MS Windows 200x / XP Professional Policies</title>
-<title>Instructions</title>
-<para>
-Instead of using the tool called "The System Policy Editor", commonly called Poledit (from the
-executable name poledit.exe), GPOs are created and managed using a Microsoft Management Console
-(MMC) snap-in as follows:</para>
-<procedure>
-<step>
-<para>
-Go to the Windows 200x / XP menu <filename>Start->Programs->Administrative Tools</filename>
- and select the MMC snap-in called "Active Directory Users and Computers"
-</para>
-</step>
+ <para>
+ Windows NT4 System policies allows setting of registry parameters specific to
+ users, groups and computers (client workstations) that are members of the NT4
+ style domain. Such policy file will work with MS Windows 2000 / XP clients also.
+ </para>
-<step><para>
-Select the domain or organizational unit (OU) that you wish to manage, then right click
-to open the context menu for that object, select the properties item.
-</para></step>
+ <para>
+ New to MS Windows 2000 Microsoft introduced a new style of group policy that confers
+ a superset of capabilities compared with NT4 style policies. Obviously, the tool used
+ to create them is different, and the mechanism for implementing them is much changed.
+ </para>
-<step><para>
-Now left click on the Group Policy tab, then left click on the New tab. Type a name
-for the new policy you will create.
-</para></step>
+ <para>
+ The older NT4 style registry based policies are known as <emphasis>Administrative Templates</emphasis>
+ in MS Windows 2000/XP Group Policy Objects (GPOs). The later includes ability to set various security
+ configurations, enforce Internet Explorer browser settings, change and redirect aspects of the
+ users' desktop (including: the location of <filename>My Documents</filename> files (directory), as
+ well as intrinsics of where menu items will appear in the Start menu). An additional new
+ feature is the ability to make available particular software Windows applications to particular
+ users and/or groups.
+ </para>
-<step><para>
-Now left click on the Edit tab to commence the steps needed to create the GPO.
-</para></step>
-</procedure>
+ <para>
+ Remember: NT4 policy files are named <filename>NTConfig.POL</filename> and are stored in the root
+ of the NETLOGON share on the domain controllers. A Windows NT4 user enters a username, a password
+ and selects the domain name to which the logon will attempt to take place. During the logon
+ process the client machine reads the NTConfig.POL file from the NETLOGON share on the authenticating
+ server, modifies the local registry values according to the settings in this file.
+ </para>
-<para>
-All policy configuration options are controlled through the use of policy administrative
-templates. These files have a .adm extension, both in NT4 as well as in Windows 200x / XP.
-Beware however, since the .adm files are NOT interchangible across NT4 and Windows 200x.
-The later introduces many new features as well as extended definition capabilities. It is
-well beyond the scope of this documentation to explain how to program .adm files, for that
-the adminsitrator is referred to the Microsoft Windows Resource Kit for your particular
-version of MS Windows.
-</para>
+ <para>
+ Windows 2K GPOs are very feature rich. They are NOT stored in the NETLOGON share, rather part of
+ a Windows 200x policy file is stored in the Active Directory itself and the other part is stored
+ in a shared (and replicated) volume called the SYSVOL folder. This folder is present on all Active
+ Directory domain controllers. The part that is stored in the Active Directory itself is called the
+ group policy container (GPC), and the part that is stored in the replicated share called SYSVOL is
+ known as the group policy template (GPT).
+ </para>
-<note>
-<para>
-The MS Windows 2000 Resource Kit contains a tool called gpolmig.exe. This tool can be used
-to migrate an NT4 NTConfig.POL file into a Windows 200x style GPO. Be VERY careful how you
-use this powerful tool. Please refer to the resource kit manuals for specific usage information.
-</para>
-</note>
+ <para>
+ With NT4 clients the policy file is read and executed upon only as each user logs onto the network.
+ MS Windows 200x policies are much more complex - GPOs are processed and applied at client machine
+ startup (machine specific part) and when the user logs onto the network the user specific part
+ is applied. In MS Windows 200x style policy management each machine and/or user may be subject
+ to any number of concurrently applicable (and applied) policy sets (GPOs). Active Directory allows
+ the administrator to also set filters over the policy settings. No such equivalent capability
+ exists with NT4 style policy files.
+ </para>
-</sect3>
-</sect2>
+ <sect3>
+ <title>Administration of Win2K / XP Policies</title>
+
+ <para>
+ Instead of using the tool called <application>The System Policy Editor</application>, commonly called Poledit (from the
+ executable name <command>poledit.exe</command>), <acronym>GPOs</acronym> are created and managed using a
+ <application>Microsoft Management Console</application> <acronym>(MMC)</acronym> snap-in as follows:</para>
+ <procedure>
+ <step>
+ <para>
+ Go to the Windows 200x / XP menu <guimenu>Start->Programs->Administrative Tools</guimenu>
+ and select the MMC snap-in called <guimenuitem>Active Directory Users and Computers</guimenuitem>
+ </para>
+ </step>
+
+ <step><para>
+ Select the domain or organizational unit (OU) that you wish to manage, then right click
+ to open the context menu for that object, select the properties item.
+ </para></step>
+
+ <step><para>
+ Now left click on the <guilabel>Group Policy</guilabel> tab, then left click on the New tab. Type a name
+ for the new policy you will create.
+ </para></step>
+
+ <step><para>
+ Now left click on the <guilabel>Edit</guilabel> tab to commence the steps needed to create the GPO.
+ </para></step>
+ </procedure>
+
+ <para>
+ All policy configuration options are controlled through the use of policy administrative
+ templates. These files have a .adm extension, both in NT4 as well as in Windows 200x / XP.
+ Beware however, since the .adm files are NOT interchangeable across NT4 and Windows 200x.
+ The later introduces many new features as well as extended definition capabilities. It is
+ well beyond the scope of this documentation to explain how to program .adm files, for that
+ the administrator is referred to the Microsoft Windows Resource Kit for your particular
+ version of MS Windows.
+ </para>
+
+ <note>
+ <para>
+ The MS Windows 2000 Resource Kit contains a tool called gpolmig.exe. This tool can be used
+ to migrate an NT4 NTConfig.POL file into a Windows 200x style GPO. Be VERY careful how you
+ use this powerful tool. Please refer to the resource kit manuals for specific usage information.
+ </para>
+ </note>
+
+ </sect3>
+ </sect2>
</sect1>
<sect1>
@@ -272,8 +314,8 @@ applied to the user's part of the registry.
<para>
MS Windows 200x/XP clients that log onto an MS Windows Active Directory security domain may additionally,
acquire policy settings through Group Policy Objects (GPOs) that are defined and stored in Active Directory
-itself. The key benefit of using AS GPOs is that they impose no registry <emphasis>tatooing</emphasis> effect.
-This has considerable advanage compared with the use of NTConfig.POL (NT4) style policy updates.
+itself. The key benefit of using AS GPOs is that they impose no registry <emphasis>spoiling</emphasis> effect.
+This has considerable advantage compared with the use of NTConfig.POL (NT4) style policy updates.
</para>
<para>
@@ -293,27 +335,37 @@ Common restrictions that are frequently used includes:
</simplelist>
</para>
-<sect2>
-<title>With Windows NT4/200x</title>
+ <sect2>
+ <title>Samba Editreg Toolset</title>
-<para>
-The tools that may be used to configure these types of controls from the MS Windows environment are:
-The NT4 User Manager for domains, the NT4 System and Group Policy Editor, the registry editor (regedt32.exe).
-Under MS Windows 200x/XP this is done using the Microsoft Managment Console (MMC) with approapriate
-"snap-ins", the registry editor, and potentially also the NT4 System and Group Policy Editor.
-</para>
-</sect2>
+ <para>
+ Describe in detail the benefits of <command>editreg</command> and how to use it.
+ </para>
-<sect2>
-<title>With a Samba PDC</title>
+ </sect2>
-<para>
-With a Samba Domain Controller, the new tools for managing of user account and policy information includes:
-<filename>smbpasswd, pdbedit, net, rpcclient.</filename>. The administrator should read the
-man pages for these tools and become familiar with their use.
-</para>
+ <sect2>
+ <title>Windows NT4/200x</title>
-</sect2>
+ <para>
+ The tools that may be used to configure these types of controls from the MS Windows environment are:
+ The NT4 User Manager for domains, the NT4 System and Group Policy Editor, the registry editor (regedt32.exe).
+ Under MS Windows 200x/XP this is done using the Microsoft Management Console (MMC) with appropriate
+ "snap-ins", the registry editor, and potentially also the NT4 System and Group Policy Editor.
+ </para>
+ </sect2>
+
+ <sect2>
+ <title>Samba PDC</title>
+
+ <para>
+ With a Samba Domain Controller, the new tools for managing of user account and policy information includes:
+ <command>smbpasswd</command>, <command>pdbedit</command>, <command>net</command>, <command>rpcclient</command>.
+ The administrator should read the
+ man pages for these tools and become familiar with their use.
+ </para>
+
+ </sect2>
</sect1>
<sect1>
@@ -342,7 +394,7 @@ reboot and as part of the user logon:
</para></listitem>
<listitem><para>
- Execution of start-up scripts (hidden and synchronous by defaut).
+ Execution of start-up scripts (hidden and synchronous by default).
</para></listitem>
<listitem><para>
@@ -354,7 +406,7 @@ reboot and as part of the user logon:
</para></listitem>
<listitem><para>
- An ordered list of User GPOs is obtained. The list contents depends on what is configured in respsect of:
+ An ordered list of User GPOs is obtained. The list contents depends on what is configured in respect of:
<simplelist>
<member>Is user a domain member, thus subject to particular policies</member>
@@ -381,4 +433,32 @@ reboot and as part of the user logon:
</orderedlist>
</sect1>
+
+<sect1>
+<title>Common Errors</title>
+
+<para>
+Policy related problems can be very difficult to diagnose and even more difficult to rectify. The following
+collection demonstrates only basic issues.
+</para>
+
+<sect2>
+<title>Policy Does Not Work</title>
+
+<para>
+Question: We have created the <filename>config.pol</filename> file and put it in the <emphasis>NETLOGON</emphasis> share.
+It has made no difference to our Win XP Pro machines, they just don't see it. IT worked fine with Win 98 but does not
+work any longer since we upgraded to Win XP Pro. Any hints?
+</para>
+
+<para>
+<emphasis>ANSWER:</emphasis> Policy files are NOT portable between Windows 9x / Me and MS Windows NT4 / 200x / XP based
+platforms. You need to use the NT4 Group Policy Editor to create a file called <filename>NTConfig.POL</filename> so that
+it is in the correct format for your MS Windows XP Pro clients.
+</para>
+
+</sect2>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/Portability.xml b/docs/docbook/projdoc/Portability.xml
index 72c3d20547..205d384843 100644
--- a/docs/docbook/projdoc/Portability.xml
+++ b/docs/docbook/projdoc/Portability.xml
@@ -1,6 +1,8 @@
<chapter id="Portability">
<chapterinfo>
&author.jelmer;
+ <!-- Some other people as well, but there were no author names in the text files
+ this file is based on-->
</chapterinfo>
<title>Portability</title>
@@ -14,14 +16,14 @@ platform-specific information about compiling and using samba.</para>
<para>
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
+hysterical reasons). There are two group files, <filename>/etc/group</filename> and
+<filename>/etc/logingroup</filename>; 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'
+symlink <filename>/etc/group</filename> to <filename>/etc/logingroup</filename>
+(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 <filename>/etc/logingroup</filename> has what it considers to be an invalid
+ID, which means outside the range <constant>[0..UID_MAX]</constant>, where <constant>UID_MAX</constant> is (I think)
+60000 currently on HP-UX. This precludes -2 and 65534, the usual <constant>nobody</constant>
GIDs.
</para>
@@ -35,8 +37,8 @@ allowed range.
</para>
<para>
-On HPUX you must use gcc or the HP Ansi compiler. The free compiler
-that comes with HP-UX is not Ansi compliant and cannot compile
+On HPUX you must use gcc or the HP ANSI compiler. The free compiler
+that comes with HP-UX is not ANSI compliant and cannot compile
Samba.
</para>
@@ -46,14 +48,15 @@ Samba.
<title>SCO Unix</title>
<para>
-If you run an old version of SCO Unix then you may need to get important
+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.
</para>
<para>
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).
+SCO (<ulink url="ftp://ftp.sco.com/">ftp.sco.com</ulink>, directory SLS,
+files uod385a.Z and uod385a.ltr.Z).
</para>
</sect1>
@@ -121,8 +124,10 @@ _seteuid:
after creating the above files you then assemble them using
</para>
-<para><command>as seteuid.s</command></para>
-<para><command>as setegid.s</command></para>
+<screen>
+ <prompt>$ </prompt><userinput>as seteuid.s</userinput>
+ <prompt>$ </prompt><userinput>as setegid.s</userinput>
+</screen>
<para>
that should produce the files <filename>seteuid.o</filename> and
@@ -155,7 +160,7 @@ You should then remove the line:
<para>
By default RedHat Rembrandt-II during installation adds an
-entry to /etc/hosts as follows:
+entry to <filename>/etc/hosts</filename> as follows:
<programlisting>
127.0.0.1 loopback "hostname"."domainname"
</programlisting>
@@ -181,7 +186,7 @@ Corrective Action: Delete the entry after the word loopback
<!-- From an email by William Jojo <jojowil@hvcc.edu> -->
<para>
Disabling Sequential Read Ahead using <userinput>vmtune -r 0</userinput> improves
-samba performance significally.
+Samba performance significantly.
</para>
</sect2>
</sect1>
@@ -193,9 +198,9 @@ samba performance significally.
<title>Locking improvements</title>
<para>Some people have been experiencing problems with F_SETLKW64/fcntl
-when running samba on solaris. The built in file locking mechanism was
+when running Samba on Solaris. The built in file locking mechanism was
not scalable. Performance would degrade to the point where processes would
-get into loops of trying to lock a file. It woul try a lock, then fail,
+get into loops of trying to lock a file. It would try a lock, then fail,
then try again. The lock attempt was failing before the grant was
occurring. So the visible manifestation of this would be a handful of
processes stealing all of the CPU, and when they were trussed they would
@@ -209,8 +214,7 @@ has not been released yet.
<para>
The patch revision for 2.6 is 105181-34
-for 8 is 108528-19
-and for 9 is 112233-04
+for 8 is 108528-19 and for 9 is 112233-04
</para>
<para>
diff --git a/docs/docbook/projdoc/Problems.xml b/docs/docbook/projdoc/Problems.xml
index eb43b63b63..16e4c8ad54 100644
--- a/docs/docbook/projdoc/Problems.xml
+++ b/docs/docbook/projdoc/Problems.xml
@@ -26,15 +26,15 @@ general SMB topics such as browsing.</para>
<para>
One of the best diagnostic tools for debugging problems is Samba itself.
-You can use the -d option for both smbd and nmbd to specify what
-'debug level' at which to run. See the man pages on smbd, nmbd and
+You can use the <option>-d option</option> for both &smbd; and &nmbd; to specify what
+<parameter>debug level</parameter> at which to run. See the man pages on smbd, nmbd and
smb.conf for more information on debugging options. The debug
level can range from 1 (the default) to 10 (100 for debugging passwords).
</para>
<para>
Another helpful method of debugging is to compile samba using the
-<command>gcc -g </command> flag. This will include debug
+<userinput>gcc -g </userinput> flag. This will include debug
information in the binaries and allow you to attach gdb to the
running smbd / nmbd process. In order to attach gdb to an smbd
process for an NT workstation, first get the workstation to make the
@@ -51,10 +51,10 @@ typing in your password, you can attach gdb and continue.
Some useful samba commands worth investigating:
</para>
-<itemizedlist>
- <listitem><para>testparam | more</para></listitem>
- <listitem><para>smbclient -L //{netbios name of server}</para></listitem>
-</itemizedlist>
+<screen>
+ <prompt>$ </prompt><userinput>testparm | more</userinput>
+ <prompt>$ </prompt><userinput>smbclient -L //{netbios name of server}</userinput>
+</screen>
<para>
An SMB enabled version of tcpdump is available from
@@ -91,18 +91,18 @@ NT Server 4.0 Install CD and the Workstation 4.0 Install CD.
</para>
<para>
-Initially you will need to install 'Network Monitor Tools and Agent'
+Initially you will need to install <application>Network Monitor Tools and Agent</application>
on the NT Server. To do this
</para>
<itemizedlist>
- <listitem><para>Goto Start - Settings - Control Panel -
- Network - Services - Add </para></listitem>
+ <listitem><para>Goto <guibutton>Start</guibutton> - <guibutton>Settings</guibutton> - <guibutton>Control Panel</guibutton> -
+ <guibutton>Network</guibutton> - <guibutton>Services</guibutton> - <guibutton>Add</guibutton> </para></listitem>
- <listitem><para>Select the 'Network Monitor Tools and Agent' and
- click on 'OK'.</para></listitem>
+ <listitem><para>Select the <guilabel>Network Monitor Tools and Agent</guilabel> and
+ click on <guibutton>OK</guibutton>.</para></listitem>
- <listitem><para>Click 'OK' on the Network Control Panel.
+ <listitem><para>Click <guibutton>OK</guibutton> on the Network Control Panel.
</para></listitem>
<listitem><para>Insert the Windows NT Server 4.0 install CD
@@ -124,13 +124,13 @@ install CD.
</para>
<itemizedlist>
- <listitem><para>Goto Start - Settings - Control Panel -
- Network - Services - Add</para></listitem>
+ <listitem><para>Goto <guibutton>Start</guibutton> - <guibutton>Settings</guibutton> - <guibutton>Control Panel</guibutton> -
+ <guibutton>Network</guibutton> - <guibutton>Services</guibutton> - <guibutton>Add</guibutton></para></listitem>
- <listitem><para>Select the 'Network Monitor Agent' and click
- on 'OK'.</para></listitem>
+ <listitem><para>Select the <guilabel>Network Monitor Agent</guilabel> and click
+ on <guibutton>OK</guibutton>.</para></listitem>
- <listitem><para>Click 'OK' on the Network Control Panel.
+ <listitem><para>Click <guibutton>OK</guibutton> on the Network Control Panel.
</para></listitem>
<listitem><para>Insert the Windows NT Workstation 4.0 install
@@ -138,15 +138,15 @@ install CD.
</itemizedlist>
<para>
-Now copy the files from the NT Server in %SYSTEMROOT%\System32\netmon\*.*
-to %SYSTEMROOT%\System32\netmon\*.* on the Workstation and set
-permissions as you deem appropriate for your site. You will need
+Now copy the files from the NT Server in <filename>%SYSTEMROOT%\System32\netmon\*.*</filename>
+to <filename>%SYSTEMROOT%\System32\netmon\*.*</filename> on the Workstation and set
+permissions as you deem appropriate for your site. You will need
administrative rights on the NT box to run netmon.
</para>
<para>
To install Netmon on a Windows 9x box install the network monitor agent
-from the Windows 9x CD (\admin\nettools\netmon). There is a readme
+from the Windows 9x CD (<filename>\admin\nettools\netmon</filename>). There is a readme
file located with the netmon driver files on the CD if you need
information on how to do this. Copy the files from a working
Netmon installation.
@@ -155,35 +155,19 @@ Netmon installation.
</sect1>
<sect1>
-<title>Useful URL's</title>
+<title>Useful URLs</title>
<itemizedlist>
-<listitem><para>Home of Samba site <ulink url="http://samba.org">
- http://samba.org</ulink>. We have a mirror near you !</para></listitem>
-
-<listitem><para> The <emphasis>Development</emphasis> document
-on the Samba mirrors might mention your problem. If so,
-it might mean that the developers are working on it.</para></listitem>
-
<listitem><para>See how Scott Merrill simulates a BDC behavior at
<ulink url="http://www.skippy.net/linux/smb-howto.html">
http://www.skippy.net/linux/smb-howto.html</ulink>. </para></listitem>
-<listitem><para>Although 2.0.7 has almost had its day as a PDC, David Bannon will
- keep the 2.0.7 PDC pages at <ulink url="http://bioserve.latrobe.edu.au/samba">
- http://bioserve.latrobe.edu.au/samba</ulink> going for a while yet.</para></listitem>
-
-<listitem><para>Misc links to CIFS information
- <ulink url="http://samba.org/cifs/">http://samba.org/cifs/</ulink></para></listitem>
-
-<listitem><para>NT Domains for Unix <ulink url="http://mailhost.cb1.com/~lkcl/ntdom/">
- http://mailhost.cb1.com/~lkcl/ntdom/</ulink></para></listitem>
-
<listitem><para>FTP site for older SMB specs:
<ulink url="ftp://ftp.microsoft.com/developr/drg/CIFS/">
ftp://ftp.microsoft.com/developr/drg/CIFS/</ulink></para></listitem>
</itemizedlist>
+<!-- FIXME: Merge with Further Resources -->
</sect1>
@@ -256,7 +240,7 @@ smb.conf in their attach directory?</para></listitem>
</sect1>
<sect1>
-<title>How to get off the mailinglists</title>
+<title>How to get off the mailing lists</title>
<para>To have your name removed from a samba mailing list, go to the
same place you went to to get on it. Go to <ulink
diff --git a/docs/docbook/projdoc/ProfileMgmt.xml b/docs/docbook/projdoc/ProfileMgmt.xml
index 140dd44ba1..58c6f34030 100644
--- a/docs/docbook/projdoc/ProfileMgmt.xml
+++ b/docs/docbook/projdoc/ProfileMgmt.xml
@@ -7,6 +7,30 @@
<title>Desktop Profile Management</title>
<sect1>
+<title>Features and Benefits</title>
+
+<para>
+Roaming Profiles are feared by some, hated by a few, loved by many, and a Godsend for
+some administrators.
+</para>
+
+<para>
+Roaming Profiles allow an administrator to make available a consistent user desktop
+as the user moves from one machine to another. This chapter provides much information
+regarding how to configure and manage Roaming Profiles.
+</para>
+
+<para>
+While Roaming Profiles might sound like nirvana to some, they are a real and tangible
+problem to others. In particular, users of mobile computing tools, where often there may not
+be a sustained network connection, are often better served by purely Local Profiles.
+This chapter provides information to help the Samba administrator to deal with those
+situations also.
+</para>
+
+</sect1>
+
+<sect1>
<title>Roaming Profiles</title>
<warning>
@@ -44,7 +68,7 @@ This section documents how to configure Samba for MS Windows client profile supp
<title>NT4/200x User Profiles</title>
<para>
-To support Windowns NT4/200x clients, in the [global] section of smb.conf set the
+To support Windows NT4/200x clients, in the [global] section of smb.conf set the
following (for example):
</para>
@@ -62,17 +86,18 @@ where %L translates to the name of the Samba server and %u translates to the use
</para>
<para>
-The default for this option is \\%N\%U\profile, namely \\sambaserver\username\profile.
-The \\N%\%U service is created automatically by the [homes] service. If you are using
+The default for this option is <filename>\\%N\%U\profile</filename>,
+namely <filename>\\sambaserver\username\profile</filename>.
+The <filename>\\N%\%U</filename> service is created automatically by the [homes] service. If you are using
a samba server for the profiles, you _must_ make the share specified in the logon path
-browseable. Please refer to the man page for smb.conf in respect of the different
-symantics of %L and %N, as well as %U and %u.
+browseable. Please refer to the man page for &smb.conf; in respect of the different
+semantics of %L and %N, as well as %U and %u.
</para>
<note>
<para>
MS Windows NT/2K clients at times do not disconnect a connection to a server
-between logons. It is recommended to NOT use the <command>homes</command>
+between logons. It is recommended to NOT use the <parameter>homes</parameter>
meta-service name as part of the profile share path.
</para>
</note>
@@ -82,7 +107,7 @@ meta-service name as part of the profile share path.
<title>Windows 9x / Me User Profiles</title>
<para>
-To support Windows 9x / Me clients, you must use the "logon home" parameter. Samba has
+ To support Windows 9x / Me clients, you must use the <parameter>logon home</parameter> parameter. Samba has
now been fixed so that <userinput>net use /home</userinput> now works as well, and it, too, relies
on the <command>logon home</command> parameter.
</para>
@@ -90,7 +115,7 @@ on the <command>logon home</command> parameter.
<para>
By using the logon home parameter, you are restricted to putting Win9x / Me
profiles in the user's home directory. But wait! There is a trick you
-can use. If you set the following in the <command>[global]</command> section of your &smb.conf; file:
+can use. If you set the following in the <parameter>[global]</parameter> section of your &smb.conf; file:
</para>
<para><programlisting>
logon home = \\%L\%U\.profiles
@@ -105,7 +130,7 @@ of your home directory called <filename>.profiles</filename> (thus making them h
Not only that, but <userinput>net use /home</userinput> will also work, because of a feature in
Windows 9x / Me. It removes any directory stuff off the end of the home directory area
and only uses the server and share portion. That is, it looks like you
-specified \\%L\%U for <command>logon home</command>.
+specified <filename>\\%L\%U</filename> for <parameter>logon home</parameter>.
</para>
</sect3>
@@ -114,7 +139,7 @@ specified \\%L\%U for <command>logon home</command>.
<para>
You can support profiles for both Win9X and WinNT clients by setting both the
-<command>logon home</command> and <command>logon path</command> parameters. For example:
+<parameter>logon home</parameter> and <parameter>logon path</parameter> parameters. For example:
</para>
<para><programlisting>
@@ -127,27 +152,32 @@ You can support profiles for both Win9X and WinNT clients by setting both the
<title>Disabling Roaming Profile Support</title>
<para>
-A question often asked is "How may I enforce use of local profiles?" or
-"How do I disable Roaming Profiles?"
+ A question often asked is <quote>How may I enforce use of local profiles?</quote> or
+ <quote>How do I disable Roaming Profiles?</quote>
</para>
<para>
There are three ways of doing this:
</para>
-<itemizedlist>
- <listitem><para>
- <command>In smb.conf:</command> affect the following settings and ALL clients
- will be forced to use a local profile:
- <programlisting>
- logon home =
- logon path =
- </programlisting></para></listitem>
-
- <listitem><para>
- <command>MS Windows Registry:</command> by using the Microsoft Management Console
- gpedit.msc to instruct your MS Windows XP machine to use only a local profile. This
- of course modifies registry settings. The full path to the option is:
+<variablelist>
+ <varlistentry>
+ <term>In &smb.conf;</term>
+ <listitem><para>
+ Affect the following settings and ALL clients
+ will be forced to use a local profile:
+ <programlisting>
+ logon home =
+ logon path =
+ </programlisting>
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>MS Windows Registry:</term>
+ <listitem><para>
+ By using the Microsoft Management Console gpedit.msc to instruct your MS Windows XP machine to use only a local profile. This of course modifies registry settings. The full path to the option is:
+ <!-- FIXME: Diagram for this ? -->
<programlisting>
Local Computer Policy\
Computer Configuration\
@@ -156,17 +186,20 @@ There are three ways of doing this:
User Profiles\
Disable: Only Allow Local User Profiles
- Disable: Prevent Roaming Profile Change from Propogating to the Server
+ Disable: Prevent Roaming Profile Change from Propagating to the Server
</programlisting>
- </para>
- </listitem>
+ </para> </listitem>
+ </varlistentry>
- <listitem><para>
- <command>Change of Profile Type:</command> From the start menu right click on the
- MY Computer icon, select <emphasis>Properties</emphasis>, click on the "<emphasis>User Profiles</emphasis>
- tab, select the profile you wish to change from Roaming type to Local, click <emphasis>Change Type</emphasis>.
- </para></listitem>
-</itemizedlist>
+ <varlistentry>
+ <term>Change of Profile Type:</term>
+ <listitem><para>
+ From the start menu right click on the
+ My Computer icon, select <guimenuitem>Properties</guimenuitem>, click on the <guilabel>User Profiles</guilabel>
+ tab, select the profile you wish to change from Roaming type to Local, click <guibutton>Change Type</guibutton>.
+ </para></listitem>
+ </varlistentry>
+</variablelist>
<para>
Consult the MS Windows registry guide for your particular MS Windows version for more
@@ -191,12 +224,13 @@ Microsoft MS Windows Resource Kit for your version of Windows for specific infor
<para>
When a user first logs in on Windows 9X, the file user.DAT is created,
-as are folders "Start Menu", "Desktop", "Programs" and "Nethood".
+as are folders <filename>Start Menu</filename>, <filename>Desktop</filename>,
+<filename>Programs</filename> and <filename>Nethood</filename>.
These directories and their contents will be merged with the local
-versions stored in c:\windows\profiles\username on subsequent logins,
-taking the most recent from each. You will need to use the [global]
-options "preserve case = yes", "short preserve case = yes" and
-"case sensitive = no" in order to maintain capital letters in shortcuts
+versions stored in <filename>c:\windows\profiles\username</filename> on subsequent logins,
+taking the most recent from each. You will need to use the <parameter>[global]</parameter>
+options <parameter>preserve case = yes</parameter>, <parameter>short preserve case = yes</parameter> and
+<parameter>case sensitive = no</parameter> in order to maintain capital letters in shortcuts
in any of the profile folders.
</para>
@@ -209,19 +243,19 @@ and deny them write access to this file.
<orderedlist>
<listitem>
<para>
- On the Windows 9x / Me machine, go to Control Panel -> Passwords and
- select the User Profiles tab. Select the required level of
- roaming preferences. Press OK, but do _not_ allow the computer
+ On the Windows 9x / Me machine, go to <guimenu>Control Panel</guimenu> -> <guimenuitem>Passwords</guimenuitem> and
+ select the <guilabel>User Profiles</guilabel> tab. Select the required level of
+ roaming preferences. Press <guibutton>OK</guibutton>, but do _not_ allow the computer
to reboot.
</para>
</listitem>
<listitem>
<para>
- On the Windows 9x / Me machine, go to Control Panel -> Network ->
- Client for Microsoft Networks -> Preferences. Select 'Log on to
- NT Domain'. Then, ensure that the Primary Logon is 'Client for
- Microsoft Networks'. Press OK, and this time allow the computer
+ On the Windows 9x / Me machine, go to <guimenu>Control Panel</guimenu> -> <guimenuitem>Network</guimenuitem> ->
+ <guimenuitem>Client for Microsoft Networks</guimenuitem> -> <guilabel>Preferences</guilabel>. Select <guilabel>Log on to
+ NT Domain</guilabel>. Then, ensure that the Primary Logon is <guilabel>Client for
+ Microsoft Networks</guilabel>. Press <guibutton>OK</guibutton>, and this time allow the computer
to reboot.
</para>
</listitem>
@@ -247,15 +281,15 @@ supports it), user name and user's password.
<para>
Once the user has been successfully validated, the Windows 9x / Me machine
-will inform you that 'The user has not logged on before' and asks you
-if you wish to save the user's preferences? Select 'yes'.
+will inform you that <computeroutput>The user has not logged on before' and asks you
+ if you wish to save the user's preferences?</computeroutput> Select <guibutton>yes</guibutton>.
</para>
<para>
Once the Windows 9x / Me client comes up with the desktop, you should be able
-to examine the contents of the directory specified in the "logon path"
-on the samba server and verify that the "Desktop", "Start Menu",
-"Programs" and "Nethood" folders have been created.
+to examine the contents of the directory specified in the <parameter>logon path</parameter>
+on the samba server and verify that the <filename>Desktop</filename>, <filename>Start Menu</filename>,
+<filename>Programs</filename> and <filename>Nethood</filename> folders have been created.
</para>
<para>
@@ -286,32 +320,31 @@ they will be told that they are logging in "for the first time".
<listitem>
<para>
instead of logging in under the [user, password, domain] dialog,
- press escape.
+ press <guibutton>escape</guibutton>.
</para>
</listitem>
<listitem>
<para>
- run the regedit.exe program, and look in:
+ run the <command>regedit.exe</command> program, and look in:
</para>
- <para>
- HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList
+ <para>
+ <filename>HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList</filename>
</para>
<para>
you will find an entry, for each user, of ProfilePath. Note the
- contents of this key (likely to be c:\windows\profiles\username),
+ contents of this key (likely to be <filename>c:\windows\profiles\username</filename>),
then delete the key ProfilePath for the required user.
+ </para>
- [Exit the registry editor].
-
- </para>
+ <para>[Exit the registry editor].</para>
</listitem>
- <listitem>
- <para>
- <emphasis>WARNING</emphasis> - before deleting the contents of the
+ <warning>
+ <para>
+ Before deleting the contents of the
directory listed in the ProfilePath (this is likely to be
<filename>c:\windows\profiles\username)</filename>, ask them if they
have any important files stored on their desktop or in their start menu.
@@ -324,11 +357,11 @@ they will be told that they are logging in "for the first time".
system file) user.DAT in their profile directory, as well as the
local "desktop", "nethood", "start menu" and "programs" folders.
</para>
- </listitem>
+ </warning>
<listitem>
<para>
- search for the user's .PWL password-caching file in the c:\windows
+ search for the user's .PWL password-caching file in the <filename>c:\windows</filename>
directory, and delete it.
</para>
</listitem>
@@ -341,8 +374,8 @@ they will be told that they are logging in "for the first time".
<listitem>
<para>
- check the contents of the profile path (see "logon path" described
- above), and delete the user.DAT or user.MAN file for the user,
+ check the contents of the profile path (see <parameter>logon path</parameter> described
+ above), and delete the <filename>user.DAT</filename> or <filename>user.MAN</filename> file for the user,
making a backup if required.
</para>
</listitem>
@@ -351,7 +384,7 @@ they will be told that they are logging in "for the first time".
<para>
If all else fails, increase samba's debug log levels to between 3 and 10,
-and / or run a packet trace program such as ethereal or netmon.exe, and
+and / or run a packet trace program such as ethereal or <command>netmon.exe</command>, and
look for error messages.
</para>
@@ -370,12 +403,12 @@ differences are with the equivalent samba trace.
<para>
When a user first logs in to a Windows NT Workstation, the profile
NTuser.DAT is created. The profile location can be now specified
-through the "logon path" parameter.
+through the <parameter>logon path</parameter> parameter.
</para>
<para>
There is a parameter that is now available for use with NT Profiles:
-"logon drive". This should be set to <filename>H:</filename> or any other drive, and
+<parameter>logon drive</parameter>. This should be set to <filename>H:</filename> or any other drive, and
should be used in conjunction with the new "logon home" parameter.
</para>
@@ -389,23 +422,23 @@ for those situations where it might be created.)
<para>
In the profile directory, Windows NT4 creates more folders than Windows 9x / Me.
-It creates "Application Data" and others, as well as "Desktop", "Nethood",
-"Start Menu" and "Programs". The profile itself is stored in a file
-NTuser.DAT. Nothing appears to be stored in the .PDS directory, and
+It creates <filename>Application Data</filename> and others, as well as <filename>Desktop</filename>, <filename>Nethood</filename>,
+<filename>Start Menu</filename> and <filename>Programs</filename>. The profile itself is stored in a file
+<filename>NTuser.DAT</filename>. Nothing appears to be stored in the .PDS directory, and
its purpose is currently unknown.
</para>
<para>
-You can use the System Control Panel to copy a local profile onto
+You can use the <application>System Control Panel</application> to copy a local profile onto
a samba server (see NT Help on profiles: it is also capable of firing
-up the correct location in the System Control Panel for you). The
-NT Help file also mentions that renaming NTuser.DAT to NTuser.MAN
+up the correct location in the <application>System Control Panel</application> for you). The
+NT Help file also mentions that renaming <filename>NTuser.DAT</filename> to <filename>NTuser.MAN</filename>
turns a profile into a mandatory one.
</para>
<para>
The case of the profile is significant. The file must be called
-NTuser.DAT or, for a mandatory profile, NTuser.MAN.
+<filename>NTuser.DAT</filename> or, for a mandatory profile, <filename>NTuser.MAN</filename>.
</para>
</sect3>
@@ -417,78 +450,78 @@ You must first convert the profile from a local profile to a domain
profile on the MS Windows workstation as follows:
</para>
-<itemizedlist>
- <listitem><para>
- Log on as the LOCAL workstation administrator.
- </para></listitem>
+<procedure>
+ <step><para>
+ Log on as the <emphasis>LOCAL</emphasis> workstation administrator.
+ </para></step>
- <listitem><para>
- Right click on the 'My Computer' Icon, select 'Properties'
- </para></listitem>
+ <step><para>
+ Right click on the <guiicon>My Computer</guiicon> Icon, select <guimenuitem>Properties</guimenuitem>
+ </para></step>
- <listitem><para>
- Click on the 'User Profiles' tab
- </para></listitem>
+ <step><para>
+ Click on the <guilabel>User Profiles</guilabel> tab
+ </para></step>
- <listitem><para>
+ <step><para>
Select the profile you wish to convert (click on it once)
- </para></listitem>
+ </para></step>
- <listitem><para>
- Click on the button 'Copy To'
- </para></listitem>
+ <step><para>
+ Click on the button <guibutton>Copy To</guibutton>
+ </para></step>
- <listitem><para>
- In the "Permitted to use" box, click on the 'Change' button.
- </para></listitem>
+ <step><para>
+ In the <guilabel>Permitted to use</guilabel> box, click on the <guibutton>Change</guibutton> button.
+ </para></step>
- <listitem><para>
+ <step><para>
Click on the 'Look in" area that lists the machine name, when you click
here it will open up a selection box. Click on the domain to which the
profile must be accessible.
</para>
<note><para>You will need to log on if a logon box opens up. Eg: In the connect
- as: MIDEARTH\root, password: mypassword.</para></note>
- </listitem>
+ as: <replaceable>MIDEARTH</replaceable>\root, password: <replaceable>mypassword</replaceable>.</para></note>
+ </step>
- <listitem><para>
+ <step><para>
To make the profile capable of being used by anyone select 'Everyone'
- </para></listitem>
+ </para></step>
- <listitem><para>
- Click OK. The Selection box will close.
- </para></listitem>
+ <step><para>
+ Click <guibutton>OK</guibutton>. The Selection box will close.
+ </para></step>
- <listitem><para>
- Now click on the 'Ok' button to create the profile in the path you
+ <step><para>
+ Now click on the <guibutton>Ok</guibutton> button to create the profile in the path you
nominated.
- </para></listitem>
-</itemizedlist>
+ </para></step>
+</procedure>
<para>
-Done. You now have a profile that can be editted using the samba-3.0.0
-<filename>profiles</filename> tool.
+Done. You now have a profile that can be edited using the samba-3.0.0
+<command>profiles</command> tool.
</para>
<note>
<para>
-Under NT/2K the use of mandotory profiles forces the use of MS Exchange
+Under NT/2K the use of mandatory profiles forces the use of MS Exchange
storage of mail data. That keeps desktop profiles usable.
</para>
</note>
<note>
-<itemizedlist>
-<listitem><para>
+<procedure>
+<step><para>
This is a security check new to Windows XP (or maybe only
Windows XP service pack 1). It can be disabled via a group policy in
Active Directory. The policy is:</para>
-<para>"Computer Configuration\Administrative Templates\System\User
-Profiles\Do not check for user ownership of Roaming Profile Folders"</para>
+<para><filename>Computer Configuration\Administrative Templates\System\User
+Profiles\Do not check for user ownership of Roaming Profile Folders</filename></para>
-<para>...and it should be set to "Enabled".
+<para>...and it should be set to <constant>Enabled</constant>.
Does the new version of samba have an Active Directory analogue? If so,
then you may be able to set the policy through this.
</para>
@@ -500,36 +533,35 @@ the following (N.B. I don't know for sure that this will work in the
same way as a domain group policy):
</para>
-</listitem>
+</step>
-<listitem><para>
+<step><para>
On the XP workstation log in with an Administrator account.
-</para></listitem>
-
- <listitem><para>Click: "Start", "Run"</para></listitem>
- <listitem><para>Type: "mmc"</para></listitem>
- <listitem><para>Click: "OK"</para></listitem>
-
- <listitem><para>A Microsoft Management Console should appear.</para></listitem>
- <listitem><para>Click: File, "Add/Remove Snap-in...", "Add"</para></listitem>
- <listitem><para>Double-Click: "Group Policy"</para></listitem>
- <listitem><para>Click: "Finish", "Close"</para></listitem>
- <listitem><para>Click: "OK"</para></listitem>
-
- <listitem><para>In the "Console Root" window:</para></listitem>
- <listitem><para>Expand: "Local Computer Policy", "Computer Configuration",</para></listitem>
- <listitem><para>"Administrative Templates", "System", "User Profiles"</para></listitem>
- <listitem><para>Double-Click: "Do not check for user ownership of Roaming Profile</para></listitem>
- <listitem><para>Folders"</para></listitem>
- <listitem><para>Select: "Enabled"</para></listitem>
- <listitem><para>Click: OK"</para></listitem>
-
- <listitem><para>Close the whole console. You do not need to save the settings (this
+</para></step>
+
+ <step><para>Click: <guimenu>Start</guimenu>, <guimenuitem>Run</guimenuitem></para></step>
+ <step><para>Type: <userinput>mmc</userinput></para></step>
+ <step><para>Click: <guibutton>OK</guibutton></para></step>
+
+ <step><para>A Microsoft Management Console should appear.</para></step>
+ <step><para>Click: <guimenu>File</guimenu>, <guimenuitem>Add/Remove Snap-in...</guimenuitem>, <guimenuitem>Add</guimenuitem></para></step>
+ <step><para>Double-Click: <guiicon>Group Policy</guiicon></para></step>
+ <step><para>Click: <guibutton>Finish</guibutton>, <guibutton>Close</guibutton></para></step>
+ <step><para>Click: <guibutton>OK</guibutton></para></step>
+
+ <step><para>In the "Console Root" window:</para></step>
+ <step><para>Expand: <guiicon>Local Computer Policy</guiicon>, <guiicon>Computer Configuration</guiicon>,
+ <guiicon>Administrative Templates</guiicon>, <guiicon>System</guiicon>, <guiicon>User Profiles</guiicon></para></step>
+ <step><para>Double-Click: <guilabel>Do not check for user ownership of Roaming Profile Folders</guilabel></para></step>
+ <step><para>Select: <guilabel>Enabled</guilabel></para></step>
+ <step><para>Click: <guibutton>OK</guibutton></para></step>
+
+ <step><para>Close the whole console. You do not need to save the settings (this
refers to the console settings rather than the policies you have
- changed).</para></listitem>
+ changed).</para></step>
- <listitem><para>Reboot</para></listitem>
-</itemizedlist>
+ <step><para>Reboot</para></step>
+</procedure>
</note>
</sect3>
</sect2>
@@ -551,13 +583,13 @@ on again with the newer version of MS Windows.
<para>
If you then want to share the same Start Menu / Desktop with W9x/Me, you will
need to specify a common location for the profiles. The smb.conf parameters
-that need to be common are <emphasis>logon path</emphasis> and
-<emphasis>logon home</emphasis>.
+that need to be common are <parameter>logon path</parameter> and
+<parameter>logon home</parameter>.
</para>
<para>
-If you have this set up correctly, you will find separate user.DAT and
-NTuser.DAT files in the same profile directory.
+If you have this set up correctly, you will find separate <filename>user.DAT</filename> and
+<filename>NTuser.DAT</filename> files in the same profile directory.
</para>
</sect2>
@@ -584,35 +616,35 @@ NT4/200x. The correct resource kit is required for each platform.
Here is a quick guide:
</para>
-<itemizedlist>
+<procedure>
-<listitem><para>
-On your NT4 Domain Controller, right click on 'My Computer', then
-select the tab labelled 'User Profiles'.
-</para></listitem>
+<step><para>
+On your NT4 Domain Controller, right click on <guiicon>My Computer</guiicon>, then
+select the tab labelled <guilabel>User Profiles</guilabel>.
+</para></step>
-<listitem><para>
+<step><para>
Select a user profile you want to migrate and click on it.
</para>
-<note><para>I am using the term &quot;migrate&quot; lossely. You can copy a profile to
+<note><para>I am using the term &quot;migrate&quot; loosely. You can copy a profile to
create a group profile. You can give the user 'Everyone' rights to the
profile you copy this to. That is what you need to do, since your samba
domain is not a member of a trust relationship with your NT4 PDC.</para></note>
-</listitem>
+</step>
- <listitem><para>Click the 'Copy To' button.</para></listitem>
+<step><para>Click the <guibutton>Copy To</guibutton> button.</para></step>
- <listitem><para>In the box labelled 'Copy Profile to' add your new path, eg:
- <filename>c:\temp\foobar</filename></para></listitem>
+ <step><para>In the box labelled <guilabel>Copy Profile to</guilabel> add your new path, eg:
+ <filename>c:\temp\foobar</filename></para></step>
- <listitem><para>Click on the button labelled 'Change' in the "Permitted to use" box.</para></listitem>
+ <step><para>Click on the button <guibutton>Change</guibutton> in the <guilabel>Permitted to use</guilabel> box.</para></step>
- <listitem><para>Click on the group 'Everyone' and then click OK. This closes the
- 'chose user' box.</para></listitem>
+ <step><para>Click on the group 'Everyone' and then click <guibutton>OK</guibutton>. This closes the
+ 'choose user' box.</para></step>
- <listitem><para>Now click OK.</para></listitem>
-</itemizedlist>
+ <step><para>Now click <guibutton>OK</guibutton>.</para></step>
+</procedure>
<para>
Follow the above for every profile you need to migrate.
@@ -657,7 +689,7 @@ Resource Kit.
<para>
Windows NT 4.0 stores the local profile information in the registry under
the following key:
-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
+<filename>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList</filename>
</para>
<para>
@@ -697,7 +729,7 @@ file in the copied profile and rename it to NTUser.MAN.
</para>
<para>
-For MS Windows 9x / Me it is the User.DAT file that must be renamed to User.MAN to
+For MS Windows 9x / Me it is the <filename>User.DAT</filename> file that must be renamed to <filename>User.MAN</filename> to
affect a mandatory profile.
</para>
@@ -707,7 +739,7 @@ affect a mandatory profile.
<title>Creating/Managing Group Profiles</title>
<para>
-Most organisations are arranged into departments. There is a nice benenfit in
+Most organisations are arranged into departments. There is a nice benefit in
this fact since usually most users in a department will require the same desktop
applications and the same desktop layout. MS Windows NT4/200x/XP will allow the
use of Group Profiles. A Group Profile is a profile that is created firstly using
@@ -717,7 +749,7 @@ to the group profile.
</para>
<para>
-The next step is rather important. PLEASE NOTE: Instead of assigning a group profile
+The next step is rather important. <emphasis>Please note:</emphasis> Instead of assigning a group profile
to users (ie: Using User Manager) on a "per user" basis, the group itself is assigned
the now modified profile.
</para>
@@ -747,18 +779,19 @@ advantages.
<title>MS Windows 9x/Me</title>
<para>
-To enable default per use profiles in Windows 9x / Me you can either use the Windows 98 System
-Policy Editor or change the registry directly.
+To enable default per use profiles in Windows 9x / Me you can either use the <application>Windows 98 System
+Policy Editor</application> or change the registry directly.
</para>
<para>
-To enable default per user profiles in Windows 9x / Me, launch the System Policy Editor, then
-select File -> Open Registry, then click on the Local Computer icon, click on Windows 98 System,
-select User Profiles, click on the enable box. Do not forget to save the registry changes.
+To enable default per user profiles in Windows 9x / Me, launch the <application>System Policy Editor</application>, then
+select <guimenu>File</guimenu> -> <guimenuitem>Open Registry</guimenuitem>, then click on the
+<guiicon>Local Computer</guiicon> icon, click on <guilabel>Windows 98 System</guilabel>,
+select <guilabel>User Profiles</guilabel>, click on the enable box. Do not forget to save the registry changes.
</para>
<para>
-To modify the registry directly, launch the Registry Editor (regedit.exe), select the hive
+To modify the registry directly, launch the <application>Registry Editor</application> (<command>regedit.exe</command>), select the hive
<filename>HKEY_LOCAL_MACHINE\Network\Logon</filename>. Now add a DWORD type key with the name
"User Profiles", to enable user profiles set the value to 1, to disable user profiles set it to 0.
</para>
@@ -798,7 +831,7 @@ profile, the changes are written to the user's profile on the server.
On MS Windows NT4 the default user profile is obtained from the location
<filename>%SystemRoot%\Profiles</filename> which in a default installation will translate to
<filename>C:\WinNT\Profiles</filename>. Under this directory on a clean install there will be
-three (3) directories: <filename>Administrator, All Users, Default User</filename>.
+three (3) directories: <filename>Administrator</filename>, <filename>All Users</filename>, <filename>Default User</filename>.
</para>
<para>
@@ -821,8 +854,8 @@ When a user logs onto an MS Windows NT4 machine that is a member of a Microsoft
the following steps are followed in respect of profile handling:
</para>
-<orderedlist>
- <listitem>
+<procedure>
+ <step>
<para>
The users' account information which is obtained during the logon process contains
the location of the users' desktop profile. The profile path may be local to the
@@ -832,35 +865,35 @@ the following steps are followed in respect of profile handling:
settings in the <filename>All Users</filename> profile in the <filename>%SystemRoot%\Profiles</filename>
location.
</para>
- </listitem>
+ </step>
- <listitem>
+ <step>
<para>
If the user account has a profile path, but at it's location a profile does not exist,
then a new profile is created in the <filename>%SystemRoot%\Profiles\%USERNAME%</filename>
directory from reading the <filename>Default User</filename> profile.
</para>
- </listitem>
+ </step>
- <listitem>
+ <step>
<para>
If the NETLOGON share on the authenticating server (logon server) contains a policy file
(<filename>NTConfig.POL</filename>) then it's contents are applied to the <filename>NTUser.DAT</filename>
which is applied to the <filename>HKEY_CURRENT_USER</filename> part of the registry.
</para>
- </listitem>
+ </step>
- <listitem>
+ <step>
<para>
When the user logs out, if the profile is set to be a roaming profile it will be written
out to the location of the profile. The <filename>NTuser.DAT</filename> file is then
re-created from the contents of the <filename>HKEY_CURRENT_USER</filename> contents.
Thus, should there not exist in the NETLOGON share an <filename>NTConfig.POL</filename> at the
- next logon, the effect of the provious <filename>NTConfig.POL</filename> will still be held
+ next logon, the effect of the previous <filename>NTConfig.POL</filename> will still be held
in the profile. The effect of this is known as <emphasis>tatooing</emphasis>.
</para>
- </listitem>
-</orderedlist>
+ </step>
+</procedure>
<para>
MS Windows NT4 profiles may be <emphasis>Local</emphasis> or <emphasis>Roaming</emphasis>. A Local profile
@@ -892,59 +925,58 @@ are controlled by entries on Windows NT4 is:
</para>
<para>
-<programlisting>
- HKEY_CURRENT_USER
- \Software
- \Microsoft
- \Windows
- \CurrentVersion
- \Explorer
- \User Shell Folders\
-</programlisting>
+<filename>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\</filename>
</para>
<para>
The above hive key contains a list of automatically managed folders. The default entries are:
</para>
- <para>
- <programlisting>
- Name Default Value
- -------------- -----------------------------------------
- AppData %USERPROFILE%\Application Data
- Desktop %USERPROFILE%\Desktop
- Favorites %USERPROFILE%\Favorites
- NetHood %USERPROFILE%\NetHood
- PrintHood %USERPROFILE%\PrintHood
- Programs %USERPROFILE%\Start Menu\Programs
- Recent %USERPROFILE%\Recent
- SendTo %USERPROFILE%\SendTo
- Start Menu %USERPROFILE%\Start Menu
- Startup %USERPROFILE%\Start Menu\Programs\Startup
- </programlisting>
- </para>
+<para>
+<table frame="all">
+ <title>User Shell Folder registry keys default values</title>
+ <tgroup cols="2">
+ <thead>
+ <row><entry>Name</entry><entry>Default Value</entry></row>
+ </thead>
+ <tbody>
+ <row><entry>AppData</entry><entry>%USERPROFILE%\Application Data</entry></row>
+ <row><entry>Desktop</entry><entry>%USERPROFILE%\Desktop</entry></row>
+ <row><entry>Favorites</entry><entry>%USERPROFILE%\Favorites</entry></row>
+ <row><entry>NetHood</entry><entry>%USERPROFILE%\NetHood</entry></row>
+ <row><entry>PrintHood</entry><entry>%USERPROFILE%\PrintHood</entry></row>
+ <row><entry>Programs</entry><entry>%USERPROFILE%\Start Menu\Programs</entry></row>
+ <row><entry>Recent</entry><entry>%USERPROFILE%\Recent</entry></row>
+ <row><entry>SendTo</entry><entry>%USERPROFILE%\SendTo</entry></row>
+ <row><entry>Start Menu </entry><entry>%USERPROFILE%\Start Menu</entry></row>
+ <row><entry>Startup</entry><entry>%USERPROFILE%\Start Menu\Programs\Startup</entry></row>
+ </tbody>
+ </tgroup>
+</table>
+</para>
<para>
The registry key that contains the location of the default profile settings is:
+</para>
-<programlisting>
- HKEY_LOCAL_MACHINE
- \SOFTWARE
- \Microsoft
- \Windows
- \CurrentVersion
- \Explorer
- \User Shell Folders
-</programlisting>
+<para>
+<filename>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders</filename>
+</para>
+<para>
The default entries are:
-<programlisting>
- Common Desktop %SystemRoot%\Profiles\All Users\Desktop
- Common Programs %SystemRoot%\Profiles\All Users\Programs
- Common Start Menu %SystemRoot%\Profiles\All Users\Start Menu
- Common Startup %SystemRoot%\Profiles\All Users\Start Menu\Progams\Startup
-</programlisting>
+<table frame="all">
+ <title>Defaults of profile settings registry keys</title>
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Common Desktop</entry><entry>%SystemRoot%\Profiles\All Users\Desktop</entry></row>
+ <row><entry>Common Programs</entry><entry>%SystemRoot%\Profiles\All Users\Programs</entry></row>
+ <row><entry>Common Start Menu</entry><entry>%SystemRoot%\Profiles\All Users\Start Menu</entry></row>
+ <row><entry>Common Startup</entry><entry>%SystemRoot%\Profiles\All Users\Start Menu\Programs\Startup</entry></row>
+ </tbody>
+ </tgroup>
+</table>
</para>
</sect2>
@@ -981,7 +1013,7 @@ login name of the user.
<note>
<para>
- This path translates, in Samba parlance, to the smb.conf [NETLOGON] share. The directory
+ This path translates, in Samba parlance, to the &smb.conf; <parameter>[NETLOGON]</parameter> share. The directory
should be created at the root of this share and must be called <filename>Default Profile</filename>.
</para>
</note>
@@ -992,7 +1024,7 @@ default profile.
</para>
<para>
-On loging out, the users' desktop profile will be stored to the location specified in the registry
+On logging out, the users' desktop profile will be stored to the location specified in the registry
settings that pertain to the user. If no specific policies have been created, or passed to the client
during the login process (as Samba does automatically), then the user's profile will be written to
the local machine only under the path <filename>C:\Documents and Settings\%USERNAME%</filename>.
@@ -1031,49 +1063,43 @@ are controlled by entries on Windows 200x/XP is:
</para>
<para>
-<programlisting>
- HKEY_CURRENT_USER
- \Software
- \Microsoft
- \Windows
- \CurrentVersion
- \Explorer
- \User Shell Folders\
-</programlisting>
+<filename>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\</filename>
</para>
<para>
The above hive key contains a list of automatically managed folders. The default entries are:
</para>
- <para>
- <programlisting>
- Name Default Value
- -------------- -----------------------------------------
- AppData %USERPROFILE%\Application Data
- Cache %USERPROFILE%\Local Settings\Temporary Internet Files
- Cookies %USERPROFILE%\Cookies
- Desktop %USERPROFILE%\Desktop
- Favorites %USERPROFILE%\Favorites
- History %USERPROFILE%\Local Settings\History
- Local AppData %USERPROFILE%\Local Settings\Application Data
- Local Settings %USERPROFILE%\Local Settings
- My Pictures %USERPROFILE%\My Documents\My Pictures
- NetHood %USERPROFILE%\NetHood
- Personal %USERPROFILE%\My Documents
- PrintHood %USERPROFILE%\PrintHood
- Programs %USERPROFILE%\Start Menu\Programs
- Recent %USERPROFILE%\Recent
- SendTo %USERPROFILE%\SendTo
- Start Menu %USERPROFILE%\Start Menu
- Startup %USERPROFILE%\Start Menu\Programs\Startup
- Templates %USERPROFILE%\Templates
- </programlisting>
- </para>
+<para>
+<table frame="all">
+ <title>Defaults of default user profile paths registry keys</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry><entry>Default Value</entry></row></thead>
+ <tbody>
+ <row><entry>AppData</entry><entry>%USERPROFILE%\Application Data</entry></row>
+ <row><entry>Cache</entry><entry>%USERPROFILE%\Local Settings\Temporary Internet Files</entry></row>
+ <row><entry>Cookies</entry><entry>%USERPROFILE%\Cookies</entry></row>
+ <row><entry>Desktop</entry><entry>%USERPROFILE%\Desktop</entry></row>
+ <row><entry>Favorites</entry><entry>%USERPROFILE%\Favorites</entry></row>
+ <row><entry>History</entry><entry>%USERPROFILE%\Local Settings\History</entry></row>
+ <row><entry>Local AppData</entry><entry>%USERPROFILE%\Local Settings\Application Data</entry></row>
+ <row><entry>Local Settings</entry><entry>%USERPROFILE%\Local Settings</entry></row>
+ <row><entry>My Pictures</entry><entry>%USERPROFILE%\My Documents\My Pictures</entry></row>
+ <row><entry>NetHood</entry><entry>%USERPROFILE%\NetHood</entry></row>
+ <row><entry>Personal</entry><entry>%USERPROFILE%\My Documents</entry></row>
+ <row><entry>PrintHood</entry><entry>%USERPROFILE%\PrintHood</entry></row>
+ <row><entry>Programs</entry><entry>%USERPROFILE%\Start Menu\Programs</entry></row>
+ <row><entry>Recent</entry><entry>%USERPROFILE%\Recent</entry></row>
+ <row><entry>SendTo</entry><entry>%USERPROFILE%\SendTo</entry></row>
+ <row><entry>Start Menu</entry><entry>%USERPROFILE%\Start Menu</entry></row>
+ <row><entry>Startup</entry><entry>%USERPROFILE%\Start Menu\Programs\Startup</entry></row>
+ <row><entry>Templates</entry><entry>%USERPROFILE%\Templates</entry></row>
+ </tbody></tgroup></table>
+</para>
<para>
-There is also an entry called "Default" that has no value set. The default entry is of type REG_SZ, all
-the others are of type REG_EXPAND_SZ.
+There is also an entry called "Default" that has no value set. The default entry is of type <constant>REG_SZ</constant>, all
+the others are of type <constant>REG_EXPAND_SZ</constant>.
</para>
<para>
@@ -1084,21 +1110,20 @@ write the Outlook PST file over the network for every login and logout.
<para>
To set this to a network location you could use the following examples:
+</para>
-<programlisting>
- %LOGONSERVER%\%USERNAME%\Default Folders
-</programlisting>
-
-This would store the folders in the user's home directory under a directory called "Default Folders"
+<para><filename>%LOGONSERVER%\%USERNAME%\Default Folders</filename></para>
+<para>
+This would store the folders in the user's home directory under a directory called <filename>Default Folders</filename>
You could also use:
+</para>
-<programlisting>
- \\SambaServer\FolderShare\%USERNAME%
-</programlisting>
+<para><filename>\\<replaceable>SambaServer</replaceable>\<replaceable>FolderShare</replaceable>\%USERNAME%</filename></para>
-in which case the default folders will be stored in the server named <emphasis>SambaServer</emphasis>
-in the share called <emphasis>FolderShare</emphasis> under a directory that has the name of the MS Windows
+<para>
+ in which case the default folders will be stored in the server named <replaceable>SambaServer</replaceable>
+in the share called <replaceable>FolderShare</replaceable> under a directory that has the name of the MS Windows
user as seen by the Linux/Unix file system.
</para>
@@ -1112,12 +1137,9 @@ MS Windows 200x/XP profiles may be <emphasis>Local</emphasis> or <emphasis>Roami
A roaming profile will be cached locally unless the following registry key is created:
</para>
-<para>
-<programlisting>
- HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\winlogon\
- "DeleteRoamingCache"=dword:00000001
-</programlisting>
+<para><filename>HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\winlogon\"DeleteRoamingCache"=dword:00000001</filename></para>
+<para>
In which case, the local cache copy will be deleted on logout.
</para>
</sect2>
@@ -1127,7 +1149,7 @@ In which case, the local cache copy will be deleted on logout.
<title>Common Errors</title>
<para>
-THe following are some typical errors/problems/questions that have been asked.
+The following are some typical errors/problems/questions that have been asked.
</para>
<sect2>
@@ -1159,17 +1181,172 @@ In any case, you can configure only one profile per user. That profile can
be either:
</para>
-<itemizedlist>
- <listitem><para>
- A profile unique to that user
- </para></listitem>
- <listitem><para>
- A mandatory profile (one the user can not change)
- </para></listitem>
- <listitem><para>
- A group profile (really should be mandatory ie:unchangable)
- </para></listitem>
-</itemizedlist>
+<simplelist>
+ <member>A profile unique to that user</member>
+ <member>A mandatory profile (one the user can not change)</member>
+ <member>A group profile (really should be mandatory ie:unchangable)</member>
+</simplelist>
+
+</sect2>
+
+<sect2>
+<title>Can NOT use Roaming Profiles</title>
+
+<para>
+<quote>
+ I dont want Roaming profile to be implemented, I just want to give users
+ local profiles only.
+...
+ Please help me I am totally lost with this error from past two days I tried
+ everything and googled around quite a bit but of no help. Please help me.
+</quote></para>
+
+<para>
+Your choices are:
+<!-- FIXME: Write to whole sentences -->
+
+<variablelist>
+ <varlistentry>
+ <term>Local profiles</term>
+ <listitem><para>
+ I know of no registry keys that will allow auto-deletion of LOCAL profiles on log out
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Roaming profiles</term>
+ <listitem><para>
+ <simplelist>
+ <member>can use auto-delete on logout option</member>
+ <member>requires a registry key change on workstation</member>
+ </simplelist>
+
+ Your choices are:
+
+ <variablelist>
+ <varlistentry>
+ <term>Personal Roaming profiles</term>
+ <listitem><para>
+ - should be preserved on a central server
+ - workstations 'cache' (store) a local copy
+ - used in case the profile can not be downloaded
+ at next logon
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Group profiles</term>
+ <listitem><para>- loaded from a central place</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Mandatory profiles</term>
+ <listitem><para>
+ - can be personal or group
+ - can NOT be changed (except by an administrator
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+
+</para>
+
+<para>
+A WinNT4/2K/XP profile can vary in size from 130KB to off the scale.
+Outlook PST files are most often part of the profile and can be many GB in
+size. On average (in a well controlled environment) roaming profile size of
+2MB is a good rule of thumb to use for planning purposes. In an
+undisciplined environment I have seen up to 2GB profiles. Users tend to
+complain when it take an hour to log onto a workstation but they harvest
+the fruits of folly (and ignorance).
+</para>
+
+<para>
+The point of all the above is to show that roaming profiles and good
+controls of how they can be changed as well as good discipline make up for
+a problem free site.
+</para>
+
+<para>
+Microsoft's answer to the PST problem is to store all email in an MS
+Exchange Server back-end. But this is another story ...!
+</para>
+
+<para>
+So, having LOCAL profiles means:
+
+<simplelist>
+ <member>If lots of users user each machine - lot's of local disk storage needed for local profiles</member>
+ <member>Every workstation the user logs into has it's own profile - can be very different from machine to machine</member>
+</simplelist>
+
+On the other hand, having roaming profiles means:
+<simplelist>
+ <member>The network administrator can control EVERY aspect of user profiles</member>
+ <member>With the use of mandatory profiles - a drastic reduction in network management overheads</member>
+ <member>User unhappiness about not being able to change their profiles soon fades as they get used to being able to work reliably</member>
+</simplelist>
+
+</para>
+
+<para>
+I have managed and installed MANY NT/2K networks and have NEVER found one
+where users who move from machine to machine are happy with local
+profiles. In the long run local profiles bite them.
+</para>
+
+</sect2>
+
+<!-- FIXME: Everything below this is a mess. I didn't quite understand it - Jelmer -->
+
+<sect2>
+ <title>Changing the default profile</title>
+
+<para><quote>
+When the client tries to logon to the PDC it looks for a profile to download
+where do I put this default profile.
+</quote></para>
+
+<para>
+Firstly, your samba server need to be configured as a domain controller.
+</para>
+
+<programlisting>
+ server = user
+ os level = 32 (or more)
+ domain logons = Yes
+</programlisting>
+
+<para>
+Plus you need to have a <parameter>[netlogon]</parameter> share that is world readable.
+It is a good idea to add a logon script to pre-set printer and
+drive connections. There is also a facility for automatically
+synchronizing the workstation time clock with that of the logon
+server (another good thing to do).
+</para>
+
+<note><para>
+To invoke auto-deletion of roaming profile from the local
+workstation cache (disk storage) you need to use the <application>Group Policy Editor</application>
+to create a file called <filename>NTConfig.POL</filename> with the appropriate entries. This
+file needs to be located in the <parameter>netlogon</parameter> share root directory.</para></note>
+
+<para>
+Oh, of course the windows clients need to be members of the domain.
+Workgroup machines do NOT do network logons - so they never see domain
+profiles.
+</para>
+
+<para>
+Secondly, for roaming profiles you need:
+
+ logon path = \\%N\profiles\%U (with some such path)
+ logon drive = H: (Z: is the default)
+
+ Plus you need a PROFILES share that is world writable.
+</para>
</sect2>
</sect1>
diff --git a/docs/docbook/projdoc/SWAT.xml b/docs/docbook/projdoc/SWAT.xml
index f238e8e1b0..1ea0789661 100644
--- a/docs/docbook/projdoc/SWAT.xml
+++ b/docs/docbook/projdoc/SWAT.xml
@@ -4,7 +4,7 @@
<pubdate>April 21, 2003</pubdate>
</chapterinfo>
-<title>SWAT - The Samba Web Admininistration Tool</title>
+<title>SWAT - The Samba Web Administration Tool</title>
<para>
There are many and varied opinions regarding the usefulness or otherwise of SWAT.
@@ -17,7 +17,7 @@ management.
</para>
<sect1>
-<title>SWAT Features and Benefits</title>
+<title>Features and Benefits</title>
<para>
There are network administrators who believe that it is a good idea to write systems
@@ -25,7 +25,7 @@ documentation inside configuration files, for them SWAT will aways be a nasty to
does not store the configuration file in any intermediate form, rather, it stores only the
parameter settings, so when SWAT writes the smb.conf file to disk it will write only
those parameters that are at other than the default settings. The result is that all comments
-will be lost from the smb.conf file. Additionally, the parameters will be written back in
+will be lost from the &smb.conf; file. Additionally, the parameters will be written back in
internal ordering.
</para>
@@ -40,8 +40,8 @@ and only non-default settings will be written to the file.
<para>
SWAT should be installed to run via the network super daemon. Depending on which system
-your Unix/Linux system has you will have either an <filename>inetd</filename> or
-<filename>xinetd</filename> based system.
+your Unix/Linux system has you will have either an <command>inetd</command> or
+<command>xinetd</command> based system.
</para>
<para>
@@ -86,7 +86,7 @@ A control file for the newer style xinetd could be:
</para>
<para>
-Both the above examples assume that the <filename>swat</filename> binary has been
+Both the above examples assume that the <command>swat</command> binary has been
located in the <filename>/usr/sbin</filename> directory. In addition to the above
SWAT will use a directory access point from which it will load it's help files
as well as other control information. The default location for this on most Linux
@@ -98,14 +98,16 @@ location using samba defaults will be <filename>/usr/local/samba/swat</filename>
Access to SWAT will prompt for a logon. If you log onto SWAT as any non-root user
the only permission allowed is to view certain aspects of configuration as well as
access to the password change facility. The buttons that will be exposed to the non-root
-user are: <emphasis>HOME, STATUS, VIEW, PASSWORD</emphasis>. The only page that allows
-change capability in this case is <emphasis>PASSWORD</emphasis>.
+user are: <guibutton>HOME</guibutton>, <guibutton>STATUS</guibutton>, <guibutton>VIEW</guibutton>,
+<guibutton>PASSWORD</guibutton>. The only page that allows
+change capability in this case is <guibutton>PASSWORD</guibutton>.
</para>
<para>
-So long as you log onto SWAT as the user <command>root</command> you should obtain
+So long as you log onto SWAT as the user <emphasis>root</emphasis> you should obtain
full change and commit ability. The buttons that will be exposed includes:
-<emphasis>HOME, GLOBALS, SHARES, PRINTERS, WIZARD, STATUS, VIEW, PASSWORD</emphasis>.
+<guibutton>HOME</guibutton>, <guibutton>GLOBALS</guibutton>, <guibutton>SHARES</guibutton>, <guibutton>PRINTERS</guibutton>,
+<guibutton>WIZARD</guibutton>, <guibutton>STATUS</guibutton>, <guibutton>VIEW</guibutton>, <guibutton>PASSWORD</guibutton>.
</para>
</sect2>
@@ -122,35 +124,35 @@ administration of Samba. Here is a method that works, courtesy of Markus Krieger
Modifications to the swat setup are as following:
</para>
-<itemizedlist>
- <listitem><para>
+<procedure>
+ <step><para>
install OpenSSL
- </para></listitem>
+ </para></step>
- <listitem><para>
+ <step><para>
generate certificate and private key
- <programlisting>
- root# /usr/bin/openssl req -new -x509 -days 365 -nodes -config \
- /usr/share/doc/packages/stunnel/stunnel.cnf \
- -out /etc/stunnel/stunnel.pem -keyout /etc/stunnel/stunnel.pem
- </programlisting></para></listitem>
+ <screen>
+&rootprompt;<userinput>/usr/bin/openssl req -new -x509 -days 365 -nodes -config \
+ /usr/share/doc/packages/stunnel/stunnel.cnf \
+ -out /etc/stunnel/stunnel.pem -keyout /etc/stunnel/stunnel.pem</userinput>
+ </screen></para></step>
- <listitem><para>
+ <step><para>
remove swat-entry from [x]inetd
- </para></listitem>
+ </para></step>
- <listitem><para>
+ <step><para>
start stunnel
- <programlisting>
- root# stunnel -p /etc/stunnel/stunnel.pem -d 901 \
- -l /usr/local/samba/bin/swat swat
- </programlisting></para></listitem>
-</itemizedlist>
+ <screen>
+&rootprompt;<userinput>stunnel -p /etc/stunnel/stunnel.pem -d 901 \
+ -l /usr/local/samba/bin/swat swat </userinput>
+ </screen></para></step>
+</procedure>
<para>
-afterwards simply contact to swat by using the URL "https://myhost:901", accept the certificate
+afterwords simply contact to swat by using the URL <ulink url="https://myhost:901">https://myhost:901</ulink>, accept the certificate
and the SSL connection is up.
</para>
@@ -167,19 +169,19 @@ document) as well as the O'Reilly book "Using Samba".
<para>
Administrators who wish to validate their samba configuration may obtain useful information
-from the man pages for the diganostic utilities. These are available from the SWAT home page
+from the man pages for the diagnostic utilities. These are available from the SWAT home page
also. One diagnostic tool that is NOT mentioned on this page, but that is particularly
useful is <command>ethereal</command>, available from <ulink url="http://www.ethereal.com">
http://www.ethereal.com</ulink>.
</para>
-<note><para>
+<warning><para>
SWAT can be configured to run in <emphasis>demo</emphasis> mode. This is NOT recommended
as it runs SWAT without authentication and with full administrative ability. ie: Allows
-changes to smb.conf as well as general operation with root privilidges. The option that
-creates this ability is the <command>-a</command> flag to swat. DO NOT USE THIS IN ANY
-PRODUCTION ENVIRONMENT - you have been warned!
-</para></note>
+changes to smb.conf as well as general operation with root privileges. The option that
+creates this ability is the <option>-a</option> flag to swat. <emphasis>Do not use this in any
+production environment.</emphasis>
+</para></warning>
</sect2>
@@ -193,16 +195,16 @@ in smb.conf. There are three levels of exposure of the parameters:
<itemizedlist>
<listitem><para>
- <command>Basic</command> - exposes common configuration options.
+ <emphasis>Basic</emphasis> - exposes common configuration options.
</para></listitem>
<listitem><para>
- <command>Advanced</command> - exposes configuration options needed in more
+ <emphasis>Advanced</emphasis> - exposes configuration options needed in more
complex environments.
</para></listitem>
<listitem><para>
- <command>Developer</command> - exposes configuration options that only the brave
+ <emphasis>Developer</emphasis> - exposes configuration options that only the brave
will want to tamper with.
</para></listitem>
</itemizedlist>
@@ -210,18 +212,18 @@ in smb.conf. There are three levels of exposure of the parameters:
<para>
To switch to other than <emphasis>Basic</emphasis> editing ability click on either the
<emphasis>Advanced</emphasis> or the <emphasis>Developer</emphasis> dial, then click the
-<emphasis>Commit Changes</emphasis> button.
+<guibutton>Commit Changes</guibutton> button.
</para>
<para>
After making any changes to configuration parameters make sure that you click on the
-<emphasis>Commit Changes</emphasis> button before moving to another area otherwise
+<guibutton>Commit Changes</guibutton> button before moving to another area otherwise
your changes will be immediately lost.
</para>
<note><para>
SWAT has context sensitive help. To find out what each parameter is for simply click the
-<command>Help</command> link to the left of the configurartion parameter.
+<guibutton>Help</guibutton> link to the left of the configuration parameter.
</para></note>
</sect2>
@@ -230,17 +232,17 @@ SWAT has context sensitive help. To find out what each parameter is for simply c
<title>Share Settings</title>
<para>
-To affect a currenly configured share, simply click on the pull down button between the
-<emphasis>Choose Share</emphasis> and the <emphasis>Delete Share</emphasis> buttons,
+To affect a currently configured share, simply click on the pull down button between the
+<guibutton>Choose Share</guibutton> and the <guibutton>Delete Share</guibutton> buttons,
select the share you wish to operate on, then to edit the settings click on the
-<emphasis>Choose Share</emphasis> button, to delete the share simply press the
-<emphasis>Delete Share</emphasis> button.
+<guibutton>Choose Share</guibutton> button, to delete the share simply press the
+<guibutton>Delete Share</guibutton> button.
</para>
<para>
-To create a new share, next to the button labelled <emphasis>Create Share</emphasis> enter
+To create a new share, next to the button labelled <guibutton>Create Share</guibutton> enter
into the text field the name of the share to be created, then click on the
-<emphasis>Create Share</emphasis> button.
+<guibutton>Create Share</guibutton> button.
</para>
</sect2>
@@ -249,17 +251,17 @@ into the text field the name of the share to be created, then click on the
<title>Printers Settings</title>
<para>
-To affect a currenly configured printer, simply click on the pull down button between the
-<emphasis>Choose Printer</emphasis> and the <emphasis>Delete Printer</emphasis> buttons,
+To affect a currently configured printer, simply click on the pull down button between the
+<guibutton>Choose Printer</guibutton> and the <guibutton>Delete Printer</guibutton> buttons,
select the printer you wish to operate on, then to edit the settings click on the
-<emphasis>Choose Printer</emphasis> button, to delete the share simply press the
-<emphasis>Delete Printer</emphasis> button.
+<guibutton>Choose Printer</guibutton> button, to delete the share simply press the
+<guibutton>Delete Printer</guibutton> button.
</para>
<para>
-To create a new printer, next to the button labelled <emphasis>Create Printer</emphasis> enter
+To create a new printer, next to the button labelled <guibutton>Create Printer</guibutton> enter
into the text field the name of the share to be created, then click on the
-<emphasis>Create Printer</emphasis> button.
+<guibutton>Create Printer</guibutton> button.
</para>
</sect2>
@@ -268,26 +270,26 @@ into the text field the name of the share to be created, then click on the
<title>The SWAT Wizard</title>
<para>
-The purpose if the SWAT Wizard is to help the Microsoft knowledgable network administrator
+The purpose if the SWAT Wizard is to help the Microsoft knowledgeable network administrator
to configure Samba with a minimum of effort.
</para>
<para>
-The Wizard page provides a tool for rewiting the smb.conf file in fully optimised format.
+The Wizard page provides a tool for rewriting the smb.conf file in fully optimised format.
This will also happen if you press the commit button. The two differ in the the rewrite button
ignores any changes that may have been made, while the Commit button causes all changes to be
affected.
</para>
<para>
-The <emphasis>Edit</emphasis> button permits the editing (setting) of the minimal set of
-options that may be necessary to create a working samba server.
+The <guibutton>Edit</guibutton> button permits the editing (setting) of the minimal set of
+options that may be necessary to create a working Samba server.
</para>
<para>
-Finally, there are a limited set of options that will determine what type of server samba
+Finally, there are a limited set of options that will determine what type of server Samba
will be configured for, whether it will be a WINS server, participate as a WINS client, or
-operate with no WINS support. By clicking on one button you can elect to epose (or not) user
+operate with no WINS support. By clicking on one button you can elect to expose (or not) user
home directories.
</para>
@@ -298,7 +300,7 @@ home directories.
<para>
The status page serves a limited purpose. Firstly, it allows control of the samba daemons.
-The key daemons that create the samba server environment are: <command> smbd, nmbd, winbindd</command>.
+The key daemons that create the samba server environment are: &smbd;, &nmbd;, &winbindd;.
</para>
<para>
@@ -319,8 +321,8 @@ free files that may be locked.
<title>The View Page</title>
<para>
-This page allows the administrator to view the optimised smb.conf file and if you are
-particularly massochistic will permit you also to see all possible global configuration
+This page allows the administrator to view the optimised &smb.conf; file and, if you are
+particularly masochistic, will permit you also to see all possible global configuration
parameters and their settings.
</para>
@@ -337,7 +339,7 @@ this tool to change a local password for a user account.
<para>
When logged in as a non-root account the user will have to provide the old password as well as
-the new password (twice). When logged in as <command>root</command> only the new password is
+the new password (twice). When logged in as <emphasis>root</emphasis> only the new password is
required.
</para>
diff --git a/docs/docbook/projdoc/Samba-BDC-HOWTO.xml b/docs/docbook/projdoc/Samba-BDC-HOWTO.xml
index 552834e929..52e53a51c7 100644
--- a/docs/docbook/projdoc/Samba-BDC-HOWTO.xml
+++ b/docs/docbook/projdoc/Samba-BDC-HOWTO.xml
@@ -10,16 +10,16 @@
<para>
Before you continue reading in this section, please make sure that you are comfortable
with configuring a Samba Domain Controller as described in the
-<ulink url="Samba-PDC-HOWTO.html">Domain Control Chapter</ulink>.
+<link linkend="samba-pdc">Domain Control</link> chapter.
</para>
<sect1>
<title>Features And Benefits</title>
<para>
-This is one of the most difficult chapters to summarise. It matters not what we say here
+This is one of the most difficult chapters to summarise. It does not matter what we say here
for someone will still draw conclusions and / or approach the Samba-Team with expectations
-that are either not yet capable of being delivered, or that can be achieved for more
+that are either not yet capable of being delivered, or that can be achieved far more
effectively using a totally different approach. Since this HOWTO is already so large and
extensive, we have taken the decision to provide sufficient (but not comprehensive)
information regarding Backup Domain Control. In the event that you should have a persistent
@@ -46,7 +46,7 @@ The use of a non-LDAP backend SAM database is particularly problematic because D
servers and workstations periodically change the machine trust account password. The new
password is then stored only locally. This means that in the absence of a centrally stored
accounts database (such as that provided with an LDAP based solution) if Samba-3 is running
-as a BDC, the PDC instance of the Domain member trust account password will not reach the
+as a BDC, the BDC instance of the Domain member trust account password will not reach the
PDC (master) copy of the SAM. If the PDC SAM is then replicated to BDCs this results in
overwriting of the SAM that contains the updated (changed) trust account password with resulting
breakage of the domain trust.
@@ -74,7 +74,7 @@ lets consider each possible option and look at the pro's and con's for each theo
</listitem>
<listitem><para>
- Passdb Backend is tdbsam based, BDCs use cron based "net rcp vampire" to
+ Passdb Backend is tdbsam based, BDCs use cron based "net rpc vampire" to
suck down the Accounts database from the PDC
</para>
@@ -131,7 +131,7 @@ provided this capability. The technology has become known as the LanMan Netlogon
</para>
<para>
-When MS Windows NT3.10 was first released it supported an new style of Domain Control
+When MS Windows NT3.10 was first released, it supported an new style of Domain Control
and with it a new form of the network logon service that has extended functionality.
This service became known as the NT NetLogon Service. The nature of this service has
changed with the evolution of MS Windows NT and today provides a very complex array of
@@ -142,11 +142,11 @@ services that are implemented over a complex spectrum of technologies.
<title>MS Windows NT4 Style Domain Control</title>
<para>
-Whenever a user logs into a Windows NT4 / 200x / XP Profresional Workstation,
+Whenever a user logs into a Windows NT4 / 200x / XP Professional Workstation,
the workstation connects to a Domain Controller (authentication server) to validate
the username and password that the user entered are valid. If the information entered
does not validate against the account information that has been stored in the Domain
-Control database (the SAM, or Security Accounts Manager database) then a set of error
+Control database (the SAM, or Security Account Manager database) then a set of error
codes is returned to the workstation that has made the authentication request.
</para>
@@ -177,7 +177,7 @@ There are two situations in which it is desirable to install Backup Domain Contr
<itemizedlist>
<listitem><para>
- On the local network that the Primary Domain Controller is on if there are many
+ On the local network that the Primary Domain Controller is on, if there are many
workstations and/or where the PDC is generally very busy. In this case the BDCs
will pick up network logon requests and help to add robustness to network services.
</para></listitem>
@@ -198,7 +198,7 @@ has the PDC, the change will likely be made directly to the PDC instance of the
copy of the SAM. In the event that this update may be performed in a branch office the
change will likely be stored in a delta file on the local BDC. The BDC will then send
a trigger to the PDC to commence the process of SAM synchronisation. The PDC will then
-request the delta from the BDC and apply it to the master SAM. THe PDC will then contact
+request the delta from the BDC and apply it to the master SAM. The PDC will then contact
all the BDCs in the Domain and trigger them to obtain the update and then apply that to
their own copy of the SAM.
</para>
@@ -225,7 +225,7 @@ Server Manager for Domains.
<para>
Since version 2.2 Samba officially supports domain logons for all current Windows Clients,
including Windows NT4, 2003 and XP Professional. For samba to be enabled as a PDC some
-parameters in the [global]-section of the smb.conf have to be set:
+parameters in the <parameter>[global]</parameter>-section of the &smb.conf; have to be set:
</para>
<para><programlisting>
@@ -235,9 +235,9 @@ parameters in the [global]-section of the smb.conf have to be set:
</programlisting></para>
<para>
-Several other things like a [homes] and a [netlogon] share also need to be set along with
+Several other things like a <parameter>[homes]</parameter> and a <parameter>[netlogon]</parameter> share also need to be set along with
settings for the profile path, the users home drive, etc.. This will not be covered in this
-chapter, for more information please refer to the chapter on Domain Control.
+chapter, for more information please refer to the chapter on <link linkend="samba-pdc">Domain Control</link>.
</para>
</sect3>
@@ -251,7 +251,7 @@ As of the release of MS Windows 2000 and Active Directory, this information is n
in a directory that can be replicated and for which partial or full administrative control
can be delegated. Samba-3 is NOT able to be a Domain Controller within an Active Directory
tree, and it can not be an Active Directory server. This means that Samba-3 also can NOT
-act as a Backup Domain Contoller to an Active Directory Domain Controller.
+act as a Backup Domain Controller to an Active Directory Domain Controller.
</para>
</sect2>
@@ -280,7 +280,7 @@ by doing a NetBIOS name query for the group name SAMBA&lt;#1c&gt;. It assumes th
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 domain controller
authenticate each other. After that the workstation sends the user's credentials (name and
-password) to the local Domain Controller, for valdation.
+password) to the local Domain Controller, for validation.
</para>
</sect2>
@@ -306,8 +306,12 @@ Several things have to be done:
<para>
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.
- </para></listitem>
+ secrets.tdb, execute:
+ </para>
+ <screen>
+ &rootprompt;<userinput>net rpc getsid</userinput>
+ </screen>
+ </listitem>
<listitem><para>
The Unix user database has to be synchronized from the PDC to the
@@ -316,14 +320,18 @@ Several things have to be done:
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.
+ access its user database in case of a PDC failure. NIS is by no means
+ the only method to synchronize passwords. An LDAP solution would work
+ as well.
</para>
</listitem>
<listitem><para>
- 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.
+ The Samba password database has to be replicated from the PDC to the BDC.
+ As said above, though possible to synchronise the <filename>smbpasswd</filename>
+ file with rsync and ssh, this method is broken and flawed, and is
+ therefore not recommended. A better solution is to set up slave LDAP
+ servers for each BDC and a master LDAP server for the PDC.
</para></listitem>
<listitem><para>
@@ -343,14 +351,13 @@ Finally, the BDC has to be found by the workstations. This can be done by settin
</para>
<para><programlisting>
-<title>Essential Parameters for BDC Operation</title>
workgroup = SAMBA
domain master = no
domain logons = yes
</programlisting></para>
<para>
-in the [global]-section of the smb.conf of the BDC. This makes the BDC
+in the <parameter>[global]</parameter>-section of the &smb.conf; of the BDC. This makes the BDC
only register the name SAMBA&lt;#1c&gt; with the WINS server. This is no
problem as the name SAMBA&lt;#1c&gt; is a NetBIOS group name that is meant to
be registered by more than one machine. The parameter 'domain master =
@@ -365,7 +372,7 @@ name is reserved for the Primary Domain Controller.
<title>Common Errors</title>
<para>
-As this is a rather new area for Samba there are not many examples thta we may refer to. Keep
+As this is a rather new area for Samba there are not many examples that we may refer to. Keep
watching for updates to this section.
</para>
@@ -379,7 +386,12 @@ are not copied back to the central server. The newer machine account password is
written when the SAM is copied from the PDC. The result is that the Domain member machine
on start up will find that it's passwords does not match the one now in the database and
since the startup security check will now fail, this machine will not allow logon attempts
-to procede and the account expiry error will be reported.
+to proceed and the account expiry error will be reported.
+</para>
+
+<para>
+The solution: use a more robust passdb backend, such as the ldapsam backend, setting up
+an slave LDAP server for each BDC, and a master LDAP server for the PDC.
</para>
</sect2>
@@ -419,10 +431,16 @@ has to be replicated to the BDC. So replicating the smbpasswd file very often is
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
+Ssh itself can be set up to accept <emphasis>only</emphasis> rsync transfer without requiring the user
to type a password.
</para>
+<para>
+As said a few times before, use of this method is broken and flawed. Machine trust
+accounts will go out of sync, resulting in a very broken domain. This method is
+<emphasis>not</emphasis> recommended. Try using LDAP instead.
+</para>
+
</sect2>
<sect2>
diff --git a/docs/docbook/projdoc/Samba-PDC-HOWTO.xml b/docs/docbook/projdoc/Samba-PDC-HOWTO.xml
index e8c60c8d6d..f208e16d28 100644
--- a/docs/docbook/projdoc/Samba-PDC-HOWTO.xml
+++ b/docs/docbook/projdoc/Samba-PDC-HOWTO.xml
@@ -17,7 +17,7 @@
<formalpara><title><emphasis>The Essence of Learning:</emphasis></title>
<para>
There are many who approach MS Windows networking with incredible misconceptions.
-That's OK, because it give the rest of us plenty of opportunity to be of assistance.
+That's OK, because it gives the rest of us plenty of opportunity to be of assistance.
Those who really want help would be well advised to become familiar with information
that is already available.
</para>
@@ -33,34 +33,34 @@ that in some magical way is expected to solve all ills.
</para>
<para>
-From the Samba mailing list one can readilly identify many common networking issues.
+From the Samba mailing list one can readily identify many common networking issues.
If you are not clear on the following subjects, then it will do much good to read the
sections of this HOWTO that deal with it. These are the most common causes of MS Windows
networking problems:
</para>
-<itemizedlist>
- <listitem><para>Basic TCP/IP configuration</para></listitem>
- <listitem><para>NetBIOS name resolution</para></listitem>
- <listitem><para>Authentication configuration</para></listitem>
- <listitem><para>User and Group configuration</para></listitem>
- <listitem><para>Basic File and Directory Permission Control in Unix/Linux</para></listitem>
- <listitem><para>Understanding of how MS Windows clients interoperate in a network
- environment</para></listitem>
-</itemizedlist>
+<simplelist>
+ <member>Basic TCP/IP configuration</member>
+ <member>NetBIOS name resolution</member>
+ <member>Authentication configuration</member>
+ <member>User and Group configuration</member>
+ <member>Basic File and Directory Permission Control in Unix/Linux</member>
+ <member>Understanding of how MS Windows clients interoperate in a network
+ environment</member>
+</simplelist>
<para>
-Do not be put off, on the surface of it MS Windows networking seems so simple that any fool
+Do not be put off; on the surface of it MS Windows networking seems so simple that any fool
can do it. In fact, it is not a good idea to set up an MS Windows network with
inadequate training and preparation. But let's get our first indelible principle out of the
way: <emphasis>It is perfectly OK to make mistakes!</emphasis> In the right place and at
the right time, mistakes are the essence of learning. It is <emphasis>very much</emphasis>
-not Ok to make mistakes that cause loss of productivity and impose an avoidable financial
+not ok to make mistakes that cause loss of productivity and impose an avoidable financial
burden on an organisation.
</para>
<para>
-Where is the right place to make mistakes? Only out of harms' way! If you are going to
+Where is the right place to make mistakes? Only out of harm's way! If you are going to
make mistakes, then please do this on a test network, away from users and in such a way as
to not inflict pain on others. Do your learning on a test network.
</para>
@@ -73,7 +73,7 @@ to not inflict pain on others. Do your learning on a test network.
</para>
<para>
-In a word, <emphasis>Single Sign On</emphasis>, or SSO for short. This to many is the holy
+In a word, <emphasis>Single Sign On</emphasis>, or SSO for short. To many, this is the holy
grail of MS Windows NT and beyond networking. SSO allows users in a well designed network
to log onto any workstation that is a member of the domain that their user account is in
(or in a domain that has an appropriate trust relationship with the domain they are visiting)
@@ -90,8 +90,8 @@ The benefits of Domain security are fully available to those sites that deploy a
Network clients of an MS Windows Domain security environment must be Domain members to be
able to gain access to the advanced features provided. Domain membership involves more than just
setting the workgroup name to the Domain name. It requires the creation of a Domain trust account
-for the workstation (called a machine account). Please refer to the chapter on Domain Membership
-for more information.
+for the workstation (called a machine account). Please refer to the chapter on
+<link linkend="domain-member">Domain Membership</link> for more information.
</para></note>
<para>
@@ -106,20 +106,20 @@ The following functionalities are new to the Samba-3 release:
<listitem><para>
Adding users via the User Manager for Domains. This can be done on any MS Windows
client using the Nexus toolkit that is available from Microsoft's web site.
- At some later date Samba-3 may get support for the use of the Microsoft Manangement
+ At some later date Samba-3 may get support for the use of the Microsoft Management
Console for user management.
</para></listitem>
<listitem><para>
Introduces replaceable and multiple user account (authentication)
- back ends. In the case where the back end is placed in an LDAP database
+ back ends. In the case where the back end is placed in an LDAP database,
Samba-3 confers the benefits of a back end that can be distributed, replicated,
- and highly scalable.
+ and is highly scalable.
</para></listitem>
<listitem><para>
Implements full Unicode support. This simplifies cross locale internationalisation
- support. It also opens up the use of protocols that samba-2.2.x had but could not use due
+ support. It also opens up the use of protocols that Samba-2.2.x had but could not use due
to the need to fully support Unicode.
</para></listitem>
</itemizedlist>
@@ -140,7 +140,7 @@ The following functionalities are NOT provided by Samba-3:
Active Directory Domain Control ability that is at this time
purely experimental <emphasis>AND</emphasis> that is certain
to change as it becomes a fully supported feature some time
- during the samba-3 (or later) life cycle.
+ during the Samba-3 (or later) life cycle.
</para></listitem>
</itemizedlist>
@@ -149,24 +149,26 @@ Windows 9x / Me / XP Home clients are not true members of a domain for reasons o
in this chapter. The protocol for support of Windows 9x / Me style network (domain) logons
is completely different from NT4 / Win2k type domain logons and has been officially supported
for some time. These clients use the old LanMan Network Logon facilities that are supported
-in Samba since approximately the samba-1.9.15 series.
+in Samba since approximately the Samba-1.9.15 series.
</para>
<para>
Samba-3 has an implementation of group mapping between Windows NT groups
-and Unix groups (this is really quite complicated to explain in a short space) this is
-discussed more fully in a chapter dedicated to this topic..
+and Unix groups (this is really quite complicated to explain in a short space). This is
+discussed more fully in the <link linkend="groupmapping">Group Mapping</link> chapter.
</para>
<para>
-A Samba-3, like an MS Windows NT4 PDC or a Windows 200x Active Directory, needs to store
+Samba-3, like an MS Windows NT4 PDC or a Windows 200x Active Directory, needs to store
user and machine trust account information in a suitable backend data store. With Samba-3
there can be multiple back-ends for this including:
</para>
+<!-- FIXME: Doesn't this belong in passdb.xml ? -->
+
<itemizedlist>
<listitem><para>
- <emphasis>smbpasswd</emphasis> - the plain ascii file stored used by
+ <emphasis>smbpasswd</emphasis> - the plain ASCII file stored used by
earlier versions of Samba. This file configuration option requires
a Unix/Linux system account for EVERY entry (ie: both for user and for
machine accounts). This file will be located in the <emphasis>private</emphasis>
@@ -176,8 +178,8 @@ there can be multiple back-ends for this including:
<listitem><para>
<emphasis>tdbsam</emphasis> - a binary database backend that will be
stored in the <emphasis>private</emphasis> directory in a file called
- <emphasis>passwd.tdb</emphasis>. The key benefit of this binary format
- file is that it can store binary objects that can not be accomodated
+ <emphasis>passdb.tdb</emphasis>. The key benefit of this binary format
+ file is that it can store binary objects that can not be accommodated
in the traditional plain text smbpasswd file. These permit the extended
account controls that MS Windows NT4 and later also have.
</para></listitem>
@@ -194,13 +196,13 @@ there can be multiple back-ends for this including:
<listitem><para>
<emphasis>ldapsam_compat</emphasis> - An LDAP back-end that maintains backwards
compatibility with the behaviour of samba-2.2.x. You should use this in the process
- of mirgrating from samba-2.2.x to samba-3 if you do not want to rebuild your LDAP
+ of migrating from samba-2.2.x to samba-3 if you do not want to rebuild your LDAP
database.
</para></listitem>
</itemizedlist>
<para>
-Read the chapter about the <link linkend="passdb">User Database</link> for details
+Read the chapter about <link linkend="passdb">Account Information Database</link> for details
regarding the choices available and how to configure them.
</para>
@@ -220,8 +222,8 @@ to the default configuration.
<title>Basics of Domain Control</title>
<para>
-Over the years public perceptions of what Domain Control really is has taken on an
-almost mystical nature. Before we branch into a brief overview of Domain Control
+Over the years, public perceptions of what Domain Control really is has taken on an
+almost mystical nature. Before we branch into a brief overview of Domain Control,
there are three basic types of domain controllers:
</para>
@@ -238,22 +240,22 @@ there are three basic types of domain controllers:
The <emphasis>Primary Domain Controller</emphasis> or PDC plays an important role in the MS
Windows NT4 and Windows 200x Domain Control architecture, but not in the manner that so many
expect. There is folk lore that dictates that because of it's role in the MS Windows
-network that the PDC should be the most powerful and most capable machine in the network.
+network, the PDC should be the most powerful and most capable machine in the network.
As strange as it may seem to say this here, good over all network performance dictates that
the entire infrastructure needs to be balanced. It is advisable to invest more in the Backup
Domain Controllers and Stand-Alone (or Domain Member) servers than in the PDC.
</para>
<para>
-In the case of MS Windows NT4 style domaines it is the PDC seeds the Domain Control database,
-a part of the Windows registry called the SAM (Security Accounts Management). It plays a key
+In the case of MS Windows NT4 style domains, it is the PDC seeds the Domain Control database,
+a part of the Windows registry called the SAM (Security Account Manager). It plays a key
part in NT4 type domain user authentication and in synchronisation of the domain authentication
database with Backup Domain Controllers.
</para>
<para>
With MS Windows 200x Server based Active Directory domains, one domain controller seeds a potential
-hierachy of domain controllers, each with their own area of delegated control. The master domain
+hierarchy of domain controllers, each with their own area of delegated control. The master domain
controller has the ability to override any down-stream controller, but a down-line controller has
control only over it's down-line. With Samba-3 this functionality can be implemented using an
LDAP based user and machine account back end.
@@ -262,9 +264,9 @@ LDAP based user and machine account back end.
<para>
New to Samba-3 is the ability to use a back-end database that holds the same type of data as
the NT4 style SAM (Security Account Manager) database (one of the registry files).
-The samba-3 SAM can be specified via the smb.conf file parameter
-<emphasis>passwd backend</emphasis> and valid options include
-<emphasis>smbpasswd, tdbsam, ldapsam, nisplussam, xmlsam, mysqlsam, plugin, guest</emphasis>.
+The Samba-3 SAM can be specified via the smb.conf file parameter
+<parameter>passwd backend</parameter> and valid options include
+<emphasis>smbpasswd, tdbsam, ldapsam, nisplussam, xmlsam, mysqlsam, guest</emphasis>.
</para>
<para>
@@ -272,23 +274,23 @@ The <emphasis>Backup Domain Controller</emphasis> or BDC plays a key role in ser
authentication requests. The BDC is biased to answer logon requests in preference to the PDC.
On a network segment that has a BDC and a PDC the BDC will be most likely to service network
logon requests. The PDC will answer network logon requests when the BDC is too busy (high load).
-A BDC can be promoted to a PDC. If the PDC is on line at the time that the BDC is promoted to
-PDC the previous PDC is automatically demoted to a BDC. With Samba-3 this is NOT an automatic
-operation, the PDB and BDC must be manually configured and changes need to be made likewise.
+A BDC can be promoted to a PDC. If the PDC is on line at the time that a BDC is promoted to
+PDC, the previous PDC is automatically demoted to a BDC. With Samba-3 this is NOT an automatic
+operation; the PDC and BDC must be manually configured and changes need to be made likewise.
</para>
<para>
-With MS Windows NT4 it is an install time decision what type of machine the server will be.
-It is possible to change the promote a BDC to a PDC and vica versa only, but the only way
+With MS Windows NT4, it is an install time decision what type of machine the server will be.
+It is possible to change the promote a BDC to a PDC and vice versa only, but the only way
to convert a domain controller to a domain member server or a stand-alone server is to
reinstall it. The install time choices offered are:
</para>
<itemizedlist>
- <listitem><para>Primary Domain Controller - The one that seeds the domain SAM</para></listitem>
- <listitem><para>Backup Domain Controller - One that obtains a copy of the domain SAM</para></listitem>
- <listitem><para>Domain Member Server - One that has NO copy of the domain SAM, rather it obtains authentication from a Domain Controller for all access controls.</para></listitem>
- <listitem><para>Stand-Alone Server - One that plays NO part is SAM synchronisation, has it's own authentication database and plays no role in Domain security.</para></listitem>
+ <listitem><para><emphasis>Primary Domain Controller</emphasis> - The one that seeds the domain SAM</para></listitem>
+ <listitem><para><emphasis>Backup Domain Controller</emphasis> - One that obtains a copy of the domain SAM</para></listitem>
+ <listitem><para><emphasis>Domain Member Server</emphasis> - One that has NO copy of the domain SAM, rather it obtains authentication from a Domain Controller for all access controls.</para></listitem>
+ <listitem><para><emphasis>Stand-Alone Server</emphasis> - One that plays NO part is SAM synchronisation, has it's own authentication database and plays no role in Domain security.</para></listitem>
</itemizedlist>
<para>
@@ -300,14 +302,14 @@ Active Directory domain.
<para>
New to Samba-3 is the ability to function fully as an MS Windows NT4 style Domain Controller,
excluding the SAM replication components. However, please be aware that Samba-3 support the
-MS Windows 200x domain control protcols also.
+MS Windows 200x domain control protocols also.
</para>
<para>
At this time any appearance that Samba-3 is capable of acting as an
<emphasis>ADS Domain Controller</emphasis> is limited and experimental in nature.
-This functionality should not be used until the samba-team offers formal support for it.
-At such a time, the documentation will be revised to duely reflect all configuration and
+This functionality should not be used until the Samba-Team offers formal support for it.
+At such a time, the documentation will be revised to duly reflect all configuration and
management requirements.
</para>
@@ -329,14 +331,14 @@ other than the machine being configured so that the network configuration has a
for it's workgroup entry. It is not uncommon for the name WORKGROUP to be used for this. With this
mode of configuration there are NO machine trust accounts and any concept of membership as such
is limited to the fact that all machines appear in the network neighbourhood to be logically
-groupped together. Again, just to be clear: WORKGROUP MODE DOES NOT INVOLVE ANY SECURITY MACHINE
-ACCOUNTS.
+grouped together. Again, just to be clear: <emphasis>workgroup mode does not involve any security machine
+accounts</emphasis>.
</para>
<para>
Domain member machines have a machine account in the Domain accounts database. A special procedure
must be followed on each machine to affect Domain membership. This procedure, which can be done
-only by the local machine Adminisistrator account, will create the Domain machine account (if
+only by the local machine Administrator account, will create the Domain machine account (if
if does not exist), and then initializes that account. When the client first logs onto the
Domain it triggers a machine password change.
</para>
@@ -344,8 +346,9 @@ Domain it triggers a machine password change.
<note><para>
When running a Domain all MS Windows NT / 200x / XP Professional clients should be configured
as full Domain Members - IF A SECURE NETWORK IS WANTED. If the machine is NOT made a member of the
-Domain, then it will operate like a workgroup (stand-alone) machine. Please refer to the chapter
-on Domain Membership for information regarding HOW to make your MS Windows clients Domain members.
+Domain, then it will operate like a workgroup (stand-alone) machine. Please refer the
+<link linkend="domain-member">Domain Membership</link> chapter for information regarding
+ HOW to make your MS Windows clients Domain members.
</para></note>
<para>
@@ -353,85 +356,40 @@ The following are necessary for configuring Samba-3 as an MS Windows NT4 style P
NT4 / 200x / XP clients.
</para>
-<orderedlist>
- <listitem><para>
- Configuration of basic TCP/IP and MS Windows Networking
- </para></listitem>
-
- <listitem><para>
- Correct designation of the Server Role (<emphasis>security = user</emphasis>)
- </para></listitem>
-
- <listitem><para>
- Consistent configuration of Name Resolution (See chapter on Browsing and on
- MS Windows network Integration)
- </para></listitem>
-
- <listitem><para>
- Domain logons for Windows NT4 / 200x / XP Professional clients
- </para></listitem>
-
- <listitem><para>
- Configuration of Roaming Profiles or explicit configuration to force local profile usage
- </para></listitem>
-
- <listitem><para>
- Configuration of Network/System Policies
- </para></listitem>
-
- <listitem><para>
- Adding and managing domain user accounts
- </para></listitem>
-
- <listitem><para>
- Configuring MS Windows client machines to become domain members
- </para></listitem>
-</orderedlist>
+<simplelist>
+ <member>Configuration of basic TCP/IP and MS Windows Networking</member>
+ <member>Correct designation of the Server Role (<parameter>security = user</parameter>)</member>
+ <member>Consistent configuration of Name Resolution (See chapter on <link linkend="NetworkBrowsing">Browsing</link> and on
+ <link linkend="integrate-ms-networks">MS Windows network Integration</link>)</member>
+ <member>Domain logons for Windows NT4 / 200x / XP Professional clients</member>
+ <member>Configuration of Roaming Profiles or explicit configuration to force local profile usage</member>
+ <member>Configuration of Network/System Policies</member>
+ <member>Adding and managing domain user accounts</member>
+ <member>Configuring MS Windows client machines to become domain members</member>
+</simplelist>
<para>
The following provisions are required to serve MS Windows 9x / Me Clients:
</para>
-<orderedlist>
- <listitem><para>
- Configuration of basic TCP/IP and MS Windows Networking
- </para></listitem>
-
- <listitem><para>
- Correct designation of the Server Role (<emphasis>security = user</emphasis>)
- </para></listitem>
-
- <listitem><para>
- Network Logon Configuration (Since Windows 9x / XP Home are not technically domain
- members, they do not really particpate in the security aspects of Domain logons as such)
- </para></listitem>
-
- <listitem><para>
- Roaming Profile Configuration
- </para></listitem>
-
- <listitem><para>
- Configuration of System Policy handling
- </para></listitem>
-
- <listitem><para>
- Installation of the Network driver "Client for MS Windows Networks" and configuration
- to log onto the domain
- </para></listitem>
-
- <listitem><para>
- Placing Windows 9x / Me clients in user level security - if it is desired to allow
- all client share access to be controlled according to domain user / group identities.
- </para></listitem>
-
- <listitem><para>
- Adding and managing domain user accounts
- </para></listitem>
-</orderedlist>
+<simplelist>
+ <member>Configuration of basic TCP/IP and MS Windows Networking</member>
+ <member>Correct designation of the Server Role (<parameter>security = user</parameter>)</member>
+ <member>Network Logon Configuration (Since Windows 9x / XP Home are not technically domain
+ members, they do not really participate in the security aspects of Domain logons as such)</member>
+ <member>Roaming Profile Configuration</member>
+ <member>Configuration of System Policy handling</member>
+ <member>Installation of the Network driver "Client for MS Windows Networks" and configuration
+ to log onto the domain</member>
+ <member>Placing Windows 9x / Me clients in user level security - if it is desired to allow
+ all client share access to be controlled according to domain user / group identities.</member>
+ <member>Adding and managing domain user accounts</member>
+</simplelist>
<note><para>
Roaming Profiles and System/Network policies are advanced network administration topics
-that are covered separately in this document. However, these are not necessarily specific
+that are covered in the <link linkend="ProfileMgmt">Profile Management</link> and
+<link linkend="PolicyMgmt">Policy Management</link> chapters of this document. However, these are not necessarily specific
to a Samba PDC as much as they are related to Windows NT networking concepts.
</para></note>
@@ -441,7 +399,7 @@ A Domain Controller is an SMB/CIFS server that:
<itemizedlist>
<listitem><para>
- Advertises and registers itself as a Domain Controller (Through NetBIOS broadcasts
+ Registers and advertises itself as a Domain Controller (through NetBIOS broadcasts
as well as by way of name registrations either by Mailslot Broadcasts over UDP broadcast,
to a WINS server over UDP unicast, or via DNS and Active Directory)
</para></listitem>
@@ -458,8 +416,8 @@ A Domain Controller is an SMB/CIFS server that:
</itemizedlist>
<para>
-For samba to provide these is rather easy to configure. Each Samba Domain Controller must provide
-the NETLOGON service which samba calls the <emphasis>domain logons</emphasis> functionality
+For Samba to provide these is rather easy to configure. Each Samba Domain Controller must provide
+the NETLOGON service which Samba calls the <emphasis>domain logons</emphasis> functionality
(after the name of the parameter in the &smb.conf; file). Additionally, one (1) server in a Samba-3
Domain must advertise itself as the domain master browser. This causes the Primary Domain Controller
to claim domain specific NetBIOS name that identifies it as a domain master browser for its given
@@ -557,12 +515,12 @@ There are a couple of points to emphasize in the above configuration.
<itemizedlist>
<listitem><para>
Encrypted passwords must be enabled. For more details on how
- to do this, refer to <link linkend="passdb">the User Database chapter</link>.
+ to do this, refer to <link linkend="passdb">Account Information Database chapter</link>.
</para></listitem>
<listitem><para>
The server must support domain logons and have a
- <filename>[netlogon]</filename> share
+ <parameter>[netlogon]</parameter> share
</para></listitem>
<listitem><para>
@@ -579,12 +537,12 @@ There are a couple of points to emphasize in the above configuration.
<title>Samba ADS Domain Control</title>
<para>
-Samba-3 is not and can not act as an Active Directory Server. It can not truely function as
+Samba-3 is not and can not act as an Active Directory Server. It can not truly function as
an Active Directory Primary Domain Controller. The protocols for some of the functionality
-the Active Directory Domain Controllers is have been partially implemented on an experiemental
+the Active Directory Domain Controllers is have been partially implemented on an experimental
only basis. Please do NOT expect Samba-3 to support these protocols - nor should you depend
on any such functionality either now or in the future. The Samba-Team may well remove such
-experiemental features or may change their behaviour.
+experimental features or may change their behaviour.
</para>
</sect1>
@@ -602,8 +560,8 @@ an integral part of the essential functionality that is provided by a Domain Con
<para>
All Domain Controllers must run the netlogon service (<emphasis>domain logons</emphasis>
-in Samba. One Domain Controller must be configured with <emphasis>domain master = Yes</emphasis>
-(the Primary Domain Controller), on ALL Backup Domain Controllers <emphasis>domain master = No</emphasis>
+in Samba). One Domain Controller must be configured with <parameter>domain master = Yes</parameter>
+(the Primary Domain Controller); on ALL Backup Domain Controllers <parameter>domain master = No</parameter>
must be set.
</para>
@@ -611,18 +569,15 @@ must be set.
<title>Example Configuration</title>
<programlisting>
-<title> A minimal configuration to support Domain Logons</title>
-<para>
- [globals]
+ [global]
domain logons = Yes
domain master = (Yes on PDC, No on BDCs)
[netlogon]
- comment = Network Logon Service
+ comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = Yes
browseable = No
-</para>
</programlisting>
</sect3>
@@ -677,7 +632,7 @@ which are the focus of this section.
</para>
<para>
-When an SMB client in a domain wishes to logon it broadcast requests for a
+When an SMB client in a domain wishes to logon, it broadcasts requests for a
logon server. The first one to reply gets the job, and validates its
password using whatever mechanism the Samba administrator has installed.
It is possible (but very stupid) to create a domain where the user
@@ -710,7 +665,7 @@ worthwhile to look at how a Windows 9x/ME client performs a logon:
a NetLogon request. This is sent to the NetBIOS name DOMAIN&lt;#1c&gt; at the
NetBIOS layer. The client chooses the first response it receives, which
contains the NetBIOS name of the logon server to use in the format of
- \\SERVER.
+ <filename>\\SERVER</filename>.
</para>
</listitem>
@@ -730,7 +685,7 @@ worthwhile to look at how a Windows 9x/ME client performs a logon:
<listitem>
<para>
- The client then connects to the NetLogon share and searches for this
+ The client then connects to the NetLogon share and searches for said script
and if it is found and can be read, is retrieved and executed by the client.
After this, the client disconnects from the NetLogon share.
</para>
@@ -740,7 +695,7 @@ worthwhile to look at how a Windows 9x/ME client performs a logon:
<para>
The client then sends a NetUserGetInfo request to the server, to retrieve
the user's home share, which is used to search for profiles. Since the
- response to the NetUserGetInfo request does not contain much more then
+ response to the NetUserGetInfo request does not contain much more than
the user's home share, profiles for Win9X clients MUST reside in the user
home directory.
</para>
@@ -750,7 +705,7 @@ worthwhile to look at how a Windows 9x/ME client performs a logon:
<para>
The client then connects to the user's home share and searches for the
user's profile. As it turns out, you can specify the user's home share as
- a sharename and path. For example, \\server\fred\.winprofile.
+ a sharename and path. For example, <filename>\\server\fred\.winprofile</filename>.
If the profiles are found, they are implemented.
</para>
</listitem>
@@ -758,7 +713,7 @@ worthwhile to look at how a Windows 9x/ME client performs a logon:
<listitem>
<para>
The client then disconnects from the user's home share, and reconnects to
- the NetLogon share and looks for CONFIG.POL, the policies file. If this is
+ the NetLogon share and looks for <filename>CONFIG.POL</filename>, the policies file. If this is
found, it is read and implemented.
</para>
</listitem>
@@ -782,7 +737,7 @@ The main difference between a PDC and a Windows 9x logon server configuration is
</itemizedlist>
<para>
-A Samba PDC will act as a Windows 9x logon server, after all it does provide the
+A Samba PDC will act as a Windows 9x logon server; after all, it does provide the
network logon services that MS Windows 9x / Me expect to find.
</para>
@@ -816,12 +771,12 @@ For this reason, it is very wise to configure the Samba DC as the DMB.
<para>
Now back to the issue of configuring a Samba DC to use a mode other
-than <emphasis>security = user</emphasis>. If a Samba host is configured to use
+than <parameter>security = user</parameter>. If a Samba host is configured to use
another SMB server or DC in order to validate user connection
requests, then it is a fact that some other machine on the network
-(the <emphasis>password server</emphasis>) knows more about the user than the Samba host.
+(the <parameter>password server</parameter>) knows more about the user than the Samba host.
99% of the time, this other host is a domain controller. Now
-in order to operate in domain mode security, the <emphasis>workgroup</emphasis> parameter
+in order to operate in domain mode security, the <parameter>workgroup</parameter> parameter
must be set to the name of the Windows NT domain (which already
has a domain controller). If the domain does NOT already have a Domain Controller
then you do not yet have a Domain!
@@ -830,7 +785,7 @@ then you do not yet have a Domain!
<para>
Configuring a Samba box as a DC for a domain that already by definition has a
PDC is asking for trouble. Therefore, you should always configure the Samba DC
-to be the DMB for its domain and set <emphasis>security = user</emphasis>.
+to be the DMB for its domain and set <parameter>security = user</parameter>.
This is the only officially supported mode of operation.
</para>
@@ -844,15 +799,15 @@ This is the only officially supported mode of operation.
<sect2>
<title>I cannot include a '$' in a machine name</title>
<para>
-A 'machine name' in (typically) <filename>/etc/passwd</filename>
-of the machine name with a '$' appended. FreeBSD (and other BSD
+A 'machine account', (typically) stored in <filename>/etc/passwd</filename>,
+takes the form of the machine name with a '$' appended. FreeBSD (and other BSD
systems?) won't create a user with a '$' in their name.
</para>
<para>
The problem is only in the program used to make the entry. Once made, it works perfectly.
-Create a user without the '$' using <command>vipw</command> to edit the entry, adding
-the '$'. Or create the whole entry with vipw if you like, make sure you use a unique User ID!
+Create a user without the '$'. Then use <command>vipw</command> to edit the entry, adding
+the '$'. Or create the whole entry with vipw if you like; make sure you use a unique User ID!
</para>
</sect2>
@@ -868,9 +823,9 @@ to a share (or IPC$) on the Samba PDC. The following command
will remove all network drive connections:
</para>
-<para>
-<prompt>C:\WINNT\></prompt> <command>net use * /d</command>
-</para>
+<screen>
+ <prompt>C:\WINNT\></prompt> <userinput>net use * /d</userinput>
+</screen>
<para>
Further, if the machine is already a 'member of a workgroup' that
@@ -884,15 +839,15 @@ does not matter what, reboot, and try again.
<title>The system can not log you on (C000019B)....</title>
<para>I joined the domain successfully but after upgrading
-to a newer version of the Samba code I get the message, "The system
+to a newer version of the Samba code I get the message, <errorname>The system
can not log you on (C000019B), Please try again or consult your
-system administrator" when attempting to logon.
+system administrator</errorname> when attempting to logon.
</para>
<para>
This occurs when the domain SID stored in the secrets.tdb database
is changed. The most common cause of a change in domain SID is when
-the domain name and/or the server name (netbios name) is changed.
+the domain name and/or the server name (NetBIOS name) is changed.
The only way to correct the problem is to restore the original domain
SID or remove the domain client from the domain and rejoin. The domain
SID may be reset using either the net or rpcclient utilities.
@@ -901,10 +856,10 @@ SID may be reset using either the net or rpcclient utilities.
<para>
The reset or change the domain SID you can use the net command as follows:
-<programlisting>
- net getlocalsid 'OLDNAME'
- net setlocalsid 'SID'
-</programlisting>
+<screen>
+&rootprompt;<userinput>net getlocalsid 'OLDNAME'</userinput>
+&rootprompt;<userinput>net setlocalsid 'SID'</userinput>
+</screen>
</para>
</sect2>
@@ -914,8 +869,8 @@ The reset or change the domain SID you can use the net command as follows:
exist or is not accessible.</title>
<para>
-When I try to join the domain I get the message "The machine account
-for this computer either does not exist or is not accessible". What's
+When I try to join the domain I get the message <errorname>The machine account
+for this computer either does not exist or is not accessible</errorname>. What's
wrong?
</para>
@@ -929,13 +884,17 @@ admin user system is working.
<para>
Alternatively if you are creating account entries manually then they
have not been created correctly. Make sure that you have the entry
-correct for the machine trust account in smbpasswd file on the Samba PDC.
+correct for the machine trust account in <filename>smbpasswd</filename> file on the Samba PDC.
If you added the account using an editor rather than using the smbpasswd
utility, make sure that the account name is the machine NetBIOS name
with a '$' appended to it ( i.e. computer_name$ ). There must be an entry
-in both /etc/passwd and the smbpasswd file. Some people have reported
+in both /etc/passwd and the smbpasswd file.
+</para>
+
+<para>
+Some people have also reported
that inconsistent subnet masks between the Samba server and the NT
-client have caused this problem. Make sure that these are consistent
+client can cause this problem. Make sure that these are consistent
for both client and server.
</para>
</sect2>
@@ -945,10 +904,18 @@ for both client and server.
I get a message about my account being disabled.</title>
<para>
-At first be ensure to enable the useraccounts with <command>smbpasswd -e
-%user%</command>, this is normally done, when you create an account.
+Enable the user accounts with <userinput>smbpasswd -e <replaceable>username</replaceable>
+</userinput>, this is normally done as an account is created.
</para>
</sect2>
+
+<sect2>
+ <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>
+</sect2>
+
</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/ServerType.xml b/docs/docbook/projdoc/ServerType.xml
index ecfeb41735..c740fbefb1 100644
--- a/docs/docbook/projdoc/ServerType.xml
+++ b/docs/docbook/projdoc/ServerType.xml
@@ -10,8 +10,8 @@
<para>
This chapter provides information regarding the types of server that Samba may be
configured to be. A Microsoft network administrator who wishes to migrate to or to
-use Samba will want to know what within a Samba context, terms familiar to MS Windows
-adminstrator mean. This means that it is essential also to define how critical security
+use Samba will want to know what, within a Samba context, terms familiar to MS Windows
+administrator mean. This means that it is essential also to define how critical security
modes function BEFORE we get into the details of how to configure the server itself.
</para>
@@ -31,21 +31,21 @@ features and benefits. These may be for or against Samba.
<para>
Two men were walking down a dusty road, when one suddenly kicked up a small red stone. It
-hurt his toe and lodged in his sandle. He took the stone out and cursed it with a passion
+hurt his toe and lodged in his sandal. He took the stone out and cursed it with a passion
and fury fitting his anguish. The other looked at the stone and said, that is a garnet - I
can turn that into a precious gem and some day it will make a princess very happy!
</para>
<para>
The moral of this tale: Two men, two very different perspectives regarding the same stone.
-Like it or not, Samba is like that stone. Treated the right way and it can bring great
-pleasure, but if you are forced upon it and have no time for it's secrets then it can be
+Like it or not, Samba is like that stone. Treat it the right way and it can bring great
+pleasure, but if you are forced upon it and have no time for its secrets then it can be
a source of discomfort.
</para>
<para>
Samba started out as a project that sought to provide interoperability for MS Windows 3.x
-clients with a Unix server. It has grown up a lot since it's humble beginnings and now provides
+clients with a Unix server. It has grown up a lot since its humble beginnings and now provides
features and functionality fit for large scale deployment. It also has some warts. In sections
like this one we will tell of both.
</para>
@@ -92,22 +92,22 @@ So now, what are the benefits of features mentioned in this chapter?
<sect1>
<title>Server Types</title>
-<para>Adminstrators of Microsoft networks often refer to there being three
+<para>Administrators of Microsoft networks often refer to three
different type of servers:</para>
<itemizedlist>
<listitem><para>Domain Controller</para>
- <itemizedlist>
- <listitem><para>Primary Domain Controller</para></listitem>
- <listitem><para>Backup Domain Controller</para></listitem>
- <listitem><para>ADS Domain Controller</para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>Primary Domain Controller</member>
+ <member>Backup Domain Controller</member>
+ <member>ADS Domain Controller</member>
+ </simplelist>
</listitem>
<listitem><para>Domain Member Server</para>
- <itemizedlist>
- <listitem><para>Active Directory Member Server</para></listitem>
- <listitem><para>NT4 Style Domain Member Server</para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>Active Directory Member Server</member>
+ <member>NT4 Style Domain Member Server</member>
+ </simplelist>
</listitem>
<listitem><para>Stand Alone Server</para></listitem>
</itemizedlist>
@@ -125,26 +125,27 @@ presented.
<title>Samba Security Modes</title>
<para>
-In this section the function and purpose of Samba's <emphasis>security</emphasis>
-modes are described. An acurate understanding of how Samba implements each security
+In this section the function and purpose of Samba's <parameter>security</parameter>
+modes are described. An accurate understanding of how Samba implements each security
mode as well as how to configure MS Windows clients for each mode will significantly
reduce user complaints and administrator heartache.
</para>
<para>
-There are in the SMB/CIFS networking world only two types of security: <emphasis>USER Level</emphasis>
-and <emphasis>SHARE Level</emphasis>. We refer to these collectively as <emphasis>security levels</emphasis>. In implementing these two <emphasis>security levels</emphasis> samba provides flexibilities
+In the SMB/CIFS networking world, there are only two types of security: <emphasis>USER Level</emphasis>
+and <emphasis>SHARE Level</emphasis>. We refer to these collectively as <emphasis>security levels</emphasis>. In implementing these two <emphasis>security levels</emphasis> Samba provides flexibilities
that are not available with Microsoft Windows NT4 / 200x servers. Samba knows of five (5)
ways that allow the security levels to be implemented. In actual fact, Samba implements
-<emphasis>SHARE Level</emphasis> security only one way, but has for ways of implementing
-<emphasis>USER Level</emphasis> security. Collectively, we call the samba implementations
-<emphasis>Security Modes</emphasis>. These are: <emphasis>SHARE, USER, DOMAIN, ADS, and SERVER</emphasis>
+<emphasis>SHARE Level</emphasis> security only one way, but has four ways of implementing
+<emphasis>USER Level</emphasis> security. Collectively, we call the Samba implementations
+<emphasis>Security Modes</emphasis>. These are: <emphasis>SHARE</emphasis>, <emphasis>USER</emphasis>, <emphasis>DOMAIN</emphasis>,
+<emphasis>ADS</emphasis>, and <emphasis>SERVER</emphasis>
modes. They are documented in this chapter.
</para>
<para>
-A SMB server tells the client at startup what <emphasis>security level</emphasis>
-it is running. There are two options <emphasis>share level</emphasis> and
+A SMB server tells the client at startup what <parameter>security level</parameter>
+it is running. There are two options: <emphasis>share level</emphasis> and
<emphasis>user level</emphasis>. 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. This may sound strange,
@@ -157,8 +158,8 @@ available and whether an action is allowed.
<title>User Level Security</title>
<para>
-We will describe<emphasis>user level</emphasis> security first, as its simpler.
-In <emphasis>user level</emphasis> security the client will send a
+We will describe <parameter>user level</parameter> security first, as it's simpler.
+In <emphasis>user level</emphasis> security, the client will send a
<emphasis>session setup</emphasis> 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
@@ -180,7 +181,7 @@ specified in the <emphasis>session setup</emphasis>.
<para>
It is also possible for a client to send multiple <emphasis>session setup</emphasis>
-requests. When the server responds it gives the client a <emphasis>uid</emphasis> to use
+requests. When the server responds, it gives the client a <emphasis>uid</emphasis> to use
as an authentication tag for that username/password. The client can maintain multiple
authentication contexts in this way (WinDD is an example of an application that does this).
</para>
@@ -207,14 +208,14 @@ This is the default setting since samba-2.2.x.
<title>Share Level Security</title>
<para>
-Ok, now for share level security. In share level security the client authenticates
+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
<emphasis>tree connection</emphasis> (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 with this operation. The client expects 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
+shares in share level security, but Samba always uses the unix authentication scheme
where it is a username/password pair that is authenticated, not a share/password pair.
</para>
@@ -230,7 +231,7 @@ level security. They normally send a valid username but no password. Samba recor
this username in a list of <emphasis>possible usernames</emphasis>. When the client
then does a <emphasis>tree connection</emphasis> 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 <command>user =</command> &smb.conf; line. The password is then checked
+listed in the <parameter>user =</parameter> &smb.conf; line. The password is then checked
in turn against these <emphasis>possible usernames</emphasis>. If a match is found
then the client is authenticated as that user.
</para>
@@ -247,8 +248,8 @@ The &smb.conf; parameter that sets <emphasis>Share Level Security</emphasis> is:
</programlisting></para>
<para>
-Plese note that there are reports that recent MS Widows clients do not like to work
-with share mode security servers. You are strongly discouraged from use of this parameter.
+Please note that there are reports that recent MS Windows clients do not like to work
+with share mode security servers. You are strongly discouraged from using share level security.
</para>
</sect3>
@@ -258,7 +259,7 @@ with share mode security servers. You are strongly discouraged from use of this
<title>Domain Security Mode (User Level Security)</title>
<para>
-When samba is operating in <emphasis>security = domain</emphasis> mode this means that
+When Samba is operating in <parameter>security = domain</parameter> mode,
the Samba server has a domain security trust account (a machine account) and will cause
all authentication requests to be passed through to the domain controllers.
</para>
@@ -274,58 +275,48 @@ This method involves addition of the following parameters in the &smb.conf; file
</para>
<para><programlisting>
- encrypt passwords = Yes
security = domain
workgroup = "name_of_NT_domain"
- password server = *
</programlisting></para>
<para>
-The use of the "*" argument to <command>password server</command> will cause samba to locate the
-domain controller in a way analogous to the way this is done within MS Windows NT.
-This is the default behaviour.
-</para>
-
-<para>
-In order for this method to work the Samba server needs to join the MS Windows NT
+In order for this method to work, the Samba server needs to join the MS Windows NT
security domain. This is done as follows:
</para>
-<itemizedlist>
- <listitem><para>On the MS Windows NT domain controller using
- the Server Manager add a machine account for the Samba server.
- </para></listitem>
+<procedure>
+ <step><para>On the MS Windows NT domain controller, using
+ the Server Manager, add a machine account for the Samba server.
+ </para></step>
- <listitem><para>Next, on the Unix/Linux system execute:</para>
- <para><programlisting>
- <command>smbpasswd -r PDC_NAME -j DOMAIN_NAME</command> (samba 2.x)
+ <step><para>Next, on the Unix/Linux system execute:</para>
+
+ <para>&rootprompt;<userinput>smbpasswd -j DOMAIN_NAME -r PDC_NAME</userinput> (samba-2.x)</para>
- <command>net join -U administrator%password</command> (samba-3)
- </programlisting>
- </para>
- </listitem>
-</itemizedlist>
+ <para>&rootprompt;<userinput>net join -U administrator%password</userinput> (samba-3)</para>
+ </step>
+</procedure>
<note><para>
As of Samba-2.2.4 the Samba 2.2.x series can auto-join a Windows NT4 style Domain just
by executing:
-<programlisting>
- smbpasswd -j DOMAIN_NAME -r PDC_NAME -U Administrator%password
-</programlisting>
+<screen>
+&rootprompt;<userinput>smbpasswd -j <replaceable>DOMAIN_NAME</replaceable> -r <replaceable>PDC_NAME</replaceable> -U Administrator%<replaceable>password</replaceable></userinput>
+</screen>
As of Samba-3 the same can be done by executing:
-<programlisting>
- net join -U Administrator%password
-</programlisting>
-It is not necessary with Samba-3 to specify the DOMAIN_NAME or the PDC_NAME as it figures this
-out from the smb.conf file settings.
+<screen>
+&rootprompt;<userinput>net join -U Administrator%<replaceable>password</replaceable></userinput>
+</screen>
+It is not necessary with Samba-3 to specify the <replaceable>DOMAIN_NAME</replaceable> or the <replaceable>PDC_NAME</replaceable> as it
+figures this out from the &smb.conf; file settings.
</para></note>
<para>
Use of this mode of authentication does require there to be a standard Unix account
-for the user in order to assign a uid once the account has been authenticated by
+for each user in order to assign a UID once the account has been authenticated by
the remote Windows DC. This account can be blocked to prevent logons by clients other than
-MS Windows through things such as setting an invalid shell in the
+MS Windows through means such as setting an invalid shell in the
<filename>/etc/passwd</filename> entry.
</para>
@@ -335,6 +326,11 @@ presented in the <link linkend="winbind">Winbind Overview</link> chapter
in this HOWTO collection.
</para>
+<para>
+For more information of being a domain member, see the <link linkend="domain-member">Domain
+Member</link> section of this Howto.
+</para>
+
</sect3>
</sect2>
@@ -342,7 +338,7 @@ in this HOWTO collection.
<title>ADS Security Mode (User Level Security)</title>
<para>
-Both Samba 2.2 and 3.0 can join an active directory domain. This is
+Both Samba 2.2 and 3.0 can join an Active Directory domain. This is
possible even if the domain is run in native mode. Active Directory in
native mode perfectly allows NT4-style domain members, contrary to
popular belief. The only thing that Active Directory in native mode
@@ -362,21 +358,22 @@ AD-member mode can accept Kerberos.
<sect3>
<title>Example Configuration</title>
-<para>
-<programlisting>
+<para><programlisting>
realm = your.kerberos.REALM
security = ADS
- encrypt passwords = Yes
+</programlisting></para>
-The following parameter may be required:
+<para>
+ The following parameter may be required:
+</para>
+<para><programlisting>
ads server = your.kerberos.server
-</programlisting>
-</para>
+</programlisting></para>
<para>
-Please refer to the Domain Membership section, Active Directory Membership for more information
-regarding this configuration option.
+Please refer to the <link linkend="domain-member">Domain Membership</link> and <link linkend="ads-member">Active Directory
+Membership</link> sections for more information regarding this configuration option.
</para>
</sect3>
@@ -386,28 +383,28 @@ regarding this configuration option.
<title>Server Security (User Level Security)</title>
<para>
-Server level security is a left over from the time when Samba was not capable of acting
-as a domain member server. It is highly recommended NOT to use this feature. Server level
-security has many draw backs. The draw backs include:
+Server security mode is a left over from the time when Samba was not capable of acting
+as a domain member server. It is highly recommended NOT to use this feature. Server
+security mode has many draw backs. The draw backs include:
</para>
-<itemizedlist>
- <listitem><para>Potential Account Lockout on MS Windows NT4/200x password servers</para></listitem>
- <listitem><para>Lack of assurance that the password server is the one specified</para></listitem>
- <listitem><para>Does not work with Winbind, particularly needed when storing profiles remotely</para></listitem>
- <listitem><para>This mode may open connections to the password server, and keep them open for extended periods.</para></listitem>
- <listitem><para>Security on the samba server breaks badly when the remote password server suddenly shuts down</para></listitem>
- <listitem><para>With this mode there is NO security account in the domain that the password server belongs to for the samba server.</para></listitem>
-</itemizedlist>
+<simplelist>
+ <member>Potential Account Lockout on MS Windows NT4/200x password servers</member>
+ <member>Lack of assurance that the password server is the one specified</member>
+ <member>Does not work with Winbind, particularly needed when storing profiles remotely</member>
+ <member>This mode may open connections to the password server, and keep them open for extended periods.</member>
+ <member>Security on the Samba server breaks badly when the remote password server suddenly shuts down</member>
+ <member>With this mode there is NO security account in the domain that the password server belongs to for the Samba server.</member>
+</simplelist>
<para>
-In server level security the samba server reports to the client that it is in user level
+In server security mode the Samba server reports to the client that it is in user level
security. The client then does a <emphasis>session setup</emphasis> as described earlier.
-The samba server takes the username/password that the client sends and attempts to login to the
-<emphasis>password server</emphasis> 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 <emphasis>password server</emphasis>.
+The Samba server takes the username/password that the client sends and attempts to login to the
+<parameter>password server</parameter> 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 <parameter>password server</parameter>.
</para>
<para>
@@ -418,21 +415,21 @@ passwords in encrypted form. Samba supports this type of encryption by default.
</para>
<para>
-The parameter <emphasis>security = server</emphasis> means that Samba reports to clients that
+The parameter <parameter>security = server</parameter> means that Samba reports to clients that
it is running in <emphasis>user mode</emphasis> but actually passes off all authentication
requests to another <emphasis>user mode</emphasis> server. This requires an additional
-parameter <emphasis>password server</emphasis> that points to the real authentication server.
+parameter <parameter>password server</parameter> that points to the real authentication server.
That real authentication server can be another Samba server or can be a Windows NT server,
the later natively capable of encrypted password support.
</para>
<note><para>
-When Samba is running in <emphasis>server level</emphasis> security it is essential that
-the parameter <emphasis>password server</emphasis> is set to the precise netbios machine
+When Samba is running in <emphasis>server security mode</emphasis> it is essential that
+the parameter <emphasis>password server</emphasis> is set to the precise NetBIOS machine
name of the target authentication server. Samba can NOT determine this from NetBIOS name
-lookups because the choice of the target authentication server arbitrary and can not
-be determined from a domain name. In essence a samba server that is in
-<emphasis>server level</emphasis> security is operating in what used to be known as
+lookups because the choice of the target authentication server is arbitrary and can not
+be determined from a domain name. In essence, a Samba server that is in
+<emphasis>server security mode</emphasis> is operating in what used to be known as
workgroup mode.
</para></note>
@@ -454,8 +451,8 @@ This method involves the additions of the following parameters in the &smb.conf;
<para>
-There are two ways of identifying whether or not a username and password pair was valid
-or not. One uses the reply information provided as part of the authentication messaging
+There are two ways of identifying whether or not a username and password pair was valid.
+One uses the reply information provided as part of the authentication messaging
process, the other uses just an error code.
</para>
@@ -469,7 +466,7 @@ certain number of failed authentication attempts this will result in user lockou
<para>
Use of this mode of authentication does require there to be a standard Unix account
-for the user, this account can be blocked to prevent logons by other than MS Windows clients.
+for the user, though this account can be blocked to prevent logons by non-SMB/CIFS clients.
</para>
</sect3>
@@ -481,15 +478,15 @@ for the user, this account can be blocked to prevent logons by other than MS Win
<title>Seamless Windows Network Integration</title>
<para>
-MS Windows clients may use encrypted passwords as part of a challenege/response
+MS Windows clients may use encrypted passwords as part of a challenge/response
authentication model (a.k.a. NTLMv1 and NTLMv2) or alone, or clear text strings for simple
-password based authentication. It should be realized that with the SMB protocol
+password based authentication. It should be realized that with the SMB protocol,
the password is passed over the network either in plain text or encrypted, but
not both in the same authentication request.
</para>
<para>
-When encrypted passwords are used a password that has been entered by the user
+When encrypted passwords are used, a password that has been entered by the user
is encrypted in two ways:
</para>
@@ -499,10 +496,10 @@ is encrypted in two ways:
</para></listitem>
<listitem><para>The password is converted to upper case,
- and then padded or trucated to 14 bytes. This string is
+ and then padded or truncated to 14 bytes. This string is
then appended with 5 bytes of NULL characters and split to
form two 56 bit DES keys to encrypt a "magic" 8 byte value.
- The resulting 16 bytes for the LanMan hash.
+ The resulting 16 bytes form the LanMan hash.
</para></listitem>
</itemizedlist>
@@ -530,29 +527,29 @@ is definitely not a good idea to re-enable plain text password support in such c
</para>
<para>
-The following parameters can be used to work around the issue of Windows 9x client
+The following parameters can be used to work around the issue of Windows 9x clients
upper casing usernames and password before transmitting them to the SMB server
when using clear text authentication.
</para>
<para><programlisting>
- <ulink url="smb.conf.5.html#PASSWORDLEVEL">passsword level</ulink> = <replaceable>integer</replaceable>
+ <ulink url="smb.conf.5.html#PASSWORDLEVEL">password level</ulink> = <replaceable>integer</replaceable>
<ulink url="smb.conf.5.html#USERNAMELEVEL">username level</ulink> = <replaceable>integer</replaceable>
</programlisting></para>
<para>
By default Samba will lower case the username before attempting to lookup the user
in the database of local system accounts. Because UNIX usernames conventionally
-only contain lower case character, the <parameter>username level</parameter> parameter
+only contain lower-case characters, the <parameter>username level</parameter> parameter
is rarely needed.
</para>
<para>
-However, passwords on UNIX systems often make use of mixed case characters.
+However, passwords on UNIX systems often make use of mixed-case characters.
This means that in order for a user on a Windows 9x client to connect to a Samba
server using clear text authentication, the <parameter>password level</parameter>
-must be set to the maximum number of upper case letter which <emphasis>could</emphasis>
-appear is a password. Note that the server OS uses the traditional DES version
+must be set to the maximum number of upper case letters which <emphasis>could</emphasis>
+appear in a password. Note that the server OS uses the traditional DES version
of crypt(), a <parameter>password level</parameter> of 8 will result in case
insensitive passwords as seen from Windows users. This will also result in longer
login times as Samba has to compute the permutations of the password string and
@@ -560,7 +557,7 @@ try them one by one until a match is located (or all combinations fail).
</para>
<para>
-The best option to adopt is to enable support for encrypted passwords where ever
+The best option to adopt is to enable support for encrypted passwords wherever
Samba is used. Most attempts to apply the registry change to re-enable plain text
passwords will eventually lead to user complaints and unhappiness.
</para>
@@ -572,15 +569,15 @@ passwords will eventually lead to user complaints and unhappiness.
<para>
We all make mistakes. It is Ok to make mistakes, so long as they are made in the right places
-and at the right time. A mistake that causes lost productivity is seldom tollerated. A mistake
+and at the right time. A mistake that causes lost productivity is seldom tolerated. A mistake
made in a developmental test lab is expected.
</para>
<para>
Here we look at common mistakes and misapprehensions that have been the subject of discussions
-on the samba mailing lists. Many of these are avoidable by doing you homework before attempting
-a Samba implementation. Some are the result of misundertanding of the English language. The
-English language has many terms of phrase that are potentially vague and may be highly confusing
+on the Samba mailing lists. Many of these are avoidable by doing you homework before attempting
+a Samba implementation. Some are the result of misunderstanding of the English language. The
+English language has many turns of phrase that are potentially vague and may be highly confusing
to those for whom English is not their native tongue.
</para>
@@ -588,10 +585,10 @@ to those for whom English is not their native tongue.
<title>What makes Samba a SERVER?</title>
<para>
-To some the nature of the samba <emphasis>security</emphasis> mode is very obvious, but entirely
-wrong all the same. It is assumed that <emphasis>security = server</emphasis> means that Samba
-will act as a server. Not so! See above - this setting means that samba will <emphasis>try</emphasis>
-to use another SMB server as it's source of user authentication alone.
+To some the nature of the Samba <emphasis>security</emphasis> mode is very obvious, but entirely
+wrong all the same. It is assumed that <parameter>security = server</parameter> means that Samba
+will act as a server. Not so! See above - this setting means that Samba will <emphasis>try</emphasis>
+to use another SMB server as its source of user authentication alone.
</para>
</sect2>
@@ -600,8 +597,8 @@ to use another SMB server as it's source of user authentication alone.
<title>What makes Samba a Domain Controller?</title>
<para>
-The &smb.conf; parameter <emphasis>security = domain</emphasis> does NOT really make Samba behave
-as a Domain Controller! This setting means we want samba to be a domain member!
+The &smb.conf; parameter <parameter>security = domain</parameter> does NOT really make Samba behave
+as a Domain Controller! This setting means we want Samba to be a domain member!
</para>
</sect2>
@@ -610,8 +607,28 @@ as a Domain Controller! This setting means we want samba to be a domain member!
<title>What makes Samba a Domain Member?</title>
<para>
-Guess! So many others do. But whatever you do, do NOT think that <emphasis>security = user</emphasis>
-makes Samba act as a domain member. Read the manufacturers manual before the warranty expires!
+Guess! So many others do. But whatever you do, do NOT think that <parameter>security = user</parameter>
+makes Samba act as a domain member. Read the manufacturers manual before the warranty expires! See
+the <link linkend="domain-member">Domain Member</link> section of this Howto for more information.
+</para>
+
+</sect2>
+
+
+<sect2>
+<title>Constantly Losing Connections to Password Server</title>
+
+<para>
+Why does server_validate() simply give up rather than re-establishing its connection to the
+password server? Though I am not fluent in the SMB protocol, perhaps the cluster server
+process passes along to its client workstation the session key it receives from the password
+server, which means the password hashes submitted by the client would not work on a subsequent
+connection, whose session key would be different. So server_validate() must give up.
+</para>
+
+<para>
+Indeed. That's why security = server is at best a nasty hack. Please use security = domain.
+<parameter>security = server</parameter> mode is also known as pass-through authentication.
</para>
</sect2>
diff --git a/docs/docbook/projdoc/Speed.xml b/docs/docbook/projdoc/Speed.xml
index e2ede62ac7..659cd6e31b 100644
--- a/docs/docbook/projdoc/Speed.xml
+++ b/docs/docbook/projdoc/Speed.xml
@@ -9,9 +9,10 @@
</affiliation>
</author>
&author.jelmer;
+ &author.jht;
</chapterinfo>
-<title>Samba performance issues</title>
+<title>Samba Performance Tuning</title>
<sect1>
<title>Comparisons</title>
@@ -28,7 +29,7 @@ SMB server.
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.
+(such as NetBEUI) and comparisons may not be valid.
</para>
<para>
@@ -58,11 +59,11 @@ performance of a TCP based server like Samba.
<para>
The socket options that Samba uses are settable both on the command
-line with the -O option, or in the smb.conf file.
+line with the <option>-O</option> option, or in the &smb.conf; file.
</para>
<para>
-The <command>socket options</command> section of the &smb.conf; manual page describes how
+The <parameter>socket options</parameter> section of the &smb.conf; manual page describes how
to set these and gives recommendations.
</para>
@@ -75,7 +76,7 @@ much. The correct settings are very dependent on your local network.
<para>
The socket option TCP_NODELAY is the one that seems to make the
biggest single difference for most networks. Many people report that
-adding <command>socket options = TCP_NODELAY</command> doubles the read
+adding <parameter>socket options = TCP_NODELAY</parameter> doubles the read
performance of a Samba drive. The best explanation I have seen for this is
that the Microsoft TCP/IP stack is slow in sending tcp ACKs.
</para>
@@ -86,7 +87,7 @@ that the Microsoft TCP/IP stack is slow in sending tcp ACKs.
<title>Read size</title>
<para>
-The option <command>read size</command> affects the overlap of disk
+The option <parameter>read size</parameter> 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
@@ -114,9 +115,9 @@ pointless and will cause you to allocate memory unnecessarily.
<title>Max xmit</title>
<para>
-At startup the client and server negotiate a <command>maximum transmit</command> size,
+At startup the client and server negotiate a <parameter>maximum transmit</parameter> size,
which limits the size of nearly all SMB commands. You can set the
-maximum size that Samba will negotiate using the <command>max xmit = </command> option
+maximum size that Samba will negotiate using the <parameter>max xmit = </parameter> option
in &smb.conf;. Note that this is the maximum size of SMB requests 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
@@ -139,7 +140,7 @@ In most cases the default is the best option.
<title>Log level</title>
<para>
-If you set the log level (also known as <command>debug level</command>) higher than 2
+If you set the log level (also known as <parameter>debug level</parameter>) 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.
@@ -150,20 +151,20 @@ expensive.
<title>Read raw</title>
<para>
-The <command>read raw</command> operation is designed to be an optimised, low-latency
+The <parameter>read raw</parameter> 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 <command>read raw</command> optional, with it
+however. and Samba makes support for <parameter>read raw</parameter> optional, with it
being enabled by default.
</para>
<para>
-In some cases clients don't handle <command>read raw</command> very well and actually
+In some cases clients don't handle <parameter>read raw</parameter> very well and actually
get lower performance using it than they get using the conventional
read operations.
</para>
<para>
-So you might like to try <command>read raw = no</command> and see what happens on your
+So you might like to try <parameter>read raw = no</parameter> and see what happens on your
network. It might lower, raise or not affect your performance. Only
testing can really tell.
</para>
@@ -174,14 +175,14 @@ testing can really tell.
<title>Write raw</title>
<para>
-The <command>write raw</command> operation is designed to be an optimised, low-latency
+The <parameter>write raw</parameter> 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 <command>write raw</command> optional, with it
+however. and Samba makes support for <parameter>write raw</parameter> optional, with it
being enabled by default.
</para>
<para>
-Some machines may find <command>write raw</command> slower than normal write, in which
+Some machines may find <parameter>write raw</parameter> slower than normal write, in which
case you may wish to change this option.
</para>
@@ -192,31 +193,78 @@ case you may wish to change this option.
<para>
Slow logins are almost always due to the password checking time. Using
-the lowest practical <command>password level</command> will improve things.
+the lowest practical <parameter>password level</parameter> will improve things.
</para>
</sect1>
<sect1>
-<title>LDAP</title>
+<title>Client tuning</title>
<para>
-LDAP can be vastly improved by using the
-<ulink url="smb.conf.5.html#LDAPTRUSTIDS">ldap trust ids</ulink> parameter.
+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. Check the sections on the various clients in
+<link linkend="Other-Clients">Samba and Other Clients</link>.
</para>
</sect1>
+<sect1>
+<title>Samba performance problem due changing kernel</title>
+
+<para>
+Hi everyone. I am running Gentoo on my server and samba 2.2.8a. Recently
+I changed kernel version from linux-2.4.19-gentoo-r10 to
+linux-2.4.20-wolk4.0s. And now I have performance issue with samba. Ok
+many of you will probably say that move to vanilla sources...well I tried
+it too and it didn't work. I have 100mb LAN and two computers (linux +
+Windows2000). Linux server shares directory with DivX files, client
+(windows2000) plays them via LAN. Before when I was running 2.4.19 kernel
+everything was fine, but now movies freezes and stops...I tried moving
+files between server and Windows and it's terribly slow.
+</para>
+
+<para>
+Grab mii-tool and check the duplex settings on the NIC.
+My guess is that it is a link layer issue, not an application
+layer problem. Also run ifconfig and verify that the framing
+error, collisions, etc... look normal for ethernet.
+</para>
+
+</sect1>
<sect1>
-<title>Client tuning</title>
+<title>Corrupt tdb Files</title>
<para>
-Often a speed problem can be traced to the client. The client (for
-example Windows for Workgroups) can often be tuned for better TCP
-performance. Check the sections on the various clients in
-<link linkend="Other-Clients">Samba and Other Clients</link>.
+Well today it happened, Our first major problem using samba.
+Our samba PDC server has been hosting 3 TB of data to our 500+ users
+[Windows NT/XP] for the last 3 years using samba, no problem.
+But today all shares went SLOW; very slow. Also the main smbd kept
+spawning new processes so we had 1600+ running smbd's (normally we avg. 250).
+It crashed the SUN E3500 cluster twice. After a lot of searching I
+decided to <command>rm /var/locks/*.tdb</command>. Happy again.
+</para>
+
+<para>
+Q1) Is there any method of keeping the *.tdb files in top condition or
+how to early detect corruption?
+</para>
+
+<para>
+A1) Yes, run <command>tdbbackup</command> each time after stopping nmbd and before starting nmbd.
+</para>
+
+<para>
+Q2) What I also would like to mention is that the service latency seems
+a lot lower then before the locks cleanup, any ideas on keeping it top notch?
+</para>
+
+<para>
+A2) Yes! Same answer as for Q1!
</para>
</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/StandAloneServer.xml b/docs/docbook/projdoc/StandAloneServer.xml
index d8f5992191..206b2f88ce 100644
--- a/docs/docbook/projdoc/StandAloneServer.xml
+++ b/docs/docbook/projdoc/StandAloneServer.xml
@@ -5,10 +5,10 @@
<title>Stand-Alone Servers</title>
<para>
-Stand-Alone servers are independant of Domain Controllers on the network.
+Stand-Alone servers are independent of Domain Controllers on the network.
They are NOT domain members and function more like workgroup servers. In many
cases a stand-alone server is configured with a minimum of security control
-with the intent that all data served will be readilly accessible to all users.
+with the intent that all data served will be readily accessible to all users.
</para>
<sect1>
@@ -53,26 +53,27 @@ USER mode.
<para>
No special action is needed other than to create user accounts. Stand-alone
servers do NOT provide network logon services. This means that machines that
-use this server do NOT perform a domain log onto it. Whatever logon facility
-the workstations are subject to is independant of this machine. It is however
-necessary to accomodate any network user so that the logon name they use will
+use this server do NOT perform a domain logon to it. Whatever logon facility
+the workstations are subject to is independent of this machine. It is however
+necessary to accommodate any network user so that the logon name they use will
be translated (mapped) locally on the stand-alone server to a locally known
-user name. There are several ways this cane be done.
+user name. There are several ways this can be done.
</para>
<para>
Samba tends to blur the distinction a little in respect of what is
a stand-alone server. This is because the authentication database may be
-local or on a remote server, even if from the samba protocol perspective
-the samba server is NOT a member of a domain security context.
+local or on a remote server, even if from the Samba protocol perspective
+the Samba server is NOT a member of a domain security context.
</para>
<para>
Through the use of PAM (Pluggable Authentication Modules) and nsswitch
(the name service switcher) the source of authentication may reside on
another server. We would be inclined to call this the authentication server.
-This means that the samba server may use the local Unix/Linux system password database
-(/etc/passwd or /etc/shadow), may use a local smbpasswd file, or may use
+This means that the Samba server may use the local Unix/Linux system password database
+(<filename>/etc/passwd</filename> or <filename>/etc/shadow</filename>), may use a
+local smbpasswd file, or may use
an LDAP back end, or even via PAM and Winbind another CIFS/SMB server
for authentication.
</para>
@@ -99,9 +100,7 @@ nobody. No home directories are shared, that are no users in the <filename>/etc/
Unix system database. This is a very simple system to administer.
</para>
-<para>
<programlisting>
- <title>Share Mode Read Only Stand-Alone Server</title>
# Global parameters
[global]
workgroup = MYGROUP
@@ -115,13 +114,12 @@ Unix system database. This is a very simple system to administer.
path = /export
guest only = Yes
</programlisting>
-</para>
<para>
In the above example the machine name is set to REFDOCS, the workgroup is set to the name
of the local workgroup so that the machine will appear in with systems users are familiar
with. The only password backend required is the "guest" backend so as to allow default
-unprivilidged account names to be used. Given that there is a WINS server on this network
+unprivileged account names to be used. Given that there is a WINS server on this network
we do use it.
</para>
@@ -143,11 +141,11 @@ on your system.
<listitem><para>
The print spooling and processing system on our print server will be CUPS.
- (Please refer to the chapter on printing for more information).
+ (Please refer to the <link linkend="CUPS-printing">CUPS Printing</link> chapter for more information).
</para></listitem>
<listitem><para>
- All printers will that the print server will service will be network
+ All printers that the print server will service will be network
printers. They will be correctly configured, by the administrator,
in the CUPS environment.
</para></listitem>
@@ -161,20 +159,20 @@ on your system.
<para>
In this example our print server will spool all incoming print jobs to
<filename>/var/spool/samba</filename> until the job is ready to be submitted by
-samba to the CUPS print processor. Since all incoming connections will be as
-the anonymous (guest) user two things will be required:
+Samba to the CUPS print processor. Since all incoming connections will be as
+the anonymous (guest) user, two things will be required:
</para>
<itemizedlist>
-<title>Enablement for Anonymous Printing</title>
+<title>Enabling Anonymous Printing</title>
<listitem><para>
The Unix/Linux system must have a <command>guest</command> account.
The default for this is usually the account <command>nobody</command>.
To find the correct name to use for your version of Samba do the
following:
- <programlisting>
- testparm -s -v | grep "guest account"
- </programlisting>
+ <screen>
+<prompt>$ </prompt><userinput>testparm -s -v | grep "guest account"</userinput>
+ </screen>
Then make sure that this account exists in your system password
database (<filename>/etc/passwd</filename>).
</para></listitem>
@@ -183,17 +181,16 @@ the anonymous (guest) user two things will be required:
The directory into which Samba will spool the file must have write
access for the guest account. The following commands will ensure that
this directory is available for use:
- <programlisting>
- mkdir /var/spool/samba
- chown nobody.nobody /var/spool/samba
- chmod a+rwt /var/spool/samba
- </programlisting>
+ <screen>
+&rootprompt;<userinput>mkdir /var/spool/samba</userinput>
+&rootprompt;<userinput>chown nobody.nobody /var/spool/samba</userinput>
+&rootprompt;<userinput>chmod a+rwt /var/spool/samba</userinput>
+ </screen>
</para></listitem>
</itemizedlist>
<para>
<programlisting>
- <title>Simple Central Print Server</title>
# Global parameters
[global]
workgroup = MYGROUP
diff --git a/docs/docbook/projdoc/UNIX_INSTALL.xml b/docs/docbook/projdoc/UNIX_INSTALL.xml
index 3dff9a5528..e919ff8c57 100644
--- a/docs/docbook/projdoc/UNIX_INSTALL.xml
+++ b/docs/docbook/projdoc/UNIX_INSTALL.xml
@@ -33,7 +33,7 @@
<title>Configuring samba (smb.conf)</title>
<para>
- Samba's configuration is stored in the smb.conf file,
+ Samba's configuration is stored in the &smb.conf; file,
that usually resides in <filename>/etc/samba/smb.conf</filename>
or <filename>/usr/local/samba/lib/smb.conf</filename>. You can either
edit this file yourself or do it using one of the many graphical
@@ -67,19 +67,19 @@
<para>
This will allow connections by anyone with an account on the server, using either
- their login name or "<command>homes</command>" as the service name.
+ their login name or "<parameter>homes</parameter>" as the service name.
(Note that the workgroup that Samba must also be set.)
</para>
<para>
Make sure you put the <filename>smb.conf</filename> file in the same place
- you specified in the<filename>Makefile</filename> (the default is to
+ you specified in the <filename>Makefile</filename> (the default is to
look for it in <filename>/usr/local/samba/lib/</filename>).
</para>
<para>
For more information about security settings for the
- <command>[homes]</command> share please refer to the chapter
+ <parameter>[homes]</parameter> share please refer to the chapter
<link linkend="securing-samba">Securing Samba</link>.
</para>
@@ -88,7 +88,7 @@
<para>
It's important that you test the validity of your <filename>smb.conf</filename>
- file using the <application>testparm</application> program. If testparm runs OK
+ file using the &testparm; program. If testparm runs OK
then it will list the loaded services. If not it will give an error message.
</para>
@@ -97,7 +97,7 @@
</para>
<para>
- Always run testparm again when you change <filename>smb.conf</filename>!
+ Always run testparm again when you change &smb.conf;!
</para>
</sect3>
@@ -115,7 +115,7 @@
<para>
To launch SWAT just run your favorite web browser and
- point it at "http://localhost:901/". Replace
+ point it at <ulink url="http://localhost:901/">http://localhost:901/</ulink>. Replace
<replaceable>localhost</replaceable>
with the name of the computer you are running samba on if you
are running samba on a different computer than your browser.
@@ -160,7 +160,7 @@
would be the name of the host where you installed &smbd;.
The <replaceable>aservice</replaceable> is
any service you have defined in the &smb.conf;
- file. Try your user name if you just have a <command>[homes]</command>
+ file. Try your user name if you just have a <parameter>[homes]</parameter>
section
in &smb.conf;.</para>
@@ -212,19 +212,23 @@ The following questions and issues get raised on the samba mailing list over and
<title>Why are so many smbd processes eating memory?</title>
<para>
+<quote>
Site that is running Samba on an AIX box. They are sharing out about 2 terabytes using samba.
Samba was installed using smitty and the binaries. We seem to be experiencing a memory problem
-with this box. When I do a svmon -Pu the monitoring program shows that smbd has several
+with this box. When I do a <command>svmon -Pu</command> the monitoring program shows that &smbd; has several
processes of smbd running:
+</quote>
</para>
<para>
+ <quote>
Is samba suppose to start this many different smbd processes? Or does it run as one smbd process? Also
is it normal for it to be taking up this much memory?
+</quote>
</para>
<para>
-<programlisting>
+<screen>
Inuse * 4096 = amount of memory being used by this process
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd
@@ -251,34 +255,40 @@ Inuse * 4096 = amount of memory being used by this process
19110 smbd 8404 1906 181 4862 N N
Total memory used: 841,592,832 bytes
-</programlisting>
+</screen>
</para>
<para>
-<emphasis>ANSWER:</emphasis> Samba consists on three core programs:
-<emphasis>nmbd, smbd, winbindd</emphasis>. <command>nmbd</command> is the name server message daemon,
-<command>smbd</command> is the server message daemon, <command>winbind</command> is the daemon that
+Samba consists on three core programs:
+&nmbd;, &smbd;, &winbindd;. &nmbd; is the name server message daemon,
+&smbd; is the server message daemon, &winbindd; is the daemon that
handles communication with Domain Controllers.
</para>
<para>
If your system is NOT running as a WINS server, then there will be one (1) single instance of
- <command>nmbd</command> running on your system. If it is running as a WINS server then there will be
+ &nmbd; running on your system. If it is running as a WINS server then there will be
two (2) instances - one to handle the WINS requests.
</para>
<para>
-<command>smbd</command> handles ALL connection requests and then spawns a new process for each client
+&smbd; handles ALL connection requests and then spawns a new process for each client
connection made. That is why you are seeing so many of them, one (1) per client connection.
</para>
<para>
-<command>winbindd</command> will run as one or two daemons, depending on whether or not it is being
+&winbindd; will run as one or two daemons, depending on whether or not it is being
run in "split mode" (in which case there will be two instances).
</para>
</sect2>
+
+ <sect2>
+ <title>I'm getting "open_oplock_ipc: Failed to get local UDP socket for address 100007f. Error was Cannot assign requested" in the logs</title>
+ <para>Your loopback device isn't working correctly. Make sure it's running. </para>
+ </sect2>
+
</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/VFS.xml b/docs/docbook/projdoc/VFS.xml
index 225411b427..67f1b39a99 100644
--- a/docs/docbook/projdoc/VFS.xml
+++ b/docs/docbook/projdoc/VFS.xml
@@ -2,169 +2,213 @@
<chapterinfo>
&author.jelmer;
&author.jht;
- <author><firstname>Alexander</firstname><surname>Bokovoy</surname></author>
<author><firstname>Tim</firstname><surname>Potter</surname></author>
- <author><firstname>Simo</firstname><surname>Sorce</surname></author>
+ <author><firstname>Simo</firstname><surname>Sorce</surname><contrib>original vfs_skel README</contrib></author>
+ <author><firstname>Alexander</firstname><surname>Bokovoy</surname><contrib>original vfs_netatalk docs</contrib></author>
+ <author><firstname>Stefan</firstname><surname>Metzmacher</surname><contrib>Update for multiple modules</contrib></author>
</chapterinfo>
<title>Stackable VFS modules</title>
<sect1>
-<title>Introduction and configuration</title>
+<title>Features and Benefits</title>
<para>
-Since samba 3.0, samba supports stackable VFS(Virtual File System) modules.
+Since Samba-3, there is support for stackable VFS(Virtual File System) modules.
Samba passes each request to access the unix file system thru the loaded VFS modules.
This chapter covers all the modules that come with the samba source and references to
some external modules.
</para>
-<para>
-You may have problems to compile these modules, as shared libraries are
-compiled and linked in different ways on different systems.
-They currently have been tested against GNU/linux and IRIX.
-</para>
-<para>
-To use the VFS modules, create a share similar to the one below. The
-important parameter is the <command>vfs object</command> parameter which must point to
-the exact pathname of the shared library objects. For example, to log all access
-to files and use a recycle bin:
+</sect1>
-<programlisting>
- [audit]
- comment = Audited /data directory
- path = /data
- vfs object = /path/to/audit.so /path/to/recycle.so
- writeable = yes
- browseable = yes
-</programlisting>
-</para>
+<sect1>
+<title>Discussion</title>
<para>
-The modules are used in the order they are specified.
+If not supplied with your platform distribution binary Samba package you may have problems
+to compile these modules, as shared libraries are compiled and linked in different ways
+on different systems. They currently have been tested against GNU/Linux and IRIX.
</para>
<para>
-Further documentation on writing VFS modules for Samba can be found in
-the Samba Developers Guide.
-</para>
-
-</sect1>
-
-<sect1>
-<title>Included modules</title>
+To use the VFS modules, create a share similar to the one below. The
+important parameter is the <command>vfs objects</command> parameter where
+you can list one or more VFS modules by name. For example, to log all access
+to files and put deleted files in a recycle bin:
-<sect2>
-<title>audit</title>
-<para>A simple module to audit file access to the syslog
-facility. The following operations are logged:
-<simplelist>
-<member>share</member>
-<member>connect/disconnect</member>
-<member>directory opens/create/remove</member>
-<member>file open/close/rename/unlink/chmod</member>
-</simplelist>
+<programlisting>
+[audit]
+ comment = Audited /data directory
+ path = /data
+ vfs objects = audit recycle
+ writeable = yes
+ browseable = yes
+</programlisting>
</para>
-</sect2>
-<sect2>
-<title>extd_audit</title>
<para>
-This module is identical with the <emphasis>audit</emphasis> module above except
-that it sends audit logs to both syslog as well as the smbd log file/s. The
-loglevel for this module is set in the smb.conf file.
+The modules are used in the order in which they are specified.
</para>
<para>
-The logging information that will be written to the smbd log file is controlled by
-the <emphasis>log level</emphasis> parameter in <filename>smb.conf</filename>. The
-following information will be recorded:
+Samba will attempt to load modules from the <emphasis>lib</emphasis>
+directory in the root directory of the samba installation (usually
+<filename>/usr/lib/samba/vfs</filename> or <filename>/usr/local/samba/lib/vfs
+</filename>).
</para>
-<table frame="all"><title>Extended Auditing Log Information</title>
-<tgroup cols="2" align="center">
- <thead>
- <row><entry align="center">Log Level</entry><entry>Log Details - File and Directory Operations</entry></row>
- </thead>
- <tbody>
- <row><entry align="center">0</entry><entry align="left">Creation / Deletion</entry></row>
- <row><entry align="center">1</entry><entry align="left">Create / Delete / Rename / Permission Changes</entry></row>
- <row><entry align="center">2</entry><entry align="left">Create / Delete / Rename / Perm Change / Open / Close</entry></row>
- </tbody>
-</tgroup>
-</table>
-
-</sect2>
-
-<sect2>
-<title>recycle</title>
<para>
-A recycle-bin like module. When used any unlink call
-will be intercepted and files moved to the recycle
-directory instead of being deleted.
-</para>
+Some modules can be used twice for the same share.
+This can be done using a configuration similar to the one below.
-<para>Supported options:
-<variablelist>
- <varlistentry>
- <term>vfs_recycle_bin:repository</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:keeptree</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:versions</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:touch</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:maxsize</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:exclude</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:exclude_dir</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term>vfs_recycle_bin:noversions</term>
- <listitem><para>FIXME</para></listitem>
- </varlistentry>
-</variablelist>
+<programlisting>
+[test]
+ comment = VFS TEST
+ path = /data
+ writeable = yes
+ browseable = yes
+ vfs objects = example:example1 example example:test
+ example1: parameter = 1
+ example: parameter = 5
+ test: parameter = 7
+</programlisting>
</para>
-</sect2>
-
-<sect2>
-<title>netatalk</title>
-<para>
-A netatalk module, that will ease co-existence of samba and
-netatalk file sharing services.
-</para>
+</sect1>
-<para>Advantages compared to the old netatalk module:
-<simplelist>
-<member>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</member>
-<member>if share in smb.conf doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</member>
-</simplelist>
-</para>
+<sect1>
+<title>Included modules</title>
-</sect2>
+ <sect2>
+ <title>audit</title>
+
+ <para>
+ A simple module to audit file access to the syslog
+ facility. The following operations are logged:
+ <simplelist>
+ <member>share</member>
+ <member>connect/disconnect</member>
+ <member>directory opens/create/remove</member>
+ <member>file open/close/rename/unlink/chmod</member>
+ </simplelist>
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>extd_audit</title>
+
+ <para>
+ This module is identical with the <emphasis>audit</emphasis> module above except
+ that it sends audit logs to both syslog as well as the smbd log file/s. The
+ loglevel for this module is set in the smb.conf file.
+ </para>
+
+ <para>
+ The logging information that will be written to the smbd log file is controlled by
+ the <parameter>log level</parameter> parameter in <filename>smb.conf</filename>. The
+ following information will be recorded:
+ </para>
+
+ <table frame="all"><title>Extended Auditing Log Information</title>
+ <tgroup cols="2" align="center">
+ <thead>
+ <row><entry align="center">Log Level</entry><entry>Log Details - File and Directory Operations</entry></row>
+ </thead>
+ <tbody>
+ <row><entry align="center">0</entry><entry align="left">Creation / Deletion</entry></row>
+ <row><entry align="center">1</entry><entry align="left">Create / Delete / Rename / Permission Changes</entry></row>
+ <row><entry align="center">2</entry><entry align="left">Create / Delete / Rename / Perm Change / Open / Close</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
+ <sect2>
+ <title>fake_perms</title>
+
+ <para>
+ This module was created to allow Roaming Profile files and directories to be set (on the Samba server
+ under Unix) as read only. This module will if installed on the Profiles share will report to the client
+ that the Profile files and directories are writable. This satisfies the client even though the files
+ will never be overwritten as the client logs out or shuts down.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>recycle</title>
+
+ <para>
+ A recycle-bin like module. When used any unlink call
+ will be intercepted and files moved to the recycle
+ directory instead of being deleted.
+ </para>
+
+ <para>Supported options:
+ <variablelist>
+ <varlistentry>
+ <term>recycle:repository</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:keeptree</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:versions</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:touch</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:maxsize</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:exclude</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:exclude_dir</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>recycle:noversions</term>
+ <listitem><para>FIXME</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>netatalk</title>
+
+ <para>
+ A netatalk module, that will ease co-existence of samba and
+ netatalk file sharing services.
+ </para>
+
+ <para>Advantages compared to the old netatalk module:
+ <simplelist>
+ <member>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</member>
+ <member>if a share in &smb.conf; doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</member>
+ </simplelist>
+ </para>
+
+ </sect2>
</sect1>
@@ -179,52 +223,60 @@ to have his or her own CVS tree).
</para>
<para>
-No statemets about the stability or functionality of any module
+No statements about the stability or functionality of any module
should be implied due to its presence here.
</para>
-<sect2>
-<title>DatabaseFS</title>
+ <sect2>
+ <title>DatabaseFS</title>
-<para>
-URL: <ulink url="http://www.css.tayloru.edu/~elorimer/databasefs/index.php">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</ulink>
-</para>
+ <para>
+ URL: <ulink url="http://www.css.tayloru.edu/~elorimer/databasefs/index.php">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</ulink>
+ </para>
-<para>By <ulink url="mailto:elorimer@css.tayloru.edu">Eric Lorimer</ulink>.</para>
+ <para>By <ulink url="mailto:elorimer@css.tayloru.edu">Eric Lorimer</ulink>.</para>
-<para>
-I have created a VFS module which implements a fairly complete read-only
-filesystem. It presents information from a database as a filesystem in
-a modular and generic way to allow different databases to be used
-(originally designed for organizing MP3s under directories such as
-"Artists," "Song Keywords," etc... I have since applied it to a student
-roster database very easily). The directory structure is stored in the
-database itself and the module makes no assumptions about the database
-structure beyond the table it requires to run.
-</para>
+ <para>
+ I have created a VFS module which implements a fairly complete read-only
+ filesystem. It presents information from a database as a filesystem in
+ a modular and generic way to allow different databases to be used
+ (originally designed for organizing MP3s under directories such as
+ "Artists," "Song Keywords," etc... I have since applied it to a student
+ roster database very easily). The directory structure is stored in the
+ database itself and the module makes no assumptions about the database
+ structure beyond the table it requires to run.
+ </para>
-<para>
-Any feedback would be appreciated: comments, suggestions, patches,
-etc... If nothing else, hopefully it might prove useful for someone
-else who wishes to create a virtual filesystem.
-</para>
+ <para>
+ Any feedback would be appreciated: comments, suggestions, patches,
+ etc... If nothing else, hopefully it might prove useful for someone
+ else who wishes to create a virtual filesystem.
+ </para>
-</sect2>
+ </sect2>
-<sect2>
-<title>vscan</title>
-<para>URL: <ulink url="http://www.openantivirus.org/">http://www.openantivirus.org/</ulink></para>
+ <sect2>
+ <title>vscan</title>
-<para>
-samba-vscan is a proof-of-concept module for Samba, which
-uses the VFS (virtual file system) features of Samba 2.2.x/3.0
-alphaX. Of couse, Samba has to be compiled with VFS support.
-samba-vscan supports various virus scanners and is maintained
-by Rainer Link.
-</para>
+ <para>URL: <ulink url="http://www.openantivirus.org/">http://www.openantivirus.org/</ulink></para>
-</sect2>
+ <para>
+ samba-vscan is a proof-of-concept module for Samba, which
+ uses the VFS (virtual file system) features of Samba 2.2.x/3.0
+ alphaX. Of course, Samba has to be compiled with VFS support.
+ samba-vscan supports various virus scanners and is maintained
+ by Rainer Link.
+ </para>
+ </sect2>
</sect1>
+<sect1>
+<title>Common Errors</title>
+
+<para>
+There must be some gotchas we should record here! Jelmer???
+</para>
+
+</sect1>
</chapter>
diff --git a/docs/docbook/projdoc/locking.xml b/docs/docbook/projdoc/locking.xml
index 437f7756d9..0e508f682a 100644
--- a/docs/docbook/projdoc/locking.xml
+++ b/docs/docbook/projdoc/locking.xml
@@ -62,7 +62,7 @@ that are specified when a file is open.
</para>
<para>
-Record locking semantics under Unix is very different from record locking under
+Record locking semantics under Unix are 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
@@ -82,33 +82,34 @@ All other locks can not be seen by unix anyway.
<para>
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
+the <command>rpc.lockd</command>. 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 <emphasis>strict locking = yes</emphasis> then it
+to by a client, but if you set <parameter>strict locking = yes</parameter> then it
will make lock checking calls on every read and write.
</para>
<para>
-You can also disable by range locking completely using <emphasis>locking = no</emphasis>.
+You can also disable byte range locking completely using <parameter>locking = no</parameter>.
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.
</para>
<para>
-The second class of locking is the <emphasis>deny modes</emphasis>. These
+The second class of locking is the <parameter>deny modes</parameter>. 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.
+<constant>DENY_NONE</constant>, <constant>DENY_READ</constant>,
+<constant>DENY_WRITE</constant> or <constant>DENY_ALL</constant>. There are also special compatibility
+modes called <constant>DENY_FCB</constant> and <constant>DENY_DOS</constant>.
</para>
<sect2>
<title>Opportunistic Locking Overview</title>
<para>
-OPPORTUNISTIC LOCKING (Oplocks) is invoked by the Windows file system
+Opportunistic locking (Oplocks) is invoked by the Windows file system
(as opposed to an API) via registry entries (on the server AND client)
for the purpose of enhancing network performance when accessing a file
residing on a server. Performance is enhanced by caching the file
@@ -129,7 +130,7 @@ locally on the client which allows:
</varlistentry>
<varlistentry><term>Lock caching:</term>
- <listitem><para>
+ <listitem><para>
The client caches application locks locally, eliminating network latency
</para></listitem>
</varlistentry>
@@ -149,8 +150,8 @@ other processes.
The redirector sees that the file was opened with deny
none (allowing concurrent access), verifies that no
other process is accessing the file, checks that
- oplocks are enabled, then grants deny-all/read-write/ex-
- clusive access to the file. The client now performs
+ oplocks are enabled, then grants deny-all/read-write/exclusive
+ access to the file. The client now performs
operations on the cached local file.
</para>
@@ -339,7 +340,7 @@ exposes the file to likely data corruption.
</para>
<para>
-If files are shared between Windows clients, and either loca Unix
+If files are shared between Windows clients, and either local Unix
or NFS users, then turn opportunistic locking off.
</para>
@@ -408,7 +409,7 @@ the share.
<title>Beware of Force User</title>
<para>
-Samba includes an smb.conf parameter called "force user" that changes
+Samba includes an &smb.conf; parameter called <parameter>force user</parameter> that changes
the user accessing a share from the incoming user to whatever user is
defined by the smb.conf variable. If opportunistic locking is enabled
on a share, the change in user access causes an oplock break to be sent
@@ -425,7 +426,7 @@ Avoid the combination of the following:
<itemizedlist>
<listitem><para>
- <emphasis>force user</emphasis> in the &smb.conf; share configuration.
+ <parameter>force user</parameter> in the &smb.conf; share configuration.
</para></listitem>
<listitem><para>
@@ -447,8 +448,9 @@ Samba provides opportunistic locking parameters that allow the
administrator to adjust various properties of the oplock mechanism to
account for timing and usage levels. These parameters provide good
versatility for implementing oplocks in environments where they would
-likely cause problems. The parameters are: <emphasis>oplock break wait time,
-oplock contention limit</emphasis>.
+likely cause problems. The parameters are:
+<parameter>oplock break wait time</parameter>,
+<parameter>oplock contention limit</parameter>.
</para>
<para>
@@ -541,7 +543,7 @@ Level1 Oplocks (aka just plain "oplocks") is another term for opportunistic lock
</para>
<para>
-Level2 Oplocks provids opportunistic locking for a file that will be treated as
+Level2 Oplocks provides opportunistic locking for a file that will be treated as
<emphasis>read only</emphasis>. Typically this is used on files that are read-only or
on files that the client has no initial intention to write to at time of opening the file.
</para>
@@ -558,7 +560,7 @@ Unless your system supports kernel oplocks, you should disable oplocks if you ar
accessing the same files from both Unix/Linux and SMB clients. Regardless, oplocks should
always be disabled if you are sharing a database file (e.g., Microsoft Access) between
multiple clients, as any break the first client receives will affect synchronisation of
-the entire file (not just the single record), which will result in a noticable performance
+the entire file (not just the single record), which will result in a noticeable performance
impairment and, more likely, problems accessing the database in the first place. Notably,
Microsoft Outlook's personal folders (*.pst) react very badly to oplocks. If in doubt,
disable oplocks and tune your system from that point.
@@ -581,7 +583,7 @@ measurable speed benefit on your network, it might not be worth the hassle of de
<title>Example Configuration</title>
<para>
-In the following we examine two destinct aspects of samba locking controls.
+In the following we examine two distinct aspects of Samba locking controls.
</para>
<sect3>
@@ -622,7 +624,7 @@ you may want to play it safe and disable oplocks and level2 oplocks.
</sect3>
<sect3>
-<title>Diabling Kernel OpLocks</title>
+<title>Disabling Kernel OpLocks</title>
<para>
Kernel OpLocks is an &smb.conf; parameter that notifies Samba (if
@@ -639,12 +641,11 @@ basis in the &smb.conf; file.
</para>
<para>
-<programlisting><title>Example:</title>
+<programlisting>
[global]
- kernel oplocks = yes
-
-The default is "no".
+kernel oplocks = yes
</programlisting>
+The default is "no".
</para>
<para>
@@ -676,7 +677,7 @@ enabled on a per-share basis, or globally for the entire server, in the
interval for Samba to reply to an oplock break request. Samba
recommends "DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND
UNDERSTOOD THE SAMBA OPLOCK CODE." Oplock Break Wait Time can only be
-configured globally in the smb.conf file:
+configured globally in the &smb.conf; file:
</para>
<para>
@@ -701,7 +702,7 @@ the entire server, in the &smb.conf; file:
[global]
oplock break contention limit = 2 (default)
- [share_name]
+[share_name]
oplock break contention limit = 2 (default)
</programlisting>
</para>
@@ -722,7 +723,7 @@ operating system known as <emphasis>Opportunistic Locking</emphasis>. When a wor
attempts to access shared data files located on another Windows 2000/XP computer,
the Windows 2000/XP operating system will attempt to increase performance by locking the
files and caching information locally. When this occurs, the application is unable to
-properly function, which results in an <emphasis>Access Denied</emphasis>
+properly function, which results in an <errorname>Access Denied</errorname>
error message being displayed during network operations.
</para>
@@ -939,8 +940,8 @@ our Knowledge Base.
<para>
In some sites locking problems surface as soon as a server is installed, in other sites
-locking problems may not surface for a long time. Almost without exeception, when a locking
-problem does surface it will cause embarassment and potential data corruption.
+locking problems may not surface for a long time. Almost without exception, when a locking
+problem does surface it will cause embarrassment and potential data corruption.
</para>
<para>
@@ -979,6 +980,26 @@ so far:
</para></listitem>
</itemizedlist>
+ <sect2>
+ <title>locking.tdb error messages</title>
+
+ <para>
+ <screen>
+ > We are seeing lots of errors in the samba logs like:
+ >
+ > tdb(/usr/local/samba_2.2.7/var/locks/locking.tdb): rec_read bad magic
+ > 0x4d6f4b61 at offset=36116
+ >
+ > What do these mean?
+ </screen>
+ </para>
+
+ <para>
+ Corrupted tdb. Stop all instances of smbd, delete locking.tdb, restart smbd.
+ </para>
+
+ </sect2>
+
</sect1>
<sect1>
diff --git a/docs/docbook/projdoc/msdfs_setup.xml b/docs/docbook/projdoc/msdfs_setup.xml
index a86cd74235..c21c9ec6bf 100644
--- a/docs/docbook/projdoc/msdfs_setup.xml
+++ b/docs/docbook/projdoc/msdfs_setup.xml
@@ -14,49 +14,54 @@
<pubdate>12 Jul 2000</pubdate>
</chapterinfo>
-
<title>Hosting a Microsoft Distributed File System tree on Samba</title>
<sect1>
-
- <title>Instructions</title>
-
- <para>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 <ulink
- url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">
- Microsoft documentation</ulink>. </para>
-
- <para>This document explains how to host a Dfs tree on a Unix
- machine (for Dfs-aware clients to browse) using Samba.</para>
-
- <para>To enable SMB-based DFS for Samba, configure it with the
- <parameter>--with-msdfs</parameter> option. Once built, a
- Samba server can be made a Dfs server by setting the global
- boolean <ulink url="smb.conf.5.html#HOSTMSDFS"><parameter>
- host msdfs</parameter></ulink> parameter in the <filename>smb.conf
- </filename> file. You designate a share as a Dfs root using the share
- level boolean <ulink url="smb.conf.5.html#MSDFSROOT"><parameter>
- msdfs root</parameter></ulink> 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
- <filename>junction-&gt;msdfs:storage1\share1</filename> 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).</para>
-
- <para>Dfs trees on Samba work with all Dfs-aware clients ranging
- from Windows 95 to 2000.</para>
+<title>Features and Benefits</title>
+
+ <para>
+ 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.
+ </para>
+
+ <para>
+ For information about DFS, refer to
+ <ulink url="http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp">
+ Microsoft documentation at http://www.microsoft.com/NTServer/nts/downloads/winfeatures/NTSDistrFile/AdminGuide.asp</ulink>.
+ </para>
+
+ <para>
+ This document explains how to host a DFS tree on a Unix machine (for DFS-aware
+ clients to browse) using Samba.
+ </para>
+
+ <para>
+ To enable SMB-based DFS for Samba, configure it with the <parameter>--with-msdfs</parameter>
+ option. Once built, a Samba server can be made a DFS server by setting the global
+ boolean <ulink url="smb.conf.5.html#HOSTMSDFS"><parameter> host msdfs</parameter></ulink>
+ parameter in the <filename>smb.conf </filename> file. You designate a share as a DFS
+ root using the share level boolean <ulink url="smb.conf.5.html#MSDFSROOT"><parameter>
+ msdfs root</parameter></ulink> 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
+ <filename>junction-&gt;msdfs:storage1\share1</filename> 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).
+ </para>
+
+ <para>
+ DFS trees on Samba work with all DFS-aware clients ranging from Windows 95 to 200x.
+ </para>
- <para>Here's an example of setting up a Dfs tree on a Samba
- server.</para>
+ <para>
+ Here's an example of setting up a DFS tree on a Samba server.
+ </para>
<para><programlisting>
# The smb.conf file:
[global]
- netbios name = SAMBA
+ netbios name = SMOKEY
host msdfs = yes
[dfs]
@@ -68,49 +73,47 @@
<para>In the /export/dfsroot directory we set up our dfs links to
other servers on the network.</para>
- <para><prompt>root# </prompt><userinput>cd /export/dfsroot</userinput></para>
- <para><prompt>root# </prompt><userinput>chown root /export/dfsroot</userinput></para>
- <para><prompt>root# </prompt><userinput>chmod 755 /export/dfsroot</userinput></para>
- <para><prompt>root# </prompt><userinput>ln -s msdfs:storageA\\shareA linka</userinput></para>
- <para><prompt>root# </prompt><userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput></para>
-
+ <screen>
+ &rootprompt;<userinput>cd /export/dfsroot</userinput>
+ &rootprompt;<userinput>chown root /export/dfsroot</userinput>
+ &rootprompt;<userinput>chmod 755 /export/dfsroot</userinput>
+ &rootprompt;<userinput>ln -s msdfs:storageA\\shareA linka</userinput>
+ &rootprompt;<userinput>ln -s msdfs:serverB\\share,serverC\\share linkb</userinput>
+ </screen>
<para>You should set up the permissions and ownership of
- the directory acting as the Dfs root such that only designated
+ 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.</para>
- <para>Users on Dfs-aware clients can now browse the Dfs tree
+ <para>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.</para>
-
- <sect2>
- <title>Notes</title>
-
- <itemizedlist>
- <listitem><para>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.</para>
- </listitem>
-
- <listitem><para>Currently there's a restriction that msdfs
- symlink names should all be lowercase.</para>
- </listitem>
-
- <listitem><para>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.</para>
- </listitem>
- </itemizedlist>
- </sect2>
</sect1>
+<sect1>
+<title>Common Errors</title>
+ <itemizedlist>
+ <listitem><para>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.</para>
+ </listitem>
+
+ <listitem><para>Currently there's a restriction that msdfs
+ symlink names should all be lowercase.</para>
+ </listitem>
+
+ <listitem><para>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.</para>
+ </listitem>
+ </itemizedlist>
+</sect1>
-
</chapter>
diff --git a/docs/docbook/projdoc/passdb.xml b/docs/docbook/projdoc/passdb.xml
index 78aee30448..3a33e9f1e7 100644
--- a/docs/docbook/projdoc/passdb.xml
+++ b/docs/docbook/projdoc/passdb.xml
@@ -17,20 +17,20 @@
<title>Account Information Databases</title>
<para>
-Samba-3 implements a new capability to work concurrently with mulitple account backends.
+Samba-3 implements a new capability to work concurrently with multiple account backends.
The possible new combinations of password backends allows Samba-3 a degree of flexibility
and scalability that previously could be achieved only with MS Windows Active Directory.
This chapter describes the new functionality and how to get the most out of it.
</para>
<para>
-In the course of development of Samba-3 a number of requests were received to provide the
+In the course of development of Samba-3, a number of requests were received to provide the
ability to migrate MS Windows NT4 SAM accounts to Samba-3 without the need to provide
matching Unix/Linux accounts. We called this the <emphasis>Non Unix Accounts (NUA)</emphasis>
capability. The intent was that an administrator could decide to use the <emphasis>tdbsam</emphasis>
-backend and by simply specifying <emphasis>"passdb backedn = tdbsam_nua, guest"</emphasis>
+backend and by simply specifying <emphasis>"passdb backend = tdbsam_nua, guest"</emphasis>
this would allow Samba-3 to implement a solution that did not use Unix accounts per se. Late
-in the development cycle the team doing this work hit upon some obstacles that prevents this
+in the development cycle, the team doing this work hit upon some obstacles that prevents this
solution from being used. Given the delays with Samba-3 release a decision was made to NOT
deliver this functionality until a better method of recognising NT Group SIDs from NT User
SIDs could be found. This feature may thus return during the life cycle for the Samba-3 series.
@@ -73,16 +73,22 @@ as follows:
provide the extended controls that are needed for more comprehensive
interoperation with MS Windows NT4 / 200x servers.
</para>
+
+ <para>
+ This backend should be used only for backwards compatibility with older
+ versions of Samba. It may be deprecated in future releases.
+ </para>
</listitem>
</varlistentry>
- <varlistentry><term>ldapsam_compat (Samba-2.2 LDAP Compatibilty):</term>
+ <varlistentry><term>ldapsam_compat (Samba-2.2 LDAP Compatibility):</term>
<listitem>
<para>
There is a password backend option that allows continued operation with
a existing OpenLDAP backend that uses the Samba-2.2.x LDAP schema extension.
This option is provided primarily as a migration tool, although there is
- no reason to force migration at this time.
+ no reason to force migration at this time. Note that this tool will eventually
+ be deprecated.
</para>
</listitem>
</varlistentry>
@@ -94,9 +100,25 @@ Samba-3 introduces the following new password backend capabilities:
<variablelist>
<title>New Backends</title>
+ <varlistentry><term>guest:</term>
+ <listitem>
+ <para>
+ This is <emphasis>always</emphasis> required as the last backend specified.
+ It provides the ability to handle guest account requirements for access to
+ resources like <parameter>IPC$</parameter> which is used for browsing.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry><term>tdbsam:</term>
<listitem>
<para>
+ This backend provides a rich database backend for local servers. This
+ backend is NOT suitable for multiple domain controller (ie: PDC + one
+ or more BDC) installations.
+ </para>
+
+ <para>
The <emphasis>tdbsam</emphasis> password backend stores the old <emphasis>
smbpasswd</emphasis> information PLUS the extended MS Windows NT / 200x
SAM information into a binary format TDB (trivial database) file.
@@ -106,7 +128,7 @@ Samba-3 introduces the following new password backend capabilities:
</para>
<para>
- The inclusion of the <emphasis>tdbssam</emphasis> capability is a direct
+ The inclusion of the <emphasis>tdbsam</emphasis> capability is a direct
response to user requests to allow simple site operation without the overhead
of the complexities of running OpenLDAP. It is recommended to use this only
for sites that have fewer than 250 users. For larger sites or implementations
@@ -118,14 +140,18 @@ Samba-3 introduces the following new password backend capabilities:
<varlistentry><term>ldapsam:</term>
<listitem>
<para>
+ This provides a rich directory backend for distributed account installation.
+ </para>
+
+ <para>
Samba-3 has a new and extended LDAP implementation that requires configuration
of OpenLDAP with a new format samba schema. The new format schema file is
- included in the <filename>~samba/examples/LDAP</filename> directory.
+ included in the <filename class="directory">examples/LDAP</filename> directory of the Samba distribution.
</para>
<para>
- The new LDAP implmentation significantly expands the control abilities that
- were possible with prior versions of Samba. It is not possible to specify
+ The new LDAP implementation significantly expands the control abilities that
+ were possible with prior versions of Samba. It is now possible to specify
"per user" profile settings, home directories, account access controls, and
much more. Corporate sites will see that the Samba-Team has listened to their
requests both for capability and to allow greater scalability.
@@ -147,16 +173,14 @@ Samba-3 introduces the following new password backend capabilities:
<listitem>
<para>
Allows the account and password data to be stored in an XML format
- data file. This backend is NOT recommended for normal operation, it is
- provided for developmental and for experimental use only. We recognise
- that this will not stop some people from using it anyhow, it should work
- but is NOT officially supported at this time (and likely will not be
- at any time).
+ data file. This backend can not be used for normal operation, it can only
+ be used in conjunction with <command>pdbedit</command>'s pdb2pdb
+ functionality. The DTD that is used might be subject to changes in the future.
</para>
<para>
The xmlsam option can be useful for account migration between database
- backends. Use of this tool will allow the data to be edited before migration
+ backends or backups. Use of this tool will allow the data to be edited before migration
into another backend format.
</para>
</listitem>
@@ -171,15 +195,6 @@ Samba-3 introduces the following new password backend capabilities:
</listitem>
</varlistentry>
- <varlistentry><term>plugin:</term>
- <listitem>
- <para>
- This option allows any external non-Samba backend to interface directly
- to the samba code. This facility will allow third part vendors to provide
- a proprietary backend to Samba-3.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</sect1>
@@ -199,7 +214,7 @@ Samba-3 introduces the following new password backend capabilities:
</para>
<para>
- These passwords can't be converted to unix style encrypted passwords. Because of that
+ These passwords can't be converted to unix style encrypted passwords. Because of that,
you can't use the standard unix user database, and you have to store the Lanman and NT
hashes somewhere else.
</para>
@@ -208,9 +223,9 @@ Samba-3 introduces the following new password backend capabilities:
In addition to differently encrypted passwords, windows also stores certain data for each
user that is not stored in a unix user database. e.g: workstations the user may logon from,
the location where the users' profile is stored, and so on. Samba retrieves and stores this
- information using a "passdb backend". Commonly available backends are LDAP, plain text
+ information using a <parameter>passdb backend</parameter>. Commonly available backends are LDAP, plain text
file, MySQL and nisplus. For more information, see the man page for &smb.conf; regarding the
- <command>passdb backend = </command> parameter.
+ <parameter>passdb backend</parameter> parameter.
</para>
<sect2>
@@ -248,23 +263,12 @@ Samba-3 introduces the following new password backend capabilities:
although they may log onto a domain environment:
</para>
- <itemizedlist>
- <listitem><para>
- MS DOS Network client 3.0 with the basic network redirector installed
- </para></listitem>
-
- <listitem><para>
- Windows 95 with the network redirector update installed
- </para></listitem>
-
- <listitem><para>
- Windows 98 [se]
- </para></listitem>
-
- <listitem><para>
- Windows Me</para>
- </listitem>
- </itemizedlist>
+ <simplelist>
+ <member>MS DOS Network client 3.0 with the basic network redirector installed</member>
+ <member>Windows 95 with the network redirector update installed</member>
+ <member>Windows 98 [se]</member>
+ <member>Windows Me</member>
+ </simplelist>
<note>
<para>
@@ -277,13 +281,13 @@ Samba-3 introduces the following new password backend capabilities:
The following versions of MS Windows fully support domain security protocols.
</para>
- <itemizedlist>
- <listitem><para>Windows NT 3.5x</para></listitem>
- <listitem><para>Windows NT 4.0</para></listitem>
- <listitem><para>Windows 2000 Professional</para></listitem>
- <listitem><para>Windows 200x Server/Advanced Server</para></listitem>
- <listitem><para>Windows XP Professional</para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>Windows NT 3.5x</member>
+ <member>Windows NT 4.0</member>
+ <member>Windows 2000 Professional</member>
+ <member>Windows 200x Server/Advanced Server</member>
+ <member>Windows XP Professional</member>
+ </simplelist>
<para>
All current release of Microsoft SMB/CIFS clients support authentication via the
@@ -346,6 +350,32 @@ Samba-3 introduces the following new password backend capabilities:
</itemizedlist>
</sect3>
</sect2>
+
+ <sect2>
+ <title>Mapping User Identifiers between MS Windows and Unix</title>
+
+ <para>
+ Every operation in Unix/Linux requires a user identifier (UID), just as in
+ MS Windows NT4 / 200x this requires a Security Identifier (SID). Samba provides
+ two means for mapping an MS Windows user to a Unix/Linux UID.
+ </para>
+
+ <para>
+ Firstly, all Samba SAM (Security Account Manager database) accounts require
+ a Unix/Linux UID that the account will map to. As users are added to the account
+ information database, Samba-3 will call the <parameter>add user script</parameter>
+ interface to add the account to the Samba host OS. In essence, all accounts in
+ the local SAM require a local user account.
+ </para>
+
+ <para>
+ The second way to affect Windows SID to Unix UID mapping is via the
+ <emphasis>idmap uid, idmap gid</emphasis> parameters in &smb.conf;.
+ Please refer to the man page for information about these parameters.
+ These parameters are essential when mapping users from a remote SAM server.
+ </para>
+
+ </sect2>
</sect1>
<sect1>
@@ -353,10 +383,10 @@ Samba-3 introduces the following new password backend capabilities:
<para>
Samba-3 provides two (2) tools for management of User and machine accounts. These tools are
-called <filename>smbpasswd</filename> and <filename>pdbedit</filename>. A third tool is under
+called <command>smbpasswd</command> and <command>pdbedit</command>. A third tool is under
development but is NOT expected to ship in time for Samba-3.0.0. The new tool will be a TCL/TK
GUI tool that looks much like the MS Windows NT4 Domain User Manager - hopefully this will
-be announced in time for samba-3.0.1 release timing.
+be announced in time for the Samba-3.0.1 release.
</para>
<sect2>
<title>The <emphasis>smbpasswd</emphasis> Command</title>
@@ -369,7 +399,7 @@ be announced in time for samba-3.0.1 release timing.
<para>
<command>smbpasswd</command> works in a client-server mode where it contacts the
- local smbd to change the user's password on its behalf.This has enormous benefits
+ local smbd to change the user's password on its behalf. This has enormous benefits
as follows:
</para>
@@ -383,47 +413,30 @@ be announced in time for samba-3.0.1 release timing.
<command>smbpasswd</command> can be used to:
</para>
- <itemizedlist>
- <listitem><para>
- <emphasis>add</emphasis> user or machine accounts
- </para></listitem>
-
- <listitem><para>
- <emphasis>delete</emphasis> user or machine accounts
- </para></listitem>
-
- <listitem><para>
- <emphasis>enable</emphasis> user or machine accounts
- </para></listitem>
-
- <listitem><para>
- <emphasis>disable</emphasis> user or machine accounts
- </para></listitem>
-
- <listitem><para>
- <emphasis>set to NULL</emphasis> user passwords
- </para></listitem>
-
- <listitem><para>
- <emphasis>manage interdomain trust accounts</emphasis>
- </para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member><emphasis>add</emphasis> user or machine accounts</member>
+ <member><emphasis>delete</emphasis> user or machine accounts</member>
+ <member><emphasis>enable</emphasis> user or machine accounts</member>
+ <member><emphasis>disable</emphasis> user or machine accounts</member>
+ <member><emphasis>set to NULL</emphasis> user passwords</member>
+ <member><emphasis>manage interdomain trust accounts</emphasis></member>
+ </simplelist>
<para>
To run smbpasswd as a normal user just type:
</para>
<para>
- <programlisting>
+ <screen>
<prompt>$ </prompt><userinput>smbpasswd</userinput>
- <prompt>Old SMB password: </prompt><userinput>&lt;secret&gt;</userinput>
- </programlisting>
- For <emphasis>secret</emphasis> type old value here - or hit return if
+ <prompt>Old SMB password: </prompt><userinput><replaceable>secret</replaceable></userinput>
+ </screen>
+ For <replaceable>secret</replaceable> type old value here - or hit return if
there was no old password
- <programlisting>
- <prompt>New SMB Password: </prompt><userinput>&lt;new secret&gt;</userinput>
- <prompt>Repeat New SMB Password: </prompt><userinput>&lt;new secret&gt;</userinput>
- </programlisting>
+ <screen>
+ <prompt>New SMB Password: </prompt><userinput><replaceable>new secret</replaceable></userinput>
+ <prompt>Repeat New SMB Password: </prompt><userinput><replaceable>new secret</replaceable></userinput>
+ </screen>
</para>
<para>
@@ -464,19 +477,11 @@ be announced in time for samba-3.0.1 release timing.
manage the passdb backend. <command>pdbedit</command> can be used to:
</para>
- <itemizedlist>
- <listitem><para>
- add, remove or modify user accounts
- </para></listitem>
-
- <listitem><para>
- listing user accounts
- </para></listitem>
-
- <listitem><para>
- migrate user accounts
- </para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>add, remove or modify user accounts</member>
+ <member>listing user accounts</member>
+ <member>migrate user accounts</member>
+ </simplelist>
<para>
The <command>pdbedit</command> tool is the only one that can manage the account
@@ -495,9 +500,8 @@ be announced in time for samba-3.0.1 release timing.
a tdbsam password backend. This listing was produced by running:
</para>
- <para>
- pdbedit -Lv met
- <programlisting>
+ <screen>
+ <prompt>$ </prompt><userinput>pdbedit -Lv met</userinput>
Unix username: met
NT username:
Account Flags: [UX ]
@@ -518,8 +522,9 @@ be announced in time for samba-3.0.1 release timing.
Password last set: Sat, 14 Dec 2002 14:37:03 GMT
Password can change: Sat, 14 Dec 2002 14:37:03 GMT
Password must change: Mon, 18 Jan 2038 20:14:07 GMT
- </programlisting>
- </para>
+ </screen>
+
+ <!-- FIXME: Add note about migrating user accounts -->
</sect2>
</sect1>
@@ -540,8 +545,8 @@ backends of the same type. For example, to use two different tdbsam databases:
<para>
<programlisting>
-In smb.conf [globals]
- passdb backend = tdbsam:/etc/samba/passdb.tdb, \
+[globals]
+ passdb backend = tdbsam:/etc/samba/passdb.tdb, \
tdbsam:/etc/samba/old-passdb.tdb, guest
</programlisting>
</para>
@@ -551,11 +556,11 @@ In smb.conf [globals]
<title>Plain Text</title>
<para>
- Older versions of samba retrieved user information from the unix user database
+ Older versions of Samba retrieved user information from the unix user database
and eventually some other fields from the file <filename>/etc/samba/smbpasswd</filename>
or <filename>/etc/smbpasswd</filename>. When password encryption is disabled, no
- SMB specific data is stored at all. Instead all operations are conduected via the way
- that the samba host OS will access it's <filename>/etc/passwd</filename> database.
+ SMB specific data is stored at all. Instead all operations are conducted via the way
+ that the Samba host OS will access its <filename>/etc/passwd</filename> database.
eg: On Linux systems that is done via PAM.
</para>
@@ -565,8 +570,8 @@ In smb.conf [globals]
<title>smbpasswd - Encrypted Password Database</title>
<para>
- Traditionally, when configuring <ulink url="smb.conf.5.html#ENCRYPTPASSWORDS">"encrypt
- passwords = yes"</ulink> in Samba's <filename>smb.conf</filename> file, user account
+ Traditionally, when configuring <ulink url="smb.conf.5.html#ENCRYPTPASSWORDS">encrypt
+ passwords = yes</ulink> in Samba's <filename>smb.conf</filename> file, user account
information such as username, LM/NT password hashes, password change times, and account
flags have been stored in the <filename>smbpasswd(5)</filename> file. There are several
disadvantages to this approach for sites with very large numbers of users (counted
@@ -592,12 +597,12 @@ In smb.conf [globals]
<listitem><para>
And finally, the amount of information which is stored in an smbpasswd entry leaves
no room for additional attributes such as a home directory, password expiration time,
- or even a Relative Identified (RID).
+ or even a Relative Identifier (RID).
</para></listitem>
</itemizedlist>
<para>
- As a result of these defeciencies, a more robust means of storing user attributes
+ As a result of these deficiencies, a more robust means of storing user attributes
used by smbd was developed. The API which defines access to user accounts
is commonly referred to as the samdb interface (previously this was called the passdb
API, and is still so named in the Samba CVS trees).
@@ -620,10 +625,10 @@ In smb.conf [globals]
</para>
<para>
- As a general guide the Samba-Team do NOT recommend using the tdbsam backend for sites
+ As a general guide the Samba-Team does NOT recommend using the tdbsam backend for sites
that have 250 or more users. Additionally, tdbsam is not capable of scaling for use
- in sites that require PDB/BDC implmentations that requires replication of the account
- database. Clearly, for reason of scalability the use of ldapsam should be encouraged.
+ in sites that require PDB/BDC implementations that requires replication of the account
+ database. Clearly, for reason of scalability, the use of ldapsam should be encouraged.
</para>
</sect2>
@@ -650,8 +655,15 @@ In smb.conf [globals]
System Administration; Gerald Carter, O'Reilly; Chapter 6: Replacing NIS".
Refer to <ulink url="http://safari.oreilly.com/?XmlId=1-56592-491-6">
http://safari.oreilly.com/?XmlId=1-56592-491-6</ulink> for those who might wish to know
- more about configuration and adminstration of an OpenLDAP server.
+ more about configuration and administration of an OpenLDAP server.
+ </para>
+
+ <note>
+ <para>
+ This section is outdated for Samba-3 schema. Samba-3 introduces a new schema
+ that has not been documented at the time of this publication.
</para>
+ </note>
<para>
This document describes how to use an LDAP directory for storing Samba user
@@ -687,7 +699,7 @@ In smb.conf [globals]
The LDAP ldapsam code has been developed and tested using the OpenLDAP 2.0 and 2.1 server and
client libraries. The same code should work with Netscape's Directory Server and client SDK.
However, there are bound to be compile errors and bugs. These should not be hard to fix.
- Please submit fixes via <link linkend="bugreport"/>.
+ Please submit fixes via <link linkend="bugreport">Bug reporting facility</link>.
</para>
</sect3>
@@ -698,13 +710,13 @@ In smb.conf [globals]
<para>
Samba 3.0 includes the necessary schema file for OpenLDAP 2.0 in
- <filename>examples/LDAP/samba.schema</filename>. The sambaAccount objectclass is given here:
+ <filename>examples/LDAP/samba.schema</filename>. The sambaSamAccount objectclass is given here:
</para>
<para>
<programlisting>
-objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
- DESC 'Samba Auxilary Account'
+objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaSamAccount' SUP top AUXILIARY
+ DESC 'Samba Auxiliary Account'
MUST ( uid $ rid )
MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $
@@ -723,8 +735,8 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
<para>
Just as the smbpasswd file is meant to store information which supplements a
- user's <filename>/etc/passwd</filename> entry, so is the sambaAccount object
- meant to supplement the UNIX user account information. A sambaAccount is a
+ user's <filename>/etc/passwd</filename> entry, so is the sambaSamAccount object
+ meant to supplement the UNIX user account information. A sambaSamAccount is a
<constant>STRUCTURAL</constant> objectclass so it can be stored individually
in the directory. However, there are several fields (e.g. uid) which overlap
with the posixAccount objectclass outlined in RFC2307. This is by design.
@@ -735,7 +747,7 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
<para>
In order to store all user account information (UNIX and Samba) in the directory,
- it is necessary to use the sambaAccount and posixAccount objectclasses in
+ it is necessary to use the sambaSamAccount and posixAccount objectclasses in
combination. However, smbd will still obtain the user's UNIX account
information via the standard C library calls (e.g. getpwnam(), et. al.).
This means that the Samba server must also have the LDAP NSS library installed
@@ -749,21 +761,21 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
<title>OpenLDAP configuration</title>
<para>
- To include support for the sambaAccount object in an OpenLDAP directory
+ To include support for the sambaSamAccount object in an OpenLDAP directory
server, first copy the samba.schema file to slapd's configuration directory.
The samba.schema file can be found in the directory <filename>examples/LDAP</filename>
in the samba source distribution.
</para>
<para>
-<programlisting>
-<prompt>root# </prompt><userinput>cp samba.schema /etc/openldap/schema/</userinput>
-</programlisting>
+<screen>
+&rootprompt;<userinput>cp samba.schema /etc/openldap/schema/</userinput>
+</screen>
</para>
<para>
Next, include the <filename>samba.schema</filename> file in <filename>slapd.conf</filename>.
- The sambaAccount object contains two attributes which depend upon other schema
+ The sambaSamAccount object contains two attributes which depend upon other schema
files. The 'uid' attribute is defined in <filename>cosine.schema</filename> and
the 'displayName' attribute is defined in the <filename>inetorgperson.schema</filename>
file. Both of these must be included before the <filename>samba.schema</filename> file.
@@ -776,7 +788,7 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
## schema files (core.schema is required by default)
include /etc/openldap/schema/core.schema
-## needed for sambaAccount
+## needed for sambaSamAccount
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/samba.schema
@@ -786,13 +798,13 @@ include /etc/openldap/schema/nis.schema
</para>
<para>
- It is recommended that you maintain some indices on some of the most usefull attributes,
- like in the following example, to speed up searches made on sambaAccount objectclasses
+ It is recommended that you maintain some indices on some of the most useful attributes,
+ like in the following example, to speed up searches made on sambaSamAccount objectclasses
(and possibly posixAccount and posixGroup as well).
</para>
<para>
-<programlisting>
+<screen>
# Indices to maintain
## required by OpenLDAP
index objectclass eq
@@ -810,12 +822,11 @@ index displayName pres,sub,eq
##index gidNumber eq
##index memberUid eq
-index rid eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
-</programlisting>
+</screen>
</para>
<para>
@@ -823,9 +834,9 @@ index default sub
</para>
<para>
-<programlisting>
+<screen>
./sbin/slapindex -f slapd.conf
-</programlisting>
+</screen>
</para>
<para>
@@ -833,25 +844,97 @@ index default sub
</para>
<para>
-<programlisting>
-<prompt>root# </prompt><userinput>/etc/init.d/slapd restart</userinput>
-</programlisting>
+<screen>
+&rootprompt;<userinput>/etc/init.d/slapd restart</userinput>
+</screen>
+</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Initialise the LDAP database</title>
+
+ <para>
+ Before you can add accounts to the LDAP database you must create the account containers
+ that they will be stored in. The following LDIF file should be modified to match your
+ needs (ie: Your DNS entries, etc.).
+ </para>
+
+<para>
+<screen>
+# Organization for Samba Base
+dn: dc=plainjoe,dc=org
+objectclass: dcObject
+objectclass: organization
+dc: plainjoe
+o: Terpstra Org Network
+description: The Samba-3 Network LDAP Example
+
+# Organizational Role for Directory Management
+dn: cn=Manager,dc=plainjoe,dc=org
+objectclass: organizationalRole
+cn: Manager
+description: Directory Manager
+
+# Setting up container for users
+dn: ou=People,dc=plainjoe,dc=org
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+# Setting up admin handle for People OU
+dn: cn=admin,ou=People,dc=plainjoe,dc=org
+cn: admin
+objectclass: top
+objectclass: organizationalRole
+objectclass: simpleSecurityObject
+userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
+</screen>
</para>
+ <para>
+ The userPassword shown above should be generated using <command>slappasswd</command>.
+ </para>
+
+ <para>
+ The following command will then load the contents of the LDIF file into the LDAP
+ database.
+ </para>
+
+<para>
+<screen>
+<prompt>$ </prompt><userinput>slapadd -v -l initldap.dif</userinput>
+</screen>
+</para>
+
+ <para>
+ Do not forget to secure your LDAP server with an adequate access control list,
+ as well as an admin password.
+ </para>
+
+ <note>
+ <para>
+ Before Samba can access the LDAP server you need to store the LDAP admin password
+ into the Samba-3 <filename>secrets.tdb</filename> database by:
+ <screen>
+&rootprompt; <userinput>smbpasswd -w <replaceable>secret</replaceable></userinput>
+ </screen>
+ </para>
+ </note>
+
</sect3>
<sect3>
<title>Configuring Samba</title>
<para>
- The following parameters are available in smb.conf only with <parameter>--with-ldapsam</parameter>
- was included when compiling Samba. The following parameters are available in smb.conf only if your
+ The following parameters are available in smb.conf only if your
version of samba was built with LDAP support. Samba automatically builds with LDAP support if the
LDAP libraries are found.
</para>
<itemizedlist>
- <listitem><para><ulink url="smb.conf.5.html#PASSDBBACKEND">passdb backend ldapsam:url</ulink></para></listitem>
+ <listitem><para><ulink url="smb.conf.5.html#PASSDBBACKEND">passdb backend = ldapsam:url</ulink></para></listitem>
<listitem><para><ulink url="smb.conf.5.html#LDAPSSL">ldap ssl</ulink></para></listitem>
<listitem><para><ulink url="smb.conf.5.html#LDAPADMINDN">ldap admin dn</ulink></para></listitem>
<listitem><para><ulink url="smb.conf.5.html#LDAPSUFFIX">ldap suffix</ulink></para></listitem>
@@ -870,51 +953,51 @@ index default sub
use with an LDAP directory could appear as
</para>
- <para>
- <programlisting>
- ## /usr/local/samba/lib/smb.conf
- [global]
- security = user
- encrypt passwords = yes
+<para>
+<programlisting>
+## /usr/local/samba/lib/smb.conf
+[global]
+ security = user
+ encrypt passwords = yes
- netbios name = TASHTEGO
- workgroup = NARNIA
+ netbios name = TASHTEGO
+ workgroup = NARNIA
- # ldap related parameters
+ # ldap related parameters
- # define the DN to use when binding to the directory servers
- # The password for this DN is not stored in smb.conf. Rather it
- # must be set by using 'smbpasswd -w <replaceable>secretpw</replaceable>' to store the
- # passphrase in the secrets.tdb file. If the "ldap admin dn" values
- # change, this password will need to be reset.
- ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org"
+ # define the DN to use when binding to the directory servers
+ # The password for this DN is not stored in smb.conf. Rather it
+ # must be set by using 'smbpasswd -w <replaceable>secretpw</replaceable>' to store the
+ # passphrase in the secrets.tdb file. If the "ldap admin dn" values
+ # change, this password will need to be reset.
+ ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org"
- # Define the SSL option when connecting to the directory
- # ('off', 'start tls', or 'on' (default))
- ldap ssl = start tls
+ # Define the SSL option when connecting to the directory
+ # ('off', 'start tls', or 'on' (default))
+ ldap ssl = start tls
- # syntax: passdb backend = ldapsam:ldap://server-name[:port]
- passdb backend ldapsam:ldap://funball.samba.org
+ # syntax: passdb backend = ldapsam:ldap://server-name[:port]
+ passdb backend = ldapsam:ldap://funball.samba.org, guest
- # smbpasswd -x delete the entire dn-entry
- ldap delete dn = no
+ # smbpasswd -x delete the entire dn-entry
+ ldap delete dn = no
- # the machine and user suffix added to the base suffix
- # wrote WITHOUT quotes. NULL siffixes by default
- ldap user suffix = ou=People
- ldap machine suffix = ou=Systems
+ # the machine and user suffix added to the base suffix
+ # wrote WITHOUT quotes. NULL suffixes by default
+ ldap user suffix = ou=People
+ ldap machine suffix = ou=Systems
- # Trust unix account information in LDAP
- # (see the smb.conf manpage for details)
- ldap trust ids = Yes
+ # Trust unix account information in LDAP
+ # (see the smb.conf manpage for details)
+ ldap trust ids = Yes
- # specify the base DN to use when searching the directory
- ldap suffix = "ou=people,dc=samba,dc=org"
+ # specify the base DN to use when searching the directory
+ ldap suffix = "ou=people,dc=samba,dc=org"
- # generally the default ldap search filter is ok
- # ldap filter = "(&amp;(uid=%u)(objectclass=sambaAccount))"
- </programlisting>
- </para>
+ # generally the default ldap search filter is ok
+ # ldap filter = "(&amp;(uid=%u)(objectclass=sambaSamAccount))"
+</programlisting>
+</para>
</sect3>
@@ -922,14 +1005,14 @@ index default sub
<title>Accounts and Groups management</title>
<para>
- As users accounts are managed thru the sambaAccount objectclass, you should
- modify your existing administration tools to deal with sambaAccount attributes.
+ As users accounts are managed through the sambaSamAccount objectclass, you should
+ modify your existing administration tools to deal with sambaSamAccount attributes.
</para>
<para>
- Machines accounts are managed with the sambaAccount objectclass, just
- like users accounts. However, it's up to you to store thoses accounts
- in a different tree of you LDAP namespace: you should use
+ Machines accounts are managed with the sambaSamAccount objectclass, just
+ like users accounts. However, it's up to you to store those accounts
+ in a different tree of your LDAP namespace: you should use
"ou=Groups,dc=plainjoe,dc=org" to store groups and
"ou=People,dc=plainjoe,dc=org" to store users. Just configure your
NSS and PAM accordingly (usually, in the /etc/ldap.conf configuration
@@ -937,8 +1020,8 @@ index default sub
</para>
<para>
- In Samba release 3.0, the group management system is based on posix
- groups. This means that Samba makes usage of the posixGroup objectclass.
+ In Samba release 3.0, the group management system is based on POSIX
+ groups. This means that Samba makes use of the posixGroup objectclass.
For now, there is no NT-like group system management (global and local
groups).
</para>
@@ -946,12 +1029,12 @@ index default sub
</sect3>
<sect3>
- <title>Security and sambaAccount</title>
+ <title>Security and sambaSamAccount</title>
<para>
There are two important points to remember when discussing the security
- of sambaAccount entries in the directory.
+ of sambaSamAccount entries in the directory.
</para>
<itemizedlist>
@@ -969,13 +1052,13 @@ index default sub
</para>
<para>
- To remedy the first security issue, the "ldap ssl" smb.conf parameter defaults
- to require an encrypted session (<command>ldap ssl = on</command>) using
- the default port of 636
+ To remedy the first security issue, the <parameter>ldap ssl</parameter> &smb.conf; parameter defaults
+ to require an encrypted session (<parameter>ldap ssl = on</parameter>) using
+ the default port of <constant>636</constant>
when contacting the directory server. When using an OpenLDAP server, it
is possible to use the use the StartTLS LDAP extended operation in the place of
LDAPS. In either case, you are strongly discouraged to disable this security
- (<command>ldap ssl = off</command>).
+ (<parameter>ldap ssl = off</parameter>).
</para>
<para>
@@ -990,102 +1073,106 @@ index default sub
following ACL in <filename>slapd.conf</filename>:
</para>
- <para>
- <programlisting>
- ## allow the "ldap admin dn" access, but deny everyone else
- access to attrs=lmPassword,ntPassword
- by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write
- by * none
- </programlisting>
- </para>
+<para>
+<programlisting>
+## allow the "ldap admin dn" access, but deny everyone else
+access to attrs=lmPassword,ntPassword
+ by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write
+ by * none
+</programlisting>
+</para>
</sect3>
<sect3>
- <title>LDAP special attributes for sambaAccounts</title>
+ <title>LDAP special attributes for sambaSamAccounts</title>
<para>
- The sambaAccount objectclass is composed of the following attributes:
+ The sambaSamAccount objectclass is composed of the following attributes:
</para>
- <itemizedlist>
- <listitem><para><constant>lmPassword</constant>: the LANMAN password 16-byte hash stored as a character
- representation of a hexidecimal string.</para></listitem>
-
- <listitem><para><constant>ntPassword</constant>: the NT password hash 16-byte stored as a character
- representation of a hexidecimal string.</para></listitem>
-
- <listitem><para><constant>pwdLastSet</constant>: The integer time in seconds since 1970 when the
+ <para>
+ <table frame="all">
+ <title>Attributes in the sambaSamAccount objectclass (LDAP)</title>
+ <tgroup cols="2" align="left">
+ <tbody>
+ <row><entry><constant>lmPassword</constant></entry><entry>the LANMAN password 16-byte hash stored as a character
+ representation of a hexadecimal string.</entry></row>
+ <row><entry><constant>ntPassword</constant></entry><entry>the NT password hash 16-byte stored as a character
+ representation of a hexadecimal string.</entry></row>
+ <row><entry><constant>pwdLastSet</constant></entry><entry>The integer time in seconds since 1970 when the
<constant>lmPassword</constant> and <constant>ntPassword</constant> attributes were last set.
- </para></listitem>
+ </entry></row>
- <listitem><para><constant>acctFlags</constant>: string of 11 characters surrounded by square brackets []
+ <row><entry><constant>acctFlags</constant></entry><entry>string of 11 characters surrounded by square brackets []
representing account flags such as U (user), W(workstation), X(no password expiration),
I(Domain trust account), H(Home dir required), S(Server trust account),
- and D(disabled).</para></listitem>
+ and D(disabled).</entry></row>
- <listitem><para><constant>logonTime</constant>: Integer value currently unused</para></listitem>
+ <row><entry><constant>logonTime</constant></entry><entry>Integer value currently unused</entry></row>
- <listitem><para><constant>logoffTime</constant>: Integer value currently unused</para></listitem>
+ <row><entry><constant>logoffTime</constant></entry><entry>Integer value currently unused</entry></row>
- <listitem><para><constant>kickoffTime</constant>: Integer value currently unused</para></listitem>
+ <row><entry><constant>kickoffTime</constant></entry><entry>Integer value currently unused</entry></row>
- <listitem><para><constant>pwdCanChange</constant>: Integer value currently unused</para></listitem>
+ <row><entry><constant>pwdCanChange</constant></entry><entry>Integer value currently unused</entry></row>
- <listitem><para><constant>pwdMustChange</constant>: Integer value currently unused</para></listitem>
+ <row><entry><constant>pwdMustChange</constant></entry><entry>Integer value currently unused</entry></row>
- <listitem><para><constant>homeDrive</constant>: specifies the drive letter to which to map the
+ <row><entry><constant>homeDrive</constant></entry><entry>specifies the drive letter to which to map the
UNC path specified by homeDirectory. The drive letter must be specified in the form "X:"
where X is the letter of the drive to map. Refer to the "logon drive" parameter in the
- smb.conf(5) man page for more information.</para></listitem>
+ smb.conf(5) man page for more information.</entry></row>
- <listitem><para><constant>scriptPath</constant>: The scriptPath property specifies the path of
+ <row><entry><constant>scriptPath</constant></entry><entry>The scriptPath property specifies the path of
the user's logon script, .CMD, .EXE, or .BAT file. The string can be null. The path
is relative to the netlogon share. Refer to the "logon script" parameter in the
- smb.conf(5) man page for more information.</para></listitem>
+ smb.conf(5) man page for more information.</entry></row>
- <listitem><para><constant>profilePath</constant>: specifies a path to the user's profile.
+ <row><entry><constant>profilePath</constant></entry><entry>specifies a path to the user's profile.
This value can be a null string, a local absolute path, or a UNC path. Refer to the
- "logon path" parameter in the smb.conf(5) man page for more information.</para></listitem>
+ "logon path" parameter in the smb.conf(5) man page for more information.</entry></row>
- <listitem><para><constant>smbHome</constant>: The homeDirectory property specifies the path of
+ <row><entry><constant>smbHome</constant></entry><entry>The homeDirectory property specifies the path of
the home directory for the user. The string can be null. If homeDrive is set and specifies
a drive letter, homeDirectory should be a UNC path. The path must be a network
UNC path of the form <filename>\\server\share\directory</filename>. This value can be a null string.
Refer to the <command>logon home</command> parameter in the &smb.conf; man page for more information.
- </para></listitem>
+ </entry></row>
- <listitem><para><constant>userWorkstation</constant>: character string value currently unused.
- </para></listitem>
+ <row><entry><constant>userWorkstation</constant></entry><entry>character string value currently unused.
+ </entry></row>
- <listitem><para><constant>rid</constant>: the integer representation of the user's relative identifier
- (RID).</para></listitem>
+ <row><entry><constant>rid</constant></entry><entry>the integer representation of the user's relative identifier
+ (RID).</entry></row>
- <listitem><para><constant>primaryGroupID</constant>: the relative identifier (RID) of the primary group
- of the user.</para></listitem>
+ <row><entry><constant>primaryGroupID</constant></entry><entry>the relative identifier (RID) of the primary group
+ of the user.</entry></row>
- <listitem><para><constant>domain</constant>: domain the user is part of.</para></listitem>
- </itemizedlist>
+ <row><entry><constant>domain</constant></entry><entry>domain the user is part of.</entry></row>
+ </tbody>
+ </tgroup></table>
+ </para>
<para>
The majority of these parameters are only used when Samba is acting as a PDC of
- a domain (refer to the <link linkend="pdc">Samba as a primary domain controller</link> chapter for details on
+ a domain (refer to the <link linkend="samba-pdc">Samba as a primary domain controller</link> chapter for details on
how to configure Samba as a Primary Domain Controller). The following four attributes
- are only stored with the sambaAccount entry if the values are non-default values:
+ are only stored with the sambaSamAccount entry if the values are non-default values:
</para>
- <itemizedlist>
- <listitem><para>smbHome</para></listitem>
- <listitem><para>scriptPath</para></listitem>
- <listitem><para>logonPath</para></listitem>
- <listitem><para>homeDrive</para></listitem>
- </itemizedlist>
+ <simplelist>
+ <member>smbHome</member>
+ <member>scriptPath</member>
+ <member>logonPath</member>
+ <member>homeDrive</member>
+ </simplelist>
<para>
- These attributes are only stored with the sambaAccount entry if
+ These attributes are only stored with the sambaSamAccount entry if
the values are non-default values. For example, assume TASHTEGO has now been
- configured as a PDC and that <command>logon home = \\%L\%u</command> was defined in
- its <filename>smb.conf</filename> file. When a user named "becky" logons to the domain,
+ configured as a PDC and that <parameter>logon home = \\%L\%u</parameter> was defined in
+ its &smb.conf; file. When a user named "becky" logons to the domain,
the <parameter>logon home</parameter> string is expanded to \\TASHTEGO\becky.
If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org",
this value is used. However, if this attribute does not exist, then the value
@@ -1097,7 +1184,7 @@ index default sub
</sect3>
<sect3>
- <title>Example LDIF Entries for a sambaAccount</title>
+ <title>Example LDIF Entries for a sambaSamAccount</title>
<para>
The following is a working LDIF with the inclusion of the posixAccount objectclass:
@@ -1112,7 +1199,7 @@ index default sub
lmPassword: 552902031BEDE9EFAAD3B435B51404EE
pwdLastSet: 1010179124
logonTime: 0
- objectClass: sambaAccount
+ objectClass: sambaSamAccount
uid: guest2
kickoffTime: 2147483647
acctFlags: [UX ]
@@ -1123,7 +1210,7 @@ index default sub
</para>
<para>
- The following is an LDIF entry for using both the sambaAccount and
+ The following is an LDIF entry for using both the sambaSamAccount and
posixAccount objectclasses:
</para>
@@ -1135,7 +1222,7 @@ index default sub
lmPassword: 552902031BEDE9EFAAD3B435B51404EE
primaryGroupID: 1201
objectClass: posixAccount
- objectClass: sambaAccount
+ objectClass: sambaSamAccount
acctFlags: [UX ]
userPassword: {crypt}BpM2ej8Rkzogo
uid: gcarter
@@ -1151,7 +1238,7 @@ index default sub
pwdCanChange: 0
pwdMustChange: 2147483647
ntPassword: 878D8014606CDA29677A44EFA1353FC7
- </programlisting>
+</programlisting>
</para>
</sect3>
@@ -1164,7 +1251,7 @@ index default sub
using pam_ldap, this allows changing both unix and windows passwords at once.
</para>
- <para>The <command>ldap passwd sync</command> options can have the following values:</para>
+ <para>The <parameter>ldap passwd sync</parameter> options can have the following values:</para>
<variablelist>
<varlistentry>
@@ -1182,8 +1269,7 @@ index default sub
<varlistentry>
<term>only</term>
<listitem><para>Only update the LDAP password and let the LDAP server worry
- about the other fields. This option is only available when
- the LDAP library supports LDAP_EXOP_X_MODIFY_PASSWD. </para></listitem>
+ about the other fields. This option is only available when the LDAP server supports LDAP_EXOP_X_MODIFY_PASSWD. </para></listitem>
</varlistentry>
</variablelist>
@@ -1192,23 +1278,18 @@ index default sub
</sect3>
- <sect3>
- <title>ldap trust ids</title>
-
- <para>
- LDAP Performance can be improved by using the <command>ldap trust ids</command> parameter.
- See the <ulink url="smb.conf.5.html#LDAPTRUSTIDS">smb.conf</ulink> manpage for details.
- </para>
-
- </sect3>
-
</sect2>
<sect2>
<title>MySQL</title>
<para>
- Stuff goes here!
+ Every so often someone will come along with a great new idea. Storing of user accounts in an
+ SQL backend is one of them. Those who want to do this are in the best position to know what the
+ specific benefits are to them. This may sound like a cop-out, but in truth we can not attempt
+ to document every nitty little detail why certain things of marginal utility to the bulk of
+ Samba users might make sense to the rest. In any case, the following instructions should help
+ the determined SQL user to implement a working system.
</para>
<sect3>
@@ -1219,7 +1300,8 @@ index default sub
for the column names) or use the default table. The file <filename>examples/pdb/mysql/mysql.dump</filename>
contains the correct queries to create the required tables. Use the command :
- <command>mysql -u<replaceable>username</replaceable> -h<replaceable>hostname</replaceable> -p<replaceable>password</replaceable> <replaceable>databasename</replaceable> &gt; <filename>/path/to/samba/examples/pdb/mysql/mysql.dump</filename></command>
+ <screen><prompt>$ </prompt><userinput>mysql -u<replaceable>username</replaceable> -h<replaceable>hostname</replaceable> -p<replaceable>password</replaceable> \
+<replaceable>databasename</replaceable> &lt; <filename>/path/to/samba/examples/pdb/mysql/mysql.dump</filename></userinput></screen>
</para>
</sect3>
@@ -1228,7 +1310,7 @@ index default sub
<para>This plugin lacks some good documentation, but here is some short info:</para>
- <para>Add a the following to the <command>passdb backend</command> variable in your <filename>smb.conf</filename>:
+ <para>Add a the following to the <parameter>passdb backend</parameter> variable in your &smb.conf;:
<programlisting>
passdb backend = [other-plugins] mysql:identifier [other-plugins]
</programlisting>
@@ -1236,71 +1318,84 @@ index default sub
<para>The identifier can be any string you like, as long as it doesn't collide with
the identifiers of other plugins or other instances of pdb_mysql. If you
- specify multiple pdb_mysql.so entries in 'passdb backend', you also need to
+ specify multiple pdb_mysql.so entries in <parameter>passdb backend</parameter>, you also need to
use different identifiers!
</para>
<para>
- Additional options can be given thru the &smb.conf; file in the <command>[global]</command> section.
+ Additional options can be given through the &smb.conf; file in the <parameter>[global]</parameter> section.
</para>
- <para>
- <programlisting>
- identifier:mysql host - host name, defaults to 'localhost'
- identifier:mysql password
- identifier:mysql user - defaults to 'samba'
- identifier:mysql database - defaults to 'samba'
- identifier:mysql port - defaults to 3306
- identifier:table - Name of the table containing users
- </programlisting>
- </para>
+ <para>
+ <table frame="all">
+ <title>Basic smb.conf options for MySQL passdb backend</title>
+ <tgroup cols="2" align="left">
+ <thead>
+ <row><entry>Field</entry><entry>Contents</entry></row>
+ </thead>
+ <tbody>
+ <row><entry>identifier:mysql host</entry><entry>host name, defaults to 'localhost'</entry></row>
+ <row><entry>identifier:mysql password</entry><entry></entry></row>
+ <row><entry>identifier:mysql user</entry><entry>defaults to 'samba'</entry></row>
+ <row><entry>identifier:mysql database</entry><entry>defaults to 'samba'</entry></row>
+ <row><entry>identifier:mysql port</entry><entry>defaults to 3306</entry></row>
+ <row><entry>identifier:table</entry><entry>Name of the table containing users</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
<warning>
<para>
- Since the password for the mysql user is stored in the
+ Since the password for the MySQL user is stored in the
&smb.conf; file, you should make the the &smb.conf; file
- readable only to the user that runs samba. This is considered a security
+ readable only to the user that runs Samba This is considered a security
bug and will be fixed soon.
</para>
</warning>
- <para>Names of the columns in this table(I've added column types those columns should have first):</para>
+ <para>Names of the columns in this table (I've added column types those columns should have first):</para>
- <para>
- <programlisting>
- identifier:logon time column - int(9)
- identifier:logoff time column - int(9)
- identifier:kickoff time column - int(9)
- identifier:pass last set time column - int(9)
- identifier:pass can change time column - int(9)
- identifier:pass must change time column - int(9)
- identifier:username column - varchar(255) - unix username
- identifier:domain column - varchar(255) - NT domain user is part of
- identifier:nt username column - varchar(255) - NT username
- identifier:fullname column - varchar(255) - Full name of user
- identifier:home dir column - varchar(255) - Unix homedir path
- identifier:dir drive column - varchar(2) - Directory drive path (eg: 'H:')
- identifier:logon script column - varchar(255)
- - Batch file to run on client side when logging on
- identifier:profile path column - varchar(255) - Path of profile
- identifier:acct desc column - varchar(255) - Some ASCII NT user data
- identifier:workstations column - varchar(255)
- - Workstations user can logon to (or NULL for all)
- identifier:unknown string column - varchar(255) - unknown string
- identifier:munged dial column - varchar(255) - ?
- identifier:user sid column - varchar(255) - NT user SID
- identifier:group sid column - varchar(255) - NT group ID
- identifier:lanman pass column - varchar(255) - encrypted lanman password
- identifier:nt pass column - varchar(255) - encrypted nt passwd
- identifier:plain pass column - varchar(255) - plaintext password
- identifier:acct control column - int(9) - nt user data
- identifier:unknown 3 column - int(9) - unknown
- identifier:logon divs column - int(9) - ?
- identifier:hours len column - int(9) - ?
- identifier:unknown 5 column - int(9) - unknown
- identifier:unknown 6 column - int(9) - unknown
- </programlisting>
- </para>
+ <para>
+ <table frame="all">
+ <title>MySQL field names for MySQL passdb backend</title>
+ <tgroup cols="3" align="left">
+ <thead>
+ <row><entry>Field</entry><entry>Type</entry><entry>Contents</entry></row>
+ </thead>
+ <tbody>
+ <row><entry>identifier:logon time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:logoff time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:kickoff time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:pass last set time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:pass can change time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:pass must change time column</entry><entry>int(9)</entry><entry></entry></row>
+ <row><entry>identifier:username column</entry><entry>varchar(255)</entry><entry>unix username</entry></row>
+ <row><entry>identifier:domain column</entry><entry>varchar(255)</entry><entry>NT domain user is part of</entry></row>
+ <row><entry>identifier:nt username column</entry><entry>varchar(255)</entry><entry>NT username</entry></row>
+ <row><entry>identifier:fullname column</entry><entry>varchar(255)</entry><entry>Full name of user</entry></row>
+ <row><entry>identifier:home dir column</entry><entry>varchar(255)</entry><entry>Unix homedir path</entry></row>
+ <row><entry>identifier:dir drive column</entry><entry>varchar(2)</entry><entry>Directory drive path (eg: 'H:')</entry></row>
+ <row><entry>identifier:logon script column</entry><entry>varchar(255)</entry><entry>Batch file to run on client side when logging on</entry></row>
+ <row><entry>identifier:profile path column</entry><entry>varchar(255)</entry><entry>Path of profile</entry></row>
+ <row><entry>identifier:acct desc column</entry><entry>varchar(255)</entry><entry>Some ASCII NT user data</entry></row>
+ <row><entry>identifier:workstations column</entry><entry>varchar(255)</entry><entry>Workstations user can logon to (or NULL for all)</entry></row>
+ <row><entry>identifier:unknown string column</entry><entry>varchar(255)</entry><entry>unknown string</entry></row>
+ <row><entry>identifier:munged dial column</entry><entry>varchar(255)</entry><entry>?</entry></row>
+ <row><entry>identifier:user sid column</entry><entry>varchar(255)</entry><entry>NT user SID</entry></row>
+ <row><entry>identifier:group sid column</entry><entry>varchar(255)</entry><entry>NT group ID</entry></row>
+ <row><entry>identifier:lanman pass column</entry><entry>varchar(255)</entry><entry>encrypted lanman password</entry></row>
+ <row><entry>identifier:nt pass column</entry><entry>varchar(255)</entry><entry>encrypted nt passwd</entry></row>
+ <row><entry>identifier:plain pass column</entry><entry>varchar(255)</entry><entry>plaintext password</entry></row>
+ <row><entry>identifier:acct control column</entry><entry>int(9)</entry><entry>nt user data</entry></row>
+ <row><entry>identifier:unknown 3 column</entry><entry>int(9)</entry><entry>unknown</entry></row>
+ <row><entry>identifier:logon divs column</entry><entry>int(9)</entry><entry>?</entry></row>
+ <row><entry>identifier:hours len column</entry><entry>int(9)</entry><entry>?</entry></row>
+ <row><entry>identifier:unknown 5 column</entry><entry>int(9)</entry><entry>unknown</entry></row>
+ <row><entry>identifier:unknown 6 column</entry><entry>int(9)</entry><entry>unknown</entry></row>
+ </tbody></tgroup>
+ </table>
+ </para>
<para>
Eventually, you can put a colon (:) after the name of each column, which
@@ -1362,7 +1457,7 @@ index default sub
</para>
<para>
- <userinput>pdbedit -e xml:filename</userinput>
+ <prompt>$ </prompt> <userinput>pdbedit -e xml:filename</userinput>
</para>
<para>
@@ -1371,22 +1466,7 @@ index default sub
<para>
To import data, use:
- <userinput>pdbedit -i xml:filename -e current-pdb</userinput>
- </para>
-
- <para>
- Where filename is the name to read the data from and current-pdb to put it in.
- </para>
-
- <para>
- For example: To migrate (copy) the smbpasswd database into a tdbsam database:
- </para>
-
- <para>
- <programlisting>
- then execute (as root):
- pdbedit -i smbpasswd -e tdbsam
- </programlisting>
+ <prompt>$ </prompt> <userinput>pdbedit -i xml:filename</userinput>
</para>
</sect2>
</sect1>
@@ -1394,11 +1474,64 @@ index default sub
<sect1>
<title>Common Errors</title>
-<para>
-Put stuff here
-- People forget to put their users in their backend and then complain samba
- won't authorize them
-</para>
+ <sect2>
+ <title>Users can not logon - Users not in Samba SAM</title>
+
+ <para>
+ People forget to put their users in their backend and then complain Samba won't authorize them.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Users are being added to the wrong backend database</title>
+
+ <para>
+ A few complaints have been received from users that just moved to Samba-3. The following
+ &smb.conf; file entries were causing problems, new accounts were being added to the old
+ smbpasswd file, not to the tdbsam passdb.tdb file:
+ </para>
+
+ <para>
+ <programlisting>
+ [globals]
+ ...
+ passdb backend = smbpasswd, tdbsam, guest
+ ...
+ </programlisting>
+ </para>
+
+ <para>
+ Samba will add new accounts to the first entry in the <emphasis>passdb backend</emphasis>
+ parameter entry. If you want to update to the tdbsam, then change the entry to:
+ </para>
+
+ <para>
+ <programlisting>
+ [globals]
+ ...
+ passdb backend = tdbsam, smbpasswd, guest
+ ...
+ </programlisting>
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>auth methods does not work</title>
+
+ <para>
+ If you explicitly set an 'auth methods' parameter, guest must be specified as the first
+ entry on the line. Eg: <parameter>auth methods = guest sam</parameter>.
+ </para>
+
+ <para>
+ This is the exact opposite of the requirement for the <parameter>passdb backed</parameter>
+ option, where it must be the <emphasis>LAST</emphasis> parameter on the line.
+ </para>
+
+ </sect2>
</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/printer_driver2.xml b/docs/docbook/projdoc/printer_driver2.xml
index da3eb838f2..11231e6c9a 100644
--- a/docs/docbook/projdoc/printer_driver2.xml
+++ b/docs/docbook/projdoc/printer_driver2.xml
@@ -1,1037 +1,3494 @@
<chapter id="printing">
<chapterinfo>
- &author.jerry;
<author>
- <firstname>Patrick</firstname><surname>Powell</surname>
+ <firstname>Kurt</firstname><surname>Pfeifle</surname>
<affiliation>
- <address><email>papowell@lprng.org</email></address>
+ <orgname> Danka Deutschland GmbH </orgname>
+ <address><email>kpfeifle@danka.de</email></address>
</affiliation>
</author>
- <pubdate> (3 May 2001) </pubdate>
+ &author.jerry;
+ <pubdate>May 32, 2003</pubdate>
</chapterinfo>
-<title>Printing Support</title>
+<title>Classical Printing Support</title>
<sect1>
-<title>Introduction</title>
-
-<para>Beginning with the 2.2.0 release, Samba supports
-the native Windows NT printing mechanisms implemented via
-MS-RPC (i.e. the SPOOLSS named pipe). Previous versions of
-Samba only supported LanMan printing calls.</para>
-
-<para>The additional functionality provided by the new
-SPOOLSS support includes:</para>
-
-<itemizedlist>
- <listitem><para>Support for downloading printer driver
- files to Windows 95/98/NT/2000 clients upon demand.
- </para></listitem>
-
- <listitem><para>Uploading of printer drivers via the
- Windows NT Add Printer Wizard (APW) or the
- Imprints tool set (refer to <ulink
- url="http://imprints.sourceforge.net">http://imprints.sourceforge.net</ulink>).
- </para></listitem>
-
- <listitem><para>Support for the native MS-RPC printing
- calls such as StartDocPrinter, EnumJobs(), etc... (See
- the MSDN documentation at <ulink
- url="http://msdn.microsoft.com/">http://msdn.microsoft.com/</ulink>
- for more information on the Win32 printing API)
- </para></listitem>
-
- <listitem><para>Support for NT Access Control Lists (ACL)
- on printer objects</para></listitem>
-
- <listitem><para>Improved support for printer queue manipulation
- through the use of an internal databases for spooled job
- information</para></listitem>
-</itemizedlist>
+<title>Features and Benefits</title>
<para>
-There has been some initial confusion about what all this means
-and whether or not it is a requirement for printer drivers to be
-installed on a Samba host in order to support printing from Windows
-clients. As a side note, Samba does not use these drivers in any way to process
-spooled files. They are utilized entirely by the clients.
+Printing is often a mission-critical service for the users. Samba can
+provide this service reliably and seamlessly for a client network
+consisting of Windows workstations.
</para>
<para>
-The following MS KB article, may be of some help if you are dealing with
-Windows 2000 clients: <emphasis>How to Add Printers with No User
-Interaction in Windows 2000</emphasis>
+A Samba-3.0 print service may be run on a Standalone or a Domain
+member server, side by side with file serving functions, or on a
+dedicated print server. It can be made as tight or as loosely secured
+as needs dictate. Configurations may be simple or complex. Available
+authentication schemes are essentially the same as described for file
+services in previous chapters. Overall, Samba's printing support is
+now able to replace an NT or Windows 2000 print server full-square,
+with additional benefits in many cases. Clients may download and
+install drivers and printers through their familiar "Point'n'Print"
+mechanism. Printer installations executed by "Logon Scripts" are no
+problem. Administrators can upload and manage drivers to be used by
+clients through the familiar "Add Printer Wizard". As an additional
+benefit, driver and printer management may be run from the command line
+or through scripts, making it more efficient in case of large numbers
+of printers. If a central accounting of print jobs (tracking every
+single page and supplying the raw data for all sorts of statistical
+reports) is required, this is best supported by CUPS as the print
+subsystem underneath the Samba hood.
</para>
<para>
-<ulink url="http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP">http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP</ulink>
+This chapter deals with the foundations of Samba printing, as they
+implemented by the more traditional UNIX (BSD- and System V-style)
+printing systems. Many things apply to CUPS, the newer Common UNIX
+Printing System, too; so if you use CUPS, you might be tempted to jump
+to the next chapter -- but you will certainly miss a few things if you
+do so. Better read this chapter too.
</para>
-</sect1>
+<note>
+<para>
+Most of the given examples have been verified on Windows XP
+Professional clients. Where this document describes the responses to
+commands given, bear in mind that Windows 2000 clients are very
+similar, but may differ in details. Windows NT is somewhat different
+again.
+</para>
+</note>
+</sect1>
<sect1>
-<title>Configuration</title>
+<title>Technical Introduction</title>
-<warning>
-<title>[print$] vs. [printer$]</title>
+<para>
+Samba's printing support always relies on the installed print
+subsystem of the Unix OS it runs on. Samba is a "middleman". It takes
+printfiles from Windows (or other SMB) clients and passes them to the
+real printing system for further processing. Therefore it needs to
+"talk" to two sides: to the Windows print clients and to the Unix
+printing system. Hence we must differentiate between the various
+client OS types each of which behave differently, as well as the
+various UNIX print subsystems, which themselves have different
+features and are accessed differently. This part of the Samba HOWTO
+Collection deals with the "traditional" way of Unix printing first;
+the next chapter covers in great detail the more modern
+<emphasis>Common UNIX Printing System</emphasis>
+(CUPS).
+
+<important><para>CUPS users, be warned: don't just jump on to the next
+chapter. You might miss important information contained only
+here!</para></important>
+</para>
+
+<sect2>
+<title>What happens if you send a Job from a Client</title>
<para>
-Previous versions of Samba recommended using a share named [printer$].
-This name was taken from the printer$ service created by Windows 9x
-clients when a printer was shared. Windows 9x printer servers always have
-a printer$ service which provides read-only access via no
-password in order to support printer driver downloads.
+To successfully print a job from a Windows client via a Samba
+print server to a UNIX printer, there are 6 (potentially 7)
+stages:
</para>
-
+
+<orderedlist>
+<listitem><para>Windows opens a connection to the printershare</para></listitem>
+
+<listitem><para>Samba must authenticate the user</para></listitem>
+
+<listitem><para>Windows sends a copy of the printfile over the network
+into Samba's spooling area</para></listitem>
+
+<listitem><para>Windows closes the connection again</para></listitem>
+
+<listitem><para>Samba invokes the print command to hand the file over
+to the UNIX print subsystem's spooling area</para></listitem>
+
+<listitem><para>The Unix print subsystem processes the print
+job</para></listitem>
+
+<listitem><para>The printfile may need to be explicitly deleted
+from the Samba spooling area.</para></listitem>
+
+</orderedlist>
+</sect2>
+
+<sect2>
+<title>Printing Related Configuration Parameters</title>
+
<para>
-However, the initial implementation allowed for a
-parameter named <parameter>printer driver location</parameter>
-to be used on a per share basis to specify the location of
-the driver files associated with that printer. Another
-parameter named <parameter>printer driver</parameter> provided
-a means of defining the printer driver name to be sent to
-the client.
+There are a number of configuration parameters in
+ controlling Samba's printing
+behaviour. Please also refer to the man page for smb.conf to
+acquire an overview about these. As with other parameters, there are
+Global Level (tagged with a "<emphasis>G</emphasis>" in the listings) and
+Service Level ("<emphasis>S</emphasis>") parameters.
</para>
-</warning>
-
+<variablelist>
+<varlistentry><term>Service Level Parameters</term>
+<listitem><para>These <emphasis>may</emphasis> go into the
+<parameter>[global]</parameter> section of
+. In this case they define the default
+behaviour of all individual or service level shares (provided those
+don't have a different setting defined for the same parameter, thus
+overriding the global default).</para></listitem>
+</varlistentry>
+
+<varlistentry><term>Global Parameters</term>
+<listitem><para>These <emphasis>may not</emphasis> go into individual
+shares. If they go in by error, the "testparm" utility can discover
+this (if you run it) and tell you so.</para></listitem>
+</varlistentry>
+</variablelist>
+</sect2>
+
<sect2>
-<title>Creating [print$]</title>
+<title>Parameters Recommended for Use</title>
+
+<para>The following &smb.conf; parameters directly
+related to printing are used in Samba-3. See also the
+&smb.conf; man page for detailed explanations:
+</para>
+
+<formalpara>
+ <title>List of printing related parameters in Samba-3</title>
+<para>
+<itemizedlist><title>Global level parameters:</title>
+<listitem><para><parameter>addprinter command (G)</parameter></para></listitem>
+<listitem><para><parameter>deleteprinter command (G)</parameter></para></listitem>
+<listitem><para><parameter>disable spoolss (G)</parameter></para></listitem>
+<listitem><para><parameter>enumports command (G)</parameter></para></listitem>
+<listitem><para><parameter>load printers (G)</parameter></para></listitem>
+<listitem><para><parameter>lpq cache time (G)</parameter></para></listitem>
+<listitem><para><parameter>os2 driver map (G)</parameter></para></listitem>
+<listitem><para><parameter>printcap name (G), printcap (G)</parameter></para></listitem>
+<listitem><para><parameter>show add printer wizard (G)</parameter></para></listitem>
+<listitem><para><parameter>total print jobs (G)</parameter></para></listitem>
+<listitem><para><parameter>use client driver (G)</parameter></para></listitem>
+</itemizedlist>
+
+<itemizedlist><title>Service level parameters:</title>
+<listitem><para><parameter>hosts allow (S)</parameter></para></listitem>
+<listitem><para><parameter>hosts deny (S)</parameter></para></listitem>
+<listitem><para><parameter>lppause command (S)</parameter></para></listitem>
+<listitem><para><parameter>lpq command (S)</parameter></para></listitem>
+<listitem><para><parameter>lpresume command (S)</parameter></para></listitem>
+<listitem><para><parameter>lprm command (S)</parameter></para></listitem>
+<listitem><para><parameter>max print jobs (S)</parameter></para></listitem>
+<listitem><para><parameter>min print space (S)</parameter></para></listitem>
+<listitem><para><parameter>print command (S)</parameter></para></listitem>
+<listitem><para><parameter>printable (S), print ok (S)</parameter></para></listitem>
+<listitem><para><parameter>printer name (S), printer (S)</parameter></para></listitem>
+<listitem><para><parameter>printer admin (S)</parameter></para></listitem>
+<listitem><para><parameter>printing = [cups|bsd|lprng...] (S)</parameter></para></listitem>
+<listitem><para><parameter>queuepause command (S)</parameter></para></listitem>
+<listitem><para><parameter>queueresume command (S)</parameter></para></listitem>
+<listitem><para><parameter>total print jobs (S)</parameter></para></listitem>
+</itemizedlist>
+</para>
+</formalpara>
<para>
-In order to support the uploading of printer driver
-files, you must first configure a file share named [print$].
-The name of this share is hard coded in Samba's internals so
-the name is very important (print$ is the service used by
-Windows NT print servers to provide support for printer driver
-download).
+Samba's printing support implements the Microsoft Remote Procedure
+Calls (MS-RPC) methods for printing. These are used by Windows NT (and
+later) print servers. The old "LanMan" protocol is still supported as
+a fallback resort, and for older clients to use. More details will
+follow further beneath.
</para>
+</sect2>
-<para>You should modify the server's smb.conf file to add the global
-parameters and to create the
-following file share (of course, some of the parameter values,
-such as 'path' are arbitrary and should be replaced with
-appropriate values for your site):</para>
+<sect2>
+<title>Parameters for Backwards Compatibility</title>
-<para><programlisting>
-[global]
- ; members of the ntadmin group should be able
- ; to add drivers and set printer properties
- ; root is implicitly a 'printer admin'
- printer admin = @ntadmin
-
-[print$]
- path = /usr/local/samba/printers
- guest ok = yes
- browseable = yes
- read only = yes
- ; since this share is configured as read only, then we need
- ; a 'write list'. Check the file system permissions to make
- ; sure this account can copy files to the share. If this
- ; is setup to a non-root account, then it should also exist
- ; as a 'printer admin'
- write list = @ntadmin,root
-</programlisting></para>
-
-<para>The <ulink url="smb.conf.5.html#WRITELIST"><parameter>
-write list</parameter></ulink> is used to allow administrative
-level user accounts to have write access in order to update files
-on the share. See the <ulink url="smb.conf.5.html">smb.conf(5)
-man page</ulink> for more information on configuring file shares.</para>
-
-<para>The requirement for <ulink url="smb.conf.5.html#GUESTOK"><command>guest
-ok = yes</command></ulink> depends upon how your
-site is configured. If users will be guaranteed to have
-an account on the Samba host, then this is a non-issue.</para>
-
-<note>
-<title>Author's Note</title>
-
-<para>
-The non-issue is that if all your Windows NT users are guaranteed to be
-authenticated by the Samba server (such as a domain member server and the NT
-user has already been validated by the Domain Controller in
-order to logon to the Windows NT console), then guest access
-is not necessary. Of course, in a workgroup environment where
-you just want to be able to print without worrying about
-silly accounts and security, then configure the share for
-guest access. You'll probably want to add <ulink
-url="smb.conf.5.html#MAPTOGUEST"><command>map to guest = Bad User
-</command></ulink> in the [global] section as well. Make sure
-you understand what this parameter does before using it
-though. --jerry
+<para>
+Two new parameters that were added in Samba 2.2.2, are still present
+in Samba-3.0. Both of these options are described in the
+&smb.conf; man page and are disabled by
+default. <emphasis>Use them with caution!</emphasis>
</para>
-</note>
-<para>In order for a Windows NT print server to support
-the downloading of driver files by multiple client architectures,
-it must create subdirectories within the [print$] service
-which correspond to each of the supported client architectures.
-Samba follows this model as well.</para>
+<variablelist>
+<varlistentry><term><parameter>disable spoolss(G)</parameter></term>
+<listitem><para> This is
+provided for better support of Samba 2.0.x backwards capability. It
+will disable Samba's support for MS-RPC printing and yield identical
+printing behaviour to Samba 2.0.x.</para></listitem>
+</varlistentry>
-<para>Next create the directory tree below the [print$] share
-for each architecture you wish to support.</para>
+<varlistentry><term><parameter>use client driver (G)</parameter></term>
+<listitem><para> was provided
+for using local printer drivers on Windows NT/2000 clients. It does
+not apply to Windows 95/98/ME clients.</para></listitem>
+</varlistentry>
+</variablelist>
-<para><computeroutput>
-[print$]-----
- |-W32X86 ; "Windows NT x86"
- |-WIN40 ; "Windows 95/98"
- |-W32ALPHA ; "Windows NT Alpha_AXP"
- |-W32MIPS ; "Windows NT R4000"
- |-W32PPC ; "Windows NT PowerPC"
-</computeroutput></para>
+<formalpara>
+<title>Parameters "for backward compatibility only", use with caution</title>
-<warning>
-<title>ATTENTION! REQUIRED PERMISSIONS</title>
-
<para>
-In order to currently add a new driver to you Samba host,
-one of two conditions must hold true:
+<itemizedlist>
+<listitem><para><parameter>disable spoolss (G)</parameter></para></listitem>
+
+<listitem><para><parameter>use client driver (S)</parameter></para></listitem>
+</itemizedlist>
+</para>
+</formalpara>
+
+</sect2>
+
+<sect2>
+<title>Parameters no longer in use</title>
+
+<para>
+Samba users upgrading from 2.2.x to 3.0 need to be aware that some
+previously available settings are no longer supported (as was
+announced some time ago). Here is a list of them:
</para>
-
+
+<formalpara>
+<title>"old" parameters, removed in Samba-3</title>
+
+<para>
+The following &smb.conf; parameters have been
+deprecated already in Samba 2.2 and are now completely removed from
+Samba-3. You cannot use them in new 3.0 installations:
+
<itemizedlist>
- <listitem><para>The account used to connect to the Samba host
- must have a uid of 0 (i.e. a root account)</para></listitem>
-
- <listitem><para>The account used to connect to the Samba host
- must be a member of the <ulink
- url="smb.conf.5.html#PRINTERADMIN"><parameter>printer
- admin</parameter></ulink> list.</para></listitem>
+<listitem><para><parameter>printer driver file (G)</parameter></para></listitem>
+<listitem><para><parameter>total print jobs (G)</parameter></para></listitem>
+<listitem><para><parameter>postscript (S)</parameter></para></listitem>
+<listitem><para><parameter>printer driver (S)</parameter></para></listitem>
+<listitem><para><parameter>printer driver location (S)</parameter></para></listitem>
</itemizedlist>
+</para>
+
+</formalpara>
+
+</sect2>
+</sect1>
+
+<sect1>
+<title>A simple Configuration to Print with Samba-3</title>
<para>
-Of course, the connected account must still possess access
-to add files to the subdirectories beneath [print$]. Remember
-that all file shares are set to 'read only' by default.
+Here is a very simple example configuration for print related settings
+in the file. If you compare it with your
+own system's , you probably find some
+additional parameters included there (as pre-configured by your OS
+vendor). Further below is a discussion and explanation of the
+parameters. Note, that this example doesn't use many parameters.
+However, in many environments these are enough to provide a valid
+ which enables all clients to print.
</para>
-</warning>
+<para><programlisting>
+ [global]
+ printing = bsd
+ load printers = yes
+
+ [printers]
+ path = /var/spool/samba
+ printable = yes
+ public = yes
+ writable = no
+</programlisting></para>
<para>
-Once you have created the required [print$] service and
-associated subdirectories, simply log onto the Samba server using
-a root (or <parameter>printer admin</parameter>) account
-from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or
-"My Network Places" and browse for the Samba host. Once you have located
-the server, navigate to the "Printers..." folder.
-You should see an initial listing of printers
-that matches the printer shares defined on your Samba host.
+This is only an example configuration. Many settings, if not
+explicitly set to a specific value, are used and set by Samba
+implicitly to its own default, because these have been compiled in.
+To see all settings, let root use the <command>testparm</command>
+utility. <command>testparm</command> also gives warnings if you have
+mis-configured certain things. Its complete output is easily 340 lines
+and more. You may want to pipe it through a pager program.
+</para>
+
+<para>
+The syntax for the configuration file is easy to grasp. You should
+know that is not very picky about its
+syntax. It has been explained elsewhere in this document. A short
+reminder: It even tolerates some spelling errors (like "browsable"
+instead of "browseable"). Most spelling is case-insensitive. Also, you
+can use "Yes|No" or "True|False" for boolean settings. Lists of names
+may be separated by commas, spaces or tabs.
+</para>
+
+<sect2>
+<title>Verification of "Settings in Use" with <command>testparm</command></title>
+
+<para>
+To see all (or at least most) printing related settings in Samba,
+including the implicitly used ones, try the command outlined below
+(hit "ENTER" twice!). It greps for all occurrences of "lp", "print",
+"spool", "driver", "ports" and "[" in testparm's output and gives you
+a nice overview about the running smbd's print configuration. (Note
+that this command does not show individually created printer shares,
+or the spooling paths in each case). Here is the output of my Samba
+setup, with exactly the same settings in
+as shown above:
</para>
+
+<para><screen>
+&rootprompt;<userinput>testparm -v | egrep "(lp|print|spool|driver|ports|\[)"</userinput>
+ Load smb config files from /etc/samba/smb.conf.simpleprinting
+ Processing section "[homes]"
+ Processing section "[printers]"
+
+ [global]
+ smb ports = 445 139
+ lpq cache time = 10
+ total print jobs = 0
+ load printers = Yes
+ printcap name = /etc/printcap
+ disable spoolss = No
+ enumports command =
+ addprinter command =
+ deleteprinter command =
+ show add printer wizard = Yes
+ os2 driver map =
+ printer admin =
+ min print space = 0
+ max print jobs = 1000
+ printable = No
+ printing = bsd
+ print command = lpr -r -P'%p' %s
+ lpq command = lpq -P'%p'
+ lprm command = lprm -P'%p' %j
+ lppause command =
+ lpresume command =
+ printer name =
+ use client driver = No
+
+ [homes]
+
+ [printers]
+ path = /var/spool/samba
+ printable = Yes
+
+</screen></para>
+
+<para>
+You can easily verify which settings were implicitly added by Samba's
+default behaviour. <emphasis>Don't forget about this point: it may
+be important in your future dealings with Samba.</emphasis>
+</para>
+
+<note><para> testparm in Samba-3.0 behaves differently from 2.2.x: used
+without the "-v" switch it only shows you the settings actually
+written into ! To see the complete
+configuration used, add the "-v" parameter to testparm.</para></note>
+
</sect2>
<sect2>
-<title>Setting Drivers for Existing Printers</title>
+<title>A little Experiment to warn you</title>
+
+<para>
+Should you need to troubleshoot at any stage, please always come back
+to this point first and verify if "testparm" shows the parameters you
+expect! To give you an example from personal experience as a warning,
+try to just "comment out" the <parameter>load printers</parameter>"
+parameter. If your 2.2.x system behaves like mine, you'll see this:
+</para>
+
+<para><screen>
+&rootprompt;grep "load printers" /etc/samba/smb.conf
+ # load printers = Yes
+ # This setting is commented ooouuuuut!!
+
+&rootprompt;testparm -v /etc/samba/smb.conf | egrep "(load printers)"
+ load printers = Yes
-<para>The initial listing of printers in the Samba host's
-Printers folder will have no real printer driver assigned
-to them. This defaults to a NULL string to allow the use
-of the local Add Printer Wizard on NT/2000 clients.
-Attempting to view the printer properties for a printer
-which has this default driver assigned will result in
-the error message:</para>
+</screen></para>
<para>
-<emphasis>Device settings cannot be displayed. The driver
-for the specified printer is not installed, only spooler
-properties will be displayed. Do you want to install the
-driver now?</emphasis>
+Despite my imagination that the commenting out of this setting should
+prevent Samba from publishing my printers, it still did! Oh Boy -- it
+cost me quite some time to find out the reason. But I am not fooled
+any more... at least not by this ;-)
</para>
+<para><screen>
+&rootprompt;<userinput>grep -A1 "load printers" /etc/samba/smb.conf</userinput>
+ load printers = No
+ # This setting is what I mean!!
+ # load printers = Yes
+ # This setting is commented ooouuuuut!!
+
+&rootprompt;<userinput>testparm -v smb.conf.simpleprinting | egrep "(load printers)"</userinput>
+ load printers = No
+
+</screen></para>
+
<para>
-Click "No" in the error dialog and you will be presented with
-the printer properties window. The way to assign a driver to a
-printer is to either
+Only when setting the parameter explicitly to
+"<parameter>load printers = No</parameter>"
+would Samba recognize my intentions. So my strong advice is:
</para>
-
+
<itemizedlist>
- <listitem><para>Use the "New Driver..." button to install
- a new printer driver, or</para></listitem>
-
- <listitem><para>Select a driver from the popup list of
- installed drivers. Initially this list will be empty.</para>
- </listitem>
+<listitem><para>Never rely on "commented out" parameters!</para></listitem>
+
+<listitem><para>Always set it up explicitly as you intend it to
+behave.</para></listitem>
+
+<listitem><para>Use <command>testparm</command> to uncover hidden
+settings which might not reflect your intentions.</para></listitem>
+
</itemizedlist>
-
-<para>If you wish to install printer drivers for client
-operating systems other than "Windows NT x86", you will need
-to use the "Sharing" tab of the printer properties dialog.</para>
-
-<para>Assuming you have connected with a root account, you
-will also be able modify other printer properties such as
-ACLs and device settings using this dialog box.</para>
-
-<para>A few closing comments for this section, it is possible
-on a Windows NT print server to have printers
-listed in the Printers folder which are not shared. Samba does
-not make this distinction. By definition, the only printers of
-which Samba is aware are those which are specified as shares in
-<filename>smb.conf</filename>.</para>
-
-<para>Another interesting side note is that Windows NT clients do
-not use the SMB printer share, but rather can print directly
-to any printer on another Windows NT host using MS-RPC. This
-of course assumes that the printing client has the necessary
-privileges on the remote host serving the printer. The default
-permissions assigned by Windows NT to a printer gives the "Print"
-permissions to the "Everyone" well-known group.
-</para>
-</sect2>
+<para>
+You can have a working Samba print configuration with this
+minimal :
+</para>
+<para><screen>
+&rootprompt;<userinput>cat /etc/samba/smb.conf-minimal</userinput>
+ [printers]
-<sect2>
-<title>Support a large number of printers</title>
-
-<para>One issue that has arisen during the development
-phase of Samba 2.2 is the need to support driver downloads for
-100's of printers. Using the Windows NT APW is somewhat
-awkward to say the list. If more than one printer are using the
-same driver, the <ulink url="rpcclient.1.html"><command>rpcclient's
-setdriver command</command></ulink> can be used to set the driver
-associated with an installed driver. The following is example
-of how this could be accomplished:</para>
-
-<para>
-<prompt>$ </prompt><userinput>rpcclient pogo -U root%secret -c "enumdrivers"</userinput>
-<programlisting>
-Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
-
-[Windows NT x86]
-Printer Driver Info 1:
- Driver Name: [HP LaserJet 4000 Series PS]
-
-Printer Driver Info 1:
- Driver Name: [HP LaserJet 2100 Series PS]
-
-Printer Driver Info 1:
- Driver Name: [HP LaserJet 4Si/4SiMX PS]
-</programlisting>
-<prompt>$ </prompt><userinput>rpcclient pogo -U root%secret -c "enumprinters"</userinput>
-<programlisting>
-Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
- flags:[0x800000]
- name:[\\POGO\hp-print]
- description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]
- comment:[]
-
-</programlisting>
-<prompt>$ </prompt><userinput>rpcclient pogo -U root%secret -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""</userinput>
-<programlisting>
-Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
-Successfully set hp-print to driver HP LaserJet 4000 Series PS.
-</programlisting></para>
-</sect2>
+</screen></para>
+<para>
+This example should show you that you can use testparm to test any
+filename for fitness as a Samba configuration. Actually, we want to
+encourage you <emphasis>not</emphasis> to change your
+ on a working system (unless you know
+exactly what you are doing)! Don't rely on an assumption that changes
+will only take effect after you re-start smbd! This is not the
+case. Samba re-reads its every 60
+seconds and on each new client connection. You might have to face
+changes for your production clients that you didn't intend to apply at
+this time! You will now note a few more interesting things. Let's now
+ask <command>testparm</command> what the Samba print configuration
+would be, if you used this minimalistic file as your real
+:
+</para>
+<para><screen>
+&rootprompt;<userinput> testparm -v /etc/samba/smb.conf-minimal | egrep "(print|lpq|spool|driver|ports|[)"</userinput>
+ Processing section "[printers]"
+ WARNING: [printers] service MUST be printable!
+ No path in service printers - using /tmp
+
+ lpq cache time = 10
+ total print jobs = 0
+ load printers = Yes
+ printcap name = /etc/printcap
+ disable spoolss = No
+ enumports command =
+ addprinter command =
+ deleteprinter command =
+ show add printer wizard = Yes
+ os2 driver map =
+ printer admin =
+ min print space = 0
+ max print jobs = 1000
+ printable = No
+ printing = bsd
+ print command = lpr -r -P%p %s
+ lpq command = lpq -P%p
+ printer name =
+ use client driver = No
+ [printers]
+ printable = Yes
+
+</screen></para>
-<sect2>
-<title>Adding New Printers via the Windows NT APW</title>
-
<para>
-By default, Samba offers all printer shares defined in <filename>smb.conf</filename>
-in the "Printers..." folder. Also existing in this folder is the Windows NT
-Add Printer Wizard icon. The APW will be show only if
+testparm issued 2 warnings:
</para>
<itemizedlist>
- <listitem><para>The connected user is able to successfully
- execute an OpenPrinterEx(\\server) with administrative
- privileges (i.e. root or <parameter>printer admin</parameter>).
- </para></listitem>
-
- <listitem><para><ulink url="smb.conf.5.html#SHOWADDPRINTERWIZARD"><parameter>show
- add printer wizard = yes</parameter></ulink> (the default).
- </para></listitem>
+<listitem><para>because we didn't specify the
+<parameter>[printers]</parameter> section as printable,
+and</para></listitem>
+
+<listitem><para>because we didn't tell it which spool directory to
+use.</para></listitem>
+
</itemizedlist>
<para>
-In order to be able to use the APW to successfully add a printer to a Samba
-server, the <ulink url="smb.conf.5.html#ADDPRINTERCOMMAND"><parameter>add
-printer command</parameter></ulink> must have a defined value. The program
-hook must successfully add the printer to the system (i.e.
-<filename>/etc/printcap</filename> or appropriate files) and
-<filename>smb.conf</filename> if necessary.
-</para>
-
-<para>
-When using the APW from a client, if the named printer share does
-not exist, <command>smbd</command> will execute the <parameter>add printer
-command</parameter> and reparse to the <filename>smb.conf</filename>
-to attempt to locate the new printer share. If the share is still not defined,
-an error of "Access Denied" is returned to the client. Note that the
-<parameter>add printer program</parameter> is executed under the context
-of the connected user, not necessarily a root account.
-</para>
-
-<para>
-There is a complementary <ulink url="smb.conf.5.html#DELETEPRINTERCOMMAND"><parameter>delete
-printer command</parameter></ulink> for removing entries from the "Printers..."
-folder.
-</para>
-
-<para>
-The following is an example <ulink url="smb.conf.5.html#ADDPRINTERCOMMAN"><parameter>add printer command</parameter></ulink> script. It adds the appropriate entries to <filename>/etc/printcap.local</filename> (change that to what you need) and returns a line of 'Done' which is needed for the whole process to work.
-</para>
-
-<programlisting>
-#!/bin/sh
-
-# Script to insert a new printer entry into printcap.local
-#
-# $1, printer name, used as the descriptive name
-# $2, share name, used as the printer name for Linux
-# $3, port name
-# $4, driver name
-# $5, location, used for the device file of the printer
-# $6, win9x location
-
-#
-# Make sure we use the location that RedHat uses for local printer defs
-PRINTCAP=/etc/printcap.local
-DATE=`date +%Y%m%d-%H%M%S`
-LP=lp
-RESTART="service lpd restart"
-
-# Keep a copy
-cp $PRINTCAP $PRINTCAP.$DATE
-# Add the printer to $PRINTCAP
-echo "" >> $PRINTCAP
-echo "$2|$1:\\" >> $PRINTCAP
-echo " :sd=/var/spool/lpd/$2:\\" >> $PRINTCAP
-echo " :mx=0:ml=0:sh:\\" >> $PRINTCAP
-echo " :lp=/usr/local/samba/var/print/$5.prn:" >> $PRINTCAP
-
-touch "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&amp;1
-chown $LP "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&amp;1
-
-mkdir /var/spool/lpd/$2
-chmod 700 /var/spool/lpd/$2
-chown $LP /var/spool/lpd/$2
-#echo $1 >> "/usr/local/samba/var/print/$5.prn"
-#echo $2 >> "/usr/local/samba/var/print/$5.prn"
-#echo $3 >> "/usr/local/samba/var/print/$5.prn"
-#echo $4 >> "/usr/local/samba/var/print/$5.prn"
-#echo $5 >> "/usr/local/samba/var/print/$5.prn"
-#echo $6 >> "/usr/local/samba/var/print/$5.prn"
-$RESTART >> "/usr/local/samba/var/print/$5.prn"
-# Not sure if this is needed
-touch /usr/local/samba/lib/smb.conf
-#
-# You need to return a value, but I am not sure what it means.
-#
-echo "Done"
-exit 0
-</programlisting>
+However, this was not fatal, and Samba-3.0 will default to values that
+will work here. But, please!, don't rely on this and don't use this
+example! This was only meant to make you careful to design and specify
+your setup to be what you really want it to be. The outcome on your
+system may vary for some parameters, since you may have a Samba built
+with a different compile-time configuration.
+<emphasis>Warning:</emphasis> don't put a comment sign <emphasis>at
+the end</emphasis> of a valid line. It
+will cause the parameter to be ignored (just as if you had put the
+comment sign at the front). At first I regarded this as a bug in my
+Samba version(s). But the man page states: <quote>Internal whitespace
+in a parameter value is retained verbatim.</quote> This means that a
+line consisting of, for example,
+</para>
+
+<para><screen>
+printing = lprng #This defines LPRng as the printing system"
+</screen></para>
+<para>
+will regard the whole of the string after the "="
+sign as the value you want to define. And this is an invalid value
+that will be ignored, and a default value used instead.]
+</para>
</sect2>
+</sect1>
+
+<sect1>
+<title>Extended Sample Configuration to Print with Samba-3</title>
+
+<para>
+Here we show a more verbose example configuration for print related
+settings in an . Below is a discussion
+and explanation of the various parameters. We chose to use BSD-style
+printing here, because we guess it is still the most commonly used
+system on legacy Linux installations (new installs now predominantly
+have CUPS, which is discussed entirely in the next chapter of this
+document). Note, that this example explicitly names many parameters
+which don't need to be stated because they are set by default. You
+might be able to do with a leaner .</para>
+
+<tip><para>
+if you read access it with the Samba Web Administration Tool (SWAT),
+and then write it to disk again, it will be optimized in a way such
+that it doesn't contain any superfluous parameters and comments. SWAT
+organizes the file for best performance. Remember that each smbd
+re-reads the Samba configuration once a minute, and that each
+connection spawns an smbd process of its own, so it is not a bad idea
+to optimize the in environments with
+hundreds or thousands of clients.</para></tip>
+
+<para><programlisting>
+ [global]
+ printing = bsd
+ load printers = yes
+ show add printer wizard = yes
+ printcap name = /etc/printcap
+ printer admin = @ntadmin, root
+ total print jobs = 100
+ lpq cache time = 20
+ use client driver = no
+
+ [printers]
+ comment = All Printers
+ printable = yes
+ path = /var/spool/samba
+ browseable = no
+ guest ok = yes
+ public = yes
+ read only = yes
+ writable = no
+
+ [my_printer_name]
+ comment = Printer with Restricted Access
+ path = /var/spool/samba_my_printer
+ printer admin = kurt
+ browseable = yes
+ printable = yes
+ writeable = no
+ hosts allow = 0.0.0.0
+ hosts deny = turbo_xp, 10.160.50.23, 10.160.51.60
+ guest ok = no
+</programlisting></para>
+
+<para>
+This <emphasis>also</emphasis> is only an example configuration. You
+may not find all the settings in your own
+ (as pre-configured by your OS
+vendor). Many configuration parameters, if not explicitly set to a
+specific value, are used and set by Samba implicitly to its own
+default, because these have been compiled in. To see all settings, let
+root use the <command>testparm</command>
+utility. <command>testparm</command> also gives warnings if you have
+mis-configured certain things..
+</para>
+</sect1>
+
+<sect1>
+<title>Detailed Explanation of the Example's Settings</title>
+<para>
+Following is a discussion of the settings from above shown example.
+</para>
<sect2>
-<title>Samba and Printer Ports</title>
+<title>The [global] Section</title>
<para>
-Windows NT/2000 print servers associate a port with each printer. These normally
-take the form of LPT1:, COM1:, FILE:, etc... Samba must also support the
-concept of ports associated with a printer. By default, only one printer port,
-named "Samba Printer Port", exists on a system. Samba does not really a port in
-order to print, rather it is a requirement of Windows clients.
+The <parameter>[global]</parameter> section is one of 4 special
+sections (along with [<parameter>[homes]</parameter>,
+<parameter>[printers]</parameter> and
+<parameter>[print$]</parameter>...) It contains all parameters which
+apply to the server as a whole. It is the place for parameters which
+have only a "global" meaning (G). It may also contain service level
+parameters (S) which then define default settings for all other
+sections and shares. This way you can simplify the configuration and
+avoid setting the same value repeatedly. (Within each individual
+section or share you may however override these globally set "share
+level" settings and specify other values).
</para>
+<variablelist>
+<varlistentry><term><parameter>printing = bsd</parameter></term>
+<listitem><para> this causes Samba to use default print commands
+applicable for the BSD (a.k.a. RFC 1179 style or LPR/LPD) printing
+system. In general, the "printing" parameter informs Samba about the
+print subsystem it should expect. Samba supports CUPS, LPD, LPRNG,
+SYSV, HPUX, AIX, QNX and PLP. Each of these systems defaults to a
+different <parameter>print command</parameter> (and other queue control
+commands).</para>
+<caution><para>The <parameter>printing</parameter> parameter is
+normally a service level parameter. Since it is included here in the
+<parameter>[global]</parameter> section, it will take effect for all
+printer shares that are not defined differently. Samba-3.0 no longer
+supports the SOFTQ printing system.</para></caution>
+</listitem></varlistentry>
+
+<varlistentry><term><parameter>load printers = yes</parameter></term>
+<listitem><para> this tells Samba to create automatically all
+available printer shares. "Available" printer shares are discovered by
+scanning the printcap file. All created printer shares are also loaded
+for browsing. If you use this parameter, you do not need to specify
+separate shares for each printer. Each automatically created printer
+share will clone the configuration options found in the
+<parameter>[printers]</parameter> section. (A <parameter>load printers
+= no</parameter> setting will allow you to specify each UNIX printer
+you want to share separately, leaving out some you don't want to be
+publicly visible and available). </para></listitem></varlistentry>
+
+<varlistentry><term><parameter>show add printer wizard =
+yes</parameter></term> <listitem><para> this setting is normally
+enabled by default (even if the parameter is not written into the
+). It makes the <guiicon>Add Printer Wizard</guiicon> icon
+show up in the <guiicon>Printers</guiicon> folder of the Samba host's
+share listing (as shown in <guiicon>Network Neighbourhood</guiicon> or
+by the <command>net view</command> command). To disable it, you need to
+explicitly set it to <constant>no</constant> (commenting it out
+will not suffice!). The Add Printer Wizard lets you upload printer
+drivers to the <parameter>[print$]</parameter> share and associate it
+with a printer (if the respective queue exists there before the
+action), or exchange a printer's driver against any other previously
+uploaded driver. </para></listitem></varlistentry>
+
+<varlistentry><term><parameter>total print jobs = 100</parameter></term>
+<listitem><para> this setting sets the upper limit to 100 print jobs
+being active on the Samba server at any one time. Should a client
+submit a job which exceeds this number, a <quote>no more space
+available on server</quote> type of error message will be returned by
+Samba to the client. A setting of "0" (the default) means there is
+<emphasis>no</emphasis> limit at all!
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>printcap name = /etc/printcap</parameter></term>
+
+<listitem><para> this tells Samba where to look for a list of
+available printer names. (If you use CUPS, make sure that a printcap
+file is written: this is controlled by the "Printcap" directive of
+<filename>cupsd.conf</filename>).
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>printer admin = @ntadmin</parameter></term>
+<listitem><para> members of the ntadmin group should be able to add
+drivers and set printer properties ("ntadmin" is only an example name,
+it needs to be a valid UNIX group name); root is implicitly always a
+<parameter>printer admin</parameter>. The "@" sign precedes group names in
+. A printer admin can do anything to
+printers via the remote administration interfaces offered by MS-RPC
+(see below). Note that the <parameter>printer admin</parameter>
+parameter is normally a share level parameter, so you may associate
+different groups to different printer shares in larger installations,
+if you use the <parameter>printer admin</parameter> parameter on the
+share levels).
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>lpq cache time = 20</parameter></term>
+<listitem><para> this controls the cache time for the results of the
+lpq command. It prevents the lpq command being called too often and
+reduces load on a heavily used print server.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>use client driver = no</parameter></term>
+<listitem><para> if set to <constant>yes</constant>, this setting only
+takes effect for Win NT/2k/XP clients (and not for Win 95/98/ME). Its
+default value is <constant>No</constant> (or <constant>False</constant>).
+It must <emphasis>not</emphasis> be enabled on print shares
+(with a <constant>yes</constant> or <constant>true</constant> setting) which
+have valid drivers installed on the Samba server! For more detailed
+explanations see the man page of &smb.conf;.
+</para></listitem></varlistentry>
+</variablelist>
+
+</sect2>
+
+<sect2>
+<title>The [printers] Section</title>
+
<para>
-Note that Samba does not support the concept of "Printer Pooling" internally
-either. This is when a logical printer is assigned to multiple ports as
-a form of load balancing or fail over.
+This is the second special section. If a section with this name
+appears in the &smb.conf;, users are able to
+connect to any printer specified in the Samba host's printcap file,
+because Samba on startup then creates a printer share for every
+printername it finds in the printcap file. You could regard this
+section as a general convenience shortcut to share all printers with
+minimal configuration. It is also a container for settings which
+should apply as default to all printers. (For more details see the
+&smb.conf; man page.) Settings inside this
+container must be share level parameters (S).
+</para>
+
+<variablelist>
+<varlistentry><term><parameter>comment = All printers</parameter></term>
+<listitem><para> the <parameter>comment</parameter> is shown next to
+the share if a client queries the server, either via <guiicon>Network
+Neighbourhood</guiicon> or with the <command>net view</command> command to list
+available shares.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>printable = yes</parameter></term>
+<listitem><para> please note well, that the
+<parameter>[printers]</parameter> service <emphasis>must</emphasis> be
+declared as printable. If you specify otherwise, smbd will refuse to
+load at startup. This parameter allows
+connected clients to open, write to and submit spool files into the
+directory specified with the <parameter>path</parameter> parameter for
+this service. It is used by Samba to differentiate printer shares from
+file shares. </para></listitem></varlistentry>
+
+<varlistentry><term><parameter>path = /var/spool/samba</parameter></term>
+<listitem><para>this must point to a directory used by Samba to spool
+incoming print files. <emphasis>It must not be the same as the spool
+directory specified in the configuration of your UNIX print
+subsystem!</emphasis> The path would typically point to a directory
+which is world writeable, with the "sticky" bit set to it.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>browseable = no</parameter></term>
+<listitem><para> this is always set to <constant>no</constant> if
+<parameter>printable = yes</parameter>. It makes the
+<parameter>[printer]</parameter> share itself invisible in the
+list of available shares in a <command>net view</command> command or
+in the Explorer browse list. (Note that you will of course see the
+individual printers).
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>guest ok = yes</parameter></term>
+
+<listitem><para>
+if set to <constant>yes</constant>, then no password is required to
+connect to the printers service. Access will be granted with the
+privileges of the <parameter>guest account</parameter>. On many systems the
+guest account will map to a user named "nobody". This user is in the UNIX
+passwd file with an empty password, but with no valid UNIX login.
+(Note: on some systems the guest account might not have the
+privilege to be able to print. Test this by logging in as your
+guest user using <command>su - guest</command> and run a system print
+command like
</para>
+<para><userinput>lpr -P printername /etc/motd</userinput></para>
+
+</listitem></varlistentry>
+
+<varlistentry><term><parameter>public = yes</parameter></term>
+<listitem><para> this is a synonym for <parameter>guest ok =
+yes</parameter>. Since we have <parameter>guest ok = yes</parameter>,
+it really doesn't need to be here! (This leads to the interesting
+question: <quote>What, if I by accident have to contradictory settings
+for the same share?</quote> The answer is: the last one encountered by
+Samba wins. The "winner" is shown by testparm. Testparm doesn't
+complain about different settings of the same parameter for the same
+share! You can test this by setting up multiple lines for the "guest
+account" parameter with different usernames, and then run testparm to
+see which one is actually used by Samba.)
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>read only = yes</parameter></term>
+<listitem><para>this normally (for other types of shares) prevents
+users creating or modifying files in the service's directory. However,
+in a "printable" service, it is <emphasis>always</emphasis> allowed to
+write to the directory (if user privileges allow the connection), but
+only via print spooling operations. "Normal" write operations are not
+allowed. </para></listitem></varlistentry>
+
+<varlistentry><term><parameter>writeable = no</parameter></term>
+<listitem><para>
+synonym for <parameter>read only = yes</parameter>
+</para></listitem></varlistentry>
+</variablelist>
+</sect2>
+
+<sect2>
+<title>Any [my_printer_name] Section</title>
+
<para>
-If you require that multiple ports be defined for some reason,
-<filename>smb.conf</filename> possesses a <ulink
-url="smb.conf.5.html#ENUMPORTSCOMMAND"><parameter>enumports
-command</parameter></ulink> which can be used to define an external program
-that generates a listing of ports on a system.
+If a section appears in the , which is
+tagged as <parameter>printable = yes</parameter>, Samba presents it as
+a printer share to its clients. Note, that Win95/98/ME clients may
+have problems with connecting or loading printer drivers if the share
+name has more than 8 characters! Also be very careful if you give a
+printer the same name as an existing user or file share name: upon a
+client's connection request to a certain sharename, Samba always tries
+to find file shares with that name first; if it finds one, it will
+connect to this and will never ultimately connect to a printer with
+the same name!
</para>
+<variablelist>
+<varlistentry><term><parameter>comment = Printer with Restricted Access</parameter></term>
+<listitem><para> the comment says it all.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>path = /var/spool/samba_my_printer</parameter></term>
+<listitem><para> here we set the spooling area for this printer to
+another directory than the default. It is not a requirement to set it
+differently, but the option is available.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>printer admin = kurt</parameter></term>
+<listitem><para> the printer admin definition is different for this
+explicitly defined printer share from the general
+<parameter>[printers]</parameter> share. It is not a requirement; we
+did it to show that it is possible if you want it.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>browseable = yes</parameter></term>
+<listitem><para> we also made this printer browseable (so that the
+clients may conveniently find it when browsing the <guiicon>Network
+Neighbourhood</guiicon>).
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>printable = yes</parameter></term>
+<listitem><para>see explanation in last subsection.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>writeable = no</parameter></term>
+<listitem><para>see explanation in last subsection.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>hosts allow = 10.160.50.,10.160.51.</parameter></term>
+<listitem><para>here we exercise a certain degree of access control
+by using the <parameter>hosts allow</parameter> and <parameter>hosts deny</parameter> parameters. Note, that
+this is not by any means a safe bet. It is not a way to secure your
+printers. This line accepts all clients from a certain subnet in a
+first evaluation of access control
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>hosts deny = turbo_xp,10.160.50.23,10.160.51.60
+</parameter></term>
+<listitem><para>all listed hosts are not allowed here (even if they
+belong to the "allowed subnets"). As you can see, you could name IP
+addresses as well as NetBIOS hostnames
+here.
+</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>guest ok = no</parameter></term>
+<listitem><para>this printer is not open for the guest account!
+</para></listitem></varlistentry>
+
+</variablelist>
</sect2>
-</sect1>
+<sect2>
+<title>Print Commands</title>
+<para>
+In each section defining a printer (or in the
+<parameter>[printers]</parameter> section), a <parameter>print
+command</parameter> parameter may be defined. It sets a command to
+process the files which have been placed into the Samba print spool
+directory for that printer. (That spool directory was, if you
+remember, set up with the <parameter>path</parameter>
+parameter). Typically, this command will submit the spool file to the
+Samba host's print subsystem, using the suitable system print
+command. But there is no requirement that this needs to be the
+case. For debugging purposes or some other reason you may want to do
+something completely different than "print" the file. An example is a
+command that just copies the print file to a temporary location for
+further investigation when you need to debug printing. If you craft
+your own print commands (or even develop print command shell scripts),
+make sure you pay attention to the need to remove the files from the
+Samba spool directory. Otherwise your hard disk may soon suffer from
+shortage of free space.
+</para>
+</sect2>
-<sect1>
- <title>The Imprints Toolset</title>
-
- <para>The Imprints tool set provides a UNIX equivalent of the
- Windows NT Add Printer Wizard. For complete information, please
- refer to the Imprints web site at <ulink url="http://imprints.sourceforge.net/">
- http://imprints.sourceforge.net/</ulink> as well as the documentation
- included with the imprints source distribution. This section will
- only provide a brief introduction to the features of Imprints.</para>
-
-
- <sect2>
- <title>What is Imprints?</title>
-
- <para>Imprints is a collection of tools for supporting the goals
- of</para>
-
- <itemizedlist>
- <listitem><para>Providing a central repository information
- regarding Windows NT and 95/98 printer driver packages</para>
- </listitem>
-
- <listitem><para>Providing the tools necessary for creating
- the Imprints printer driver packages.</para></listitem>
-
- <listitem><para>Providing an installation client which
- will obtain and install printer drivers on remote Samba
- and Windows NT 4 print servers.</para></listitem>
- </itemizedlist>
-
- </sect2>
-
-
- <sect2>
- <title>Creating Printer Driver Packages</title>
-
- <para>The process of creating printer driver packages is beyond
- the scope of this document (refer to Imprints.txt also included
- with the Samba distribution for more information). In short,
- an Imprints driver package is a gzipped tarball containing the
- driver files, related INF files, and a control file needed by the
- installation client.</para>
- </sect2>
-
-
- <sect2>
- <title>The Imprints server</title>
-
- <para>The Imprints server is really a database server that
- may be queried via standard HTTP mechanisms. Each printer
- entry in the database has an associated URL for the actual
- downloading of the package. Each package is digitally signed
- via GnuPG which can be used to verify that package downloaded
- is actually the one referred in the Imprints database. It is
- <emphasis>not</emphasis> recommended that this security check
- be disabled.</para>
- </sect2>
-
- <sect2>
- <title>The Installation Client</title>
-
- <para>More information regarding the Imprints installation client
- is available in the <filename>Imprints-Client-HOWTO.ps</filename>
- file included with the imprints source package.</para>
-
- <para>The Imprints installation client comes in two forms.</para>
-
- <itemizedlist>
- <listitem><para>a set of command line Perl scripts</para>
- </listitem>
-
- <listitem><para>a GTK+ based graphical interface to
- the command line perl scripts</para></listitem>
- </itemizedlist>
-
- <para>The installation client (in both forms) provides a means
- of querying the Imprints database server for a matching
- list of known printer model names as well as a means to
- download and install the drivers on remote Samba and Windows
- NT print servers.</para>
-
- <para>The basic installation process is in four steps and
- perl code is wrapped around <command>smbclient</command>
- and <command>rpcclient</command>.</para>
-
-<para><programlisting>
-foreach (supported architecture for a given driver)
-{
- 1. rpcclient: Get the appropriate upload directory
- on the remote server
- 2. smbclient: Upload the driver files
- 3. rpcclient: Issues an AddPrinterDriver() MS-RPC
-}
-
-4. rpcclient: Issue an AddPrinterEx() MS-RPC to actually
- create the printer
-</programlisting></para>
-
- <para>One of the problems encountered when implementing
- the Imprints tool set was the name space issues between
- various supported client architectures. For example, Windows
- NT includes a driver named "Apple LaserWriter II NTX v51.8"
- and Windows 95 calls its version of this driver "Apple
- LaserWriter II NTX"</para>
-
- <para>The problem is how to know what client drivers have
- been uploaded for a printer. As astute reader will remember
- that the Windows NT Printer Properties dialog only includes
- space for one printer driver name. A quick look in the
- Windows NT 4.0 system registry at</para>
-
- <para><filename>HKLM\System\CurrentControlSet\Control\Print\Environment
- </filename></para>
-
- <para>will reveal that Windows NT always uses the NT driver
- name. This is ok as Windows NT always requires that at least
- the Windows NT version of the printer driver is present.
- However, Samba does not have the requirement internally.
- Therefore, how can you use the NT driver name if is has not
- already been installed?</para>
-
- <para>The way of sidestepping this limitation is to require
- that all Imprints printer driver packages include both the Intel
- Windows NT and 95/98 printer drivers and that NT driver is
- installed first.</para>
- </sect2>
-
-</sect1>
+<sect2>
+<title>Default Print Commands for various Unix Print Subsystems</title>
+
+<para>
+You learned earlier on, that Samba in most cases uses its built-in
+settings for many parameters if it can not find an explicitly stated
+one in its configuration file. The same is true for the
+<parameter>print command</parameter>. The default print command varies
+depending on the <parameter>printing =...</parameter> parameter
+setting. In the commands listed below, you will notice some parameters
+of the form <emphasis>%X</emphasis> where <emphasis>X</emphasis> is
+<emphasis>p, s, J</emphasis> etc. These letters stand for
+"printername", "spoolfile" and "job ID" respectively. They are
+explained in more detail further below. Here is an overview (excluding
+the special case of CUPS, which is discussed in the next chapter):
+</para>
-<!--
-
- This comment from rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex()
- needs to be added into a section probably. This is to remind me it needs
- to be done. -jerry
-
- /*
- * If the openprinterex rpc call contains a devmode,
- * it's a per-user one. This per-user devmode is derivated
- * from the global devmode. Openprinterex() contains a per-user
- * devmode for when you do EMF printing and spooling.
- * In the EMF case, the NT workstation is only doing half the job
- * of rendering the page. The other half is done by running the printer
- * driver on the server.
- * The EMF file doesn't contain the page description (paper size, orientation, ...).
- * The EMF file only contains what is to be printed on the page.
- * So in order for the server to know how to print, the NT client sends
- * a devicemode attached to the openprinterex call.
- * But this devicemode is short lived, it's only valid for the current print job.
- *
- * If Samba would have supported EMF spooling, this devicemode would
- * have been attached to the handle, to sent it to the driver to correctly
- * rasterize the EMF file.
- *
- * As Samba only supports RAW spooling, we only receive a ready-to-print file,
- * we just act as a pass-thru between windows and the printer.
- *
- * In order to know that Samba supports only RAW spooling, NT has to call
- * getprinter() at level 2 (attribute field) or NT has to call startdoc()
- * and until NT sends a RAW job, we refuse it.
- *
- * But to call getprinter() or startdoc(), you first need a valid handle,
- * and to get an handle you have to call openprintex(). Hence why you have
- * a devicemode in the openprinterex() call.
- *
- *
- * Differences between NT4 and NT 2000.
- * NT4:
- *
- * On NT4, you only have a global devicemode. This global devicemode can be changed
- * by the administrator (or by a user with enough privs). Every time a user
- * wants to print, the devicemode is reset to the default. In Word, every time
- * you print, the printer's characteristics are always reset to the global devicemode.
- *
- * NT 2000:
- *
- * In W2K, there is the notion of per-user devicemode. The first time you use
- * a printer, a per-user devicemode is build from the global devicemode.
- * If you change your per-user devicemode, it is saved in the registry, under the
- * H_KEY_CURRENT_KEY sub_tree. So that every time you print, you have your default
- * printer preferences available.
- *
- * To change the per-user devicemode: it's the "Printing Preferences ..." button
- * on the General Tab of the printer properties windows.
- *
- * To change the global devicemode: it's the "Printing Defaults..." button
- * on the Advanced Tab of the printer properties window.
--->
+<informaltable frame='all'>
+<tgroup cols='2' align='left' colsep='1' rowsep='1'>
+<thead>
+<row>
+<entry>If this setting is active...</entry>
+<entry>...this is used in lieu of an explicit command:</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry><parameter>printing = bsd|aix|lprng|plp</parameter></entry>
+<entry>print command is <command>lpr -r -P%p %s</command></entry>
+</row>
+<row>
+<entry><parameter>printing = sysv|hpux</parameter></entry>
+<entry>print command is <command>lp -c -P%p %s; rm %s</command></entry>
+</row>
+<row>
+<entry> <parameter>printing = qnx</parameter></entry>
+<entry>print command is <command>lp -r -P%p -s %s</command></entry>
+</row>
+<row>
+<entry><parameter>printing = bsd|aix|lprng|plp</parameter></entry>
+<entry>lpq command is <command>lpq -P%p</command></entry>
+</row>
+<row>
+<entry><parameter>printing = sysv|hpux</parameter></entry>
+<entry>lpq command is <command>lpstat -o%p</command></entry>
+</row>
+<row>
+<entry><parameter>printing = qnx</parameter></entry>
+<entry>lpq command is <command>lpq -P%p</command></entry>
+</row>
+<row>
+<entry><parameter>printing = bsd|aix|lprng|plp</parameter></entry>
+<entry>lprm command is <command>lprm -P%p %j</command></entry>
+</row>
+<row>
+<entry><parameter>printing = sysv|hpux</parameter></entry>
+<entry>lprm command is <command>cancel %p-%j</command></entry>
+</row>
+<row>
+<entry><parameter>printing = qnx</parameter></entry>
+<entry>lprm command is <command>cancel %p-%j</command></entry>
+</row>
+<row>
+<entry><parameter>printing = bsd|aix|lprng|plp</parameter></entry>
+<entry>lppause command is <command>lp -i %p-%j -H hold</command></entry>
+</row>
+<row>
+<entry><parameter>printing = sysv|hpux</parameter></entry>
+<entry>lppause command (...is empty)</entry>
+</row>
+<row>
+<entry><parameter>printing = qnx</parameter></entry>
+<entry>lppause command (...is empty)</entry>
+</row>
+<row>
+<entry><parameter>printing = bsd|aix|lprng|plp</parameter></entry>
+<entry>lpresume command is <command>lp -i %p-%j -H resume</command></entry>
+</row>
+<row>
+<entry><parameter>printing = sysv|hpux</parameter></entry>
+<entry>lpresume command (...is empty)</entry>
+</row>
+<row>
+<entry><parameter>printing = qnx</parameter></entry>
+<entry>lpresume command (...is empty)</entry>
+</row>
+</tbody>
+</tgroup>
+</informaltable>
-<sect1>
-<title>Diagnosis</title>
+<para>
+We excluded the special CUPS case here, because it is discussed in the
+next chapter. Just a short summary. For <parameter>printing =
+CUPS</parameter>: If SAMBA is compiled against libcups, it uses the
+CUPS API to submit jobs, etc. (It is a good idea also to set
+<parameter>printcap = cups</parameter> in case your
+<filename>cupsd.conf</filename> is set to write its autogenerated
+printcap file to an unusual place). Otherwise Samba maps to the System
+V printing commands with the -oraw option for printing, i.e. it uses
+<command>lp -c -d%p -oraw; rm %s</command> With <parameter>printing =
+cups</parameter> , and if SAMBA is compiled against libcups, any
+manually set print command will be ignored!
+</para>
+
+<!-- FIXME: This information is for 2.2 -->
+<para>
+Having listed the above mappings here, you should note that there used
+to be a <emphasis>bug</emphasis> in recent 2.2.x versions which
+prevented the mapping from taking effect. It lead to the
+"bsd|aix|lprng|plp" settings taking effect for all other systems, for
+the most important commands (the <command>print</command> command, the
+<command>lpq</command> command and the <command>lprm</command>
+command). The <command>lppause</command> command and the
+<command>lpresume</command> command remained empty. Of course, these
+commands worked on bsd|aix|lprng|plp but they didn't work on
+sysv|hpux|qnx systems. To work around this bug, you need to
+explicitly set the commands. Use <command>testparm -v</command> to
+check which command takes effect. Then check that this command is
+adequate and actually works for your installed print subsystem. It is
+always a good idea to explicitly set up your configuration files the
+way you want them to work and not rely on any built-in defaults.
+</para>
+</sect2>
<sect2>
-<title>Introduction</title>
+<title>Setting up your own Print Commands</title>
<para>
-This is a short description of how to debug printing problems with
-Samba. This describes how to debug problems with printing from a SMB
-client to a Samba server, not the other way around. For the reverse
-see the examples/printing directory.
+After a print job has finished spooling to a service, the
+<parameter>print command</parameter> will be used by Samba via a
+<emphasis>system()</emphasis> call to process the spool file. Usually
+the command specified will submit the spool file to the host's
+printing subsystem. But there is no requirement at all that this must
+be the case. The print subsystem will probably not remove the spool
+file on its own. So whatever command you specify on your own you
+should ensure that the spool file is deleted after it has been
+processed.
</para>
<para>
-Ok, so you want to print to a Samba server from your PC. The first
-thing you need to understand is that Samba does not actually do any
-printing itself, it just acts as a middleman between your PC client
-and your Unix printing subsystem. Samba receives the file from the PC
-then passes the file to a external "print command". What print command
-you use is up to you.
+There is no difficulty with using your own customized print commands
+with the traditional printing systems. However, if you don't wish to
+"roll your own", you should be well informed about the default
+built-in commands that Samba uses for each printing subsystem (see the
+table above). In all the commands listed in the last paragraphs you
+see parameters of the form <emphasis>%X</emphasis> These are
+<emphasis>macros</emphasis>, or shortcuts, used as place holders for
+the names of real objects. At the time of running a command with such
+a placeholder, Samba will insert the appropriate value
+automatically. Print commands can handle all Samba macro
+substitutions. In regard to printing, the following ones do have
+special relevance:
</para>
+<itemizedlist>
+<listitem><para><parameter>%s, %f</parameter> - the path to the spool
+file name</para></listitem>
+
+<listitem><para><parameter>%p</parameter> - the appropriate printer
+name</para></listitem>
+
+<listitem><para><parameter>%J</parameter> - the job name as
+transmitted by the client.</para></listitem>
+
+<listitem><para><parameter>%c</parameter> - the number of printed
+pages of the spooled job (if known).</para></listitem>
+
+<listitem><para><parameter>%z</parameter> - the size of the spooled
+print job (in bytes)</para></listitem>
+
+</itemizedlist>
+
<para>
-The whole things is controlled using options in smb.conf. The most
-relevant options (which you should look up in the smb.conf man page)
-are:
+The print command MUST contain at least one occurrence of
+<parameter>%s</parameter> or <parameter>%f</parameter>. -- The
+<parameter>%p</parameter> is optional. If no printer name is supplied,
+the <parameter>%p</parameter> will be silently removed from the print
+command. In this case the job is sent to the default printer.
</para>
-<para><programlisting>
- [global]
- print command - send a file to a spooler
- lpq command - get spool queue status
- lprm command - remove a job
- [printers]
- path = /var/spool/lpd/samba
-</programlisting></para>
+<para>
+If specified in the <parameter>[global]</parameter> section, the print
+command given will be used for any printable service that does not
+have its own print command specified. If there is neither a specified
+print command for a printable service nor a global print command,
+spool files will be created but not processed! And (most importantly):
+print files will not be removed, so they will start filling your Samba
+hard disk.
+</para>
<para>
-The following are nice to know about:
+Note that printing may fail on some UNIXes from the "nobody"
+account. If this happens, create an alternative guest account and
+supply it with the privilege to print. Set up this guest account in
+the <parameter>[global]</parameter> section with the <parameter>guest
+account</parameter> parameter.
+</para>
+
+<para>
+You can form quite complex print commands. You need to realize that
+print commands are just passed to a UNIX shell. The shell is able to
+expand the included environment variables as usual. (The syntax to
+include a UNIX environment variable <parameter>$variable</parameter>
+in or in the Samba print command is
+<parameter>%$variable</parameter>.) To give you a working
+<parameter>print command</parameter> example, the following will log a
+print job to <filename>/tmp/print.log</filename>, print the file, then
+remove it. Note that ';' is the usual separator for commands in shell
+scripts:
</para>
<para><programlisting>
- queuepause command - stop a printer or print queue
- queueresume command - start a printer or print queue
+<![CDATA[
+ print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
+]]>
</programlisting></para>
<para>
-Example:
+You may have to vary your own command considerably from this example
+depending on how you normally print files on your system. The default
+for the <parameter>print command</parameter> parameter varies depending on the setting of
+the <parameter>printing</parameter> parameter. Another example is:
</para>
<para><programlisting>
- print command = /usr/bin/lpr -r -P%p %s
- lpq command = /usr/bin/lpq -P%p %s
- lprm command = /usr/bin/lprm -P%p %j
- queuepause command = /usr/sbin/lpc -P%p stop
- queuepause command = /usr/sbin/lpc -P%p start
+ print command = /usr/local/samba/bin/myprintscript %p %s
</programlisting></para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Innovations in Samba Printing since 2.2</title>
<para>
-Samba should set reasonable defaults for these depending on your
-system type, but it isn't clairvoyant. It is not uncommon that you
-have to tweak these for local conditions. The commands should
-always have fully specified pathnames, as the smdb may not have
-the correct PATH values.
+Before version 2.2.0, Samba's print server support for Windows clients
+was limited to the level of <emphasis>LanMan</emphasis> printing
+calls. This is the same protocol level as Windows 9x PCs offer when
+they share printers. Beginning with the 2.2.0 release, Samba started
+to support the native Windows NT printing mechanisms. These are
+implemented via <emphasis>MS-RPC</emphasis> (RPC = <emphasis>Remote
+Procedure Calls</emphasis> ). MS-RPCs use the
+<emphasis>SPOOLSS</emphasis> named pipe for all printing.
</para>
<para>
-When you send a job to Samba to be printed, it will make a temporary
-copy of it in the directory specified in the [printers] section.
-and it should be periodically cleaned out. The lpr -r option
-requests that the temporary copy be removed after printing; If
-printing fails then you might find leftover files in this directory,
-and it should be periodically cleaned out. Samba used the lpq
-command to determine the "job number" assigned to your print job
-by the spooler.
+The additional functionality provided by the new SPOOLSS support includes:
</para>
+<itemizedlist>
+<listitem><para>Support for downloading printer driver files to Windows
+95/98/NT/2000 clients upon demand (<emphasis>Point'n'Print</emphasis>);
+</para></listitem>
+
+<listitem><para>Uploading of printer drivers via the Windows NT
+<emphasis>Add Printer Wizard</emphasis> (APW) or the
+<emphasis>Imprints</emphasis> tool set (refer to <ulink
+url="http://imprints.sourceforge.net/">http://imprints.sourceforge.net</ulink>);
+</para></listitem>
+
+<listitem><para>Support for the native MS-RPC printing calls such as
+StartDocPrinter, EnumJobs(), etc... (See the MSDN documentation
+at <ulink
+url="http://msdn.microsoft.com/">http://msdn.microsoft.com/</ulink>
+for more information on the Win32 printing API);</para></listitem>
+
+<listitem><para>Support for NT <emphasis>Access Control
+Lists</emphasis> (ACL) on printer objects;</para></listitem>
+
+<listitem><para>Improved support for printer queue manipulation
+through the use of internal databases for spooled job information
+(implemented by various <filename>*.tdb</filename>
+files).</para></listitem>
+
+</itemizedlist>
+
+<para>
+One other benefit of an update is this: Samba-3 is able to publish
+all its printers in Active Directory (or LDAP)!
+</para>
+
+<para>
+One slight difference is here: it is possible on a Windows NT print
+server to have printers listed in the Printers folder which are
+<emphasis>not</emphasis> shared. Samba does not make this
+distinction. By definition, the only printers of which Samba is aware
+are those which are specified as shares in
+. The reason is that Windows NT/200x/XP Professional
+clients do not normally need to use the standard SMB printer share;
+rather they can print directly to any printer on another Windows NT
+host using MS-RPC. This of course assumes that the printing client has
+the necessary privileges on the remote host serving the printer. The
+default permissions assigned by Windows NT to a printer gives the
+"Print" permissions to the well-known <emphasis>Everyone</emphasis>
+group. (The older clients of type Win9x can only print to "shared"
+printers).
+</para>
+
+<sect2>
+<title>Client Drivers on Samba Server for <emphasis>Point'n'Print</emphasis></title>
+
+<para>
+There is still confusion about what all this means: <emphasis>Is it or
+is it not a requirement for printer drivers to be installed on a Samba
+host in order to support printing from Windows clients?</emphasis> The
+answer to this is: No, it is not a
+<emphasis>requirement</emphasis>. Windows NT/2000 clients can, of
+course, also run their APW to install drivers
+<emphasis>locally</emphasis> (which then connect to a Samba served
+print queue). This is the same method as used by Windows 9x
+clients. (However, a <emphasis>bug</emphasis> existed in Samba 2.2.0
+which made Windows NT/2000 clients require that the Samba server
+possess a valid driver for the printer. This was fixed in Samba
+2.2.1).
+</para>
+
+<para>
+But it is a new <emphasis>option</emphasis> to install the printer
+drivers into the <parameter>[print$]</parameter> share of the Samba
+server, and a big convenience too. Then <emphasis>all</emphasis>
+clients (including 95/98/ME) get the driver installed when they first
+connect to this printer share. The <emphasis>uploading</emphasis> or
+<emphasis>depositing</emphasis> of the driver into this
+<parameter>[print$]</parameter> share, and the following binding of
+this driver to an existing Samba printer share can be achieved by
+different means:
+</para>
+
+<itemizedlist>
+<listitem><para>running the <emphasis>APW</emphasis> on an
+NT/200x/XP Professional client (this doesn't work from 95/98/ME
+clients);</para></listitem>
+
+<listitem><para>using the <emphasis>Imprints</emphasis>
+toolset;</para></listitem>
+
+<listitem><para>using the <emphasis>smbclient</emphasis> and
+<emphasis>rpcclient</emphasis> commandline tools;</para></listitem>
+
+<listitem><para>using <emphasis>cupsaddsmb</emphasis>(only works for
+the CUPS printing system, not for LPR/LPD, LPRng
+etc.).</para></listitem>
+
+</itemizedlist>
+
<para>
-The %&gt;letter&lt; are "macros" that get dynamically replaced with appropriate
-values when they are used. The %s gets replaced with the name of the spool
-file that Samba creates and the %p gets replaced with the name of the
-printer. The %j gets replaced with the "job number" which comes from
-the lpq output.
+Please take additional note of the following fact: <emphasis>Samba
+does not use these uploaded drivers in any way to process spooled
+files</emphasis>. Drivers are utilized entirely by the clients, who
+download and install them via the "Point'n'Print" mechanism supported
+by Samba. The clients use these drivers to generate print files in the
+format the printer (or the Unix print system) requires. Print files
+received by Samba are handed over to the Unix printing system, which
+is responsible for all further processing, if needed.
</para>
+</sect2>
+
+<sect2>
+<title>The [printer$] Section is removed from Samba-3</title>
+
+<formalpara><title>
+<parameter>[print$]</parameter> vs. <parameter>[printer$]</parameter>
+</title>
+<para>
+Versions of Samba prior to 2.2 made it possible to use a share
+named <emphasis>[printer$]</emphasis>. This name was taken from the
+same named service created by Windows 9x clients when a printer was
+shared by them. Windows 9x printer servers always have a
+<parameter>[printer$]</parameter> service which provides read-only
+access (with no password required) in order to support printer driver
+downloads. However, Samba's initial implementation allowed for a
+parameter named <parameter>printer driver location</parameter> to be
+used on a per share basis. This specified the location of the driver
+files associated with that printer. Another parameter named
+<parameter>printer driver</parameter> provided a means of defining the
+printer driver name to be sent to the client. These parameters,
+including the <parameter>printer driver file</parameter> parameter,
+are now removed and can not be used in installations of Samba-3.0.
+Now the share name <parameter>[print$]</parameter> is used for the
+location of downloadable printer drivers. It is taken from the
+<parameter>[print$]</parameter> service created by Windows NT PCs when
+a printer is shared by them. Windows NT print servers always have a
+<parameter>[print$]</parameter> service which provides read-write
+access (in the context of its ACLs) in order to support printer driver
+down- and uploads. Don't fear -- this does not mean Windows 9x
+clients are thrown aside now. They can use Samba's
+<parameter>[print$]</parameter> share support just fine.
+</para></formalpara>
</sect2>
<sect2>
-<title>Debugging printer problems</title>
+<title>Creating the [print$] Share</title>
<para>
-One way to debug printing problems is to start by replacing these
-command with shell scripts that record the arguments and the contents
-of the print file. A simple example of this kind of things might
-be:
+In order to support the up- and downloading of printer driver files,
+you must first configure a file share named
+<parameter>[print$]</parameter>. The "public" name of this share is
+hard coded in Samba's internals (because it is hard coded in the MS
+Windows clients too). It cannot be renamed since Windows clients are
+programmed to search for a service of exactly this name if they want
+to retrieve printer driver files.
</para>
-<para><programlisting>
- print command = /tmp/saveprint %p %s
-
- #!/bin/saveprint
- # we make sure that we are the right user
- /usr/bin/id -p >/tmp/tmp.print
- # we run the command and save the error messages
- # replace the command with the one appropriate for your system
- /usr/bin/lpr -r -P$1 $2 2>>&amp;/tmp/tmp.print
-</programlisting></para>
+<para>
+You should modify the server's file to
+add the global parameters and create the
+<parameter>[print$]</parameter> file share (of course, some of the
+parameter values, such as 'path' are arbitrary and should be replaced
+with appropriate values for your site):
+</para>
+
+<para><screen>
+ [global]
+ ; members of the ntadmin group should be able to add drivers and set
+ ; printer properties. root is implicitly always a 'printer admin'.
+ printer admin = @ntadmin
+ [....]
+
+ [printers]
+ [....]
+
+ [print$]
+ comment = Printer Driver Download Area
+ path = /etc/samba/drivers
+ browseable = yes
+ guest ok = yes
+ read only = yes
+ write list = @ntadmin, root
+</screen></para>
<para>
-Then you print a file and try removing it. You may find that the
-print queue needs to be stopped in order to see the queue status
-and remove the job:
+Of course, you also need to ensure that the directory named by the
+<parameter>path</parameter> parameter exists on the Unix file system.
</para>
-<para><programlisting>
+</sect2>
-h4: {42} % echo hi >/tmp/hi
-h4: {43} % smbclient //localhost/lw4
-added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
-Password:
-Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
-smb: \> print /tmp/hi
-putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
-smb: \> queue
-1049 3 hi-17534
-smb: \> cancel 1049
-Error cancelling job 1049 : code 0
-smb: \> cancel 1049
-Job 1049 cancelled
-smb: \> queue
-smb: \> exit
-</programlisting></para>
+<sect2>
+<title>Parameters in the [print$] Section</title>
<para>
-The 'code 0' indicates that the job was removed. The comment
-by the smbclient is a bit misleading on this.
-You can observe the command output and then and look at the
-/tmp/tmp.print file to see what the results are. You can quickly
-find out if the problem is with your printing system. Often people
-have problems with their /etc/printcap file or permissions on
-various print queues.
+<parameter>[print$]</parameter> is a special section in
+. It contains settings relevant to
+potential printer driver download and local installation by clients.
</para>
+
+<variablelist>
+<varlistentry><term><parameter>comment = Printer Driver
+Download Area</parameter></term>
+<listitem><para> the comment appears next to the share name if it is
+listed in a share list (usually Windows clients won't see it often but
+it will also appear up in a <command>smbclient -L sambaserver
+</command> output). </para></listitem></varlistentry>
+
+<varlistentry><term><parameter>path = /etc/samba/printers</parameter></term>
+<listitem><para> this is the path to the location of the Windows
+driver file deposit from the UNIX point of
+view.</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>browseable = no</parameter></term>
+<listitem><para> this makes the <parameter>[print$]</parameter> share
+"invisible" in Network Neighbourhood to clients. However, you can
+still "mount" it from any client using the <command>net use
+g:\\sambaserver\print$</command> command in a "DOS box" or the
+"Connect network drive" menu from Windows
+Explorer.</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>guest ok = yes</parameter></term>
+<listitem><para>this gives read only access to this share for all
+guest users. Access may be used to download and install printer
+drivers on clients. The requirement for <parameter>guest ok =
+yes</parameter> depends upon how your site is configured. If users
+will be guaranteed to have an account on the Samba host, then this is
+a non-issue.</para>
+
+<note><para>
+The non-issue is this: if all your Windows NT users are guaranteed to
+be authenticated by the Samba server (for example if Samba
+authenticates via an NT domain server and the NT user has already been
+validated by the Domain Controller in order to logon to the Windows NT
+session), then guest access is not necessary. Of course, in a
+workgroup environment where you just want to be able to print without
+worrying about silly accounts and security, then configure the share
+for guest access. You'll probably want to add <parameter>map to guest
+= Bad User</parameter> in the <parameter>[global]</parameter> section
+as well. Make sure you understand what this parameter does before
+using it.
+</para></note> </listitem></varlistentry>
+
+<varlistentry><term><parameter>read only = yes</parameter></term>
+<listitem><para>as we don't want everybody to upload driver files (or
+even change driver settings) we tagged this share as not
+writeable.</para></listitem></varlistentry>
+
+<varlistentry><term><parameter>write list = @ntadmin,root</parameter></term>
+<listitem><para>since the <parameter>[print$]</parameter> was made
+read only by the previous setting, we need to create a "write list"
+also. UNIX groups (denoted with a leading "@" character) and users
+listed here are allowed write access (as an exception to the general
+public's "read-only" access), which they need to update files on the
+share. Normally you will want to only name administrative level user
+accounts in this setting. Check the file system permissions to make
+sure these accounts can copy files to the share. If this is a non-root
+account, then the account should also be mentioned in the global
+<parameter>printer admin </parameter> parameter. See the
+ man page for more information on
+configuring file shares. </para></listitem></varlistentry>
+
+</variablelist>
+
</sect2>
<sect2>
-<title>What printers do I have?</title>
+<title>Subdirectory Structure in [print$]</title>
<para>
-You can use the 'testprns' program to check to see if the printer
-name you are using is recognized by Samba. For example, you can
-use:
+In order for a Windows NT print server to support the downloading of
+driver files by multiple client architectures, you must create several
+subdirectories within the <parameter>[print$]</parameter> service
+(i.e. the Unix directory named by the <parameter>path</parameter>
+parameter). These correspond to each of the supported client
+architectures. Samba follows this model as well. Just like the name of
+the <parameter>[print$]</parameter> share itself, the subdirectories
+*must* be exactly the names listed below (you may leave out the
+subdirectories of architectures you don't want to support).
</para>
+<para>
+Therefore, create a directory tree below the
+<parameter>[print$]</parameter> share for each architecture you wish
+to support.
+</para>
+
+<!-- FIXME: diagram-->
<para><programlisting>
- testprns printer /etc/printcap
+[print$]--+--
+ |--W32X86 # serves drivers to "Windows NT x86"
+ |--WIN40 # serves drivers to "Windows 95/98"
+ |--W32ALPHA # serves drivers to "Windows NT Alpha_AXP"
+ |--W32MIPS # serves drivers to "Windows NT R4000"
+ |--W32PPC # serves drivers to "Windows NT PowerPC"
</programlisting></para>
+<important><title>Required permissions</title>
+
<para>
-Samba can get its printcap information from a file or from a program.
-You can try the following to see the format of the extracted
-information:
+In order to add a new driver to your Samba host, one of two conditions
+must hold true:
</para>
-<para><programlisting>
- testprns -a printer /etc/printcap
+<itemizedlist>
+<listitem><para>The account used to connect to the Samba host must
+have a UID of 0 (i.e. a root account)</para></listitem>
- testprns -a printer '|/bin/cat printcap'
-</programlisting></para>
+<listitem><para>The account used to connect to the Samba host must be
+named in the <emphasis>printer admin</emphasis>list.</para></listitem>
+
+</itemizedlist>
+
+<para>
+Of course, the connected account must still possess access to add
+files to the subdirectories beneath
+<parameter>[print$]</parameter>. Remember that all file shares are set
+to 'read only' by default.
+</para>
+</important>
+<para>
+Once you have created the required <parameter>[print$]</parameter>
+service and associated subdirectories, go to a Windows NT 4.0/2k/XP
+client workstation. Open <guiicon>Network Neighbourhood</guiicon> or
+<guiicon>My Network Places</guiicon> and browse for the Samba host.
+Once you have located the server, navigate to its <guiicon>Printers and
+Faxes</guiicon> folder. You should see an initial listing of printers
+that matches the printer shares defined on your Samba host.
+</para>
</sect2>
+</sect1>
+
+<sect1>
+<title>Installing Drivers into [print$]</title>
+
+<para>
+You have successfully created the <parameter>[print$]</parameter>
+share in ? And Samba has re-read its
+configuration? Good. But you are not yet ready to take off. The
+<emphasis>driver files</emphasis> need to be present in this share,
+too! So far it is still an empty share. Unfortunately, it is not enough
+to just copy the driver files over. They need to be <emphasis>set
+up</emphasis> too. And that is a bit tricky, to say the least. We
+will now discuss two alternative ways to install the drivers into
+<parameter>[print$]</parameter>:
+</para>
+
+<itemizedlist>
+
+<listitem><para>using the Samba commandline utility
+<command>rpcclient</command> with its various subcommands (here:
+<command>adddriver</command> and <command>setdriver</command>) from
+any UNIX workstation;</para></listitem>
+
+<listitem><para>running a GUI (<emphasis>Printer
+Properties</emphasis> and <emphasis>Add Printer Wizard</emphasis>)
+from any Windows NT/2k/XP client workstation.</para></listitem>
+
+</itemizedlist>
+
+<para>
+The latter option is probably the easier one (even if the only
+entrance to this realm seems a little bit weird at first).
+</para>
<sect2>
-<title>Setting up printcap and print servers</title>
+<title>Setting Drivers for existing Printers with a Client GUI</title>
<para>
-You may need to set up some printcaps for your Samba system to use.
-It is strongly recommended that you use the facilities provided by
-the print spooler to set up queues and printcap information.
+The initial listing of printers in the Samba host's
+<guiicon>Printers</guiicon> folder accessed from a client's Explorer
+will have no real printer driver assigned to them. By default, in
+Samba-3 (as in 2.2.1 and later) this driver name is set to a NULL
+string. This must be changed now. The local <emphasis>Add Printer
+Wizard</emphasis>, run from NT/2000/XP clients, will help us in this
+task.
</para>
<para>
-Samba requires either a printcap or program to deliver printcap
-information. This printcap information has the format:
+However, the job to set a valid driver for the printer is not a
+straightforward one: You must attempt to view the printer properties
+for the printer to which you want the driver assigned. Open the
+Windows Explorer, open Network Neighbourhood, browse to the Samba
+host, open Samba's <guiicon>Printers</guiicon> folder, right-click the printer icon and
+select <guimenu>Properties...</guimenu>. You are now trying to view printer and driver
+properties for a queue which has this default <constant>NULL</constant> driver
+assigned. This will result in an error message (this is normal here):
</para>
-<para><programlisting>
- name|alias1|alias2...:option=value:...
-</programlisting></para>
+<para><errorname> Device settings cannot be displayed. The driver
+for the specified printer is not installed, only spooler properties
+will be displayed. Do you want to install the driver
+now?</errorname></para>
+
+<para>
+<emphasis>Important:</emphasis>Don't click <guibutton>Yes</guibutton>! Instead,
+<emphasis>click <guibutton>No</guibutton></emphasis> in the error dialog.
+Only now you will be presented with the printer properties window. From here,
+the way to assign a driver to a printer is open to us. You have now the choice
+either:
+</para>
+
+<itemizedlist>
+<listitem><para>select a driver from the pop-up list of installed
+drivers. <emphasis>Initially this list will be empty.</emphasis>
+Or</para></listitem>
+
+<listitem><para>use the <guibutton>New Driver...</guibutton> button to
+install a new printer driver (which will in fact start up the
+APW).</para></listitem>
+</itemizedlist>
<para>
-For almost all printing systems, the printer 'name' must be composed
-only of alphanumeric or underscore '_' characters. Some systems also
-allow hyphens ('-') as well. An alias is an alternative name for the
-printer, and an alias with a space in it is used as a 'comment'
-about the printer. The printcap format optionally uses a \ at the end of lines
-to extend the printcap to multiple lines.
+Once the APW is started, the procedure is exactly the same as the one
+you are familiar with in Windows (we assume here that you are
+familiar with the printer driver installations procedure on Windows
+NT). Make sure your connection is in fact setup as a user with
+<parameter>printer admin</parameter> privileges (if in doubt, use
+<command>smbstatus</command> to check for this). If you wish to
+install printer drivers for client operating systems other than
+<application>Windows NT x86</application>, you will need to use the
+<guilabel>Sharing</guilabel> tab of the printer properties dialog.
</para>
<para>
-Here are some examples of printcap files:
+Assuming you have connected with an administrative (or root) account
+(as named by the <parameter>printer admin</parameter> parameter),
+you will also be able to modify other printer properties such as ACLs
+and default device settings using this dialog. For the default device
+settings, please consider the advice given further below.
</para>
+</sect2>
+
+<sect2>
+<title>Setting Drivers for existing Printers with
+<command>rpcclient</command></title>
<para>
+The second way to install printer drivers into
+<parameter>[print$]</parameter> and set them up in a valid way can be
+done from the UNIX command line. This involves four distinct steps:
+</para>
+
<orderedlist>
-<listitem><para>
-pr just printer name
-</para></listitem>
-<listitem><para>
-pr|alias printer name and alias
-</para></listitem>
-<listitem><para>
-pr|My Printer printer name, alias used as comment
-</para></listitem>
-<listitem><para>
-pr:sh:\ Same as pr:sh:cm= testing
- :cm= \
- testing
-</para></listitem>
-<listitem><para>
-pr:sh Same as pr:sh:cm= testing
- :cm= testing
-</para></listitem>
+<listitem><para>gathering the info about the required driver files
+and collecting the files together;</para></listitem>
+
+<listitem><para>deposit the driver files into the
+<parameter>[print$]</parameter> share's correct subdirectories
+(possibly by using <command>smbclient</command>);</para></listitem>
+
+<listitem><para>running the <command>rpcclient</command>
+commandline utility once with the <command>adddriver</command>
+subcommand,</para></listitem>
+
+<listitem><para>running <command>rpcclient</command> a second
+time with the <command>setdriver</command>
+subcommand.</para></listitem>
</orderedlist>
+
+<para>
+We will provide detailed hints for each of these steps in the next few
+paragraphs.
</para>
+<sect3>
+<title>Identifying the Driver Files</title>
+
<para>
-Samba reads the printcap information when first started. If you make
-changes in the printcap information, then you must do the following:
+To find out about the driver files, you have two options: you could
+investigate the driver CD which comes with your printer. Study the
+<filename>*.inf</filename> file on the CD, if it is contained. This
+may not be the possible, since the *.inf file might be
+missing. Unfortunately, many vendors have now started to use their own
+installation programs. These installations packages are often some
+sort of Windows platform archive format, plus, the files may get
+re-named during the installation process. This makes it extremely
+difficult to identify the driver files you need.
</para>
-<orderedlist>
+<para>
+Then you only have the second option: install the driver first on a
+Windows client *locally* and investigate which file names and paths it
+uses after they are installed. (Note, that you need to repeat this
+procedure for every client platform you want to support. We are going
+to show it here for the <application>W32X86</application> platform only, a
+name used by Microsoft for all WinNT/2k/XP clients...)
+</para>
-<listitem><para>
-make sure that the print spooler is aware of these changes.
-The LPRng system uses the 'lpc reread' command to do this.
-</para></listitem>
+<para>
+A good method to recognize the driver files this is to print the test
+page from the driver's <guilabel>Properties</guilabel> Dialog
+(<guilabel>General</guilabel> tab). Then look at the list of driver
+files named on the printout. You'll need to recognize what Windows
+(and Samba) are calling the <guilabel>Driver File</guilabel> , the
+<guilabel>Data File</guilabel>, the <guilabel>Config File</guilabel>,
+the <guilabel>Help File</guilabel> and (optionally) the
+<guilabel>Dependent Driver Files</guilabel> (this may vary slightly
+for Windows NT). You need to remember all names (or better take a
+note) for the next steps.
+</para>
-<listitem><para>
-make sure that the spool queues, etc., exist and have the
-correct permissions. The LPRng system uses the 'checkpc -f'
-command to do this.
-</para></listitem>
+<para>
+Another method to quickly test the driver filenames and related paths
+is provided by the <command>rpcclient</command> utility. Run it with
+<command>enumdrivers</command> or with the
+<command>getdriver</command> subcommand, each in the
+<emphasis>3</emphasis> level. In the following example,
+<emphasis>TURBO_XP</emphasis> is the name of the Windows PC (in this
+case it was a Windows XP Professional laptop, BTW). I had installed
+the driver locally to TURBO_XP while <emphasis>kde-bitshop</emphasis> is
+the name of the Linux host from which I am working. We could run an
+<emphasis>interactive</emphasis> <command>rpcclient</command> session;
+then we'd get an <emphasis>rpcclient /></emphasis> prompt and would
+type the subcommands at this prompt. This is left as a good exercise
+to the reader. For now we use <command>rpcclient</command> with the
+<option>-c</option> parameter to execute a single subcommand
+line and exit again. This is the method you would use if you want to
+create scripts to automate the procedure for a large number of
+printers and drivers. Note the different quotes used to overcome the
+different spaces in between words:
+</para>
-<listitem><para>
-You now should send a SIGHUP signal to the smbd server to have
-it reread the printcap information.
+<para><screen>
+&rootprompt;<userinput>rpcclient -U'Danka%xxxx' -c 'getdriver "Heidelberg Digimaster 9110 (PS)" 3' TURBO_XP</userinput>
+ cmd = getdriver "Heidelberg Digimaster 9110 (PS)" 3
+
+ [Windows NT x86]
+ Printer Driver Info 3:
+ Version: [2]
+ Driver Name: [Heidelberg Digimaster 9110 (PS)]
+ Architecture: [Windows NT x86]
+ Driver Path: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.DLL]
+ Datafile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.ppd]
+ Configfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.DLL]
+ Helpfile: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01U_de.HLP]
+
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.DLL]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.INI]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1KMMin.DLL]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.dat]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.cat]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.def]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hre]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.vnd]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de.hlp]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\Hddm91c1_de_reg.HLP]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01Aux.dll]
+ Dependentfiles: [C:\WINNT\System32\spool\DRIVERS\W32X86\2\HDNIS01_de.NTF]
+
+ Monitorname: []
+ Defaultdatatype: []
+
+</screen></para>
+
+<para>
+You may notice, that this driver has quite a big number of
+<guilabel>Dependentfiles</guilabel> (I know worse cases however). Also,
+strangely, the <guilabel>Driver File</guilabel> is here tagged as
+<guilabel>Driver Path</guilabel>.... oh, well. Here we don't have yet
+support for the so-called <application>WIN40</application> architecture
+installed. This name is used by Microsoft for the Win95/98/ME platforms.
+If we want to support these, we need to install the Win95/98/ME driver
+files in addition to those for <application>W32X86</application>
+(i.e. the WinNT72000/XP clients) onto a Windows PC. This PC
+can also host the Win9x drivers, even if itself runs on Windows NT,
+2000 or XP.
+</para>
+
+<para>
+Since the <parameter>[print$]</parameter> share is usually accessible
+through the <guiicon>Network Neighbourhood</guiicon>, you can also use the UNC notation
+from Windows Explorer to poke at it. The Win9x driver files will end
+up in subdirectory "0" of the "WIN40" directory. The full path to
+access them will be
+<filename>\\WINDOWSHOST\print$\WIN40\0\</filename>.
+</para>
+
+<note><para> more recent drivers on Windows 2000 and Windows XP are
+installed into the "3" subdirectory instead of the "2". The version 2
+of drivers, as used in Windows NT, were running in Kernel Mode.
+Windows 2000 changed this. While it still can use the Kernel Mode
+drivers (if this is enabled by the Admin), its native mode for printer
+drivers is User Mode execution. This requires drivers designed for
+this. These type of drivers install into the "3" subdirectory.
+</para></note>
+</sect3>
+
+<sect3>
+<title>Collecting the Driver Files from a Windows Host's
+[print$] Share</title>
+
+<para>
+Now we need to collect all the driver files we identified. in our
+previous step. Where do we get them from? Well, why not retrieve them
+from the very PC and the same <parameter>[print$]</parameter> share
+which we investigated in our last step to identify the files? We can
+use <command>smbclient</command> to do this. We will use the paths and
+names which were leaked to us by <command>getdriver</command>. The
+listing is edited to include linebreaks for readability:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>smbclient //TURBO_XP/print\$ -U'Danka%xxxx' \
+ -c 'cd W32X86/2;mget HD*_de.* \
+ hd*ppd Hd*_de.* Hddm*dll HDN*Aux.DLL'</userinput>
+ added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0
+ Got a positive name query response from 10.160.50.8 ( 10.160.50.8 )
+ Domain=[DEVELOPMENT] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
+ <prompt>Get file Hddm91c1_de.ABD? </prompt><userinput>n</userinput>
+ <prompt>Get file Hddm91c1_de.def? </prompt><userinput>y</userinput>
+ getting file \W32X86\2\Hddm91c1_de.def of size 428 as Hddm91c1_de.def (22.0 kb/s) (average 22.0 kb/s)
+ <prompt>Get file Hddm91c1_de.DLL? </prompt><userinput>y</userinput>
+ getting file \W32X86\2\Hddm91c1_de.DLL of size 876544 as Hddm91c1_de.DLL (737.3 kb/s) (average 737.3 kb/s)
+ [...]
+
+</screen></para>
+
+<para>
+After this command is complete, the files are in our current local
+directory. You probably have noticed that this time we passed several
+commands to the <option>-c</option> parameter, separated by semi-colons. This
+effects that all commands are executed in sequence on the remote
+Windows server before smbclient exits again.
+</para>
+
+<para>
+Don't forget to repeat the procedure for the <application>WIN40</application>
+architecture should you need to support Win95/98/XP clients. Remember, the
+files for these architectures are in the WIN40/0/ subdir. Once we are
+complete, we can run <command>smbclient ... put</command> to store
+the collected files on the Samba server's
+<parameter>[print$]</parameter> share.
+</para>
+</sect3>
+
+<sect3>
+<title>Depositing the Driver Files into [print$]</title>
+
+<para>
+So, now we are going to put the driver files into the
+<parameter>[print$]</parameter> share. Remember, the UNIX path to this
+share has been defined previously in your
+. You also have created subdirectories
+for the different Windows client types you want to support. Supposing
+your <parameter>[print$]</parameter> share maps to the UNIX path
+<filename>/etc/samba/drivers/</filename>, your driver files should now
+go here:
+</para>
+
+<itemizedlist>
+<listitem><para>for all Windows NT, 2000 and XP clients into
+<filename>/etc/samba/drivers/W32X86/</filename> <emphasis>but
+*not*(yet) into the "2" subdir</emphasis>!</para></listitem>
+
+<listitem><para>for all Windows 95, 98 and ME clients into
+<filename>/etc/samba/drivers/WIN40/</filename> -- <emphasis>but *not*
+(yet) into the "0" subdir</emphasis>!</para></listitem>
+</itemizedlist>
+
+<para>
+We again use smbclient to transfer the driver files across the
+network. We specify the same files and paths as were leaked to us by
+running <command>getdriver</command> against the original
+<emphasis>Windows</emphasis> install. However, now we are going to
+store the files into a <emphasis>Samba/UNIX</emphasis> print server's
+<parameter>[print$]</parameter> share...
+</para>
+
+<para><screen>
+&rootprompt;<userinput>smbclient //SAMBA-CUPS/print\$ -U'root%xxxx' -c 'cd W32X86; put HDNIS01_de.DLL; \
+ put Hddm91c1_de.ppd; put HDNIS01U_de.DLL; \
+ put HDNIS01U_de.HLP; put Hddm91c1_de.DLL; \
+ put Hddm91c1_de.INI; put Hddm91c1KMMin.DLL; \
+ put Hddm91c1_de.dat; put Hddm91c1_de.dat; \
+ put Hddm91c1_de.def; put Hddm91c1_de.hre; \
+ put Hddm91c1_de.vnd; put Hddm91c1_de.hlp; \
+ put Hddm91c1_de_reg.HLP; put HDNIS01Aux.dll; \
+ put HDNIS01_de.NTF'</userinput>
+ added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0
+ Got a positive name query response from 10.160.51.162 ( 10.160.51.162 )
+ Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a]
+ putting file HDNIS01_de.DLL as \W32X86\HDNIS01_de.DLL (4465.5 kb/s) (average 4465.5 kb/s)
+ putting file Hddm91c1_de.ppd as \W32X86\Hddm91c1_de.ppd (12876.8 kb/s) (average 4638.9 kb/s)
+ putting file HDNIS01U_de.DLL as \W32X86\HDNIS01U_de.DLL (20249.8 kb/s) (average 5828.3 kb/s)
+ putting file HDNIS01U_de.HLP as \W32X86\HDNIS01U_de.HLP (9652.8 kb/s) (average 5899.8 kb/s)
+ putting file Hddm91c1_de.DLL as \W32X86\Hddm91c1_de.DLL (23777.7 kb/s) (average 10400.6 kb/s)
+ putting file Hddm91c1_de.INI as \W32X86\Hddm91c1_de.INI (98.6 kb/s) (average 10329.0 kb/s)
+ putting file Hddm91c1KMMin.DLL as \W32X86\Hddm91c1KMMin.DLL (22931.5 kb/s) (average 10501.7 kb/s)
+ putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat (2462.8 kb/s) (average 10393.0 kb/s)
+ putting file Hddm91c1_de.dat as \W32X86\Hddm91c1_de.dat (4925.3 kb/s) (average 10356.3 kb/s)
+ putting file Hddm91c1_de.def as \W32X86\Hddm91c1_de.def (417.9 kb/s) (average 10290.1 kb/s)
+ putting file Hddm91c1_de.hre as \W32X86\Hddm91c1_de.hre (22571.3 kb/s) (average 11338.5 kb/s)
+ putting file Hddm91c1_de.vnd as \W32X86\Hddm91c1_de.vnd (3384.6 kb/s) (average 10754.3 kb/s)
+ putting file Hddm91c1_de.hlp as \W32X86\Hddm91c1_de.hlp (18406.8 kb/s) (average 10839.8 kb/s)
+ putting file Hddm91c1_de_reg.HLP as \W32X86\Hddm91c1_de_reg.HLP (20278.3 kb/s) (average 11386.3 kb/s)
+ putting file HDNIS01Aux.dll as \W32X86\HDNIS01Aux.dll (14994.6 kb/s) (average 11405.2 kb/s)
+ putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF (23390.2 kb/s) (average 13170.8 kb/s)
+
+</screen></para>
+
+<para>
+Phewww -- that was a lot of typing! Most drivers are a lot smaller --
+many only having 3 generic PostScript driver files plus 1 PPD. Note,
+that while we did retrieve the files from the "2" subdirectory of the
+"W32X86" directory from the Windows box, we <emphasis>don't</emphasis>
+put them (for now) in this same subdirectory of the Samba box! This
+re-location will automatically be done by the
+<command>adddriver</command> command which we will run shortly (and
+don't forget to also put the files for the Win95/98/ME architecture
+into the <filename>WIN40/</filename> subdirectory should you need
+them).
+</para>
+</sect3>
+
+<sect3>
+<title>Check if the Driver Files are there (with smbclient)</title>
+
+<para>
+For now we verify that our files are there. This can be done with
+<command>smbclient</command> too (but of course you can log in via SSH
+also and do this through a standard UNIX shell access too):
+</para>
+
+<para><screen>
+&rootprompt;<userinput>smbclient //SAMBA-CUPS/print\$ -U 'root%xxxx' -c 'cd W32X86; pwd; dir; cd 2; pwd; dir'</userinput>
+ added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0
+ Got a positive name query response from 10.160.51.162 ( 10.160.51.162 )
+ Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a]
+
+ Current directory is \\SAMBA-CUPS\print$\W32X86\
+ . D 0 Sun May 4 03:56:35 2003
+ .. D 0 Thu Apr 10 23:47:40 2003
+ 2 D 0 Sun May 4 03:56:18 2003
+ HDNIS01Aux.dll A 15356 Sun May 4 03:58:59 2003
+ Hddm91c1KMMin.DLL A 46966 Sun May 4 03:58:59 2003
+ HDNIS01_de.DLL A 434400 Sun May 4 03:58:59 2003
+ HDNIS01_de.NTF A 790404 Sun May 4 03:56:35 2003
+ Hddm91c1_de.DLL A 876544 Sun May 4 03:58:59 2003
+ Hddm91c1_de.INI A 101 Sun May 4 03:58:59 2003
+ Hddm91c1_de.dat A 5044 Sun May 4 03:58:59 2003
+ Hddm91c1_de.def A 428 Sun May 4 03:58:59 2003
+ Hddm91c1_de.hlp A 37699 Sun May 4 03:58:59 2003
+ Hddm91c1_de.hre A 323584 Sun May 4 03:58:59 2003
+ Hddm91c1_de.ppd A 26373 Sun May 4 03:58:59 2003
+ Hddm91c1_de.vnd A 45056 Sun May 4 03:58:59 2003
+ HDNIS01U_de.DLL A 165888 Sun May 4 03:58:59 2003
+ HDNIS01U_de.HLP A 19770 Sun May 4 03:58:59 2003
+ Hddm91c1_de_reg.HLP A 228417 Sun May 4 03:58:59 2003
+ 40976 blocks of size 262144. 709 blocks available
+
+ Current directory is \\SAMBA-CUPS\print$\W32X86\2\
+ . D 0 Sun May 4 03:56:18 2003
+ .. D 0 Sun May 4 03:56:35 2003
+ ADOBEPS5.DLL A 434400 Sat May 3 23:18:45 2003
+ laserjet4.ppd A 9639 Thu Apr 24 01:05:32 2003
+ ADOBEPSU.DLL A 109568 Sat May 3 23:18:45 2003
+ ADOBEPSU.HLP A 18082 Sat May 3 23:18:45 2003
+ PDFcreator2.PPD A 15746 Sun Apr 20 22:24:07 2003
+ 40976 blocks of size 262144. 709 blocks available
+
+</screen></para>
+
+<para>
+Notice that there are already driver files present in the
+<filename>2</filename> subdir (probably from a previous
+installation). Once the files for the new driver are there too, you
+are still a few steps away from being able to use them on the
+clients. The only thing you could do *now* is to retrieve them from a
+client just like you retrieve ordinary files from a file share, by
+opening print$ in Windows Explorer. But that wouldn't install them per
+Point'n'Print. The reason is: Samba doesn't know yet that these files
+are something special, namely <emphasis>printer driver
+files</emphasis> and it doesn't know yet to which print queue(s) these
+driver files belong.
+</para>
+</sect3>
+
+<sect3>
+<title>Running <command>rpcclient</command> with
+<command>adddriver</command></title>
+
+<para>
+So, next you must tell Samba about the special category of the files
+you just uploaded into the <parameter>[print$]</parameter> share. This
+is done by the <command>adddriver</command> command. It will
+prompt Samba to register the driver files into its internal TDB
+database files. The following command and its output has been edited,
+again, for readability:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>rpcclient -Uroot%xxxx -c 'adddriver "Windows NT x86" "dm9110:HDNIS01_de.DLL: \
+ Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \
+ NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \
+ Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \
+ Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \
+ HDNIS01Aux.dll,HDNIS01_de.NTF, \
+ Hddm91c1_de_reg.HLP' SAMBA-CUPS</userinput>
+
+ cmd = adddriver "Windows NT x86" "dm9110:HDNIS01_de.DLL:Hddm91c1_de.ppd:HDNIS01U_de.DLL: \
+ HDNIS01U_de.HLP:NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \
+ Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \
+ Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \
+ HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP"
+
+ Printer Driver dm9110 successfully installed.
+
+</screen></para>
+
+<para>
+After this step the driver should be recognized by Samba on the print
+server. You need to be very careful when typing the command. Don't
+exchange the order of the fields. Some changes would lead to a
+<computeroutput>NT_STATUS_UNSUCCESSFUL</computeroutput> error
+message. These become obvious. Other changes might install the driver
+files successfully, but render the driver unworkable. So take care!
+Hints about the syntax of the adddriver command are in the man
+page. The CUPS printing chapter of this HOWTO collection provides a
+more detailed description, if you should need it.
+</para>
+</sect3>
+
+<sect3>
+<title>Check how Driver Files have been moved after
+<command>adddriver</command> finished</title>
+
+<para>
+One indication for Samba's recognition of the files as driver files is
+the <computeroutput>successfully installed</computeroutput> message.
+Another one is the fact, that our files have been moved by the
+<command>adddriver</command> command into the <filename>2</filename>
+subdirectory. You can check this again with
+<command>smbclient</command>:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>smbclient //SAMBA-CUPS/print\$ -Uroot%xxxx -c 'cd W32X86;dir;pwd;cd 2;dir;pwd'</userinput>
+ added interface ip=10.160.51.162 bcast=10.160.51.255 nmask=255.255.252.0
+ Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a]
+
+ Current directory is \\SAMBA-CUPS\print$\W32X86\
+ . D 0 Sun May 4 04:32:48 2003
+ .. D 0 Thu Apr 10 23:47:40 2003
+ 2 D 0 Sun May 4 04:32:48 2003
+ 40976 blocks of size 262144. 731 blocks available
+
+ Current directory is \\SAMBA-CUPS\print$\W32X86\2\
+ . D 0 Sun May 4 04:32:48 2003
+ .. D 0 Sun May 4 04:32:48 2003
+ DigiMaster.PPD A 148336 Thu Apr 24 01:07:00 2003
+ ADOBEPS5.DLL A 434400 Sat May 3 23:18:45 2003
+ laserjet4.ppd A 9639 Thu Apr 24 01:05:32 2003
+ ADOBEPSU.DLL A 109568 Sat May 3 23:18:45 2003
+ ADOBEPSU.HLP A 18082 Sat May 3 23:18:45 2003
+ PDFcreator2.PPD A 15746 Sun Apr 20 22:24:07 2003
+ HDNIS01Aux.dll A 15356 Sun May 4 04:32:18 2003
+ Hddm91c1KMMin.DLL A 46966 Sun May 4 04:32:18 2003
+ HDNIS01_de.DLL A 434400 Sun May 4 04:32:18 2003
+ HDNIS01_de.NTF A 790404 Sun May 4 04:32:18 2003
+ Hddm91c1_de.DLL A 876544 Sun May 4 04:32:18 2003
+ Hddm91c1_de.INI A 101 Sun May 4 04:32:18 2003
+ Hddm91c1_de.dat A 5044 Sun May 4 04:32:18 2003
+ Hddm91c1_de.def A 428 Sun May 4 04:32:18 2003
+ Hddm91c1_de.hlp A 37699 Sun May 4 04:32:18 2003
+ Hddm91c1_de.hre A 323584 Sun May 4 04:32:18 2003
+ Hddm91c1_de.ppd A 26373 Sun May 4 04:32:18 2003
+ Hddm91c1_de.vnd A 45056 Sun May 4 04:32:18 2003
+ HDNIS01U_de.DLL A 165888 Sun May 4 04:32:18 2003
+ HDNIS01U_de.HLP A 19770 Sun May 4 04:32:18 2003
+ Hddm91c1_de_reg.HLP A 228417 Sun May 4 04:32:18 2003
+ 40976 blocks of size 262144. 731 blocks available
+
+</screen></para>
+
+<para>
+Another verification is that the timestamp of the printing TDB files
+is now updated (and possibly their filesize has increased).
+</para>
+</sect3>
+
+<sect3>
+<title>Check if the Driver is recognized by Samba</title>
+
+<para>
+Now the driver should be registered with Samba. We can easily verify
+this, and will do so in a moment. However, this driver is
+<emphasis>not yet</emphasis> associated with a particular
+<emphasis>printer</emphasis>. We may check the driver status of the
+files by at least three methods:
+</para>
+
+<itemizedlist>
+<listitem><para>from any Windows client browse Network Neighbourhood,
+find the Samba host and open the Samba <guiicon>Printers and
+Faxes</guiicon> folder. Select any printer icon, right-click and
+select the printer <guimenuitem>Properties</guimenuitem>. Click on the
+<guilabel>Advanced</guilabel> tab. Here is a field indicating the
+driver for that printer. A drop down menu allows you to change that
+driver (be careful to not do this unwittingly.). You can use this
+list to view all drivers know to Samba. Your new one should be amongst
+them. (Each type of client will only see his own architecture's
+list. If you don't have every driver installed for each platform, the
+list will differ if you look at it from Windows95/98/ME or
+WindowsNT/2000/XP.)</para></listitem>
+
+<listitem><para>from a Windows 2000 or XP client (not WinNT) browse
+<guiicon>Network Neighbourhood</guiicon>, search for the Samba
+server and open the server's <guiicon>Printers</guiicon> folder,
+right-click the white background (with no printer highlighted). Select
+<guimenuitem>Server Properties</guimenuitem>. On the
+<guilabel>Drivers</guilabel> tab you will see the new driver listed
+now. This view enables you to also inspect the list of files belonging
+to that driver<emphasis> (this doesn't work on Windows NT, but only on
+Windows 2000 and Windows XP. WinNT doesn't provide the "Drivers"
+tab).</emphasis>. An alternative, much quicker method for Windows
+2000/XP to start this dialog is by typing into a DOS box (you must of
+course adapt the name to your Samba server instead of <replaceable>SAMBA-CUPS</replaceable>):
+</para>
+
+<para><userinput> rundll32 printui.dll,PrintUIEntry /s /t2 /n\\<replaceable>SAMBA-CUPS</replaceable></userinput></para>
+</listitem>
+
+<listitem><para>from a UNIX prompt run this command (or a variant
+thereof), where <replaceable>SAMBA-CUPS</replaceable> is the name of the Samba
+host and "xxxx" represents the actual Samba password assigned to root:
+</para>
+
+<para><userinput>rpcclient -U'root%xxxx' -c 'enumdrivers' <replaceable>SAMBA-CUPS</replaceable></userinput></para>
+
+<para>
+You will see a listing of all drivers Samba knows about. Your new one
+should be amongst them. But it is only listed under the <parameter>[Windows NT
+x86]</parameter> heading, not under <parameter>[Windows 4.0]</parameter>,
+since we didn't install that part. Or did *you*? -- You will see a listing of
+all drivers Samba knows about. Your new one should be amongst them. In our
+example it is named <emphasis>dm9110</emphasis>. Note that the 3rd column
+shows the other installed drivers twice, for each supported architecture one
+time. Our new driver only shows up for
+<application>Windows NT 4.0 or 2000</application>. To
+have it present for <application>Windows 95, 98 and ME</application> you'll
+have to repeat the whole procedure with the WIN40 architecture and subdirectory.
</para></listitem>
+</itemizedlist>
+</sect3>
+
+<sect3>
+<title>A side note: you are not bound to specific driver names</title>
+
+<para>
+You can name the driver as you like. If you repeat the
+<command>adddriver</command> step, with the same files as before, but
+with a different driver name, it will work the same:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>rpcclient -Uroot%xxxx \
+ -c 'adddriver "Windows NT x86" \
+ "myphantasydrivername:HDNIS01_de.DLL: \
+ Hddm91c1_de.ppd:HDNIS01U_de.DLL:HDNIS01U_de.HLP: \
+ NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \
+ Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \
+ Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \
+ HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP' SAMBA-CUPS
+ </userinput>
+
+ cmd = adddriver "Windows NT x86"
+ "myphantasydrivername:HDNIS01_de.DLL:Hddm91c1_de.ppd:HDNIS01U_de.DLL:\
+ HDNIS01U_de.HLP:NULL:RAW:Hddm91c1_de.DLL,Hddm91c1_de.INI, \
+ Hddm91c1_de.dat,Hddm91c1_de.def,Hddm91c1_de.hre, \
+ Hddm91c1_de.vnd,Hddm91c1_de.hlp,Hddm91c1KMMin.DLL, \
+ HDNIS01Aux.dll,HDNIS01_de.NTF,Hddm91c1_de_reg.HLP"
+
+ Printer Driver myphantasydrivername successfully installed.
+
+</screen></para>
+
+<para>
+You will also be able to bind that driver to any print queue (however,
+you are responsible yourself that you associate drivers to queues
+which make sense to the target printer). Note, that you can't run the
+<command>rpcclient</command> <command>adddriver</command> command
+repeatedly. Each run "consumes" the files you had put into the
+<parameter>[print$]</parameter> share by moving them into the
+respective subdirectories. So you <emphasis>must</emphasis> precede an
+<command>smbclient ... put</command> command before each
+<command>rpcclient ... adddriver</command>" command.
+</para>
+</sect3>
+
+<sect3>
+<title>La Grande Finale: Running <command>rpcclient</command> with
+<command>setdriver</command></title>
+
+<para>
+Samba still needs to know <emphasis>which</emphasis> printer's driver
+this is. It needs to create a mapping of the driver to a printer, and
+store this info in its "memory", the TDB files. The <command>rpcclient
+setdriver</command> command achieves exactly this:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>rpcclient -U'root%xxxx' -c 'setdriver dm9110 myphantasydrivername' <replaceable>SAMBA-CUPS</replaceable></userinput>
+ cmd = setdriver dm9110 myphantasydrivername
+ Successfully set dm9110 to driver myphantasydrivername.
+</screen></para>
+
+<para>
+Ahhhhh -- no, I didn't want to do that. Repeat, this time with the
+name I intended:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>rpcclient -U'root%xxxx' -c 'setdriver dm9110 dm9110' <replaceable>SAMBA-CUPS</replaceable></userinput>
+ cmd = setdriver dm9110 dm9110
+ Successfully set dm9110 to driver dm9110.
+</screen></para>
+
+<para>
+The syntax of the command is <userinput>rpcclient
+-U'root%<replaceable>sambapassword</replaceable>' -c 'setdriver
+"<replaceable>printername</replaceable>"
+"<replaceable>drivername</replaceable>'
+<replaceable>SAMBA-Hostname</replaceable></userinput> . --
+Now we have done *most* of the work. But not yet all....
+</para>
+
+<note><para>
+the <command>setdriver</command> command will only succeed if the printer is
+known to
+Samba already. A bug in 2.2.x prevented Samba from recognizing freshly
+installed printers. You had to restart Samba, or at least send a HUP
+signal to all running smbd processes to work around this:
+<userinput>kill -HUP `pidof smbd`</userinput>. </para></note>
+</sect3>
+</sect2>
+</sect1>
+
+<sect1>
+<title>"The Proof of the Pudding lies in the Eating" (Client Driver Install
+Procedure)</title>
+
+<para>
+A famous philosopher said once: <quote>The Proof of the Pudding lies
+in the Eating</quote>. The proof for our setup lies in the printing.
+So let's install the printer driver onto the client PCs. This is not
+as straightforward as it may seem. Read on.
+</para>
+
+<sect2>
+<title>The first Client Driver Installation</title>
+
+<para>
+Especially important is the installation onto the first client PC (for
+each architectural platform separately). Once this is done correctly,
+all further clients are easy to setup and shouldn't need further
+attention. What follows is a description for the recommended first
+procedure. You work now from a client workstation. First you should
+guarantee that your connection is not unwittingly mapped to
+<parameter>bad user</parameter> "nobody". In a DOS box type:
+</para>
+
+<para><userinput>net use \\<replaceable>SAMBA-SERVER</replaceable>\print$ /user:root</userinput></para>
+
+<para>
+Replace root, if needed, by another valid
+<replaceable>printer admin</replaceable> user as given in the definition.
+Should you already be connected as a different user, you'll get an error
+message. There is no easy way to get rid of that connection, because
+Windows doesn't seem to know a concept of "logging off" from a share
+connection (don't confuse this with logging off from the local
+workstation; that is a different matter). You can try to close
+<emphasis>all</emphasis> Windows file explorer and Internet Explorer
+windows. As a last resort, you may have to reboot. Make sure there is
+no automatic re-connection set up. It may be easier to go to a
+different workstation and try from there. After you have made sure you
+are connected as a printer admin user (you can check this with the
+<command>smbstatus</command> command on Samba) do this from the
+Windows workstation:
+</para>
+
+<itemizedlist>
+<listitem><para>Open <guiicon>Network
+Neighbourhood</guiicon></para></listitem>
+
+<listitem><para>Browse to Samba server</para></listitem>
+
+<listitem><para>Open its <guiicon>Printers and
+Faxes</guiicon> folder</para></listitem>
+
+<listitem><para>Highlight and right-click the printer</para></listitem>
+
+<listitem><para>Select <guimenuitem>Connect...</guimenuitem> (for WinNT4/2K
+it is possibly <guimenuitem>Install...</guimenuitem>)</para></listitem>
+</itemizedlist>
+
+<para>
+A new printer (named <replaceable>printername</replaceable> on
+samba-server) should now have appeared in your
+<emphasis>local</emphasis> Printer folder (check <guimenu>Start</guimenu> --
+<guimenuitem>Settings</guimenuitem> -- <guimenuitem>Control Panel</guimenuitem>
+-- <guiicon>Printers and Faxes</guiicon>).
+</para>
+
+<para>
+Most likely you are now tempted to try and print a test page. After
+all, you now can open the printer properties and on the "General" tab,
+there is a button offering to do just that. But chances are that you
+get an error message saying <errorname>Unable to print Test
+Page</errorname>. The reason might be that there is not yet a
+valid Device Mode set for the driver, or that the "Printer Driver
+Data" set is still incomplete.
+</para>
+
+<para>
+You must now make sure that a valid "Device Mode" is set for the
+driver. Don't fear -- we will explain now what that means.
+</para>
+</sect2>
+
+<sect2>
+<title>IMPORTANT! Setting Device Modes on new Printers</title>
+
+<para>
+In order for a printer to be truly usable by a Windows NT/2K/XP
+client, it must possess:
+</para>
+
+<itemizedlist>
+<listitem><para>a valid <emphasis>Device Mode</emphasis> generated by
+the driver for the printer (defining things like paper size,
+orientation and duplex settings), and</para></listitem>
+
+<listitem><para>a complete set of
+<emphasis>Printer Driver Data</emphasis> generated by the
+driver.</para></listitem>
+</itemizedlist>
+
+<para>
+If either one of these is incomplete, the clients can produce less
+than optimal output at best. In the worst cases, unreadable garbage or
+nothing at all comes from the printer or they produce a harvest of
+error messages when attempting to print. Samba stores the named values
+and all printing related info in its internal TDB database files
+<filename>(ntprinters.tdb</filename>,
+<filename>ntdrivers.tdb</filename>, <filename>printing.tdb</filename>
+and <filename>ntforms.tdb</filename>).
+</para>
+
+<para>
+What do these two words stand for? Basically, the Device Mode and the
+set of Printer Driver Data is a collection of settings for all print
+queue properties, initialized in a sensible way. Device Modes and
+Printer Driver Data should initially be set on the print server (that is
+here: the Samba host) to healthy values so that the clients can start
+to use them immediately. How do we set these initial healthy values?
+This can be achieved by accessing the drivers remotely from an NT (or
+2k/XP) client, as is discussed in the next paragraphs.
+</para>
+
+<para>
+Be aware, that a valid Device Mode can only be initiated by a
+<parameter>printer admin</parameter>, or root (the reason should be
+obvious). Device Modes can only correctly be set by executing the
+printer driver program itself. Since Samba can not execute this Win32
+platform driver code, it sets this field initially to NULL (which is
+not a valid setting for clients to use). Fortunately, most drivers
+generate themselves the Printer Driver Data that is needed, when they
+are uploaded to the <parameter>[print$]</parameter> share with the
+help of the APW or rpcclient.
+</para>
+
+<para>
+The generation and setting of a first valid Device Mode however
+requires some "tickling" from a client, to set it on the Samba
+server. The easiest means of doing so is to simply change the page
+orientation on the server's printer. This "executes" enough of the
+printer driver program on the client for the desired effect to happen,
+and feeds back the new Device Mode to our Samba server. You can use the
+native Windows NT/2K/XP printer properties page from a Window client
+for this:
+</para>
+
+<itemizedlist>
+ <listitem><para>Browse the <guiicon>Network Neighbourhood</guiicon></para></listitem>
+
+<listitem><para>Find the Samba server</para></listitem>
+
+<listitem><para>Open the Samba server's <guiicon>Printers and
+ Faxes</guiicon> folder</para></listitem>
+
+<listitem><para>Highlight the shared printer in question</para></listitem>
+
+<listitem><para>Right-click the printer (you may already be here, if you
+followed the last section's description)</para></listitem>
+
+<listitem><para>At the bottom of the context menu select
+<guimenu>Properties....</guimenu> (if the menu still offers the
+<guimenuitem>Connect...</guimenuitem> entry
+further above, you need to click that one first to achieve the driver
+installation as shown in the last section)</para></listitem>
+
+<listitem><para>Go to the <guilabel>Advanced</guilabel> tab; click on
+<guibutton>Printing Defaults...</guibutton></para></listitem>
+
+<listitem><para>Change the "Portrait" page setting to "Landscape" (and
+back)</para></listitem>
+
+<listitem><para>(Oh, and make sure to <emphasis>apply</emphasis>
+changes between swapping the page orientation to cause the change to
+actually take effect...).</para></listitem>
+
+<listitem><para>While you're at it, you may optionally also want to
+set the desired printing defaults here, which then apply to all future
+client driver installations on the remaining from now
+on.</para></listitem>
+</itemizedlist>
+
+<para>
+This procedure has executed the printer driver program on the client
+platform and fed back the correct Device Mode to Samba, which now
+stored it in its TDB files. Once the driver is installed on the
+client, you can follow the analogous steps by accessing the
+<emphasis>local</emphasis> <guiicon>Printers</guiicon> folder too if you are
+a Samba printer admin user. From now on printing should work as expected.
+</para>
+
+<para>
+Samba also includes a service level parameter name <parameter>default
+devmode</parameter> for generating a default Device Mode for a
+printer. Some drivers will function well with Samba's default set of
+properties. Others may crash the client's spooler service. So use this
+parameter with caution. It is always better to have the client
+generate a valid device mode for the printer and store it on the
+server for you.
+</para>
+</sect2>
+
+<sect2>
+<title>Further Client Driver Install Procedures</title>
+
+<para>
+Every further driver may be done by any user, along the lines
+described above: Browse network, open printers folder on Samba server,
+right-click printer and choose <guimenuitem>Connect...</guimenuitem>. Once
+this completes (should be not more than a few seconds, but could also take
+a minute, depending on network conditions), you should find the new printer in
+your client workstation local <guiicon>Printers and
+Faxes</guiicon> folder.
+</para>
+
+<para>
+You can also open your local <guiicon>Printers and Faxes</guiicon> folder by
+using this command on Windows 2000 and Windows XP Professional workstations:
+</para>
+
+<para><userinput>rundll32 shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder
+</userinput></para>
+
+<para>
+or this command on Windows NT 4.0 workstations:
+</para>
+
+<para><userinput>
+rundll32 shell32.dll,Control_RunDLL MAIN.CPL @2
+</userinput></para>
+
+<para>
+You can enter the commands either inside a <guilabel>DOS box</guilabel> window
+or in the <guimenuitem>Run command...</guimenuitem> field from the
+<guimenu>Start</guimenu> menu.
+</para>
+</sect2>
+
+<sect2>
+<title>Always make first Client Connection as root or "printer admin"</title>
+
+<para>
+After you installed the driver on the Samba server (in its
+<parameter>[print$]</parameter> share, you should always make sure
+that your first client installation completes correctly. Make it a habit for
+yourself to build that the very first connection from a client as
+<parameter>printer admin</parameter>. This is to make sure that:
+</para>
+
+<itemizedlist>
+
+<listitem><para> a first valid <emphasis>Device Mode</emphasis> is
+really initialized (see above for more explanation details), and
+that</para></listitem>
+
+<listitem><para> the default print settings of your printer for all
+further client installations are as you want them</para></listitem>
+</itemizedlist>
+
+<para>
+Do this by changing the orientation to landscape, click
+<emphasis>Apply</emphasis>, and then change it back again. Then modify
+the other settings (for example, you don't want the default media size
+set to <emphasis>Letter</emphasis>, when you are all using
+<emphasis>A4</emphasis>, right? You may want to set the printer for
+<emphasis>duplex</emphasis> as the default; etc.).
+</para>
+
+<para>
+To connect as root to a Samba printer, try this command from a Windows
+2K/XP DOS box command prompt:
+</para>
+
+<para><userinput>runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /p /t3 /n \\<replaceable>SAMBA-SERVER</replaceable>\<replaceable>printername</replaceable>"</userinput>
+</para>
+
+<para>
+You will be prompted for root's Samba-password; type it, wait a few
+seconds, click on <guibutton>Printing Defaults...</guibutton> and
+proceed to set the job options as should be used as defaults by all
+clients. Alternatively, instead of root you can name one other member
+of the <parameter>printer admins</parameter> from the setting.
+</para>
+
+<para>
+Now all the other users downloading and installing the driver
+the same way (called <emphasis>Point'n'Print</emphasis>) will
+have the same defaults set for them. If you miss this step you'll
+get a lot of helpdesk calls from your users. But maybe you like to
+talk to people.... ;-)
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Other Gotchas</title>
+
+<para>
+Your driver is installed. It is ready for
+<emphasis>Point'n'Print</emphasis> installation by the clients
+now. You <emphasis>may</emphasis> have tried to download and use it
+onto your first client machine now. But wait... let's make you
+acquainted first with a few tips and tricks you may find useful. For
+example, suppose you didn't manage to "set the defaults" on the
+printer, as advised in the preceding paragraphs? And your users
+complain about various issues (such as <quote>We need to set the paper
+size for each job from Letter to A4 and it won't store it!</quote>)
+</para>
+
+<sect2>
+<title>Setting Default Print Options for the Client Drivers</title>
+
+<para>
+The last sentence might be viewed with mixed feelings by some users and
+admins. They have struggled for hours and hours and couldn't arrive at
+a point were their settings seemed to be saved. It is not their
+fault. The confusing thing is this: in the multi-tabbed dialog that pops
+up when you right-click the printer name and select
+<guimenuitem>Properties...</guimenuitem>, you can arrive at two identically
+looking dialogs, each claiming that they help you to set printer options,
+in three different ways. Here is the definite answer to the "Samba
+Default Driver Setting FAQ":
+</para>
+
+<formalpara><title><quote>I can't set and save default print options
+for all users on Win2K/XP! Why not?</quote></title>
+
+<para>
+How are you doing it? I bet the wrong way.... (it is not very
+easy to find out, though). There are 3 different ways to bring you to
+a dialog that <emphasis>seems</emphasis> to set everything. All three
+dialogs <emphasis>look</emphasis> the same. Only one of them
+<emphasis>does</emphasis> what you intend.
+<emphasis>Important:</emphasis> you need to be Administrator or Print
+Administrator to do this for all users. Here is how I reproduce it in
+on XP Professional:
+
+<orderedlist numeration="upperalpha">
+
+<listitem><para>The first "wrong" way:
+
+<orderedlist numeration="arabic">
+<listitem><para>Open the <guiicon>Printers</guiicon>
+folder.</para></listitem>
+
+<listitem><para>Right-click on the printer
+(<emphasis>remoteprinter on cupshost</emphasis>) and
+select in context menu <guimenu>Printing
+Preferences...</guimenu></para></listitem>
+
+<listitem><para>Look at this dialog closely and remember what it looks
+like.</para></listitem>
+</orderedlist>
+</para>
+</listitem>
+
+<listitem><para>The second "wrong" way:
+
+<orderedlist numeration="arabic">
+ <listitem><para>Open the <guimenu>Printers</guimenu>
+folder.</para></listitem>
+
+<listitem><para>Right-click on the printer (<emphasis>remoteprinter on
+cupshost</emphasis>) and select in the context menu
+<guimenuitem>Properties</guimenuitem></para></listitem>
+
+<listitem><para>Click on the <guilabel>General</guilabel>
+tab</para></listitem>
+
+<listitem><para>Click on the button <guibutton>Printing
+Preferences...</guibutton></para></listitem>
+
+<listitem><para>A new dialog opens. Keep this dialog open and go back
+to the parent dialog.</para></listitem>
+</orderedlist>
+</para>
+</listitem>
+
+<listitem><para>The third, the "correct" way: (should you do
+this from the beginning, just carry out steps 1. and 2. from second
+"way" above)
+
+<orderedlist numeration="arabic">
+<listitem><para>Click on the <guilabel>Advanced</guilabel>
+tab. (Hmmm... if everything is "Grayed Out", then you are not logged
+in as a user with enough privileges).</para></listitem>
+
+<listitem><para>Click on the <guibutton>Printing
+Defaults...</guibutton> button.</para></listitem>
+
+<listitem><para>On any of the two new tabs, click on the
+<guilabel>Advanced...</guilabel> button.</para></listitem>
+
+<listitem><para>A new dialog opens. Compare this one to the other,
+identical looking one from "B.5" or A.3".</para></listitem>
+</orderedlist>
+</para>
+</listitem>
</orderedlist>
+Do you see any difference in the two settings dialogs? I don't
+either. However, only the last one, which you arrived at with steps
+C.1.-6. will permanently save any settings which will then become the
+defaults for new users. If you want all clients to have the same
+defaults, you need to conduct these steps as administrator
+(<parameter>printer admin</parameter> in )
+<emphasis>before</emphasis> a client downloads the driver (the clients
+can later set their own <emphasis>per-user defaults</emphasis> by
+following the procedures <emphasis>A.</emphasis>
+or <emphasis>B.</emphasis> above...). (This is new: Windows 2000 and
+Windows XP allow <emphasis>per-user</emphasis> default settings and
+the ones the administrator gives them, before they set up their own).
+The "parents" of the identically looking dialogs have a slight
+difference in their window names: one is called
+<computeroutput>Default Print Values for Printer Foo on Server
+Bar"</computeroutput> (which is the one you need) and the other is
+called "<computeroutput>Print Settings for Printer Foo on Server
+Bar</computeroutput>". The last one is the one you arrive at when you
+right-click on the printer and select <guimenuitem>Print
+Settings...</guimenuitem>. This is the one what you were
+taught to use back in the days of Windows NT! So it is only natural to
+try the same way with Win2k or WinXP. You wouldn't dream
+that there is now a different "clicking path" to arrive at an
+identically looking, but functionally different dialog to set defaults
+for all users!
+</para></formalpara>
+
+<tip><para>Try (on Win2000 and WinXP) to run this command (as a user
+with the right privileges):
+</para>
+
+<para><userinput>
+rundll32 printui.dll,PrintUIEntry /p /t3 /n\\<replaceable>SAMBA-SERVER</replaceable>\<replaceable>printersharename</replaceable>
+</userinput></para>
+
+<para>
+to see the tab with the <guilabel>Printing Defaults...</guilabel>
+button (the one you need). Also run this command:
+</para>
+
+<para><userinput>
+rundll32 printui.dll,PrintUIEntry /p /t0 /n\\<replaceable>SAMBA-SERVER</replaceable>\<replaceable>printersharename</replaceable>
+</userinput></para>
+
+<para>
+to see the tab with the <guilabel>Printing Preferences...</guilabel>
+button (the one which doesn't set system-wide defaults). You can
+start the commands from inside a DOS box" or from the <guimenu>Start</guimenu>
+-- <guimenuitem>Run...</guimenuitem> menu.
+</para>
+</tip>
+
</sect2>
<sect2>
-<title>Job sent, no output</title>
+<title>Supporting large Numbers of Printers</title>
<para>
-This is the most frustrating part of printing. You may have sent the
-job, verified that the job was forwarded, set up a wrapper around
-the command to send the file, but there was no output from the printer.
+One issue that has arisen during the recent development phase of Samba
+is the need to support driver downloads for 100's of printers. Using
+Windows NT APW here is somewhat awkward (to say the least). If you
+don't want to acquire RSS pains from such the printer installation
+clicking orgy alone, you need to think about a non-interactive script.
</para>
<para>
-First, check to make sure that the job REALLY is getting to the
-right print queue. If you are using a BSD or LPRng print spooler,
-you can temporarily stop the printing of jobs. Jobs can still be
-submitted, but they will not be printed. Use:
+If more than one printer is using the same driver, the
+<command>rpcclient setdriver</command> command can be used to set the
+driver associated with an installed queue. If the driver is uploaded
+to <parameter>[print$]</parameter> once and registered with the
+printing TDBs, it can be used by multiple print queues. In this case
+you just need to repeat the <command>setprinter</command> subcommand
+of <command>rpcclient</command> for every queue (without the need to
+conduct the <command>adddriver</command> again and again). The
+following is an example of how this could be accomplished:
</para>
-<para><programlisting>
- lpc -Pprinter stop
-</programlisting></para>
+<para><screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'enumdrivers'</userinput>
+ cmd = enumdrivers
+
+ [Windows NT x86]
+ Printer Driver Info 1:
+ Driver Name: [infotec IS 2075 PCL 6]
+
+ Printer Driver Info 1:
+ Driver Name: [DANKA InfoStream]
+
+ Printer Driver Info 1:
+ Driver Name: [Heidelberg Digimaster 9110 (PS)]
+
+ Printer Driver Info 1:
+ Driver Name: [dm9110]
+
+ Printer Driver Info 1:
+ Driver Name: [myphantasydrivername]
+
+ [....]
+</screen>
+
+<screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'enumprinters'</userinput>
+ cmd = enumprinters
+ flags:[0x800000]
+ name:[\\SAMBA-CUPS\dm9110]
+ description:[\\SAMBA-CUPS\dm9110,,110ppm HiVolume DANKA Stuttgart]
+ comment:[110 ppm HiVolume DANKA Stuttgart]
+ [....]
+</screen>
+
+<screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'setdriver <replaceable>dm9110</replaceable> "<replaceable>Heidelberg Digimaster 9110 (PS)</replaceable>"'</userinput>
+ cmd = setdriver dm9110 Heidelberg Digimaster 9110 (PPD)
+ Successfully set dm9110 to driver Heidelberg Digimaster 9110 (PS).
+</screen>
+
+<screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'enumprinters'</userinput>
+ cmd = enumprinters
+ flags:[0x800000]
+ name:[\\SAMBA-CUPS\dm9110]
+ description:[\\SAMBA-CUPS\dm9110,Heidelberg Digimaster 9110 (PS),110ppm HiVolume DANKA Stuttgart]
+ comment:[110ppm HiVolume DANKA Stuttgart]
+ [....]
+</screen>
+
+<screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'setdriver <replaceable>dm9110</replaceable> <replaceable>myphantasydrivername</replaceable>'</userinput>
+ cmd = setdriver dm9110 myphantasydrivername
+ Successfully set dm9110 to myphantasydrivername.
+</screen>
+
+<screen>
+&rootprompt;<userinput>rpcclient <replaceable>SAMBA-CUPS</replaceable> -U root%<replaceable>secret</replaceable> -c 'enumprinters'</userinput>
+ cmd = enumprinters
+ flags:[0x800000]
+ name:[\\SAMBA-CUPS\dm9110]
+ description:[\\SAMBA-CUPS\dm9110,myphantasydrivername,110ppm HiVolume DANKA Stuttgart]
+ comment:[110ppm HiVolume DANKA Stuttgart]
+ [....]
+</screen></para>
<para>
-Now submit a print job and then use 'lpq -Pprinter' to see if the
-job is in the print queue. If it is not in the print queue then
-you will have to find out why it is not being accepted for printing.
+It may be not easy to recognize: but the first call to
+<command>enumprinters</command> showed the "dm9110" printer with an
+empty string where the driver should have been listed (between the 2
+commas in the "description" field). After the
+<command>setdriver</command> command succeeded, all is well. (The
+CUPS Printing chapter has more info about the installation of printer
+drivers with the help of <command>rpcclient</command>).
</para>
+</sect2>
+
+<sect2>
+<title>Adding new Printers with the Windows NT APW</title>
<para>
-Next, you may want to check to see what the format of the job really
-was. With the assistance of the system administrator you can view
-the submitted jobs files. You may be surprised to find that these
-are not in what you would expect to call a printable format.
-You can use the UNIX 'file' utitily to determine what the job
-format actually is:
+By default, Samba exhibits all printer shares defined in
+&smb.conf; in the
+<guiicon>Printers...</guiicon> folder. Also located in this folder
+is the Windows NT Add Printer Wizard icon. The APW will be shown only
+if:
</para>
-<para><programlisting>
- cd /var/spool/lpd/printer # spool directory of print jobs
- ls # find job files
- file dfA001myhost
-</programlisting></para>
+<itemizedlist>
+<listitem><para>...the connected user is able to successfully execute
+an <command>OpenPrinterEx(\\server)</command> with administrative
+privileges (i.e. root or <parameter>printer admin</parameter>).
+</para>
+
+<tip><para> Try this from a Windows 2K/XP DOS box command prompt:
+</para>
+
+<para><userinput>
+runas /netonly /user:root rundll32 printui.dll,PrintUIEntry /p /t0 /n \\<replaceable>SAMBA-SERVER</replaceable>\<replaceable>printersharename</replaceable>
+</userinput></para>
+
+<para>
+and click on <guibutton>Printing Preferences...</guibutton>
+</para></tip></listitem>
+
+<listitem><para>... contains the setting
+<parameter>show add printer wizard = yes</parameter> (the
+default).</para></listitem>
+</itemizedlist>
+
+<para>
+The APW can do various things:
+</para>
+
+<itemizedlist>
+<listitem><para>upload a new driver to the Samba
+<parameter>[print$]</parameter> share;</para></listitem>
+
+<listitem><para>associate an uploaded driver with an existing (but
+still "driverless") print queue;</para></listitem>
+
+<listitem><para>exchange the currently used driver for an existing
+print queue with one that has been uploaded before;</para></listitem>
+
+<listitem><para>add an entirely new printer to the Samba host (only in
+conjunction with a working <parameter>add printer command</parameter>;
+a corresponding <parameter>delete printer command</parameter> for
+removing entries from the <guiicon>Printers...</guiicon> folder
+may be provided too)</para></listitem>
+</itemizedlist>
<para>
-You should make sure that your printer supports this format OR that
-your system administrator has installed a 'print filter' that will
-convert the file to a format appropriate for your printer.
+The last one (add a new printer) requires more effort than the
+previous ones. In order to use the APW to successfully add a printer
+to a Samba server, the <parameter>add printer command</parameter> must
+have a defined value. The program hook must successfully add the
+printer to the Unix print system (i.e. to
+<filename>/etc/printcap</filename>,
+<filename>/etc/cups/printers.conf</filename> or other appropriate
+files) and to if necessary.
</para>
+<para>
+When using the APW from a client, if the named printer share does not
+exist, smbd will execute the <parameter>add printer
+command</parameter> and reparse to the
+to attempt to locate the new printer share. If the share is still not
+defined, an error of <errorname>Access Denied</errorname> is
+returned to the client. Note that the <parameter>add printer
+command</parameter> is executed under the context of the connected
+user, not necessarily a root account. A <parameter>map to guest = bad
+user</parameter> may have connected you unwittingly under the wrong
+privilege; you should check it by using the
+<command>smbstatus</command> command.
+</para>
</sect2>
<sect2>
-<title>Job sent, strange output</title>
+<title>Weird Error Message <errorname>Cannot connect under a
+different Name</errorname></title>
<para>
-Once you have the job printing, you can then start worrying about
-making it print nicely.
+Once you are connected with the wrong credentials, there is no means
+to reverse the situation other than to close all Explorer windows, and
+perhaps reboot.
</para>
+<itemizedlist>
+<listitem><para>The <command>net use \\SAMBA-SERVER\sharename
+/user:root</command> gives you an error message: <computeroutput>Multiple
+connections to a server or a shared resource by the same user
+utilizing the several user names are not allowed. Disconnect all
+previous connections to the server, resp. the shared resource, and try
+again.</computeroutput></para></listitem>
+
+<listitem><para>Every attempt to "connect a network drive" to
+<filename>\\SAMBASERVER\\print$</filename> to z: is countered by the
+pertinacious message. <computeroutput>This network folder is currently
+connected under different credentials (username and password).
+Disconnect first any existing connection to this network share in
+order to connect again under a different username and
+password</computeroutput>.</para></listitem>
+</itemizedlist>
+
<para>
-The most common problem is extra pages of output: banner pages
-OR blank pages at the end.
+So you close all connections. You try again. You get the same
+message. You check from the Samba side, using
+<command>smbstatus</command>. Yes, there are some more
+connections. You kill them all. The client still gives you the same
+error message. You watch the smbd.log file on a very high debug level
+and try re-connect. Same error message, but not a single line in the
+log. You start to wonder if there was a connection attempt at all. You
+run ethereal and tcpdump while you try to connect. Result: not a
+single byte goes on the wire. Windows still gives the error
+message. You close all Explorer Windows and start it again. You try to
+connect - and this times it works! Windows seems to cache connection
+info somewhere and doesn't keep it up to date (if you are unlucky you
+might need to reboot to get rid of the error message).
</para>
+</sect2>
+
+<sect2>
+<title>Be careful when assembling Driver Files</title>
<para>
-If you are getting banner pages, check and make sure that the
-printcap option or printer option is configured for no banners.
-If you have a printcap, this is the :sh (suppress header or banner
-page) option. You should have the following in your printer.
+You need to be very careful when you take notes about the files and
+belonging to a particular driver. Don't confuse the files for driver
+version "0" (for Win95/98/ME, going into
+<filename>[print$]/WIN/0/</filename>), driver version "2" (Kernel Mode
+driver for WinNT, going into <filename>[print$]/W32X86/2/</filename>
+<emphasis>may</emphasis> be used on Win2K/XP too), and driver version
+"3" (non-Kernel Mode driver going into
+<filename>[print$]/W32X86/3/</filename> <emphasis>can not</emphasis>
+be used on WinNT). Very often these different driver versions contain
+files carrying the same name; but still the files are very different!
+Also, if you look at them from the Windows Explorer (they reside in
+<filename>%WINDOWS%\system32\spool\drivers\W32X86\</filename>) you
+will probably see names in capital letters, while an "enumdrivers"
+command from Samba would show mixed or lower case letters. So it is
+easy to confuse them. If you install them manually using
+<command>rpcclient</command> and subcommands, you may even succeed
+without an error message. Only later, when you try install on a
+client, you will encounter error messages like <computeroutput>This
+server has no appropriate driver for the printer</computeroutput>.
</para>
-<para><programlisting>
- printer: ... :sh
-</programlisting></para>
+<para>
+Here is an example. You are invited to look very closely at the
+various files, compare their names and their spelling, and discover
+the differences in the composition of the version-2 and -3 sets
+Note: the version-0 set contained 40 (!)
+<parameter>Dependentfiles</parameter>, so I left it out for space
+reasons:
+</para>
+
+<para><screen>
+&rootprompt;<userinput>rpcclient -U 'Administrator%<replaceable>secret</replaceable>' -c 'enumdrivers 3' 10.160.50.8 </userinput>
+
+ Printer Driver Info 3:
+ Version: [3]
+ Driver Name: [Canon iR8500 PS3]
+ Architecture: [Windows NT x86]
+ Driver Path: [\\10.160.50.8\print$\W32X86\3\cns3g.dll]
+ Datafile: [\\10.160.50.8\print$\W32X86\3\iR8500sg.xpd]
+ Configfile: [\\10.160.50.8\print$\W32X86\3\cns3gui.dll]
+ Helpfile: [\\10.160.50.8\print$\W32X86\3\cns3g.hlp]
+
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aucplmNT.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\ucs32p.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\tnl32.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aussdrv.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cnspdc.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\aussapi.dat]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cns3407.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\CnS3G.cnt]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\NBAPI.DLL]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\NBIPC.DLL]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcview.exe]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcdspl.exe]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcedit.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcqm.exe]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcspl.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cfine32.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcr407.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\Cpcqm407.hlp]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cpcqm407.cnt]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\3\cns3ggr.dll]
+
+ Monitorname: []
+ Defaultdatatype: []
+
+ Printer Driver Info 3:
+ Version: [2]
+ Driver Name: [Canon iR5000-6000 PS3]
+ Architecture: [Windows NT x86]
+ Driver Path: [\\10.160.50.8\print$\W32X86\2\cns3g.dll]
+ Datafile: [\\10.160.50.8\print$\W32X86\2\IR5000sg.xpd]
+ Configfile: [\\10.160.50.8\print$\W32X86\2\cns3gui.dll]
+ Helpfile: [\\10.160.50.8\print$\W32X86\2\cns3g.hlp]
+
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\AUCPLMNT.DLL]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\aussdrv.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cnspdc.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\aussapi.dat]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cns3407.dll]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\CnS3G.cnt]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\NBAPI.DLL]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\NBIPC.DLL]
+ Dependentfiles: [\\10.160.50.8\print$\W32X86\2\cns3gum.dll]
+
+ Monitorname: [CPCA Language Monitor2]
+ Defaultdatatype: []
+
+</screen></para>
<para>
-If you have this option and are still getting banner pages, there
-is a strong chance that your printer is generating them for you
-automatically. You should make sure that banner printing is disabled
-for the printer. This usually requires using the printer setup software
-or procedures supplied by the printer manufacturer.
+If we write the "version 2" files and the "version 3" files
+into different text files and compare the result, we see this
+picture:
</para>
+<para><screen>
+&rootprompt;<userinput>sdiff 2-files 3-files</userinput>
+
+<![CDATA[
+ cns3g.dll cns3g.dll
+ iR8500sg.xpd iR8500sg.xpd
+ cns3gui.dll cns3gui.dll
+ cns3g.hlp cns3g.hlp
+ AUCPLMNT.DLL | aucplmNT.dll
+ > ucs32p.dll
+ > tnl32.dll
+ aussdrv.dll aussdrv.dll
+ cnspdc.dll cnspdc.dll
+ aussapi.dat aussapi.dat
+ cns3407.dll cns3407.dll
+ CnS3G.cnt CnS3G.cnt
+ NBAPI.DLL NBAPI.DLL
+ NBIPC.DLL NBIPC.DLL
+ cns3gum.dll | cpcview.exe
+ > cpcdspl.exe
+ > cpcqm.exe
+ > cpcspl.dll
+ > cfine32.dll
+ > cpcr407.dll
+ > Cpcqm407.hlp
+ > cpcqm407.cnt
+ > cns3ggr.dll
+]]>
+</screen></para>
+
<para>
-If you get an extra page of output, this could be due to problems
-with your job format, or if you are generating PostScript jobs,
-incorrect setting on your printer driver on the MicroSoft client.
-For example, under Win95 there is a option:
+Don't be fooled though! Driver files for each version with identical
+names may be different in their content, as you can see from this size
+comparison:
</para>
-<para><programlisting>
- Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|
-</programlisting></para>
+<para><screen>
+&rootprompt;<userinput>for i in cns3g.hlp cns3gui.dll cns3g.dll; do \
+ smbclient //10.160.50.8/print\$ -U 'Administrator%xxxx' \
+ -c "cd W32X86/3; dir $i; cd .. ; cd 2; dir $i"; \
+ done</userinput>
+
+ CNS3G.HLP A 122981 Thu May 30 02:31:00 2002
+ CNS3G.HLP A 99948 Thu May 30 02:31:00 2002
+
+ CNS3GUI.DLL A 1805824 Thu May 30 02:31:00 2002
+ CNS3GUI.DLL A 1785344 Thu May 30 02:31:00 2002
+
+ CNS3G.DLL A 1145088 Thu May 30 02:31:00 2002
+ CNS3G.DLL A 15872 Thu May 30 02:31:00 2002
+
+</screen></para>
+
+<para>
+In my example were even more differences than shown here. Conclusion:
+you must be very careful to select the correct driver files for each
+driver version. Don't rely on the names alone. Don't interchange files
+belonging to different driver versions.
+</para>
+</sect2>
+
+<sect2>
+<title>Samba and Printer Ports</title>
+
+<para>
+Windows NT/2000 print servers associate a port with each
+printer. These normally take the form of <filename>LPT1:</filename>,
+<filename>COM1:</filename>, <filename>FILE:</filename>, etc. Samba
+must also support the concept of ports associated with a printer. By
+default, only one printer port, named "Samba Printer Port", exists on
+a system. Samba does not really need such a "port" in order to print;
+it rather is a requirement of Windows clients. They insist on being
+told about an available port when they request this info, otherwise
+they throw an error message at you. So Samba fakes the port
+information to keep the Windows clients happy.
+</para>
+
+<para>
+Note that Samba does not support the concept of "Printer Pooling"
+internally either. Printer Pooling assigns a logical printer to
+multiple ports as a form of load balancing or fail over.
+</para>
+
+<para>
+If you require that multiple ports be defined for some reason or
+another (<quote>My users and my Boss should not know that they are
+working with Samba</quote>), possesses a
+<parameter>enumports command</parameter> which can be used to define
+an external program that generates a listing of ports on a system.
+</para>
+</sect2>
+
+<sect2>
+<title>Avoiding the most common Misconfigurations of the Client Driver</title>
+
+<para>
+So - printing works, but there are still problems. Most jobs print
+well, some don't print at all. Some jobs have problems with fonts,
+which don't look good at all. Some jobs print fast, and some are
+dead-slow. We can't cover it all; but we want to encourage you to read
+the little paragraph about "Avoiding the wrong PostScript Driver
+Settings" in the CUPS Printing part of this document.
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>The Imprints Toolset</title>
+
+<para>
+The Imprints tool set provides a UNIX equivalent of the
+Windows NT Add Printer Wizard. For complete information, please
+refer to the Imprints web site
+at<ulink url="http://imprints.sourceforge.net/">http://imprints.sourceforge.net/</ulink>
+as well as the documentation included with the imprints source
+distribution. This section will only provide a brief introduction
+to the features of Imprints.
+</para>
+
+<formalpara><title>Attention! Maintainer required</title>
+
+<para>
+Unfortunately, the Imprints toolset is no longer maintained. As of
+December, 2000, the project is in need of a new maintainer. The most
+important skill to have is decent perl coding and an interest in
+MS-RPC based printing using Samba. If you wish to volunteer, please
+coordinate your efforts on the samba-technical mailing list. The
+toolset is still in usable form; but only for a series of older
+printer models, where there are prepared packages to use. Packages for
+more up to date print devices are needed if Imprints should have a
+future.</para></formalpara>
+
+<sect2>
+<title>What is Imprints?</title>
<para>
-that allows you to choose if a Ctrl-D is appended to all jobs.
-This is a very bad thing to do, as most spooling systems will
-automatically add a ^D to the end of the job if it is detected as
-PostScript. The multiple ^D may cause an additional page of output.
+Imprints is a collection of tools for supporting these goals:
</para>
+<itemizedlist>
+<listitem><para>Providing a central repository information regarding
+Windows NT and 95/98 printer driver packages</para></listitem>
+
+<listitem><para>Providing the tools necessary for creating the
+Imprints printer driver packages.</para></listitem>
+
+<listitem><para>Providing an installation client which will obtain
+printer drivers from a central internet (or intranet) Imprints Server
+repository and install them on remote Samba and Windows NT4 print
+servers.</para></listitem>
+</itemizedlist>
</sect2>
<sect2>
-<title>Raw PostScript printed</title>
+<title>Creating Printer Driver Packages</title>
<para>
-This is a problem that is usually caused by either the print spooling
-system putting information at the start of the print job that makes
-the printer think the job is a text file, or your printer simply
-does not support PostScript. You may need to enable 'Automatic
-Format Detection' on your printer.
+The process of creating printer driver packages is beyond the scope of
+this document (refer to Imprints.txt also included with the Samba
+distribution for more information). In short, an Imprints driver
+package is a gzipped tarball containing the driver files, related INF
+files, and a control file needed by the installation client.
</para>
+</sect2>
+
+<sect2>
+<title>The Imprints Server</title>
+<para>
+The Imprints server is really a database server that may be queried
+via standard HTTP mechanisms. Each printer entry in the database has
+an associated URL for the actual downloading of the package. Each
+package is digitally signed via GnuPG which can be used to verify that
+package downloaded is actually the one referred in the Imprints
+database. It is strongly recommended that this security check
+<emphasis>not</emphasis> be disabled.
+</para>
</sect2>
<sect2>
-<title>Advanced Printing</title>
+<title>The Installation Client</title>
+
+<para>
+More information regarding the Imprints installation client is
+available in the <filename>Imprints-Client-HOWTO.ps</filename> file
+included with the imprints source package.
+</para>
+
+<para>
+The Imprints installation client comes in two forms.
+</para>
+<itemizedlist>
+<listitem><para>a set of command line Perl scripts</para></listitem>
+
+<listitem><para>a GTK+ based graphical interface to the command line Perl
+scripts</para></listitem>
+</itemizedlist>
+
+<para>
+The installation client (in both forms) provides a means of querying
+the Imprints database server for a matching list of known printer
+model names as well as a means to download and install the drivers on
+remote Samba and Windows NT print servers.
+</para>
+
+<para>
+The basic installation process is in four steps and perl code is
+wrapped around smbclient and rpcclient
+</para>
+
+<itemizedlist>
+ <listitem><para>
+ foreach (supported architecture for a given driver)
+ <orderedlist>
+ <listitem><para>rpcclient: Get the appropriate upload directory on the remote server</para></listitem>
+ <listitem><para>smbclient: Upload the driver files</para></listitem>
+ <listitem><para>rpcclient: Issues an AddPrinterDriver() MS-RPC</para></listitem>
+ </orderedlist>
+ </para></listitem>
+
+ <listitem><para>rpcclient: Issue an AddPrinterEx() MS-RPC to actually create the printer</para></listitem>
+</itemizedlist>
+
+<para>
+One of the problems encountered when implementing the Imprints tool
+set was the name space issues between various supported client
+architectures. For example, Windows NT includes a driver named "Apple
+LaserWriter II NTX v51.8" and Windows 95 calls its version of this
+driver "Apple LaserWriter II NTX"
+</para>
+
+<para>
+The problem is how to know what client drivers have been uploaded for
+a printer. An astute reader will remember that the Windows NT Printer
+Properties dialog only includes space for one printer driver name. A
+quick look in the Windows NT 4.0 system registry at
+</para>
+
+<para><filename>
+ HKLM\System\CurrentControlSet\Control\Print\Environment
+</filename></para>
+
+<para>
+will reveal that Windows NT always uses the NT driver name. This is
+ok as Windows NT always requires that at least the Windows NT version
+of the printer driver is present. However, Samba does not have the
+requirement internally. Therefore, how can you use the NT driver name
+if is has not already been installed?
+</para>
+
+<para>
+The way of sidestepping this limitation is to require that all
+Imprints printer driver packages include both the Intel Windows NT and
+95/98 printer drivers and that NT driver is installed first.
+</para>
+</sect2>
+</sect1>
+
+<sect1>
+<title>Add Network Printers at Logon without User Interaction</title>
+
+<para>
+The following MS Knowledge Base article may be of some help if you
+need to handle Windows 2000 clients: <emphasis>How to Add Printers
+with No User Interaction in Windows 2000.</emphasis> ( <ulink
+url="http://support.microsoft.com/default.aspx?scid=kb;en-us;189105">http://support.microsoft.com/default.aspx?scid=kb;en-us;189105</ulink>
+). It also applies to Windows XP Professional clients.
+</para>
+
+<para>
+The ideas sketched out below are inspired by this article. It
+describes a commandline method which can be applied to install
+network and local printers and their drivers. This is most useful
+if integrated in Logon Scripts. You can see what options are
+available by typing in a command prompt ("DOS box") this:
+</para>
+
+<para><userinput>rundll32 printui.dll,PrintUIEntry /?</userinput></para>
+
+<para>
+A window pops up which shows you all of the commandline switches
+available. An extensive list of examples is also provided. This is
+only for Win 2k/XP. It doesn't work on WinNT. WinNT has probably some
+other tools in the respective Resource Kit. Here is a suggestion about
+what a client logon script might contain, with a short explanation of
+what the lines actually do (it works if 2k/XP Windows clients access
+printers via Samba, but works for Windows-based print servers too):
+</para>
+
+<para><screen>
+<userinput>rundll32 printui.dll,PrintUIEntry /dn /n "\\sambacupsserver\infotec2105-IPDS" /q</userinput>
+<userinput>rundll32 printui.dll,PrintUIEntry /in /n "\\sambacupsserver\infotec2105-PS"</userinput>
+<userinput>rundll32 printui.dll,PrintUIEntry /y /n "\\sambacupsserver\infotec2105-PS"</userinput>
+</screen></para>
+
+<para>
+Here is a list of the used commandline parameters:
+</para>
+
+<variablelist>
+<varlistentry><term>/dn</term>
+<listitem><para>deletes a network printer</para></listitem>
+</varlistentry>
+<varlistentry><term>/q</term>
+<listitem><para>quiet modus</para></listitem>
+</varlistentry>
+<varlistentry><term>/n</term>
+<listitem><para>names a printer</para></listitem>
+</varlistentry>
+<varlistentry><term>/in</term>
+<listitem><para>adds a network printer connection</para></listitem>
+</varlistentry>
+<varlistentry><term>/y</term>
+<listitem><para>sets printer as default printer</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>
+I have tested this with a Samba 2.2.7a and a Samba-3alpha24
+installation and Windows XP Professional clients. Note that this
+specific command set works with network print queues (installing
+local print queues requires different parameters, but this is of no
+interest here).
+</para>
+
+<itemizedlist>
+<listitem><para>Line 1 deletes a possibly existing previous network
+printer <emphasis>infotec2105-IPDS</emphasis> (which had used native
+Windows drivers with LPRng that were removed from the server which was
+converted to CUPS). The <command>/q</command> at the end eliminates
+"Confirm" or error dialog boxes popping up. They should not be
+presented to the user logging on.</para></listitem>
+
+<listitem><para>Line 2 adds the new printer
+<emphasis>infotec2105-PS</emphasis> (which actually is same physical
+device but is now run by the new CUPS printing system and associated
+with the CUPS/Adobe PS drivers). The printer and its driver
+<emphasis>must</emphasis> have been added to Samba prior to the user
+logging in (e.g. by a procedure as discussed earlier in this chapter,
+or by running <command>cupsaddsmb</command>). The driver is now
+auto-downloaded to the client PC where the user is about to log
+in.</para></listitem>
+
+<listitem><para>Line 3 sets the default printer to this new network
+printer (there might be several other printers installed with this
+same method and some may be local as well -- so we decide for a
+default printer). The default printer selection may of course be
+different for different users.</para></listitem>
+</itemizedlist>
+
+<para>
+Note that the second line only works if the printer
+<emphasis>infotec2105-PS</emphasis> has an already working print queue
+on "sambacupsserver", and if the printer drivers have successfully been
+uploaded (via <command>APW</command> ,
+<command>smbclient/rpcclient</command> or
+<command>cupsaddsmb</command>) into the
+<parameter>[print$]</parameter> driver repository of Samba. Also, some
+Samba versions prior to version 3.0 required a re-start of smbd after
+the printer install and the driver upload, otherwise the script (or
+any other client driver download) would fail.
+</para>
<para>
-Note that you can do some pretty magic things by using your
-imagination with the "print command" option and some shell scripts.
-Doing print accounting is easy by passing the %U option to a print
-command shell script. You could even make the print command detect
-the type of output and its size and send it to an appropriate
-printer.
+Since there no easy way to test for the existence of an installed
+network printer from the logon script, the suggestion is: don't bother
+checking and just allow the deinstallation/reinstallation to occur
+every time a user logs in; it's really quick anyway (1 to 2 seconds).
</para>
+<para>
+The additional benefits for this are:
+</para>
+
+<itemizedlist>
+<listitem><para>It puts in place any printer default setup changes
+automatically at every user logon.</para></listitem>
+
+<listitem><para>It allows for "roaming" users' login into the domain from
+different workstations.</para></listitem>
+</itemizedlist>
+
+<para>
+Since network printers are installed per user this much simplifies the
+process of keeping the installation up-to-date. The extra few seconds
+at logon time will not really be noticeable. Printers can be centrally
+added, changed, and deleted at will on the server with no user
+intervention required on the clients (you just need to keep the logon
+scripts up to date).
+</para>
+</sect1>
+
+<sect1>
+<title>The <command>addprinter</command> command</title>
+
+<para>
+The <command>addprinter</command> command can be configured to be a
+shell script or program executed by Samba. It is triggered by running
+the APW from a client against the Samba print server. The APW asks the
+user to fill in several fields (such as printer name, driver to be
+used, comment, port monitor, etc.). These parameters are passed on to
+Samba by the APW. If the addprinter command is designed in a way that
+it can create a new printer (through writing correct printcap entries
+on legacy systems, or execute the <command>lpadmin</command> command
+on more modern systems) and create the associated share in
+, then the APW will in effect really
+create a new printer on Samba and the UNIX print subsystem!
+</para>
+</sect1>
+
+<sect1>
+<title>Migration of "Classical" printing to Samba-3</title>
+
+<para>
+The basic "NT-style" printer driver management has not changed
+considerably in 3.0 over the 2.2.x releases (apart from many small
+improvements). Here migration should be quite easy, especially if you
+followed previous advice to stop using deprecated parameters in your
+setup. For migrations from an existing 2.0.x setup, or if you
+continued "Win9x-style" printing in your Samba 2.2 installations, it
+is more of an effort. Please read the appropriate release notes and
+the HOWTO Collection for 2.2. You can follow several paths. Here are
+possible scenarios for migration:
+</para>
+
+<itemizedlist>
+<listitem><para>You need to study and apply the new Windows NT printer
+and driver support. Previously used parameters "<parameter>printer
+driver file</parameter>", " <parameter>printer driver</parameter>" and
+"<parameter>printer driver location</parameter>" are no longer
+supported.</para></listitem>
+
+<listitem><para>If you want to take advantage of WinNT printer driver
+support you also need to migrate the Win9x/ME drivers to the new
+setup.</para></listitem>
+
+<listitem><para>An existing <filename>printers.def</filename> file
+(the one specified in the now removed parameter <parameter>printer
+driver file = ...</parameter>) will work no longer with Samba-3.0. In
+3.0, smbd attempts to locate a Win9x/ME driver files for the printer
+in <parameter>[print$]</parameter> and additional settings in the TDB
+and only there; if it fails it will <emphasis>not</emphasis> (as 2.2.x
+used to do) drop down to using a <filename>printers.def</filename>
+(and all associated parameters). The make_printerdef tool is removed
+and there is no backwards compatibility for this.</para></listitem>
+
+<listitem><para>You need to install a Windows 9x driver into the
+<parameter>[print$]</parameter> share for a printer on your Samba
+host. The driver files will be stored in the "WIN40/0" subdirectory of
+<parameter>[print$]</parameter>, and some other settings and info go
+into the printing-related TDBs.</para></listitem>
+
+<listitem><para>If you want to migrate an existing
+<filename>printers.def</filename> file into the new setup, the current
+only solution is to use the Windows NT APW to install the NT drivers
+and the 9x drivers. This can be scripted using smbclient and
+rpcclient. See the Imprints installation client at:
+</para>
+
+<para>
+<ulink url="http://imprints.sourceforge.net/"><emphasis>http://imprints.sourceforge.net/</emphasis></ulink>
+</para>
+
+<para>
+for an example. See also the discussion of rpcclient usage in the
+"CUPS Printing" section.</para></listitem>
+</itemizedlist>
+</sect1>
+
+<sect1>
+<title>Publishing Printer Information in Active Directory or LDAP</title>
+
+<para>
+We will publish an update to this section shortly.
+</para>
+</sect1>
+
+<sect1>
+<title>Common Errors and Problems</title>
+
+<para>
+Here are a few typical errors and problems people have
+encountered. You can avoid them. Read on.
+</para>
+
+<sect2>
+<title>I give my root password but I don't get access</title>
+
+<para>
+Don't confuse the root password which is valid for the Unix system
+(and in most cases stored in the form of a one-way hash in a file
+named <filename>/etc/shadow</filename>) with the password used to
+authenticate against Samba!. Samba doesn't know the UNIX password; for
+root to access Samba resources via Samba-type access, a Samba account
+for root must be created first. This is often done with the
+<command>smbpasswd</command> command.
+</para>
</sect2>
<sect2>
-<title>Real debugging</title>
+<title>My printjobs get spooled into the spooling directory, but then get lost</title>
<para>
-If the above debug tips don't help, then maybe you need to bring in
-the bug guns, system tracing. See Tracing.txt in this directory.
+Don't use the existing Unix print system spool directory for the Samba
+spool directory. It may seem convenient and a saving of space, but it
+only leads to problems. The two <emphasis>must</emphasis> be separate.
</para>
+
</sect2>
</sect1>
diff --git a/docs/docbook/projdoc/samba-doc.xml b/docs/docbook/projdoc/samba-doc.xml
index a4394d263f..91002c9133 100644
--- a/docs/docbook/projdoc/samba-doc.xml
+++ b/docs/docbook/projdoc/samba-doc.xml
@@ -9,10 +9,6 @@
<bookinfo>
<authorgroup>
- <author>
- <othername>SAMBA Team</othername>
- <affiliation><address><email>samba@samba.org</email></address></affiliation>
- </author>
<editor>&person.jelmer;</editor>
<editor>&person.jht;</editor>
<editor>&person.jerry;</editor>
@@ -28,7 +24,7 @@ The most recent version of this document can be found at
<ulink url="http://www.samba.org/">http://www.samba.org/</ulink>
on the "Documentation" page. Please send updates to
<ulink url="mailto:jelmer@samba.org">Jelmer Vernooij</ulink>,
-<ulink url="mailto:jht@samba.org">John H Terpstra</ulink> or
+<ulink url="mailto:jht@samba.org">John H. Terpstra</ulink> or
<ulink url="mailto:jerry@samba.org">Gerald (Jerry) Carter</ulink>.
</para>
@@ -38,7 +34,7 @@ or without their knowledge contributed to this update. The size and scope of thi
project would not have been possible without significant community contribution. A not
insignificant number of ideas for inclusion (if not content itself) has been obtained
from a number of Unofficial HOWTOs - to each such author a big "Thank-you" is also offered.
-Please keep publishing your Unofficial HOWTO's - they are a source of inspiration and
+Please keep publishing your Unofficial HOWTOs - they are a source of inspiration and
application knowledge that is most to be desired by many Samba users and administrators.
</para>
@@ -50,6 +46,14 @@ version 2. A copy of the license is included with the Samba source
distribution. A copy can be found on-line at <ulink
url="http://www.fsf.org/licenses/gpl.txt">http://www.fsf.org/licenses/gpl.txt</ulink>
</para>
+
+<formalpara>
+ <title>Attributions</title>
+ <para>
+ &attributions;
+ </para>
+</formalpara>
+
</legalnotice>
</bookinfo>
@@ -67,6 +71,7 @@ PLEASE read this.</para>
</partintro>
&IntroSMB;
&UNIX-INSTALL;
+&FastStart;
</part>
<part id="type">
@@ -84,6 +89,7 @@ section carefully.
&Samba-BDC-HOWTO;
&DOMAIN-MEMBER;
&StandAloneServer;
+&ClientConfig;
</part>
<part id="optional">
@@ -112,6 +118,15 @@ Samba has several features that you might want or might not want to use. The cha
&Samba-PAM;
&IntegratingWithWindows;
&unicode;
+&Backup;
+&HighAvailability;
+</part>
+
+<part id="migration">
+<title>Migration and Updating</title>
+&upgrading;
+&NT4Migration;
+&SWAT;
</part>
<part id="troubleshooting">
@@ -124,12 +139,13 @@ Samba has several features that you might want or might not want to use. The cha
<part id="Appendixes">
<title>Appendixes</title>
&Compiling;
-&NT4Migration;
&Portability;
&Other-Clients;
-&SWAT;
&SPEED;
+&DNS-DHCP-Configuration;
&Further-Resources;
</part>
+<index/>
+
</book>
diff --git a/docs/docbook/projdoc/securing-samba.xml b/docs/docbook/projdoc/securing-samba.xml
index 204fceeb4a..bed4e4ee56 100644
--- a/docs/docbook/projdoc/securing-samba.xml
+++ b/docs/docbook/projdoc/securing-samba.xml
@@ -3,7 +3,7 @@
<chapterinfo>
&author.tridge;
&author.jht;
- <pubdate>17 March 2003</pubdate>
+ <pubdate>May 26, 2003</pubdate>
</chapterinfo>
<title>Securing Samba</title>
@@ -16,209 +16,354 @@ important security fix. The information contained here applies to Samba
installations in general.
</para>
-</sect1>
-
-<sect1>
-<title>Using host based protection</title>
-
<para>
-In many installations of Samba the greatest threat comes for outside
-your immediate network. By default Samba will accept connections from
-any host, which means that if you run an insecure version of Samba on
-a host that is directly connected to the Internet you can be
-especially vulnerable.
+A new apprentice reported for duty to the Chief Engineer of a boiler house. He said, "Here I am,
+if you will show me the boiler I'll start working on it." Then engineer replied, "You're leaning
+on it!"
</para>
<para>
-One of the simplest fixes in this case is to use the <command>hosts allow</command> and
-<command>hosts deny</command> options in the Samba &smb.conf; configuration file to only
-allow access to your server from a specific range of hosts. An example
-might be:
-</para>
-
-<para><programlisting>
- hosts allow = 127.0.0.1 192.168.2.0/24 192.168.3.0/24
- hosts deny = 0.0.0.0/0
-</programlisting></para>
-
-<para>
-The above will only allow SMB connections from 'localhost' (your own
-computer) and from the two private networks 192.168.2 and
-192.168.3. All other connections will be refused as soon
-as the client sends its first packet. The refusal will be marked as a
-'not listening on called name' error.
+Security concerns are just like that: You need to know a little about the subject to appreciate
+how obvious most of it really is. The challenge for most of us is to discover that first morsel
+of knowledge with which we may unlock the secrets of the masters.
</para>
</sect1>
<sect1>
-<title>User based protection</title>
+<title>Features and Benefits</title>
<para>
-If you want to restrict access to your server to valid users only then the following
-method may be of use. In the smb.conf [globals] section put:
+There are three level at which security principals must be observed in order to render a site
+at least moderately secure. These are: the perimeter firewall, the configuration of the host
+server that is running Samba, and Samba itself.
</para>
-<para><programlisting>
- valid users = @smbusers, jacko
-</programlisting></para>
-
<para>
-What this does is, it restricts all server access to either the user <emphasis>jacko</emphasis>
-or to members of the system group <emphasis>smbusers</emphasis>.
+Samba permits a most flexible approach to network security. As far as possible Samba implements
+the latest protocols to permit more secure MS Windows file and print operations.
</para>
-</sect1>
-
-<sect1>
-
-<title>Using interface protection</title>
-
<para>
-By default Samba will accept connections on any network interface that
-it finds on your system. That means if you have a ISDN line or a PPP
-connection to the Internet then Samba will accept connections on those
-links. This may not be what you want.
+Samba may be secured from connections that originate from outside the local network. This may be
+done using <emphasis>host based protection</emphasis> (using samba's implementation of a technology
+known as "tcpwrappers", or it may be done be using <emphasis>interface based exclusion</emphasis>
+so that &smbd; will bind only to specifically permitted interfaces. It is also
+possible to set specific share or resource based exclusions, eg: on the <parameter>IPC$</parameter>
+auto-share. The <parameter>IPC$</parameter> share is used for browsing purposes as well as to establish
+TCP/IP connections.
</para>
<para>
-You can change this behaviour using options like the following:
-</para>
-
-<para><programlisting>
- interfaces = eth* lo
- bind interfaces only = yes
-</programlisting></para>
-
-<para>
-This tells Samba to only listen for connections on interfaces with a
-name starting with 'eth' such as eth0, eth1, plus on the loopback
-interface called 'lo'. The name you will need to use depends on what
-OS you are using, in the above I used the common name for Ethernet
-adapters on Linux.
-</para>
-
-<para>
-If you use the above and someone tries to make a SMB connection to
-your host over a PPP interface called 'ppp0' then they will get a TCP
-connection refused reply. In that case no Samba code is run at all as
-the operating system has been told not to pass connections from that
-interface to any samba process.
+Another method by which Samba may be secured is by way of setting Access Control Entries in an Access
+Control List on the shares themselves. This is discussed in the chapter on File, Directory and Share Access
+Control.
</para>
</sect1>
<sect1>
-<title>Using a firewall</title>
-
-<para>
-Many people use a firewall to deny access to services that they don't
-want exposed outside their network. This can be a very good idea,
-although I would recommend using it in conjunction with the above
-methods so that you are protected even if your firewall is not active
-for some reason.
-</para>
+<title>Technical Discussion of Protective Measures and Issues</title>
<para>
-If you are setting up a firewall then you need to know what TCP and
-UDP ports to allow and block. Samba uses the following:
-</para>
-
-<para><programlisting>
- UDP/137 - used by nmbd
- UDP/138 - used by nmbd
- TCP/139 - used by smbd
- TCP/445 - used by smbd
-</programlisting></para>
-
-<para>
-The last one is important as many older firewall setups may not be
-aware of it, given that this port was only added to the protocol in
-recent years.
+The key challenge of security is the fact that protective measures suffice at best
+only to close the door on known exploits and breach techniques. Never assume that
+because you have followed these few measures that the Samba server is now an impenetrable
+fortress! Given the history of information systems so far, it is only a matter of time
+before someone will find yet another vulnerability.
</para>
+ <sect2>
+ <title>Using host based protection</title>
+
+ <para>
+ In many installations of Samba the greatest threat comes for outside
+ your immediate network. By default Samba will accept connections from
+ any host, which means that if you run an insecure version of Samba on
+ a host that is directly connected to the Internet you can be
+ especially vulnerable.
+ </para>
+
+ <para>
+ One of the simplest fixes in this case is to use the <parameter>hosts allow</parameter> and
+ <parameter>hosts deny</parameter> options in the Samba &smb.conf; configuration file to only
+ allow access to your server from a specific range of hosts. An example
+ might be:
+ </para>
+
+ <para><programlisting>
+ hosts allow = 127.0.0.1 192.168.2.0/24 192.168.3.0/24
+ hosts deny = 0.0.0.0/0
+ </programlisting></para>
+
+ <para>
+ The above will only allow SMB connections from 'localhost' (your own
+ computer) and from the two private networks 192.168.2 and
+ 192.168.3. All other connections will be refused as soon
+ as the client sends its first packet. The refusal will be marked as a
+ <errorname>not listening on called name</errorname> error.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>User based protection</title>
+
+ <para>
+ If you want to restrict access to your server to valid users only then the following
+ method may be of use. In the &smb.conf; <parameter>[globals]</parameter> section put:
+ </para>
+
+ <para><programlisting>
+ valid users = @smbusers, jacko
+ </programlisting></para>
+
+ <para>
+ What this does is, it restricts all server access to either the user <emphasis>jacko</emphasis>
+ or to members of the system group <emphasis>smbusers</emphasis>.
+ </para>
+
+ </sect2>
+
+ <sect2>
+
+ <title>Using interface protection</title>
+
+ <para>
+ By default Samba will accept connections on any network interface that
+ it finds on your system. That means if you have a ISDN line or a PPP
+ connection to the Internet then Samba will accept connections on those
+ links. This may not be what you want.
+ </para>
+
+ <para>
+ You can change this behaviour using options like the following:
+ </para>
+
+ <para><programlisting>
+ interfaces = eth* lo
+ bind interfaces only = yes
+ </programlisting></para>
+
+ <para>
+ This tells Samba to only listen for connections on interfaces with a
+ name starting with 'eth' such as eth0, eth1, plus on the loopback
+ interface called 'lo'. The name you will need to use depends on what
+ OS you are using, in the above I used the common name for Ethernet
+ adapters on Linux.
+ </para>
+
+ <para>
+ If you use the above and someone tries to make a SMB connection to
+ your host over a PPP interface called 'ppp0' then they will get a TCP
+ connection refused reply. In that case no Samba code is run at all as
+ the operating system has been told not to pass connections from that
+ interface to any samba process.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Using a firewall</title>
+
+ <para>
+ Many people use a firewall to deny access to services that they don't
+ want exposed outside their network. This can be a very good idea,
+ although I would recommend using it in conjunction with the above
+ methods so that you are protected even if your firewall is not active
+ for some reason.
+ </para>
+
+ <para>
+ If you are setting up a firewall then you need to know what TCP and
+ UDP ports to allow and block. Samba uses the following:
+ </para>
+
+ <simplelist>
+ <member>UDP/137 - used by nmbd</member>
+ <member>UDP/138 - used by nmbd</member>
+ <member>TCP/139 - used by smbd</member>
+ <member>TCP/445 - used by smbd</member>
+ </simplelist>
+
+ <para>
+ The last one is important as many older firewall setups may not be
+ aware of it, given that this port was only added to the protocol in
+ recent years.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>Using a IPC$ share deny</title>
+
+ <para>
+ If the above methods are not suitable, then you could also place a
+ more specific deny on the IPC$ share that is used in the recently
+ discovered security hole. This allows you to offer access to other
+ shares while denying access to IPC$ from potentially untrustworthy
+ hosts.
+ </para>
+
+ <para>
+ To do that you could use:
+ </para>
+
+ <para><programlisting>
+[ipc$]
+ hosts allow = 192.168.115.0/24 127.0.0.1
+ hosts deny = 0.0.0.0/0
+ </programlisting></para>
+
+ <para>
+ this would tell Samba that IPC$ connections are not allowed from
+ anywhere but the two listed places (localhost and a local
+ subnet). Connections to other shares would still be allowed. As the
+ IPC$ share is the only share that is always accessible anonymously
+ this provides some level of protection against attackers that do not
+ know a username/password for your host.
+ </para>
+
+ <para>
+ If you use this method then clients will be given a <errorname>access denied</errorname>
+ reply when they try to access the IPC$ share. That means that those
+ clients will not be able to browse shares, and may also be unable to
+ access some other resources.
+ </para>
+
+ <para>
+ This is not recommended unless you cannot use one of the other
+ methods listed above for some reason.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <title>NTLMv2 Security</title>
+
+ <para>
+ To configure NTLMv2 authentication the following registry keys are worth knowing about:
+ </para>
+
+ <!-- FIXME -->
+ <para>
+ <screen>
+ [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
+ "lmcompatibilitylevel"=dword:00000003
+
+ 0x3 - Send NTLMv2 response only. Clients will use NTLMv2 authentication,
+ use NTLMv2 session security if the server supports it. Domain
+ controllers accept LM, NTLM and NTLMv2 authentication.
+
+ [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]
+ "NtlmMinClientSec"=dword:00080000
+
+ 0x80000 - NTLMv2 session security. If either NtlmMinClientSec or
+ NtlmMinServerSec is set to 0x80000, the connection will fail if NTLMv2
+ session security is not negotiated.
+ </screen>
+ </para>
+ </sect2>
</sect1>
<sect1>
-<title>Using a IPC$ share deny</title>
-
-<para>
-If the above methods are not suitable, then you could also place a
-more specific deny on the IPC$ share that is used in the recently
-discovered security hole. This allows you to offer access to other
-shares while denying access to IPC$ from potentially untrustworthy
-hosts.
-</para>
-
-<para>
-To do that you could use:
-</para>
-
-<para><programlisting>
- [ipc$]
- hosts allow = 192.168.115.0/24 127.0.0.1
- hosts deny = 0.0.0.0/0
-</programlisting></para>
-
-<para>
-this would tell Samba that IPC$ connections are not allowed from
-anywhere but the two listed places (localhost and a local
-subnet). Connections to other shares would still be allowed. As the
-IPC$ share is the only share that is always accessible anonymously
-this provides some level of protection against attackers that do not
-know a username/password for your host.
-</para>
-
-<para>
-If you use this method then clients will be given a 'access denied'
-reply when they try to access the IPC$ share. That means that those
-clients will not be able to browse shares, and may also be unable to
-access some other resources.
-</para>
+<title>Upgrading Samba</title>
<para>
-This is not recommended unless you cannot use one of the other
-methods listed above for some reason.
+Please check regularly on <ulink url="http://www.samba.org/">http://www.samba.org/</ulink> for updates and
+important announcements. Occasionally security releases are made and
+it is highly recommended to upgrade Samba when a security vulnerability
+is discovered.
</para>
</sect1>
<sect1>
-<title>NTLMv2 Security</title>
-
-<para>
-To configure NTLMv2 authentication the following registry keys are worth knowing about:
-</para>
+<title>Common Errors</title>
<para>
-<programlisting>
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
- "lmcompatibilitylevel"=dword:00000003
-
- 0x3 - Send NTLMv2 response only. Clients will use NTLMv2 authentication,
- use NTLMv2 session security if the server supports it. Domain
- controllers accept LM, NTLM and NTLMv2 authentication.
-
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]
- "NtlmMinClientSec"=dword:00080000
-
- 0x80000 - NTLMv2 session security. If either NtlmMinClientSec or
- NtlmMinServerSec is set to 0x80000, the connection will fail if NTLMv2
- session security is not negotiated.
-</programlisting>
+If all of samba and host platform configuration were really as intuitive as one might like then this
+section would not be necessary. Security issues are often vexing for a support person to resolve, not
+because of the complexity of the problem, but for reason that most administrators who post what turns
+out to be a security problem request are totally convinced that the problem is with Samba.
</para>
-</sect1>
-
-<sect1>
-<title>Upgrading Samba</title>
-<para>
-Please check regularly on <ulink url="http://www.samba.org/">http://www.samba.org/</ulink> for updates and
-important announcements. Occasionally security releases are made and
-it is highly recommended to upgrade Samba when a security vulnerability
-is discovered.
-</para>
+ <sect2>
+ <title>Smbclient works on localhost, but the network is dead</title>
+
+ <para>
+ This is a very common problem. Red Hat Linux (as do others) will install a default firewall.
+ With the default firewall in place only traffic on the loopback adapter (IP address 127.0.0.1)
+ will be allowed through the firewall.
+ </para>
+
+ <para>
+ The solution is either to remove the firewall (stop it) or to modify the firewall script to
+ allow SMB networking traffic through. See section above in this chapter.
+ </para>
+
+ </sect2>
+
+ <sect2>
+ <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* else's 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
+ <parameter>only user = yes</parameter> 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 <parameter>[homes]</parameter> share, as recommended in
+ the &smb.conf; man page.
+ </para>
+ </sect2>
</sect1>
-
</chapter>
diff --git a/docs/docbook/projdoc/unicode.xml b/docs/docbook/projdoc/unicode.xml
index 2351668e56..d24ec4b5cd 100644
--- a/docs/docbook/projdoc/unicode.xml
+++ b/docs/docbook/projdoc/unicode.xml
@@ -13,6 +13,32 @@
<title>Unicode/Charsets</title>
<sect1>
+<title>Features and Benefits</title>
+
+<para>
+Every industry eventually matures. One of the great areas of maturation is in
+the focus that has been given over the past decade to make it possible for anyone
+anywhere to use a computer. It has not always been that way, in fact, not so long
+ago it was common for software to be written for exclusive use in the country of
+origin.
+</para>
+
+<para>
+Of all the effort that has been brought to bear on providing native language support
+for all computer users, the efforts of the Openi18n organisation is deserving of
+special mention. For more information about Openi18n please refer to:
+<link url="http://www.openi18n.org/">http://www.openi18n.org/</link>.
+</para>
+
+<para>
+Samba-2.x supported a single locale through a mechanism called
+<emphasis>codepages</emphasis>. Samba-3 is destined to become a truly trans-global
+file and printer sharing platform.
+</para>
+
+</sect1>
+
+<sect1>
<title>What are charsets and unicode?</title>
<para>
@@ -44,7 +70,7 @@ communicating.
</para>
<para>Old windows clients used to use single-byte charsets, named
-'codepages' by microsoft. However, there is no support for
+'codepages' by Microsoft. However, there is no support for
negotiating the charset to be used in the smb protocol. Thus, you
have to make sure you are using the same charset when talking to an old client.
Newer clients (Windows NT, 2K, XP) talk unicode over the wire.
@@ -61,7 +87,7 @@ samba knows of three kinds of character sets:
<variablelist>
<varlistentry>
- <term>unix charset</term>
+ <term><parameter>unix charset</parameter></term>
<listitem><para>
This is the charset used internally by your operating system.
The default is <constant>ASCII</constant>, which is fine for most
@@ -70,14 +96,14 @@ samba knows of three kinds of character sets:
</varlistentry>
<varlistentry>
- <term>display charset</term>
+ <term><parameter>display charset</parameter></term>
<listitem><para>This is the charset samba will use to print messages
on your screen. It should generally be the same as the <command>unix charset</command>.
</para></listitem>
</varlistentry>
<varlistentry>
- <term>dos charset</term>
+ <term><parameter>dos charset</parameter></term>
<listitem><para>This is the charset samba uses when communicating with
DOS and Windows 9x clients. It will talk unicode to all newer clients.
The default depends on the charsets you have installed on your system.
@@ -114,24 +140,24 @@ points of attention when setting it up:</para>
<itemizedlist>
-<listitem><para>You should set <command>mangling method =
-hash</command></para></listitem>
+<listitem><para>You should set <parameter>mangling method =
+hash</parameter></para></listitem>
<listitem><para>There are various iconv() implementations around and not
all of them work equally well. glibc2's iconv() has a critical problem
in CP932. libiconv-1.8 works with CP932 but still has some problems and
does not work with EUC-JP.</para></listitem>
-<listitem><para>You should set <command>dos charset = CP932</command>, not
+<listitem><para>You should set <parameter>dos charset = CP932</parameter>, not
Shift_JIS, SJIS...</para></listitem>
-<listitem><para>Currently only <command>unix charset = CP932</command>
+<listitem><para>Currently only <parameter>unix charset = CP932</parameter>
will work (but still has some problems...) because of iconv() issues.
-<command>unix charset = EUC-JP</command> doesn't work well because of
+<parameter>unix charset = EUC-JP</parameter> doesn't work well because of
iconv() issues.</para></listitem>
-<listitem><para>Currently Samba 3.0 does not support <command>unix charset
-= UTF8-MAC/CAP/HEX/JIS*</command></para></listitem>
+<listitem><para>Currently Samba 3.0 does not support <parameter>unix charset
+= UTF8-MAC/CAP/HEX/JIS*</parameter></para></listitem>
</itemizedlist>
diff --git a/docs/docbook/projdoc/upgrading-to-3.0.xml b/docs/docbook/projdoc/upgrading-to-3.0.xml
index 3dc4816664..b4c0732a65 100644
--- a/docs/docbook/projdoc/upgrading-to-3.0.xml
+++ b/docs/docbook/projdoc/upgrading-to-3.0.xml
@@ -4,7 +4,7 @@
<pubdate>25 October 2002</pubdate>
</chapterinfo>
-<title>Issues when upgrading from 2.2 to 3.0</title>
+<title>Upgrading from Samba-2.x to Samba-3.0.0</title>
<sect1>
<title>Charsets</title>
@@ -31,6 +31,34 @@ In 3.0, the following configuration options have been removed.
<member>use rhosts</member>
<member>postscript</member>
<member>client code page (replaced by dos charset)</member>
+<member>vfs path</member>
+<member>vfs options</member>
</simplelist>
</sect1>
+
+<sect1>
+<title>Password Backend</title>
+
+<para>
+Effective with the release of samba-3 it is now imperative that the password backend
+be correctly defined in smb.conf.
+</para>
+
+<para>
+Those migrating from samba-2.x with plaintext password support need the following:
+<emphasis>passdb backend = guest</emphasis>.
+</para>
+
+<para>
+Those migrating from samba-2.x with encrypted password support should add to smb.conf
+<emphasis>passdb backend = smbpasswd, guest</emphasis>.
+</para>
+
+<para>
+LDAP using Samba-2.x systems can continue to operate with the following entry
+<emphasis>passdb backend = ldapsam_compat, guest</emphasis>.
+</para>
+
+</sect1>
+
</chapter>
diff --git a/docs/docbook/projdoc/winbind.xml b/docs/docbook/projdoc/winbind.xml
index cb6a56687d..524f05ffa2 100644
--- a/docs/docbook/projdoc/winbind.xml
+++ b/docs/docbook/projdoc/winbind.xml
@@ -6,11 +6,10 @@
<firstname>Tim</firstname><surname>Potter</surname>
<affiliation>
<orgname>Samba Team</orgname>
- <address><email>tpot@linuxcare.com.au</email></address>
+ <address><email>tpot@samba.org</email></address>
</affiliation>
</author>
&author.tridge;
- &author.jht;
<author>
<firstname>Naag</firstname><surname>Mummaneni</surname>
<affiliation>
@@ -18,14 +17,15 @@
</affiliation>
</author>
&author.jelmer;
+ &author.jht;
</authorgroup>
<pubdate>27 June 2002</pubdate>
</chapterinfo>
-<title>Unified Logons between Windows NT and UNIX using Winbind</title>
+<title>Integrated Logon Support using Winbind</title>
<sect1>
- <title>Abstract</title>
+ <title>Features and Benefits</title>
<para>Integration of UNIX and Microsoft Windows NT through
a unified logon has been considered a "holy grail" in heterogeneous
@@ -223,7 +223,9 @@
of that service should be tried and in what order. If the passwd
config line is:</para>
- <para><command>passwd: files example</command></para>
+ <para><programlisting>
+passwd: files example
+ </programlisting></para>
<para>then the C library will first load a module called
<filename>/lib/libnss_files.so</filename> followed by
@@ -337,8 +339,8 @@ the winbind services which come with SAMBA 3.0.
<title>Introduction</title>
<para>
-This HOWTO describes the procedures used to get winbind up and
-running on my RedHat 7.1 system. Winbind is capable of providing access
+This section describes the procedures used to get winbind up and
+running on a RedHat 7.1 system. Winbind is capable of providing access
and authentication control for Windows Domain users through an NT
or Win2K PDC for 'regular' services, such as telnet a nd ftp, as
well for SAMBA services.
@@ -386,7 +388,7 @@ somewhat to fit the way your distribution works.
<title>Requirements</title>
<para>
-If you have a samba configuration file that you are currently
+If you have a Samba configuration file that you are currently
using... <emphasis>BACK IT UP!</emphasis> If your system already uses PAM,
<emphasis>back up the <filename>/etc/pam.d</filename> directory
contents!</emphasis> If you haven't already made a boot disk,
@@ -394,8 +396,8 @@ contents!</emphasis> If you haven't already made a boot disk,
</para>
<para>
-Messing with the pam configuration files can make it nearly impossible
-to log in to yourmachine. That's why you want to be able to boot back
+Messing with the PAM configuration files can make it nearly impossible
+to log in to your machine. That's why you want to be able to boot back
into your machine in single user mode and restore your
<filename>/etc/pam.d</filename> back to the original state they were in if
you get frustrated with the way things are going. ;-)
@@ -428,17 +430,15 @@ install the development packages in <filename>pam-devel-0.74-22</filename>.
<para>
Before starting, it is probably best to kill off all the SAMBA
-related daemons running on your server. Kill off all <command>smbd</command>,
-<command>nmbd</command>, and <command>winbindd</command> processes that may
+related daemons running on your server. Kill off all &smbd;,
+&nmbd;, and &winbindd; processes that may
be running. To use PAM, you will want to make sure that you have the
standard PAM package (for RedHat) which supplies the <filename>/etc/pam.d</filename>
directory structure, including the pam modules are used by pam-aware
services, several pam libraries, and the <filename>/usr/doc</filename>
and <filename>/usr/man</filename> entries for pam. Winbind built better
in SAMBA if the pam-devel package was also installed. This package includes
-the header files needed to compile pam-aware applications. For instance,
-my RedHat system has both <filename>pam-0.74-22</filename> and
-<filename>pam-devel-0.74-22</filename> RPMs installed.
+the header files needed to compile pam-aware applications.
</para>
<sect3>
@@ -450,14 +450,14 @@ The first three steps may not be necessary depending upon
whether or not you have previously built the Samba binaries.
</para>
-<para><programlisting>
-<prompt>root#</prompt> <command>autoconf</command>
-<prompt>root#</prompt> <command>make clean</command>
-<prompt>root#</prompt> <command>rm config.cache</command>
-<prompt>root#</prompt> <command>./configure</command>
-<prompt>root#</prompt> <command>make</command>
-<prompt>root#</prompt> <command>make install</command>
-</programlisting></para>
+<para><screen>
+&rootprompt;<command>autoconf</command>
+&rootprompt;<command>make clean</command>
+&rootprompt;<command>rm config.cache</command>
+&rootprompt;<command>./configure</command>
+&rootprompt;<command>make</command>
+&rootprompt;<command>make install</command>
+</screen></para>
<para>
@@ -473,12 +473,14 @@ It will also build the winbindd executable and libraries.
winbind libraries on Linux and Solaris</title>
<para>
-The libraries needed to run the <command>winbindd</command> daemon
+The libraries needed to run the &winbindd; daemon
through nsswitch need to be copied to their proper locations, so
</para>
<para>
-<prompt>root#</prompt> <command>cp ../samba/source/nsswitch/libnss_winbind.so /lib</command>
+<screen>
+&rootprompt;<userinput>cp ../samba/source/nsswitch/libnss_winbind.so /lib</userinput>
+</screen>
</para>
<para>
@@ -486,19 +488,19 @@ I also found it necessary to make the following symbolic link:
</para>
<para>
-<prompt>root#</prompt> <command>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</command>
+&rootprompt; <userinput>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</userinput>
</para>
-<para>And, in the case of Sun solaris:</para>
-<para>
-<prompt>root#</prompt> <userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</userinput>
-<prompt>root#</prompt> <userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</userinput>
-<prompt>root#</prompt> <userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</userinput>
-</para>
+<para>And, in the case of Sun Solaris:</para>
+<screen>
+&rootprompt;<userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</userinput>
+&rootprompt;<userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</userinput>
+&rootprompt;<userinput>ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</userinput>
+</screen>
<para>
Now, as root you need to edit <filename>/etc/nsswitch.conf</filename> to
-allow user and group entries to be visible from the <command>winbindd</command>
+allow user and group entries to be visible from the &winbindd;
daemon. My <filename>/etc/nsswitch.conf</filename> file look like
this after editing:
</para>
@@ -517,7 +519,7 @@ is faster (and you don't need to reboot) if you do it manually:
</para>
<para>
-<prompt>root#</prompt> <command>/sbin/ldconfig -v | grep winbind</command>
+&rootprompt;<userinput>/sbin/ldconfig -v | grep winbind</userinput>
</para>
<para>
@@ -566,11 +568,11 @@ url="http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixbman/baseadmn/ia
<para>
Several parameters are needed in the smb.conf file to control
-the behavior of <command>winbindd</command>. Configure
-<filename>smb.conf</filename> These are described in more detail in
+the behavior of &winbindd;. Configure
+&smb.conf; These are described in more detail in
the <citerefentry><refentrytitle>winbindd</refentrytitle>
<manvolnum>8</manvolnum></citerefentry> man page. My
-<filename>smb.conf</filename> file was modified to
+&smb.conf; file was modified to
include the following entries in the [global] section:
</para>
@@ -580,9 +582,9 @@ include the following entries in the [global] section:
# separate domain and username with '+', like DOMAIN+username
<ulink url="winbindd.8.html#WINBINDSEPARATOR">winbind separator</ulink> = +
# use uids from 10000 to 20000 for domain users
- <ulink url="winbindd.8.html#WINBINDUID">winbind uid</ulink> = 10000-20000
+ <ulink url="winbindd.8.html#WINBINDUID">idmap uid</ulink> = 10000-20000
# use gids from 10000 to 20000 for domain groups
- <ulink url="winbindd.8.html#WINBINDGID">winbind gid</ulink> = 10000-20000
+ <ulink url="winbindd.8.html#WINBINDGID">idmap gid</ulink> = 10000-20000
# allow enumeration of winbind users and groups
<ulink url="winbindd.8.html#WINBINDENUMUSERS">winbind enum users</ulink> = yes
<ulink url="winbindd.8.html#WINBINDENUMGROUP">winbind enum groups</ulink> = yes
@@ -606,7 +608,7 @@ a domain user who has administrative privileges in the domain.
<para>
-<prompt>root#</prompt> <command>/usr/local/samba/bin/net join -S PDC -U Administrator</command>
+&rootprompt;<userinput>/usr/local/samba/bin/net join -S PDC -U Administrator</userinput>
</para>
@@ -631,7 +633,7 @@ command as root:
</para>
<para>
-<prompt>root#</prompt> <command>/usr/local/samba/bin/winbindd</command>
+&rootprompt;<userinput>/usr/local/samba/bin/winbindd</userinput>
</para>
<para>
@@ -640,11 +642,11 @@ run as 2 processes. The first will answer all requests from the cache,
thus making responses to clients faster. The other will
update the cache for the query that the first has just responded.
Advantage of this is that responses stay accurate and are faster.
-You can enable dual daemon mode by adding '-B' to the commandline:
+You can enable dual daemon mode by adding <option>-B</option> to the commandline:
</para>
<para>
-<prompt>root#</prompt> <command>/usr/local/samba/bin/winbindd -B</command>
+&rootprompt;<userinput>/usr/local/samba/bin/winbindd -B</userinput>
</para>
<para>
@@ -653,14 +655,14 @@ is really running...
</para>
<para>
-<prompt>root#</prompt> <command>ps -ae | grep winbindd</command>
+&rootprompt;<userinput>ps -ae | grep winbindd</userinput>
</para>
<para>
This command should produce output like this, if the daemon is running
</para>
-<para>
+<screen>
3025 ? 00:00:00 winbindd
-</para>
+</screen>
<para>
Now... for the real test, try to get some information about the
@@ -668,7 +670,7 @@ users on your PDC
</para>
<para>
-<prompt>root#</prompt> <command>/usr/local/samba/bin/wbinfo -u</command>
+&rootprompt;<userinput>/usr/local/samba/bin/wbinfo -u</userinput>
</para>
<para>
@@ -676,14 +678,14 @@ This should echo back a list of users on your Windows users on
your PDC. For example, I get the following response:
</para>
-<para><programlisting>
+<para><screen>
CEO+Administrator
CEO+burdell
CEO+Guest
CEO+jt-ad
CEO+krbtgt
CEO+TsInternetUser
-</programlisting></para>
+</screen></para>
<para>
Obviously, I have named my domain 'CEO' and my <parameter>winbind
@@ -695,8 +697,8 @@ You can do the same sort of thing to get group information from
the PDC:
</para>
-<para><programlisting>
-<prompt>root#</prompt> <command>/usr/local/samba/bin/wbinfo -g</command>
+<para><screen>
+&rootprompt;<userinput>/usr/local/samba/bin/wbinfo -g</userinput>
CEO+Domain Admins
CEO+Domain Users
CEO+Domain Guests
@@ -706,7 +708,7 @@ the PDC:
CEO+Schema Admins
CEO+Enterprise Admins
CEO+Group Policy Creator Owners
-</programlisting></para>
+</screen></para>
<para>
The function 'getent' can now be used to get unified
@@ -715,7 +717,7 @@ Try the following command:
</para>
<para>
-<prompt>root#</prompt> <command>getent passwd</command>
+&rootprompt;<userinput>getent passwd</userinput>
</para>
<para>
@@ -729,7 +731,7 @@ The same thing can be done for groups with the command
</para>
<para>
-<prompt>root#</prompt> <command>getent group</command>
+&rootprompt;<userinput>getent group</userinput>
</para>
</sect3>
@@ -742,14 +744,13 @@ The same thing can be done for groups with the command
<title>Linux</title>
<para>
-The <command>winbindd</command> daemon needs to start up after the
-<command>smbd</command> and <command>nmbd</command> daemons are running.
+The &winbindd; daemon needs to start up after the
+&smbd; and &nmbd; daemons are running.
To accomplish this task, you need to modify the startup scripts of your system.
They are located at <filename>/etc/init.d/smb</filename> in RedHat and
<filename>/etc/init.d/samba</filename> in Debian.
script to add commands to invoke this daemon in the proper sequence. My
-startup script starts up <command>smbd</command>,
-<command>nmbd</command>, and <command>winbindd</command> from the
+startup script starts up &smbd;, &nmbd;, and &winbindd; from the
<filename>/usr/local/samba/bin</filename> directory directly. The 'start'
function in the script looks like this:
</para>
@@ -822,9 +823,9 @@ stop() {
<sect4>
<title>Solaris</title>
-<para>Winbind doesn't work on solaris 9, see the <link linkend="winbind-solaris9">Portability</link> chapter for details.</para>
+<para>Winbind doesn't work on Solaris 9, see the <link linkend="winbind-solaris9">Portability</link> chapter for details.</para>
-<para>On solaris, you need to modify the
+<para>On Solaris, you need to modify the
<filename>/etc/init.d/samba.server</filename> startup script. It usually
only starts smbd and nmbd but should now start winbindd too. If you
have samba installed in <filename>/usr/local/samba/bin</filename>,
@@ -898,8 +899,7 @@ in the script above with:
<sect4>
<title>Restarting</title>
<para>
-If you restart the <command>smbd</command>, <command>nmbd</command>,
-and <command>winbindd</command> daemons at this point, you
+If you restart the &smbd;, &nmbd;, and &winbindd; daemons at this point, you
should be able to connect to the samba server as a domain member just as
if you were a local user.
</para>
@@ -924,7 +924,7 @@ by invoking the command
</para>
<para>
-<prompt>root#</prompt> <command>make nsswitch/pam_winbind.so</command>
+&rootprompt;<userinput>make nsswitch/pam_winbind.so</userinput>
</para>
<para>
@@ -936,7 +936,7 @@ modules reside in <filename>/usr/lib/security</filename>.
</para>
<para>
-<prompt>root#</prompt> <command>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</command>
+&rootprompt;<userinput>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</userinput>
</para>
<sect4>
@@ -944,7 +944,7 @@ modules reside in <filename>/usr/lib/security</filename>.
<para>
The <filename>/etc/pam.d/samba</filename> file does not need to be changed. I
-just left this fileas it was:
+just left this file as it was:
</para>
@@ -981,8 +981,8 @@ For ftp services to work properly, you will also need to either
have individual directories for the domain users already present on
the server, or change the home directory template to a general
directory for all domain users. These can be easily set using
-the <filename>smb.conf</filename> global entry
-<command>template homedir</command>.
+the &smb.conf; global entry
+<parameter>template homedir</parameter>.
</para>
<para>
@@ -1022,8 +1022,8 @@ same way. It now looks like this:
</programlisting></para>
<para>
-In this case, I added the <command>auth sufficient /lib/security/pam_winbind.so</command>
-lines as before, but also added the <command>required pam_securetty.so</command>
+In this case, I added the <programlisting>auth sufficient /lib/security/pam_winbind.so</programlisting>
+lines as before, but also added the <programlisting>required pam_securetty.so</programlisting>
above it, to disallow root logins over the network. I also added a
<command>sufficient /lib/security/pam_unix.so use_first_pass</command>
line after the <command>winbind.so</command> line to get rid of annoying
@@ -1124,7 +1124,19 @@ configured in the pam.conf.
</sect1>
<sect1>
- <title>Limitations</title>
+<title>Conclusion</title>
+
+ <para>The winbind system, through the use of the Name Service
+ Switch, Pluggable Authentication Modules, and appropriate
+ Microsoft RPC calls have allowed us to provide seamless
+ integration of Microsoft Windows NT domain users on a
+ UNIX system. The result is a great reduction in the administrative
+ cost of running a mixed UNIX and NT network.</para>
+
+</sect1>
+
+<sect1>
+<title>Common Errors</title>
<para>Winbind has a number of limitations in its current
released version that we hope to overcome in future
@@ -1137,7 +1149,7 @@ configured in the pam.conf.
we require the C library of the target operating system to
support the Name Service Switch and Pluggable Authentication
Modules systems. This is becoming more common as NSS and
- PAM gain support among UNIX vendors.</para></listitem>
+ PAM gain support among UNIX vendors.</para></listitem>
<listitem><para>The mappings of Windows NT RIDs to UNIX ids
is not made algorithmically and depends on the order in which
@@ -1153,17 +1165,4 @@ configured in the pam.conf.
</itemizedlist>
</sect1>
-
-<sect1>
- <title>Conclusion</title>
-
- <para>The winbind system, through the use of the Name Service
- Switch, Pluggable Authentication Modules, and appropriate
- Microsoft RPC calls have allowed us to provide seamless
- integration of Microsoft Windows NT domain users on a
- UNIX system. The result is a great reduction in the administrative
- cost of running a mixed UNIX and NT network.</para>
-
-</sect1>
-
</chapter>