From fa96398866a4bcdcc13b42ab4f8d3f516cd9238a Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Thu, 16 Jun 2005 01:33:35 +0000 Subject: Stage 1 of PHPTR Edits. (This used to be commit 64a9e3e8619bf33dcf6b0ff8171b47a3e2581239) --- docs/Samba3-HOWTO/TOSHARG-AccessControls.xml | 839 +-- docs/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml | 75 +- docs/Samba3-HOWTO/TOSHARG-BDC.xml | 204 +- docs/Samba3-HOWTO/TOSHARG-Backup.xml | 26 +- docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml | 5610 +++++++++----------- docs/Samba3-HOWTO/TOSHARG-DomainMember.xml | 238 +- docs/Samba3-HOWTO/TOSHARG-FastStart.xml | 267 +- docs/Samba3-HOWTO/TOSHARG-Group-Mapping.xml | 227 +- docs/Samba3-HOWTO/TOSHARG-IDMAP.xml | 247 +- docs/Samba3-HOWTO/TOSHARG-Install.xml | 91 +- .../TOSHARG-Integrating-with-Windows.xml | 153 +- docs/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml | 156 +- docs/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml | 502 +- docs/Samba3-HOWTO/TOSHARG-PAM.xml | 193 +- docs/Samba3-HOWTO/TOSHARG-PDC.xml | 376 +- docs/Samba3-HOWTO/TOSHARG-Passdb.xml | 362 +- docs/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml | 138 +- docs/Samba3-HOWTO/TOSHARG-Printing.xml | 699 ++- docs/Samba3-HOWTO/TOSHARG-Problems.xml | 7 +- docs/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml | 576 +- docs/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml | 88 +- docs/Samba3-HOWTO/TOSHARG-Securing.xml | 95 +- docs/Samba3-HOWTO/TOSHARG-ServerType.xml | 181 +- docs/Samba3-HOWTO/TOSHARG-StandAloneServer.xml | 67 +- docs/Samba3-HOWTO/TOSHARG-TheNetCommand.xml | 312 +- docs/Samba3-HOWTO/TOSHARG-Unicode.xml | 226 +- docs/Samba3-HOWTO/TOSHARG-Winbind.xml | 242 +- docs/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml | 111 +- docs/Samba3-HOWTO/TOSHARG-glossary.xml | 3 + docs/Samba3-HOWTO/TOSHARG-locking.xml | 276 +- docs/Samba3-HOWTO/TOSHARG-msdfs.xml | 30 +- docs/Samba3-HOWTO/index.xml | 3 +- 32 files changed, 6104 insertions(+), 6516 deletions(-) diff --git a/docs/Samba3-HOWTO/TOSHARG-AccessControls.xml b/docs/Samba3-HOWTO/TOSHARG-AccessControls.xml index 973f390238..51f08c2f57 100644 --- a/docs/Samba3-HOWTO/TOSHARG-AccessControls.xml +++ b/docs/Samba3-HOWTO/TOSHARG-AccessControls.xml @@ -8,11 +8,11 @@ &person.jelmer;drawing May 10, 2003 -File, Directory and Share Access Controls +File, Directory, and Share Access Controls ACLs -Advanced MS Windows users are frequently perplexed when file, directory and share manipulation of +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 administrators are often confused regarding network access controls and how to provide users with the access they need while protecting resources from unauthorized access. @@ -34,7 +34,7 @@ though it does try to bridge the chasm to a degree. Extended Attributes ACLsPOSIX -POSIX Access Control List technology has been available (along with Extended Attributes) +POSIX Access Control List technology has been available (along with extended attributes) for UNIX for many years, yet there is little evidence today of any significant use. This explains to some extent the slow adoption of ACLs into commercial Linux products. MS Windows administrators are astounded at this, given that ACLs were a foundational capability of the now @@ -66,7 +66,7 @@ beyond early plans and expectations, yet the gap continues to shrink. Samba Access Control Facilities - permissionsUNIX file and directory + permissionsUNIX file and directory UNIX File and Directory Permissions @@ -89,7 +89,7 @@ beyond early plans and expectations, yet the gap continues to shrink. In configuring share settings and controls in the &smb.conf; file, the network administrator can exercise overrides to native file system permissions and behaviors. This can be handy and convenient - to effect behavior that is more like what MS Windows NT users expect + to effect behavior that is more like what MS Windows NT users expect, but it is seldom the best way to achieve this. The basic options and techniques are described herein. @@ -101,8 +101,8 @@ beyond early plans and expectations, yet the gap continues to shrink. - Just like it is possible in MS Windows NT to set ACLs on shares - themselves, so it is possible to do this in Samba. + Just as it is possible in MS Windows NT to set ACLs on shares + themselves, so it is possible to do in Samba. Few people make use of this facility, yet it remains one of the easiest ways to affect access controls (restrictions) and can often do so with minimum invasiveness compared with other methods. @@ -120,8 +120,8 @@ beyond early plans and expectations, yet the gap continues to 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 also provide - this. Sadly, few Linux platforms ship today with native ACLs and - Extended Attributes enabled. This chapter has pertinent information + this support. 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. @@ -143,25 +143,24 @@ at how Samba helps to bridge the differences. MS Windows NTFS Comparison with UNIX File Systems -NTFS -File System -File SystemUNIX -File SystemWindows - + NTFS + File System + File SystemUNIX + File SystemWindows Samba operates on top of the UNIX file system. This means it is subject to UNIX file system conventions and permissions. It also means that if the MS Windows networking environment requires file system - behavior that differs from UNIX file system behavior then somehow Samba is responsible for emulating + behavior, that differs from UNIX file system behavior then somehow Samba is responsible for emulating that in a transparent and consistent manner. - It is good news that Samba does this to a large extent and on top of that provides a high degree - of optional configuration to override the default behavior. We look at some of these over-rides, - but for the greater part we will stay within the bounds of default behavior. Those wishing to explore + It is good news that Samba does this to a large extent, and on top of that, provides a high degree + of optional configuration to override the default behavior. We look at some of these overrides, + but for the greater part we stay within the bounds of default behavior. Those wishing to explore the depths of control ability should review the &smb.conf; man page. - The following compares file system features for UNIX with those of Microsoft Windows NT/200x: + The following compares file system features for UNIX with those of MS Windows NT/200x: File Systemfeature comparison @@ -171,9 +170,9 @@ at how Samba helps to bridge the differences. Name Space - MS Windows NT4/200x/XP files names may be up to 254 characters long, and UNIX file names - may be 1023 characters long. In MS Windows, file extensions indicate particular file types, - in UNIX this is not so rigorously observed as all names are considered arbitrary. + MS Windows NT4/200x/XP file names may be up to 254 characters long, and UNIX file names + may be 1023 characters long. In MS Windows, file extensions indicate particular file types; + in UNIX this is not so rigorously observed because all names are considered arbitrary. What MS Windows calls a folder, UNIX calls a directory. @@ -187,7 +186,7 @@ at how Samba helps to bridge the differences. 8.3 file names File Systemcase sensitivity - MS Windows file names are generally upper case if made up of 8.3 (8 character file name + MS Windows file names are generally uppercase if made up of 8.3 (8-character file name and 3 character extension. File names that are longer than 8.3 are case preserving and case insensitive. @@ -195,10 +194,11 @@ at how Samba helps to bridge the differences. UNIX file and directory names are case sensitive and case preserving. Samba implements the MS Windows file name behavior, but it does so as a user application. The UNIX file system - provides no mechanism to perform case insensitive file name lookups. MS Windows does this + provides no mechanism to perform case-insensitive file name lookups. MS Windows does this by default. This means that Samba has to carry the processing overhead to provide features that are not native to the UNIX operating system environment. + Consider the following. All are unique UNIX names but one single MS Windows file name: @@ -208,74 +208,66 @@ at how Samba helps to bridge the differences. - So clearly, in an MS Windows file name space these three files cannot co-exist, but in UNIX + So clearly, in an MS Windows file namespace these three files cannot co-exist, but in UNIX they can. + So what should Samba do if all three are present? That which is lexically first will be - accessible to MS Windows users, the others are invisible and unaccessible &smbmdash; any + accessible to MS Windows users; the others are invisible and unaccessible &smbmdash; any other solution would be suicidal. - - + - Directory Separators - - - - Directory Separators - MS Windows and DOS uses the backslash \ as a directory delimiter, and UNIX uses + Directory Separators + + Directory Separators + MS Windows and DOS use the backslash \ as a directory delimiter, and UNIX uses the forward-slash / as its directory delimiter. This is handled transparently by Samba. - - + - Drive Identification - - - Drive Identification - MS Windows products support a notion of drive letters, like C: to represent - disk partitions. UNIX has no concept of separate identifiers for file partitions, each + Drive Identification + + Drive Identification + MS Windows products support a notion of drive letters, like C:, to represent + disk partitions. UNIX has no concept of separate identifiers for file partitions; each such file system is mounted to become part of the overall directory tree. - The UNIX directory tree begins at / just like the root of a DOS drive is specified as + The UNIX directory tree begins at / just as the root of a DOS drive is specified as C:\. - - + - File Naming Conventions - - - File Naming Conventions - MS Windows generally never experiences file names that begin with a dot (.) while in UNIX these + File Naming Conventions + + File Naming Conventions + MS Windows generally never experiences file names that begin with a dot (.), while in UNIX these are commonly found in a user's home directory. Files that begin with a dot (.) are typically - either start-up files for various UNIX applications, or they may be files that contain - start-up configuration data. - - + startup files for various UNIX applications, or they may be files that contain + startup configuration data. + - Links and Short-Cuts - - + Links and Short-Cuts + Linkshard Linkssoft - Short-Cuts - MS Windows make use of links and short-cuts that are actually special types of files that will + Shortcuts + MS Windows make use of links and shortcuts 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 links, but they are entirely different from what MS Windows users are used to. + 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 simultaneously by more than one file name. - - + @@ -291,8 +283,12 @@ at how Samba helps to bridge the differences. Managing Directories - There are three basic operations for managing directories: create, delete, rename. - + There are three basic operations for managing directories: create, delete, + rename. Managing Directories with UNIX and + Windows compares the commands in Windows and UNIX that implement these operations. + + +
Managing Directories with UNIX and Windows @@ -306,20 +302,18 @@ at how Samba helps to bridge the differences.
-
File and Directory Access Control - ACLsFile System The network administrator is strongly advised to read foundational training manuals and reference materials regarding file and directory permissions maintenance. Much can be achieved with the basic UNIX permissions - without having to resort to more complex facilities like POSIX Access Control Lists (ACLs) or Extended - Attributes (EAs). + without having to resort to more complex facilities like POSIX ACLs or extended + attributes (EAs). @@ -345,11 +339,13 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 - The columns above represent (from left to right): permissions, number of hard links to file, owner, group, size (bytes), access date, time of last modification, and file name. + The columns represent (from left to right) permissions, number of hard links to file, owner, group, size + (bytes), access date, time of last modification, and file name. - An overview of the permissions field can be found in Overview of UNIX permissions field. + An overview of the permissions field is shown in Overview of UNIX permissions + field.
@@ -358,26 +354,28 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08
- Any bit flag may be unset. An unset bit flag is the equivalent of cannot and is represented - as a - character. - - - Example File - - -rwxr-x--- Means: The owner (user) can read, write, execute - the group can read and execute - everyone else cannot do anything with it. - - - + Any bit flag may be unset. An unset bit flag is the equivalent of "cannot" and is represented + as a - character (see ) + +Example File + +-rwxr-x--- Means: + ^^^ The owner (user) can read, write, execute + ^^^ the group can read and execute + ^^^ everyone else cannot do anything with it. + + + + - Additional possibilities 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,r + s = UNIX Domain Socket. - The letters rwxXst set permissions for the user, group and others as: read (r), write (w), + 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). @@ -396,7 +394,7 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 - When a directory is set d-wx--x--- this means that the owner can read and create (write) files in it, but because + When a directory is set d-wx--x---, the owner can read and create (write) files in it, but because the (r) read flags are not set, files cannot be listed (seen) in the directory by anyone. The group can read files in the directory but cannot create new files. 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. @@ -410,20 +408,20 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 For example, Windows NT/2K/XP provides the capacity to set access controls on a directory into which people can write files but not delete them. It is possible to set an ACL on a Windows file that permits the file to be written to but not deleted. Such concepts are foreign to the UNIX operating system file space. Within the UNIX file system - anyone who has the ability to create a file can write to it, and has the capability to delete it. + anyone who has the ability to create a file can write to it and has the capability to delete it. For the record, in the UNIX environment the ability to delete a file is controlled by the permissions on the directory that the file is in. In other words, a user can delete a file in a directory to which that - user had write access, even if that user does not own the file. + user has write access, even if that user does not own the file. Of necessity, Samba is subject to the file system semantics of the host operating system. Samba is therefore limited in the file system capabilities that can be made available through Windows ACLs, and therefore performs - a best fit translation to POSIX ACLs. Some UNIX file systems do however support a feature known - as extended attributes. Only the Windows concept of inheritance is implemented by Samba through + a "best fit" translation to POSIX ACLs. Some UNIX file systems do, however support, a feature known + as extended attributes. Only the Windows concept of inheritance is implemented by Samba through the appropriate extended attribute. @@ -443,32 +441,34 @@ CAP_LINUX_IMMUTABLE capability can set or clear this attribute. server. - + + Test for file Immutibility Support + - Create a file called filename + Create a file called filename. Login as the root user, then set the immutibile flag on a test file as follows: -&rootprompt; chatter +i 'filename' +&rootprompt; chatter +i `filename' - Login as the user who owns the file (not root) attempt to remove the file as follows: + Login as the user who owns the file (not root) and attempt to remove the file as follows: mystic:/home/hannibal > rm filename It will not be possible to delete the file if the immutible flag is correctly honored. - + - On those systems and file system types that support the immutible bit it is possible to create directories - that can not be deleted. Check the man page on your particular host system to determine whether or not + On those systems and file system types that support the immutible bit, it is possible to create directories + that cannot be deleted. Check the man page on your particular host system to determine whether or not immutable directories are writable. If they are not, then the entire directory and its contents will effectively - by protected from writing (file creation also) and deletion. + be protected from writing (file creation also) and deletion. @@ -481,19 +481,19 @@ mystic:/home/hannibal > rm filename Share Definition Access Controls - -permissionsshare -The following parameters in the &smb.conf; file sections define a share control or effect access controls. -Before using any of the following options, please refer to the man page for &smb.conf;. - + + permissionsshare + The following parameters in the &smb.conf; file sections define a share control or affect access controls. + Before using any of the following options, please refer to the man page for &smb.conf;. + - User and Group-Based Controls + User- and Group-Based Controls - User and group-based controls can prove quite useful. In some situations it is distinctly desirable to affect all + User- and group-based controls can prove quite useful. In some situations it is distinctly desirable to affect all file system operations as if a single user were doing so. The use of the and - behavior will achieve this. In other situations it may be necessary to effect a + behavior will achieve this. In other situations it may be necessary to use a paranoia level of control to ensure that only particular authorized persons will be able to access a share or its contents. Here the use of the or the may be most useful. @@ -501,23 +501,23 @@ Before using any of the following options, please refer to the man page for &smb As always, it is highly advisable to use the least difficult to maintain and the least ambiguous method for - controlling access. Remember, when you leave the scene someone else will need to provide assistance and - if he finds too great a mess or does not understand what you have done, there is risk of + controlling access. Remember, when you leave the scene, someone else will need to provide assistance, and + if he or she finds too great a mess or does not understand what you have done, there is risk of Samba being removed and an alternative solution being adopted. - Following table enumerates these controls. + User and Group Based Controls enumerates these controls. - User and Group Based Controls +
User- and Group-Based Controls Control Parameter - Description - Action - Notes + Description, Action, Notes @@ -525,8 +525,8 @@ Before using any of the following options, please refer to the man page for &smb List of users who will be granted administrative privileges on the share. - They will do all file operations as the super-user (root). - Any user in this list will be able to do anything they like on the share, + They will do all file operations as the superuser (root). + Users in this list will be able to do anything they like on the share, irrespective of file permissions. @@ -540,7 +540,7 @@ Before using any of the following options, please refer to the man page for &smb - Specifies a UNIX user name that will be assigned as the default user for all users connecting to this service. + Specifies a UNIX username that will be assigned as the default user for all users connecting to this service. This is useful for sharing files. Incorrect use can cause security problems. @@ -567,13 +567,13 @@ Before using any of the following options, please refer to the man page for &smb List of users that are given read-only access to a service. Users in this list - will not be given write access, no matter what the read only option is set to. + will not be given write access, no matter what the read-only option is set to. - Refer to the &smb.conf; man page for more information -- this is a complex and potentially misused parameter. + Refer to the &smb.conf; man page for more information; this is a complex and potentially misused parameter. @@ -598,25 +598,25 @@ Before using any of the following options, please refer to the man page for &smb File and Directory Permissions-Based Controls - The following file and directory permission-based controls, if misused, can result in considerable difficulty to - diagnose causes of misconfiguration. Use them sparingly and carefully. By gradually introducing each one by one, + The following file and directory permission-based controls, if misused, can result in considerable difficulty in + diagnosing causes of misconfiguration. Use them sparingly and carefully. By gradually introducing them one by one, undesirable side effects may be detected. In the event of a problem, always comment all of them out and then gradually reintroduce them in a controlled way. - Refer to the following table for information regarding the parameters that may be used to affect file and - directory permission-based access controls. + Refer to File and Directory Permission Based Controls for information + regarding the parameters that may be used to affect file and directory permission-based access controls. -
File and Directory Permission Based Controls +
File and Directory Permission-Based Controls Control Parameter - Description - Action - Notes + Description, Action, Notes @@ -630,7 +630,7 @@ Before using any of the following options, please refer to the man page for &smb The octal modes used when converting DOS modes to UNIX modes when creating UNIX directories. - See also: directory security mask. + See also directory security mask. @@ -641,13 +641,13 @@ Before using any of the following options, please refer to the man page for &smb - This parameter specifies a set of UNIX mode bit permissions that will always be set on a file created by Samba. + This parameter specifies a set of UNIX-mode bit permissions that will always be set on a file created by Samba. - This parameter specifies a set of UNIX mode bit permissions that will always be set on a directory created by Samba. + This parameter specifies a set of UNIX-mode bit permissions that will always be set on a directory created by Samba. @@ -671,13 +671,13 @@ Before using any of the following options, please refer to the man page for &smb - Prevents clients from seeing the existence 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. Unwritable directories are shown as usual. - This parameter controls whether smbd will attempt to map UNIX permissions into Windows NT access control lists. + This parameter controls whether smbd will attempt to map UNIX permissions into Windows NT ACLs. @@ -697,7 +697,8 @@ Before using any of the following options, please refer to the man page for &smb The following are documented because of the prevalence of administrators creating inadvertent barriers to file - access by not understanding the full implications of &smb.conf; file settings. See following table. + access by not understanding the full implications of &smb.conf; file settings. + See Other Controls.
Other Controls @@ -707,7 +708,7 @@ Before using any of the following options, please refer to the man page for &smb Control Parameter - Description - Action - Notes + Description, Action, Notes @@ -718,14 +719,14 @@ Before using any of the following options, please refer to the man page for &smb - This means that all file name lookup will be done in a case sensitive manner. + This means that all file name lookup will be done in a case-sensitive manner. Files will be created with the precise file name Samba received from the MS Windows client. - Client Side Caching Policy - parallels MS Windows client side file caching capabilities. + Client-side caching policy parallels MS Windows client-side file caching capabilities. @@ -743,7 +744,7 @@ Before using any of the following options, please refer to the man page for &smb - DOS and Windows allow users to change file time stamps if they can write to the file. POSIX semantics prevent this. + DOS and Windows allow users to change file timestamps if they can write to the file. POSIX semantics prevent this. This option allows DOS and Windows behavior. @@ -751,7 +752,7 @@ Before using any of the following options, please refer to the man page for &smb Oplocks are the way that SMB clients get permission from a server to locally cache file operations. If a server grants an - oplock, the client is free to assume that it is the only one accessing the file and it will aggressively cache file data. + oplock, the client is free to assume that it is the only one accessing the file, and it will aggressively cache file data. @@ -761,7 +762,7 @@ Before using any of the following options, please refer to the man page for &smb - Note: MS Windows Explorer allows over-ride of files marked as hidden so they will still be visible. + Note: MS Windows Explorer allows override of files marked as hidden so they will still be visible. @@ -789,53 +790,57 @@ Before using any of the following options, please refer to the man page for &smb -permissionsshare ACLs - This section deals with how to configure Samba per share access control restrictions. + permissionsshare ACLs + 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 can be set on MS Windows NT4/200x/XP shares. This can be an effective way to limit who can - connect to a share. In the absence of specific restrictions the default setting is to allow + connect to a share. In the absence of specific restrictions, the default setting is to allow the global user Everyone - Full Control (full control, change and read). - At this time Samba does not provide a tool for configuring access control setting on the share + At this time Samba does not provide a tool for configuring access control settings on the share itself. Samba does have the capacity to store and act on access control settings, but the only - way to create those settings is to use either the NT4 Server Manager or the Windows 200x MMC for - Computer Management. + way to create those settings is to use either the NT4 Server Manager or the Windows 200x + Microsoft Management Console (MMC) for Computer Management. - Samba stores the per share access control settings in a file called share_info.tdb. + Samba stores the per-share access control settings in a file called share_info.tdb. 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 /usr/local/samba/var. If the tdbdump utility has been compiled and installed on your system, then you can examine the contents of this file - by executing: tdbdump share_info.tdb in the directory containing the tdb files. + by executing tdbdump share_info.tdb in the directory containing the tdb files. Share Permissions Management - The best tool for the task is platform dependant. Choose the best tool for your environment. + The best tool for share permissions management is platform-dependent. Choose the best tool for your environment. Windows NT4 Workstation/Server - The tool you need to use to manage share permissions on a Samba server is the NT Server Manager. - Server Manager is shipped with Windows NT4 Server products but not with Windows NT4 Workstation. - You can obtain the NT Server Manager for MS Windows NT4 Workstation from Microsoft &smbmdash; see details below. + The tool you can use to manage share permissions on a Samba server from a Windows NT4 Workstation or Server + is the NT Server Manager. Server Manager is shipped with Windows NT4 Server products but not with Windows + NT4 Workstation. You can obtain the NT Server Manager for MS Windows NT4 Workstation from the Microsoft + web site support section. Instructions + - Launch the NT4 Server Manager, click on the Samba server you want to administer. From the menu - select Computer, then click on Shared Directories. + Launch the NT4 Server Manager and click on the Samba server you want to + administer. From the menu select Computer, then click on + Shared Directories. - Click on the share that you wish to manage, then click the Properties tab. then click + Click on the share that you wish to manage and click the Properties tab. then click the Permissions tab. Now you can add or change access control settings as you wish. @@ -846,22 +851,22 @@ Before using any of the following options, please refer to the man page for &smb Windows 200x/XP - On MS Windows NT4/200x/XP system access control lists on the share itself are set using native - tools, usually from File Manager. For example, in Windows 200x, right click on the shared folder, + On MS Windows NT4/200x/XP system, ACLs on the share itself are set using native + tools, usually from File Manager. 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 Everyone full control on the share. + Windows NT4/200x permission allows "Everyone" full control on the share. - MS Windows 200x and later versions come with a tool called the Computer Management snap-in for the - Microsoft Management Console (MMC). This tool is located by clicking on Control Panel -> + MS Windows 200x and later versions come with a tool called the Computer Management + snap-in for the MMC. This tool is located by clicking on Control Panel -> Administrative Tools -> Computer Management. Instructions - After launching the MMC with the Computer Management snap-in, click the menu item Action, + After launching the MMC with the Computer Management snap-in, click the menu item Action and select Connect to another computer. 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 are already logged in with administrative privilege, this step is not offered. @@ -870,8 +875,8 @@ Before using any of the following options, please refer to the man page for &smb If the Samba server is not shown in the Select Computer box, type in the name of the target Samba server in the field Name:. Now click the on [+] next to - System Tools, then on the [+] next to Shared Folders in the - left panel. + System Tools, then on the [+] next to + Shared Folders in the left panel. @@ -884,10 +889,11 @@ Before using any of the following options, please refer to the man page for &smb - Be careful. If you take away all permissions from the Everyone user without removing this user, - effectively no user will be able to access the share. This is a result of what is known as - ACL precedence. Everyone with no access means that MaryK who is part of the group - Everyone will have no access even if she is given explicit full control access. + Be careful. If you take away all permissions from the Everyone user without removing + this user, effectively no user will be able to access the share. This is a result of what is known as + ACL precedence. Everyone with no access means that MaryK who is + part of the group Everyone will have no access even if she is given explicit full + control access. @@ -904,13 +910,13 @@ Before using any of the following options, please refer to the man page for &smb -permissionsfile/directory ACLs + permissionsfile/directory ACLs Windows NT clients can use their native security settings dialog box to view and modify the underlying UNIX permissions. - This ability is careful not to compromise the security of the UNIX host on which Samba is running, and + This ability is careful not to compromise the security of the UNIX host on which Samba is running and still obeys all the file permission rules that a Samba administrator can set. @@ -933,15 +939,15 @@ Before using any of the following options, please refer to the man page for &smb Viewing File Security on a Samba Share - From an NT4/2000/XP client, right click on any file or directory in a Samba-mounted drive letter + From an NT4/2000/XP client, right-click on any file or directory in a Samba-mounted drive letter or UNC path. When the menu pops up, click on the Properties entry at the bottom of the menu. This brings up the file Properties dialog box. Click on the Security tab and you will see three buttons: Permissions, Auditing, and Ownership. The Auditing - button will cause either an error message `A requested privilege is not held by the client' - 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 Add + button will cause either an error message "A requested privilege is not held by the client" + to appear if the user is not the NT administrator, or a dialog 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 + nonfunctional with a Samba share at this time, because the only useful button, the Add button, will not currently allow a list of users to be seen. @@ -961,7 +967,7 @@ Before using any of the following options, please refer to the man page for &smb SERVER is the NetBIOS name of the Samba server, user - is the user name of the UNIX user who owns the file, and (Long name) is the + is the username of the UNIX user who owns the file, and (Long name) is the descriptive string identifying the user (normally found in the GECOS field of the UNIX password database). Click on the Close button to remove this dialog. @@ -973,17 +979,19 @@ Before using any of the following options, please refer to the man page for &smb The Take Ownership button will not allow you to change the ownership of this file to - yourself (clicking it will display a dialog box complaining that the user you are currently logged onto + yourself (clicking it will display a dialog box complaining that the user as whom you are currently logged onto the NT client cannot be found). The reason for this is that changing the ownership of a file is a privileged - operation in UNIX, available only to the root user. As clicking on this button causes + operation in UNIX, available only to the root user. Because clicking on this button causes NT to attempt to change the ownership of a file to the current user logged into the NT client, this will - not work with Samba at this time. + not work with Samba at this time. + - There is an NT chown command that will work with Samba 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 Seclib NT security library written - by Jeremy Allison of the Samba Team, and is available from the main Samba FTP site. + There is an NT chown command that will work with Samba 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 file system + or remote mounted NTFS or Samba drive. This is available as part of the Seclib NT + security library written by Jeremy Allison of the Samba Team and is downloadable from the main Samba FTP site. + @@ -991,7 +999,7 @@ Before using any of the following options, please refer to the man page for &smb Viewing File or Directory Permissions - The third button is the Permissions button. Clicking on this brings up a dialog box + The third button is the Permissions button. Clicking on it brings up a dialog box that shows both the permissions and the UNIX owner of the file or directory. The owner is displayed like this: @@ -999,238 +1007,271 @@ Before using any of the following options, please refer to the man page for &smb user (Long name) - Where SERVER is the NetBIOS name of the Samba server, - user is the user name of the UNIX user who owns the file, and + SERVER is the NetBIOS name of the Samba server, + user is the username of the UNIX user who owns the file, and (Long name) is the descriptive string identifying the user (normally found in the GECOS field of the UNIX password database). If the parameter is set to false, - the file owner will be shown as the NT user Everyone and the permissions will be - shown as NT Full Control. + the file owner will be shown as the NT user Everyone, and the permissions will be + shown as NT Full Control. - The permissions field is displayed differently for files and directories, both are discussed here: + The permissions field is displayed differently for files and directories, both are discussed next. - File Permissions - - The standard UNIX user/group/world triplet and the corresponding read, write, execute permissions - 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 Everyone, followed - by the list of permissions allowed for the UNIX world. The UNIX owner and group permissions are displayed as an NT - user icon and an NT local group icon, respectively, followed by the list - of permissions allowed for the UNIX user and group. - - Because many UNIX permission sets do not map into common NT names such as read, - change or full control, usually the permissions will be prefixed - by the words Special Access in the NT display list. - - But what happens if the file has no permissions allowed for a particular UNIX user group or world component? In order - to allow no permissions to be seen and modified Samba then overloads the NT Take Ownership ACL attribute - (which has no meaning in UNIX) and reports a component with no permissions as having the NT O bit set. - This was chosen, of course, to make it look like a zero, meaning zero permissions. More details on the decision behind this is - given below. + File Permissions + + + The standard UNIX user/group/world triplet and the corresponding read, write, + execute permissions 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 Everyone, followed + by the list of permissions allowed for the UNIX world. The UNIX owner and group permissions are displayed as an NT + user icon and an NT local group icon, respectively, followed by the list + of permissions allowed for the UNIX user and group. + + + + Because many UNIX permission sets do not map into common NT names such as read, + change, or full control, usually the permissions will be prefixed + by the words Special Access in the NT display list. + + + + But what happens if the file has no permissions allowed for a particular UNIX user group or world component? + In order to allow no permissions to be seen and modified, Samba then overloads the NT + Take Ownership ACL attribute (which has no meaning in UNIX) and reports a component with + no permissions as having the NT O bit set. This was chosen, of course, to make it look + like a zero, meaning zero permissions. More details on the decision behind this action are given below. + + - Directory Permissions + Directory Permissions - Directories on an NT NTFS file system have two different sets of permissions. The first set is the ACL set on the - directory itself, which is usually displayed in the first set of parentheses in the normal RW - 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. + + Directories on an NT NTFS file system have two different sets of permissions. The first set is the ACL set on the + directory itself, which is usually displayed in the first set of parentheses in the normal RW + 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. + - The second set of directory permissions has no real meaning in the UNIX permissions world and represents the - inherited permissions that any file created within this directory would inherit. + + The second set of directory permissions has no real meaning in the UNIX permissions world and represents the + inherited permissions that any file created within this directory would inherit. + + + + Samba synthesizes these inherited permissions for NT by returning as an NT ACL the UNIX permission mode that a new file + created by Samba on this share would receive. + - Samba synthesizes these inherited permissions for NT by returning as an NT ACL the UNIX permission mode that a new file - created by Samba on this share would receive. + - Modifying File or Directory Permissions - - Modifying file and directory permissions is as simple - as changing the displayed permissions in the dialog box, and - clicking on OK. 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. - - If the parameter - is set to false, any attempt to set - security permissions will fail with an `Access Denied' - message. - - The first thing to note is that the Add - button will not return a list of users in Samba (it will give - an error message saying `The remote procedure call failed - and did not execute'). 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. - - If a permission triplet (either user, group, or world) - is removed from the list of permissions in the NT dialog box, - then when the OK 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 O flag, as described above. This - allows you to add permissions back to a file or directory once - you have removed them from a triplet component. - - As UNIX supports only the r, w and x bits of - an NT ACL, if other NT security attributes such as Delete Access are - selected they will be ignored when applied on the Samba server. - - 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 un-check the Replace - permissions on existing files check-box in the NT - dialog before clicking on OK. - - If you wish to remove all permissions from a - user/group/world component, you may either highlight the - component and click on the Remove button, - or set the component to only have the special Take - Ownership permission (displayed as O - ) highlighted. - + Modifying File or Directory Permissions - - Interaction with the Standard Samba <quote>create mask</quote> Parameters + + Modifying file and directory permissions is as simple as changing the displayed permissions in the dialog box + and clicking on OK. 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 also need to + be taken into account. + - There are four parameters that control interaction with the standard Samba create mask parameters. - These are: + + If the parameter is set to false, any attempt to + set security permissions will fail with an "Access Denied" message. + - - - - - - + + The first thing to note is that the Add button will not return a list of users in Samba + (it will give an error message saying "The remote procedure call failed and did not + execute"). This means that you can only manipulate the current user/group/world permissions listed + in the dialog box. This actually works quite well because these are the only permissions that UNIX actually + has. + - + + If a permission triplet (either user, group, or world) is removed from the list of permissions in the NT + dialog box, then when the OK button is pressed, it will be applied as no + permissions on the UNIX side. If you view the permissions again, the no + permissions entry will appear as the NT O flag, as described above. This allows + you to add permissions back to a file or directory once you have removed them from a triplet component. + - When a user clicks on OK to apply the - permissions, Samba maps the given permissions into a user/group/world - r/w/x triplet set, and then checks the changed permissions for a - file against the bits set in the - parameter. Any bits that - were changed that are not set to 1 in this parameter are left alone - in the file permissions. - - Essentially, zero bits in the - may be treated as a set of bits the user is not - allowed to change, and one bits are those the user is allowed to change. - + + Because UNIX supports only the r, w, and x bits of an NT ACL, if + other NT security attributes such as Delete Access are selected, they will be ignored + when applied on the Samba server. + - If not explicitly set, this parameter defaults to the same value as - the parameter. To allow a user to modify all the - user/group/world permissions on a file, set this parameter to 0777. - + + 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 + Replace permissions on existing files checkbox in the NT dialog before clicking on + OK. + - Next Samba checks the changed permissions for a file against the bits set in the - parameter. Any bits - that were changed that correspond to bits set to 1 in this parameter - are forced to be set. - - Essentially, bits set in the force security mode parameter - may be treated as a set of bits that, when modifying security on a file, the user has always set to be on. - - If not explicitly set, this parameter defaults to the same value - as the parameter. - To allow a user to modify all the user/group/world permissions on a file - with no restrictions set this parameter to 000. The - and force - security mode parameters are applied to the change - request in that order. - - For a directory, Samba will perform the same operations as - described above for a file except it uses the parameter - directory security mask instead of security - mask, and force directory security mode - parameter instead of force security mode - . - - The parameter - by default is set to the same value as the directory mask - parameter and the force directory security - mode parameter by default is set to the same value as - the parameter. - In this way Samba enforces the permission restrictions that - an administrator can set on a Samba share, while still allowing users - to modify the permission bits within that restriction. - - If you want to set up a share that allows users full control - in modifying the permission bits on their files and directories and - does not force any particular bits to be set on, then set the following - parameters in the &smb.conf; file in that share-specific section: - + + If you wish to remove all permissions from a user/group/world component, you may either highlight the + component and click on the Remove button or set the component to only have the special + Take Ownership permission (displayed as O) highlighted. + - - 0777 - 0 - 0777 - 0 - - Interaction with the Standard Samba File Attribute Mapping + Interaction with the Standard Samba <quote>create mask</quote> Parameters - - Samba maps some of the DOS attribute bits (such as read - only) into the UNIX permissions of a file. This means there can - be a conflict between the permission bits set via the security - dialog and the permission bits set by the file attribute mapping. - - + There are four parameters that control interaction with the standard Samba create mask parameters: + + + + + + + + + + + + + When a user clicks on OK to apply the + permissions, Samba maps the given permissions into a user/group/world + r/w/x triplet set, and then checks the changed permissions for a + file against the bits set in the + parameter. Any bits that + were changed that are not set to 1 in this parameter are left alone + in the file permissions. + + + Essentially, zero bits in the + may be treated as a set of bits the user is not + allowed to change, and one bits are those the user is allowed to change. + + + + If not explicitly set, this parameter defaults to the same value as + the parameter. To allow a user to modify all the + user/group/world permissions on a file, set this parameter to 0777. + + + + Next Samba checks the changed permissions for a file against the bits set in the + parameter. Any bits + that were changed that correspond to bits set to 1 in this parameter + are forced to be set. + + + Essentially, bits set in the force security mode parameter + may be treated as a set of bits that, when modifying security on a file, the user + has always set to be on. + + + If not explicitly set, this parameter defaults to the same value + as the parameter. + To allow a user to modify all the user/group/world permissions on a file + with no restrictions, set this parameter to 000. The + and force + security mode parameters are applied to the change + request in that order. + + + For a directory, Samba performs the same operations as + described above for a file except it uses the parameter + directory security mask instead of security + mask, and force directory security mode + parameter instead of force security mode + . + + + The parameter + by default is set to the same value as the directory mask + parameter and the force directory security + mode parameter by default is set to the same value as + the parameter. + In this way Samba enforces the permission restrictions that + an administrator can set on a Samba share, while still allowing users + to modify the permission bits within that restriction. + + + If you want to set up a share that allows users full control + in modifying the permission bits on their files and directories and + does not force any particular bits to be set on, + then set the following parameters in the &smb.conf; file in that + share-specific section: + + 0777 + 0 + 0777 + 0 + + + + + + Interaction with the Standard Samba File Attribute Mapping + + + + Samba maps some of the DOS attribute bits (such as read-only) + into the UNIX permissions of a file. This means there can + be a conflict between the permission bits set via the security + dialog and the permission bits set by the file attribute mapping. + + + + + If a file has no UNIX read access for the owner, it will show up + as read-only in the standard file attributes tabbed dialog. + Unfortunately, this dialog is the same one that contains the security information + in another tab. + + + + What this can mean is that if the owner changes the permissions + to allow himself or herself read access using the security dialog, clicks on + OK to get back to the standard attributes tab + dialog, and clicks on OK 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 on OK to get back to the + attributes dialog, you should always press Cancel + rather than OK to ensure that your changes + are not overridden. + - If a file has no UNIX read access for the owner, it will show up - as read only in the standard file attributes tabbed dialog. - Unfortunately, this dialog is the same one that contains the security information - in another tab. - - What this can mean is that if the owner changes the permissions - to allow himself read access using the security dialog, clicks on - OK to get back to the standard attributes tab - dialog, and clicks on OK 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 on OK to get back to the - attributes dialog, you should always press Cancel - rather than OK to ensure that your changes - are not overridden. - Windows NT/200X ACLS and POSIX ACLS &smbmdash; Limitations + Windows NT/200X ACLs and POSIX ACLs Limitations - Windows administrators are familiar with simple ACL controls and they typically + Windows administrators are familiar with simple ACL controls, and they typically consider that UNIX user/group/other (ugo) permissions are inadequate and not sufficiently fine-grained. Competing SMB implementations differ in how they handle Windows ACLs. Samba handles - Windows ACLs from the perspective of UNIX file system adminsitration and thus adopts + Windows ACLs from the perspective of UNIX file system administration and thus adopts the limitations of POSIX ACLs. Therefore, where POSIX ACLs lack a capability of the Windows NT/200X ACLs, the POSIX semantics and limitations are imposed on the Windows administrator. - POSIX ACLs present an interesting challenge to the UNIX adminsitrator and therfore a + POSIX ACLs present an interesting challenge to the UNIX administrator and therefore force a compromise to be applied to Windows ACLs administration. POSIX ACLs are not - covered by an official standard, rather the latest standard is a draft standard + covered by an official standard; rather, the latest standard is a draft standard 1003.1e revision 17. This is the POSIX document on which the Samba implementation has been implemented. @@ -1239,7 +1280,7 @@ Before using any of the following options, please refer to the man page for &smb UNIX vendors differ in the manner in which POSIX ACLs are implemented. There are a number of Linux file systems that support ACLs. Samba has to provide a way to make transparent all the differences between the various implementations of POSIX ACLs. - The pressure for ACLs support in Samba has noticibly increased the pressure to + The pressure for ACLs support in Samba has noticeably increased the pressure to standardize ACLs support in the UNIX world. @@ -1258,15 +1299,15 @@ Before using any of the following options, please refer to the man page for &smb In examining POSIX ACLs we must consider the manner in which they operate for both files and directories. File ACLs have the following significance: -# file: testfile <- the file name -# owner: jeremy <-- the file owner -# group: users <-- the POSIX group owner -user::rwx <-- perms for the file owner (user) -user:tpot:r-x <-- perms for the additional user 'tpot' -group::r-- <-- perms for the file group owner (group) -group:engrs:r-- <-- perms for the additonal group 'engineers' -mask:rwx <-- the mask that is 'ANDed' with groups -other::--- <-- perms applied to everyone else (other) +# file: testfile <- the file name +# owner: jeremy <-- the file owner +# group: users <-- the POSIX group owner +user::rwx <-- perms for the file owner (user) +user:tpot:r-x <-- perms for the additional user `tpot' +group::r-- <-- perms for the file group owner (group) +group:engrs:r-- <-- perms for the additonal group `engineers' +mask:rwx <-- the mask that is `ANDed' with groups +other::--- <-- perms applied to everyone else (other) Directory ACLs have the following signficance: @@ -1275,10 +1316,10 @@ other::--- <-- perms applied to everyone else (other) # group: jeremy <-- the POSIX group owner user::rwx <-- directory perms for owner (user) group::rwx <-- directory perms for owning group (group) -mask::rwx <-- the mask that is 'ANDed' with group perms +mask::rwx <-- the mask that is `ANDed' with group perms other:r-x <-- perms applied to everyone else (other) default:user::rwx <-- inherited owner perms -default:user:tpot:rwx <-- inherited extra perms for user 'tpot' +default:user:tpot:rwx <-- inherited extra perms for user `tpot' default:group::r-x <-- inherited group perms default:mask:rwx <-- inherited default mask default:other:--- <-- inherited permissions for everyone (other) @@ -1292,8 +1333,9 @@ default:other:--- <-- inherited permissions for everyone (other) Microsoft Windows NT4/200X ACLs must of necessity be mapped to POSIX ACLs. - The mappings for file permissions are shown in . - The '#' character means this flag is set only when the Windows administrator + The mappings for file permissions are shown in How + Windows File ACLs Map to UNIX POSIX File ACLs. + The # character means this flag is set only when the Windows administrator sets the Full Control flag on the file. @@ -1313,11 +1355,11 @@ default:other:--- <-- inherited permissions for everyone (other) # - Traverse Folder / Execute File + Traverse Folder/Execute File x - List Folder / Read Data + List Folder/Read Data r @@ -1329,11 +1371,11 @@ default:other:--- <-- inherited permissions for everyone (other) r - Create Files / Write Data + Create Files/Write Data w - Create Folders / Append Data + Create Folders/Append Data w @@ -1369,21 +1411,21 @@ default:other:--- <-- inherited permissions for everyone (other)
- As can be seen from the mapping table, there is no 1:1 mapping capability and therefore + As can be seen from the mapping table, there is no one-to-one mapping capability, and therefore Samba must make a logical mapping that will permit Windows to operate more-or-less the way - that is intended by the Administrator. + that is intended by the administrator. In general the mapping of UNIX POSIX user/group/other permissions will be mapped to - Windows ALCs. This has precidence over the creation of POSIX ACLs. POSIX ACLs are necessary + Windows ACLs. This has precedence over the creation of POSIX ACLs. POSIX ACLs are necessary to establish access controls for users and groups other than the user and group that own the file or directory. The UNIX administrator can set any directory permission from within the UNIX environment. - The Windows administrator is more restricted in that it is not possible from within the + The Windows administrator is more restricted in that it is not possible from within Windows Explorer to remove read permission for the file owner. @@ -1394,8 +1436,8 @@ default:other:--- <-- inherited permissions for everyone (other) Interesting things happen in the mapping of UNIX POSIX directory permissions as well - as UNIX POSIX ACLs to Windows ACEs (Access Control Entries, the discrete component of - an Access Control List (ACL), are mapped to Windows directory ACLs. + as UNIX POSIX ACLs to Windows ACEs (Access Control Entries, the discrete components of + an ACLs when they are mapped to Windows directory ACLs. @@ -1413,8 +1455,8 @@ default:other:--- <-- inherited permissions for everyone (other) Common Errors -File, directory and share access problems are common on the mailing list. The following -are examples taken from the mailing list in recent times. +File, directory, and share access problems are common topics on the mailing list. The following +are examples recently taken from the mailing list. @@ -1423,15 +1465,16 @@ are examples taken from the mailing list in recent times. - We are facing some troubles with file/directory permissions. I can log on the domain as admin user(root), + We are facing some troubles with file/directory permissions. I can log on the domain as admin user (root), 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 the server to - chgrp -R users * and chown -R nobody * to allow others users to change the file. + chgrp -R users * and chown -R nobody * to allow + others users to change the file. - There are many ways to solve this problem and here are a few hints: + There are many ways to solve this problem, and here are a few hints: @@ -1443,12 +1486,12 @@ are examples taken from the mailing list in recent times. - Set the ownership to what ever public owner and group you want + Set the ownership to whatever public owner and group you want -&prompt;find 'directory_name' -type d -exec chown user.group {}\; -&prompt;find 'directory_name' -type d -exec chmod 1775 'directory_name' -&prompt;find 'directory_name' -type f -exec chmod 0775 {} \; -&prompt;find 'directory_name' -type f -exec chown user.group {}\; +&prompt;find `directory_name' -type d -exec chown user.group {}\; +&prompt;find `directory_name' -type d -exec chmod 1775 `directory_name' +&prompt;find `directory_name' -type f -exec chmod 0775 {} \; +&prompt;find `directory_name' -type f -exec chown user.group {}\; @@ -1462,7 +1505,7 @@ are examples taken from the mailing list in recent times. - Directory is: /foodbar + Directory is /foodbar: &prompt;chown jack.engr /foodbar @@ -1523,7 +1566,7 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar These procedures are needed only if your users are not members of the group - you have used. That is if within the OS do not have write permission on the directory. + you have used &smbmdash; that is, if within the OS they do not have write permission on the directory. @@ -1552,22 +1595,22 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar MS Word with Samba Changes Owner of File - Question: When user B saves a word document that is owned by user A the updated file is now owned by user B. - Why is Samba doing this? How do I fix this? + Question: When user B saves a word document that is owned by user A, + the updated file is now owned by user B. Why is Samba doing this? How do I fix this? - Answer: Word does the following when you modify/change a Word document: MS Word creates a NEW document with - a temporary name, Word then closes the old document and deletes it, Word then renames the new document to the original document name. + Answer: Word does the following when you modify/change a Word document: MS Word creates a new document with + a temporary name. Word then closes the old document and deletes it, then renames the new document to the original document name. There is no mechanism by which Samba can in any way know that the new document really should be owned by the owners of the original file. Samba has no way of knowing that the file will be renamed by MS Word. As far as Samba is able - to tell, the file that gets created is a NEW file, not one that the application (Word) is updating. + to tell, the file that gets created is a new file, not one that the application (Word) is updating. - There is a work-around to solve the permissions problem. That work-around involves understanding how you can manage file + There is a workaround to solve the permissions problem. It involves understanding how you can manage file system behavior from within the &smb.conf; file, as well as understanding how UNIX file systems work. Set on the directory - in which you are changing Word documents: chmod g+s `directory_name' This ensures that all files will + in which you are changing Word documents: chmod g+s `directory_name'. This ensures that all files will be created with the group that owns the directory. In &smb.conf; share declaration section set: @@ -1579,7 +1622,7 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar - These two settings will ensure that all directories and files that get created in the share will be read/writable by the + These two settings will ensure that all directories and files that get created in the share will be readable/writable by the owner and group set on the directory itself. diff --git a/docs/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml b/docs/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml index b07e13ab73..0f5ca5d6c4 100644 --- a/docs/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml +++ b/docs/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml @@ -3,7 +3,7 @@ &author.jht; - April 3 2003 + June 15 2005 Advanced Network Management @@ -11,17 +11,16 @@ 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. +environment, and to make their lives a little easier. Features and Benefits -Often the difference between a working network environment and a well appreciated one can +Often the difference between a working network environment and a well-appreciated one can best be measured by the little things that make everything work more -harmoniously. A key part of every network environment solution is the -ability to remotely +harmoniously. A key part of every network environment solution is the ability to remotely manage MS Windows workstations, remotely access the Samba server, provide customized logon scripts, as well as other housekeeping activities that help to sustain more reliable network operations. @@ -38,14 +37,14 @@ other chapters, for ease of reference. Remote Server Administration -How do I get `User Manager' and `Server Manager'? +How do I get User Manager and Server Manager? User Manager Server Manager Event Viewer -Since I do not need to buy an NT4 Server, how do I get the `User Manager for Domains' -and the `Server Manager'? +Since I do not need to buy an NT4 server, how do I get the User Manager for Domains +and the Server Manager? @@ -61,13 +60,15 @@ on Windows 9x/Me systems. The tools set includes: -Download the archived file at ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE. +Download the archived file at the Microsoft Nexus link. SRVTOOLS.EXE -The Windows NT 4.0 version of the `User Manager for -Domains' and `Server Manager' are available from Microsoft via ftp. +The Windows NT 4.0 version of the User Manager for +Domains and Server Manager are available from Microsoft +via ftp. @@ -93,14 +94,14 @@ is the best tool in your network environment. - I have a wonderful Linux/Samba server running as pdc for a network. Now I would like to add remote + I have a wonderful Linux/Samba server running as PDC for a network. Now I would like to add remote desktop capabilities so users outside could login to the system and get their desktop up from home or another country. - Is there a way to accomplish this? Do I need a Windows Terminal Server? Do I need to configure it so - it is a member of the domain or a BDC,PDC? Are there any hacks for MS Windows XP to enable remote login + Is there a way to accomplish this? Do I need a Windows Terminal server? Do I need to configure it so + it is a member of the domain or a BDC or PDC? Are there any hacks for MS Windows XP to enable remote login even if the computer is in a domain? @@ -122,17 +123,17 @@ is the best tool in your network environment.
- I could test drive their (public) Red Hat machine in Italy, over a loaded - Internet connection, with enabled thumbnail previews in KDE konqueror + I test drove their (public) Red Hat 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 - that my score was 631750 points at first try. + that my score was 631,750 points at first try. 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 + connection methods I use from time to time: TightVNC, rdesktop or Remote X. It is even faster than a direct crosslink connection between two nodes. @@ -145,20 +146,20 @@ is the best tool in your network environment. - I recommend to test drive NX to anybody with a only a passing interest in remote computing - http://www.nomachine.com/testdrive.php. + I recommend test driving NX to anybody with a only a passing interest in remote computing + the NX utility. - Just download the free of charge client software (available for Red Hat, - SuSE, Debian and Windows) and be up and running within five minutes (they + Just download the free-of-charge client software (available for Red Hat, + 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. + a real UNIX account on their testdrive.nomachine.com box). 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, + 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. You also can run it @@ -171,7 +172,7 @@ is the best tool in your network environment. 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.) + use in order to get a fully running remote X session up and running). @@ -198,14 +199,14 @@ is the best tool in your network environment. The NX core technologies are all Open Source and released under the GPL &smbmdash; - you can now use a (very inconvenient) command-line at no cost, + you can now use a (very inconvenient) command line at no cost, but you can buy a comfortable (proprietary) NX GUI front end for money. - NoMachine are encouraging and offering help to OSS/Free Software implementations - for such a front end too, even if it means competition to them (they have written - to this effect even to the LTSP, KDE and GNOME developer mailing lists). + NoMachine is encouraging and offering help to OSS/Free Software implementations + for such a front-end too, even if it means competition to them (they have written + to this effect even to the LTSP, KDE, and GNOME developer mailing lists). @@ -223,7 +224,7 @@ There are several opportunities for creating a custom network startup configurat No Logon Script. Simple universal Logon Script that applies to all users. - Use of a conditional Logon Script that applies per user or per group attributes. + Use of a conditional Logon Script that applies per-user or per-group attributes. Use of Samba's preexec and postexec functions on access to the NETLOGON share to create a custom logon script and then execute it. User of a tool such as KixStart. @@ -321,7 +322,7 @@ This is the genlogon.pl file: -Those wishing to use more elaborate or capable logon processing system should check out these sites: +Those wishing to use a more elaborate or capable logon processing system should check out these sites: @@ -341,7 +342,7 @@ Printers may be added automatically during logon script processing through the u &dosprompt;rundll32 printui.dll,PrintUIEntry /? -See the documentation in the Microsoft knowledgebase article 189105. +See the documentation in the Microsoft Knowledge Base article 189105.
@@ -356,7 +357,7 @@ See the documentation in the - The following share configuration demonstrates use of the script shown in : - + The following share configuration demonstrates use of the script shown in . + [myshare] ... preexec script = /sbin/PermitSingleLogon.sh preexec close = Yes ... - + - Script to Enforce Single Resource Logon +Script to Enforce Single Resource Logon #!/bin/bash diff --git a/docs/Samba3-HOWTO/TOSHARG-BDC.xml b/docs/Samba3-HOWTO/TOSHARG-BDC.xml index c553950f76..9b62564ba8 100644 --- a/docs/Samba3-HOWTO/TOSHARG-BDC.xml +++ b/docs/Samba3-HOWTO/TOSHARG-BDC.xml @@ -12,48 +12,48 @@ Before you continue reading this section, please make sure that you are comfortable -with configuring a Samba Domain Controller as described in Domain Control. +with configuring a Samba domain controller as described in Domain Control. Features and Benefits -This is one of the most difficult chapters to summarize. It does not matter what we say here +This is one of the most difficult chapters to summarize. 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 far more +that are either not yet capable of being delivered or that can be achieved far more effectively using a totally different approach. In the event that you should have a persistent concern that is not addressed in this book, please email John H. Terpstra -clearly setting out your requirements and/or question and we will do our best to provide a solution. +clearly setting out your requirements and/or question, and we will do our best to provide a solution. SAM backendLDAP -Samba-3 is capable of acting as a Backup Domain Controller (BDC) to another Samba Primary Domain -Controller (PDC). A Samba-3 PDC can operate with an LDAP Account backend. The LDAP backend can be -either a common master LDAP server, or a slave server. The use of a slave LDAP server has the +Samba-3 can act as a Backup Domain Controller (BDC) to another Samba Primary Domain +Controller (PDC). A Samba-3 PDC can operate with an LDAP account backend. The LDAP backend can be +either a common master LDAP server or a slave server. The use of a slave LDAP server has the benefit that when the master is down, clients may still be able to log onto the network. This effectively gives Samba a high degree of scalability and is an effective solution for large organizations. If you use an LDAP slave server for a PDC, -you will need to ensure the master's continued availability - if the -slave finds it's master down at the wrong time, you will have +you will need to ensure the master's continued availability &smbmdash; if the +slave finds its master down at the wrong time, you will have stability and operational problems. replicationSAM -While it is possible to run a Samba-3 BDC with non-LDAP backend, that -backend must allow some form of 'two way' propagation, of changes -from the BDC to the master. Only LDAP is capable of this at this stage. +While it is possible to run a Samba-3 BDC with a non-LDAP backend, that +backend must allow some form of "two-way" propagation of changes +from the BDC to the master. Only LDAP has such capability at this stage. SAM backendnon-LDAP -The use of a non-LDAP backend SAM database is particularly problematic because Domain Member +The use of a non-LDAP backend SAM database is particularly problematic because domain member 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 BDC 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 the SAM that contains the updated (changed) trust account password with resulting breakage of the domain trust. @@ -62,7 +62,8 @@ breakage of the domain trust. Considering the number of comments and questions raised concerning how to configure a BDC, let's consider each possible option and look at the pros and cons for each possible solution. -Following table lists possible design configurations for a PDC/BDC infrastructure. +The Domain Backend Account Distribution Options table below lists +possible design configurations for a PDC/BDC infrastructure. netrpc SAM backendldapsam SAM backendtdbsam @@ -89,14 +90,14 @@ let's consider each possible option and look at the pros and cons for each possi Single Central LDAP Server Single Central LDAP Server - A workable solution without fail-over ability. This is a usable solution, but not optimal. + A workable solution without failover ability. This is a usable solution, but not optimal. tdbsam tdbsam + net rpc vampire - Does not work with Samba-3.0; as Samba does not implement the + Does not work with Samba-3.0; Samba does not implement the server-side protocols required. @@ -130,7 +131,7 @@ let's consider each possible option and look at the pros and cons for each possi Essential Background Information -A Domain Controller is a machine that is able to answer logon requests from network +A domain controller is a machine that is able to answer logon requests from network workstations. Microsoft LanManager and IBM LanServer were two early products that provided this capability. The technology has become known as the LanMan Netlogon service. @@ -147,19 +148,19 @@ services that are implemented over an intricate spectrum of technologies. MS Windows NT4-style Domain Control -Whenever a user logs into a Windows NT4/200x/XP Professional Workstation, -the workstation connects to a Domain Controller (authentication server) to validate that +Whenever a user logs into a Windows NT4/200x/XP Professional workstation, +the workstation connects to a domain controller (authentication server) to validate that the username and password the user entered are valid. If the information entered -does not match account information that has been stored in the Domain -Control database (the SAM, or Security Account Manager database), a set of error +does not match account information that has been stored in the domain +control database (the SAM, or Security Account Manager database), a set of error codes is returned to the workstation that has made the authentication request. -When the username/password pair has been validated, the Domain Controller +When the username/password pair has been validated, the domain controller (authentication server) will respond with full enumeration of the account information -that has been stored regarding that user in the User and Machine Accounts database -for that Domain. This information contains a complete network access profile for +that has been stored regarding that user in the user and machine accounts database +for that domain. This information contains a complete network access profile for the user but excludes any information that is particular to the user's desktop profile, or for that matter it excludes all desktop profiles for groups that the user may belong to. It does include password time limits, password uniqueness controls, @@ -170,36 +171,36 @@ in all versions of MS Windows NT (3.10, 3.50, 3.51, 4.0). replicationSAM -The account information (user and machine) on Domain Controllers is stored in two files, -one containing the Security information and the other the SAM. These are stored in files +The account information (user and machine) on domain controllers is stored in two files, +one containing the security information and the other the SAM. These are stored in files by the same name in the %SystemRoot%\System32\config directory. This normally translates to the path C:\WinNT\System32\config. These -are the files that are involved in replication of the SAM database where Backup Domain -Controllers are present on the network. +are the files that are involved in replication of the SAM database where BDCs are present +on the network. -There are two situations in which it is desirable to install Backup Domain Controllers: +There are two situations in which it is desirable to install BDCs: - On the local network that the Primary Domain Controller is on, if there are many + On the local network that the PDC 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. - At each remote site, to reduce wide area network traffic and to add stability to + At each remote site, to reduce wide-area network traffic and to add stability to remote network operations. The design of the network, the strategic placement of - Backup Domain Controllers, together with an implementation that localizes as much - of network to client interchange as possible will help to minimize wide area network + BDCs, together with an implementation that localizes as much + of network to client interchange as possible will help to minimize wide-area network bandwidth needs (and thus costs). -The inter-operation of a PDC and its BDCs in a true Windows NT4 environment is worth +The interoperation of a PDC and its BDCs in a true Windows NT4 environment is worth mentioning here. The PDC contains the master copy of the SAM. In the event that an administrator makes a change to the user account database while physically present on the local network that has the PDC, the change will likely be made directly to @@ -207,19 +208,19 @@ the PDC instance of the master copy of the SAM. In the event that this update ma 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 synchronization. The PDC will then 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 +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. -Samba-3 can not participate in true SAM replication and is therefore not able to +Samba-3 cannot participate in true SAM replication and is therefore not able to employ precisely the same protocols used by MS Windows NT4. A Samba-3 BDC will -not create SAM update delta files. It will not inter-operate with a PDC (NT4 or Samba) +not create SAM update delta files. It will not interoperate with a PDC (NT4 or Samba) to synchronize the SAM from delta files that are held by BDCs. -Samba-3 cannot function as a BDC to an MS Windows NT4 PDC, and Samba-3 can not +Samba-3 cannot function as a BDC to an MS Windows NT4 PDC, and Samba-3 cannot function correctly as a PDC to an MS Windows NT4 BDC. Both Samba-3 and MS Windows NT4 can function as a BDC to its own type of PDC. @@ -227,17 +228,17 @@ NT4 can function as a BDC to its own type of PDC. The BDC is said to hold a read-only of the SAM from which it is able to process network logon requests and authenticate users. The BDC can -continue to provide this service, particularly while, for example, the wide area +continue to provide this service, particularly while, for example, the wide-area network link to the PDC is down. A BDC plays a very important role in both the -maintenance of Domain Security as well as in network integrity. +maintenance of domain security as well as in network integrity. In the event that the NT4 PDC should need to be taken out of service, or if it dies, -one of the NT4 BDCs can be promoted to a PDC. If this happens while the original NT4 PDC is on -line, it is automatically demoted to an NT4 BDC. This is an important aspect of Domain -Controller management. The tool that is used to effect a promotion or a demotion is the -Server Manager for Domains. It should be noted that Samba-3 BDCs can not be promoted +one of the NT4 BDCs can be promoted to a PDC. If this happens while the original NT4 PDC +is online, it is automatically demoted to an NT4 BDC. This is an important aspect of domain +controller management. The tool that is used to effect a promotion or a demotion is the +Server Manager for Domains. It should be noted that Samba-3 BDCs cannot be promoted in this manner because reconfiguration of Samba requires changes to the &smb.conf; file. @@ -246,13 +247,14 @@ in this manner because reconfiguration of Samba requires changes to the &smb.con Beginning with 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 -section of the &smb.conf; have to be set. -Refer to following configuration for an example of the minimum required settings. +including Windows NT4, 2003, and XP Professional. For Samba to be enabled as a PDC, some +parameters in the section of the &smb.conf; have to be set. +Refer to the Minimal smb.conf for a PDC in Use with a BDC &smbmdash; LDAP Server on +PDC section for an example of the minimum required settings. -Minimal smb.conf for a PDC in Use With a BDC &smbmdash; LDAP Server on PDC. +Minimal smb.conf for a PDC in Use with a BDC &smbmdash; LDAP Server on PDC &example.workgroup; ldapsam://localhost:389 @@ -276,7 +278,7 @@ chapter; for more information please refer to Domain C When configuring a master and a slave LDAP server, it is advisable to use the master LDAP server -for the PDC and slave LDAP servers for the BDCs. It is not essential to use slave LDAP servers, however, +for the PDC and slave LDAP servers for the BDCs. It is not essential to use slave LDAP servers; however, many administrators will want to do so in order to provide redundant services. Of course, one or more BDCs may use any slave LDAP server. Then again, it is entirely possible to use a single LDAP server for the entire network. @@ -292,12 +294,12 @@ subjectAltName certificate extension. More details on server certificate names a It does not really fit within the scope of this document, but a working LDAP installation is -basic to LDAP enabled Samba operation. When using an OpenLDAP server with Transport Layer Security +basic to LDAP-enabled Samba operation. When using an OpenLDAP server with Transport Layer Security (TLS), the machine name in /etc/ssl/certs/slapd.pem must be the same as in /etc/openldap/sldap.conf. The Red Hat Linux startup script creates the slapd.pem file with hostname localhost.localdomain. It is impossible to access this LDAP server from a slave LDAP server (i.e., a Samba BDC) unless the -certificate is recreated with a correct hostname. +certificate is re-created with a correct hostname. @@ -305,7 +307,7 @@ For preference, do not install a Samba PDC on a OpenLDAP slave server. Joining c will fail in this configuration because the change to the machine account in the LDAP tree must take place on the master LDAP server. This is not replicated rapidly enough to the slave server that the PDC queries. It therefore gives an error message on the client machine about -not being able to set up account credentials. The machine account is created on the LDAP server +not being able to set up account credentials. The machine account is created on the LDAP server, but the password fields will be empty. Unfortunately, some sites are unable to avoid such configurations, and these sites should review the parameter, intended to slow down Samba sufficiently @@ -339,17 +341,15 @@ Possible PDC/BDC plus LDAP configurations include: -In order to have a fall-back configuration (secondary) LDAP server one would specify -the secondary LDAP server in the &smb.conf; file as shown in following example. +In order to have a fallback configuration (secondary) LDAP server, you would specify +the secondary LDAP server in the &smb.conf; file as shown in the Multiple LDAP +Servers in &smb.conf; example. Multiple LDAP Servers in &smb.conf; -... - -ldapsam:"ldap://master.quenya.org ldap://slave.quenya.org" -... +ldapsam:"ldap://master.quenya.org ldap://slave.quenya.org" @@ -361,9 +361,9 @@ the secondary LDAP server in the &smb.conf; file as shown in Network Browsing: Discussion for more information regarding TCP/IP network protocols and how - SMB/CIFS names are handled. +Network Browsing,Discussion +for more information regarding TCP/IP network protocols and how SMB/CIFS names are handled.
-How does a Workstation find its Domain Controller? +How Does a Workstation find its Domain Controller? -There are two different mechanisms to locate a domain controller, one method is used when +There are two different mechanisms to locate a domain controller: one method is used when NetBIOS over TCP/IP is enabled and the other when it has been disabled in the TCP/IP network configuration. @@ -408,12 +408,12 @@ environment all machines require appropriate DNS entries. More information may b NetBIOS Over TCP/IP Enabled An MS Windows NT4/200x/XP Professional workstation in the domain MIDEARTH that wants a -local user to be authenticated has to find the Domain Controller for MIDEARTH. It does this +local user to be authenticated has to find the domain controller for MIDEARTH. It does this by doing a NetBIOS name query for the group name MIDEARTH<#1c>. It assumes that each -of the machines it gets back from the queries is a Domain Controller and can answer logon -requests. To not open security holes, both the workstation and the selected Domain Controller +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 validation. +password) to the local domain controller for validation. @@ -423,7 +423,7 @@ password) to the local Domain Controller for validation. An MS Windows NT4/200x/XP Professional workstation in the realm quenya.org -that has a need to affect user logon authentication will locate the Domain Controller by +that has a need to affect user logon authentication will locate the domain controller by re-querying DNS servers for the _ldap._tcp.pdc._msdcs.quenya.org record. More information regarding this subject may be found in DNS and Active Directory. @@ -437,7 +437,7 @@ More information regarding this subject may be found in the next example. +done by configuring the Samba &smb.conf; file section +as shown in Minimal Setup for Being a BDC. -Minimal setup for being a BDC +Minimal Setup for Being a BDC &example.workgroup; ldapsam:ldap://slave-ldap.quenya.org @@ -523,13 +524,12 @@ done by setting Samba as shown in the next example -In the -section of the &smb.conf; of the BDC. This makes the BDC -only register the name MIDEARTH<#1c> with the WINS server. This is no -problem as the name MIDEARTH<#1c> is a NetBIOS group name that is meant to -be registered by more than one machine. The parameter +This configuration causes the BDC to register only the name MIDEARTH<#1c> with the +WINS server. This is not a problem, as the name MIDEARTH<#1c> is a NetBIOS group name +that is meant to be registered by more than one machine. The parameter no -forces the BDC not to register MIDEARTH<#1b> which as a unique NetBIOS -name is reserved for the Primary Domain Controller. +forces the BDC not to register MIDEARTH<#1b>, which is a unique NetBIOS name that +is reserved for the PDC. @@ -542,19 +542,19 @@ use the LDAP database to resolve all UIDs and GIDs for UNIX accounts. Server TypeDomain Member Samba-3 has introduced a new ID mapping facility. One of the features of this facility is that it -allows greater flexibility in how user and group IDs are handled in respect to NT Domain User and Group +allows greater flexibility in how user and group IDs are handled in respect to NT domain user and group SIDs. One of the new facilities provides for explicitly ensuring that UNIX/Linux UID and GID values -will be consistent on the PDC, all BDCs and all Domain Member servers. The parameter that controls this +will be consistent on the PDC, all BDCs, and all domain member servers. The parameter that controls this is called idmap backend. Please refer to the man page for &smb.conf; for more information regarding its behavior. The use of the ldap:ldap://master.quenya.org -option on a BDC only make sense where ldapsam is used on a PDC. The purpose for an LDAP based idmap backend is -also to allow a domain-member (without its own passdb backend) to use winbindd to resolve Windows network users -and groups to common UID/GIDs. In other words, this option is generally intended for use on BDCs and on Domain -Member servers. +option on a BDC only makes sense where ldapsam is used on a PDC. The purpose of an LDAP-based idmap backend is +also to allow a domain member (without its own passdb backend) to use winbindd to resolve Windows network users +and groups to common UID/GIDs. In other words, this option is generally intended for use on BDCs and on domain +member servers. @@ -564,9 +564,9 @@ Member servers. Common Errors -As this is a rather new area for Samba, there are not many examples that we may refer to. +As domain control is a rather new area for Samba, there are not many examples that we may refer to. Updates will be published as they become available and may be found in later Samba releases or -from the Samba web site. +from the Samba Web site. @@ -575,18 +575,18 @@ from the Samba web site. Machine Trust Accounts This problem will occur when the passdb (SAM) files are copied from a central -server but the local Backup Domain Controller is acting as a PDC. This results in the application of +server but the local BDC is acting as a PDC. This results in the application of Local Machine Trust Account password updates to the local SAM. Such updates -are not copied back to the central server. The newer machine account password is then over -written when the SAM is re-copied from the PDC. The result is that the Domain Member machine -on start up will find that its passwords do not match the one now in the database and +are not copied back to the central server. The newer machine account password is then +overwritten when the SAM is recopied from the PDC. The result is that the domain member machine +on startup will find that its passwords do 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 proceed and the account expiry error will be reported. The solution is to use a more robust passdb backend, such as the ldapsam backend, setting up -a slave LDAP server for each BDC, and a master LDAP server for the PDC. +a slave LDAP server for each BDC and a master LDAP server for the PDC. @@ -619,7 +619,7 @@ 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 +As the smbpasswd file contains plaintext 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 @@ -639,8 +639,8 @@ accounts will go out of sync, resulting in a broken domain. This method is The simple answer is yes. Samba's pdb_ldap code supports binding to a replica -LDAP server, and will also follow referrals and re-bind to the master if it ever -needs to make a modification to the database. (Normally BDCs are read only, so +LDAP server and will also follow referrals and rebind to the master if it ever +needs to make a modification to the database. (Normally BDCs are read-only, so this will not occur often). diff --git a/docs/Samba3-HOWTO/TOSHARG-Backup.xml b/docs/Samba3-HOWTO/TOSHARG-Backup.xml index 7844fb13f2..46150a22ed 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Backup.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Backup.xml @@ -11,10 +11,10 @@ Features and Benefits -The Samba project is over ten years old. During the early history +The Samba project is over 10 years old. During the early history of Samba, UNIX administrators were its key implementors. UNIX administrators -will use UNIX system tools to backup UNIX system files. Over the past -four years, an increasing number of Microsoft network administrators have +use UNIX system tools to backup UNIX system files. Over the past +4 years, an increasing number of Microsoft network administrators have taken an interest in Samba. This is reflected in the questions about backup in general on the Samba mailing lists. @@ -27,7 +27,7 @@ in general on the Samba mailing lists. During discussions at a Microsoft Windows training course, one of the pro-UNIX delegates stunned the class when he pointed out that Windows -NT4 is so limiting compared with UNIX. He likened UNIX to a Meccano set +NT4 is limiting compared with UNIX. He likened UNIX to a Meccano set that has an unlimited number of tools that are simple, efficient, and, in combination, capable of achieving any desired outcome. @@ -42,7 +42,7 @@ intent is preferred by some like her. Please note that all information here is provided as is and without recommendation of fitness or suitability. The network administrator is strongly encouraged to -perform due-diligence research before implementing any backup solution, whether free +perform due diligence research before implementing any backup solution, whether free software or commercial. @@ -62,21 +62,21 @@ The following three free software projects might also merit consideration. BackupPC - BackupPC version 2.0.0 has been released on SourceForge. + BackupPC version 2.0.0 has been released on SourceForge. New features include support for rsync/rsyncd and internationalization of the CGI interface (including English, French, Spanish, and German). BackupPC is a high-performance Perl-based package for backing up Linux, - UNIX or Windows PCs and laptops to a server's disk. BackupPC is highly + UNIX, and Windows PCs and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain. SMB (via smbclient), - tar over rsh/ssh or rsync/rsyncd + tar over rsh/ssh, or rsync/rsyncd are used to extract client data. - Given the ever decreasing cost of disks and raid systems, it is now + Given the ever-decreasing cost of disks and RAID systems, it is now practical and cost effective to backup a large number of machines onto a server's local disk or network storage. This is what BackupPC does. @@ -89,8 +89,8 @@ The following three free software projects might also merit consideration. BackupPC is free software distributed under a GNU GPL license. - BackupPC runs on Linux/UNIX/freenix servers, and has been tested - on Linux, UNIX, Windows 9x/ME, Windows 98, Windows 200x, Windows XP, and Mac OSX clients. + BackupPC runs on Linux/UNIX/freenix servers and has been tested + on Linux, UNIX, Windows 9x/Me, Windows 98, Windows 200x, Windows XP, and Mac OSX clients. @@ -175,7 +175,7 @@ The following three free software projects might also merit consideration. For more information regarding Amanda, please check the - www.amanda.org/ site. + www.amanda.org/ site. @@ -193,7 +193,7 @@ The following three free software projects might also merit consideration. The home page for BOBS is located at - bobs.sourceforge.net. + bobs.sourceforge.net. diff --git a/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml b/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml index a7e2880964..518661359f 100644 --- a/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml +++ b/docs/Samba3-HOWTO/TOSHARG-CUPS-printing.xml @@ -36,177 +36,167 @@ The Common UNIX Print System (CUPS) has become quite popular. All major Linux distributions now ship it as their default printing - system. To many, it is still a mystical tool. Mostly, it just works. - People tend to regard it as a black box - that they do not want to look into as long as it works. But once - there is a little problem, they are in trouble to find out where to - start debugging it. Refer to the chapter Classical Printing that - contains a lot of information that is relevant for CUPS. + system. To many, it is still a mystical tool. Mostly, it just works. People tend to regard + it as a black box that they do not want to look into as long as it works. But once + there is a little problem, they have trouble finding out where to start debugging it. Refer to + Classical Printing, which contains a much information + that is also relevant to CUPS. - 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 not to try and apply any prior knowledge about - printing to this new system. Rather, try to understand CUPS - from the beginning. This documentation will lead you to a - complete understanding of CUPS. Let's start with the most basic - things first. + CUPS sports quite a few unique and powerful features. While its basic functions may be grasped quite + easily, they are also new. Because it is different from other, more traditional printing systems, it is best + not to try to apply any prior knowledge about printing to this new system. Rather, try to understand CUPS from + the beginning. This documentation will lead you to a complete understanding of CUPS. Let's start with the most + basic things first. - Overview + Overview - - CUPS is more than just a print spooling system. It is a complete - printer management system that complies with the new - Internet Printing Protocol (IPP). IPP is an industry - and Internet Engineering Task Force (IETF) - 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). Additionally, it - has the traditional command line and several more modern GUI interfaces - (GUI interfaces developed by third parties, like KDE's - overwhelming KDEPrint). - + + CUPS is more than just a print spooling system. It is a complete printer management system that + complies with the new Internet Printing Protocol (IPP). IPP is an industry and Internet Engineering Task Force + (IETF) standard for network printing. Many of its functions can be managed remotely (or locally) via a Web + browser (giving you platform-independent access to the CUPS print server). Additionally, it has the + traditional command line and several more modern GUI interfaces (GUI interfaces developed by third parties, + like KDE's overwhelming KDEPrint). + + + + CUPS allows creation of raw printers (i.e., 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 capabilities similar 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 explore how + to configure CUPS for interfacing with MS Windows print clients via Samba. + - - CUPS allows creation of raw printers (i.e., 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. - + Basic CUPS Support Configuration - Printing with CUPS in the most basic &smb.conf; setup in Samba-3.0 (as was true for 2.2.x) only needs two - settings: cups and + Printing with CUPS in the most basic &smb.conf; setup in Samba-3.0 (as was true for 2.2.x) requires just + two parameters: cups and cups. CUPS does not need a printcap file. However, the cupsd.conf configuration file knows of two related directives that control how such a file will be automatically created and maintained by CUPS for the convenience of third-party applications (example: Printcap /etc/printcap and PrintcapFormat BSD). Legacy programs often require the existence of a printcap file containing printer names or they will refuse to print. Make sure CUPS is set to generate and maintain a printcap file. For details, see - man cupsd.conf and other CUPS-related documentation, like the wealth of documents on your CUPS server - itself: http://localhost:631/documentation.html. + man cupsd.conf and other CUPS-related documentation, like the wealth of documents + regarding theCUPS server itself available from the + CUPS web site. - Linking smbd with libcups.so + Linking smbd with libcups.so - - Samba has a special relationship to CUPS. Samba can be compiled with CUPS library support. - Most recent installations have this support enabled. 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 libcups.so &smbmdash; but - there are some differences in required or supported configuration. - - - - When Samba is compiled against libcups, cups - uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V - commands with an additional -oraw option for printing. On a Linux - system, you can use the ldd utility to find out details (ldd may not be present on - other OS platforms, or its function may be embodied by a different command): - + + Samba has a special relationship to CUPS. Samba can be compiled with CUPS library support. + Most recent installations have this support enabled. By default, CUPS linking is compiled + into smbd and other Samba binaries. Of course, you can use CUPS even + if Samba is not linked against libcups.so &smbmdash; but + there are some differences in required or supported configuration. + - + + When Samba is compiled and linked with libcups, cups + uses the CUPS API to list printers, submit jobs, query queues, and so on. Otherwise it maps to the System V + commands with an additional -oraw option for printing. On a Linux + system, you can use the ldd utility to find out if smbd has been linked with the + libcups library (ldd may not be present on other OS platforms, or its function may be embodied + by a different command): + &rootprompt;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) [....] - + + - - The line libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) shows - there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups - is set, then any otherwise manually set print command in &smb.conf; is ignored. - This is an important point to remember! - + + The line libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) shows + there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups + is set, then any otherwise manually set print command in &smb.conf; is ignored. + This is an important point to remember! + + + Should it be necessary, for any reason, to set your own print commands, you can do this by setting + sysv. However, you will lose all the benefits + of tight CUPS-Samba integration. When you do this you must manually configure the printing system commands + (most important: + ; other commands are + , + , + , + , + and + ). + - Should it be necessary, for any reason, to set your own print commands, you can do this by setting - sysv. However, you will lose all the benefits - of tight CUPS/Samba integration. When you do this you must manually configure the printing system commands - (most important: - ; other commands are - , - , - , - , - and - ). - Simple &smb.conf; Settings for CUPS + Simple &smb.conf; Settings for CUPS - - To summarize, following example shows simplest printing-related setup for &smb.conf; to enable basic CUPS support: - + + To summarize, the Simplest Printing-Related + &smb.conf; file shows simplest printing-related setup for &smb.conf; to + enable basic CUPS support: + - - Simplest printing-related smb.conf - - - yes - cups - cups - - - All Printers - /var/spool/samba - no - yes - yes - no - yes - root, @ntadmins - - - + + Simplest Printing-Related smb.conf + + + yes + cups + cups + + + All Printers + /var/spool/samba + no + yes + yes + no + yes + root, @ntadmins + + + + + This is all you need for basic printing setup for CUPS. It will print all graphic, text, PDF, and PostScript + files submitted from Windows clients. However, most of your Windows users would not know how to send these + kinds 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 rarely send files + from the command line. Unlike UNIX clients, they rarely submit graphic, text, or PDF formatted files directly + to the spooler. They nearly exclusively print from GUI applications with a printer driver + hooked between the application's 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. + - - This is all you need for basic printing setup for CUPS. It will print - all graphic, text, PDF, and PostScript files submitted from Windows - clients. However, most of your Windows users would not know how to - send these kinds 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 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 - application's 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. - More Complex CUPS &smb.conf; Settings - Next configuration is a slightly more complex printing-related setup - for &smb.conf;. It enables general CUPS printing - support for all printers, but defines one printer share, which is set - up differently. + The Overriding Global CUPS Settings for One Printer example + is a slightly more complex printing-related setup for &smb.conf;. It enables general CUPS printing + support for all printers, but defines one printer share, which is set up differently. - Overriding global CUPS settings for one printer + Overriding Global CUPS Settings for One Printer cups @@ -239,25 +229,25 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - This special share is only there for testing purposes. It does not write the print job to a file. It just logs the job parameters + This special share is only for testing purposes. It does not write the print job to a file. It just logs the job parameters known to Samba into the /tmp/smbprn.log file and deletes the job-file. Moreover, the of this share is kurt (not the @ntadmins group), - guest access is not allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it only - allows access from only three hosts. To prevent CUPS kicking in and taking over the print jobs for that share, we need to set - sysv and - lpstat. + guest access is not allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it + allows access from only three hosts. To prevent CUPS from kicking in and taking over the print jobs for that share, we need to set + sysv and lpstat. + + Advanced Configuration - Before we delve into all the configuration options, let us clarify a few - points. Network printing needs to be organized and setup - correctly. This frequently doesn't happen. Legacy systems - or small business LAN environments often lack design and good housekeeping. + Before we delve into all the configuration options, let us clarify a few points. Network printing + needs to be organized and set up correctly. This frequently doesn't happen. Legacy systems or small + business LAN environments often lack design and good housekeeping. @@ -266,25 +256,21 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) -spoolingcentral -spoolingpeer-to-peer - Many small office or home networks, as well as badly organized larger - environments, allow each client a direct access to available network - printers. This is generally a bad idea. It often blocks one client's - access to the printer when another client's job is printing. It 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. + spoolingcentral + spoolingpeer-to-peer + Many small office or home networks, as well as badly organized larger environments, allow each client a direct + access to available network printers. This is generally a bad idea. It often blocks one client's access to the + printer when another client's job is printing. It 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 use of a print server: it routes all jobs through one + central system, which responds immediately, takes jobs from multiple concurrent clients, and transfers them to + the printer(s) in the correct order. + - Raw Print Serving &smbmdash; Vendor Drivers on Windows Clients - + Raw Print Serving: Vendor Drivers on Windows Clients spooling-only @@ -293,15 +279,15 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) 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 that its ready to be sent to the printing - device. Here a native (vendor-supplied) Windows printer driver needs to + prepare the print job file that is ready to be sent to the printing + device. In this case, a native (vendor-supplied) Windows printer driver needs to be installed on each and every client for the target device. - It is possible to configure CUPS, Samba and your Windows clients in the + It is possible to configure 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 + 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 @@ -310,13 +296,15 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - The easiest printing configuration possible is to use raw print-through. - This is achieved by installation of the printer as if it was physically + The easiest printing configuration possible is raw print-through. + This is achieved by installation of the printer as if it were physically attached to the Windows client. You then redirect output to a raw network - print queue. The following procedure may be followed to achieve this: + print queue. This procedure may be followed to achieve this: + Configuration Steps for Raw CUPS Printing Support + Edit /etc/cups/mime.types to uncomment the line near the end of the file that has: @@ -331,7 +319,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) Add a raw printer using the Web interface. Point your browser at - http://localhost:631. Enter Administration, add + http://localhost:631. Enter Administration, and add the printer following the prompts. Do not install any drivers for it. Choose Raw. Choose queue name Raw Queue. @@ -345,11 +333,11 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - Install the printer as if it is a local printer. i.e.: Printing to LPT1:. + Install the printer as if it is a local printer, that is, Printing to LPT1:. - Edit the configuration under the Detail tab, create a + Edit the configuration under the Detail tab and create a local port that points to the raw printer queue that you have configured above. Example: \\server\raw_q. Here, the name raw_q is the name you gave the print @@ -369,7 +357,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) Manually install the drivers locally on each client, - one by one; this yields the old LanMan style + one by one; this yields the old LanMan style printing and uses a \\sambaserver\printershare type of connection. @@ -400,7 +388,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) 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 + formats. The CUPS files that need to be correctly set for raw mode printers to work are: @@ -410,53 +398,39 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - Both contain entries (at the end of the respective files) which must - be uncommented to allow RAW mode operation. - In /etc/cups/mime.types, make sure this line is - present: - - - application/octet-stream - - + Both contain entries (at the end of the respective files) that must be uncommented to allow RAW mode + operation. In /etc/cups/mime.types, make sure this line is present: + +application/octet-stream + /etc/cups/mime.convs /etc/cups/mime.types - - In /etc/cups/mime.convs, - have this line: - + In /etc/cups/mime.convs, have this line: application/vnd.cups-raw - - - application/octet-stream application/vnd.cups-raw 0 - - - + +application/octet-stream application/vnd.cups-raw 0 - + If these two files are not set up correctly for raw Windows client printing, you may encounter the dreaded Unable to - convert file 0 in your CUPS error_log file. + convert file 0 in your CUPS error_log file. - Editing the mime.convs and the - mime.types file does not - enforce raw printing, it only - allows it. + + Editing the mime.convs and the mime.types file does + not enforce raw printing, it only allows it. Background - application/octet-stream - 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 least - the loss of a lot of paper and ink. Unknown data are tagged by CUPS - as MIME type: application/octet-stream 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 the next - chapter for even more background explanations). + That CUPS is 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 least the loss of a lot of paper and + ink. Unknown data are tagged by CUPS as MIME type: application/octet-stream + 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 the CUPS Printing Chapter for more background explanations). @@ -467,6 +441,7 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) more advanced CUPS/Samba printing, simply skip the remaining sections of this chapter. + @@ -478,67 +453,57 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - point 'n' print - If you want to use the MS-RPC type printing, you must upload the + point'n'print + If you want to use the MS-RPC-type printing, you must upload the drivers onto the Samba server first ( share). For a discussion on how to deposit printer drivers on the Samba host (so the Windows clients can download and use them via - Point'n'Print), please refer to the previous chapter of this - HOWTO Collection. There you will find a description or reference to + Point'n'Print), please refer to the Classic Printing + chapter of this Samba-3 HOWTO Collection. There you will find a description or reference to three methods of preparing the client drivers on the Samba server: + - add printer wizard - The GUI, Add Printer Wizard - upload-from-a-Windows-client - method. - - The command line, smbclient/rpcclient - upload-from-a-UNIX-workstation method. + add printer wizard + The GUI, Add Printer Wizard upload-from-a-Windows-client method. + + + The command line, smbclient/rpcclient upload-from-a-UNIX-workstation method. + - - imprints - The Imprints Toolset - method. + + imprints + The Imprints tool set method. + - These three methods apply to CUPS all the same. A new and more - convenient way to load the Windows drivers into Samba is provided - if you use CUPS: + These three methods apply to CUPS all the same. The cupsaddsmb utility is new and more + convenient way to load the Windows drivers into Samba is provided if you use CUPS. - - - - cupsaddsmb - the cupsaddsmb - utility. - - - cupsaddsmb is discussed in much detail further below. But we first + cupsaddsmb is discussed in much detail later in this chapter. But we first explore the CUPS filtering system and compare the Windows and UNIX printing architectures. + + Advanced Intelligent Printing with PostScript Driver Download - PostScriptGhostscript - We now know - how to set up a dump printserver, that is, a server which is spooling - print-jobs raw, leaving the print data untouched. + We now know how to set up a dump print server, that is, a server that spools + print jobs raw, leaving the print data untouched. - Possibly you need to setup CUPS in a smarter way. The reasons could - be manifold: + You might need to set up CUPS in a smarter way. The reasons could be manifold: @@ -547,156 +512,129 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) What was the average print run per day? What are the typical hourly peaks in printing? Which department prints how much? - Maybe you are asked to setup a print quota system: - Users should not be able to print more jobs, once they have surpassed + Maybe you are asked to set up a print quota system: + Users should not be able to print more jobs once they have surpassed a given limit per period. Maybe your previous network printing setup is a mess and must be re-organized from a clean beginning. - Maybe you have experiencing too many blue screens + Maybe you are experiencing too many blue screens originating from poorly debugged printer drivers running in NT kernel mode? These goals cannot be achieved by a raw print server. To build a - server meeting these requirements, you'll first need to learn about + server meeting these requirements, you'll first need to learn how CUPS works and how you can enable its features. What follows is the comparison of some fundamental concepts for - Windows and UNIX printing; then follows a description of the - CUPS filtering system, how it works and how you can tweak it. + Windows and UNIX printing, then a description of the + CUPS filtering system, how it works, and how you can tweak it. - GDI on Windows -- PostScript on UNIX - + GDI on Windows, PostScript on UNIX GDI PostScript Network printing is one of the most complicated and error-prone day-to-day tasks any user or administrator may encounter. This is - true for all OS platforms. And there are reasons for this. + true for all OS platforms, and there are reasons it is so. PCL PDL - You can't expect most file formats to just throw them toward - printers and they get printed. There needs to be a file format - conversion in between. The problem is that there is no common standard for - print file formats across all manufacturers and printer types. While - PostScript (trademark held by Adobe) and, to an - extent, PCL (trademark held by HP) have developed - into semi-official standards by being the most widely used PDLs - Page Description Languages (PDLs), there are still - many manufacturers who roll their own (their reasons may be - unacceptable license fees for using printer-embedded PostScript - interpreters, and so on). + You can't expect to throw just any file format at a printer and have it get printed. A file format conversion + must take place. The problem is that there is no common standard for print file formats across all + manufacturers and printer types. While PostScript (trademark held by Adobe) and, to an extent, PCL (trademark + held by Hewlett-Packard) have developed into semi-official standards by being the most widely + used page description languages (PDLs), there are still many manufacturers who roll their own + (their reasons may be unacceptable license fees for using printer-embedded PostScript interpreters, and so on). + - Windows Drivers, GDI and EMF - + Windows Drivers, GDI, and EMF GDI EMF WYSIWYG - 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 Graphical Device - Interface (GDI), 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 - on screen as well as on - paper (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, often produces a file format called Enhanced - MetaFile (EMF). The EMF is processed by the printer driver and - converted to the printer-specific file format. + 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 graphical device interface (GDI), 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 on screen as well as on + paper (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, often produces a file format called Enhanced MetaFile (EMF). The EMF is processed by the printer + driver and converted to the printer-specific file format. PDF - 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 - X Window System - PostScript - PCL - Xprint - Systems. Their Core Graphic Engine uses a - PDF derivative for all display work. + To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation + for its (BSD-UNIX-based, did you know?) Mac OS X and Darwin operating X Window + System PostScript + PCL Xprint systems. + Apple's core graphic engine uses a PDF derivative for all display work. - -
- Windows printing to a local printer. - 1small -
+ The example in Windows Printing to a Local Printer illustrates local Windows + printing.
+ +
+ Windows Printing to a Local Printer. + 1small +
+
UNIX Printfile Conversion and GUI Basics - X Window System PostScript PCL Xprint - 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 and that at least gives 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 - 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 X.org, - designing the UNIX foundations and protocols for Graphical User - Interfaces, refused to take 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. + 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 and + that at least gives 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 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 X.org, designing the UNIX foundations and protocols for + graphical user interfaces, refused to take responsibility for paper output, 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. Background - PostScript - 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, and 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 is 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 + The PostScript programming language is an invention by Adobe, but its specifications have been + published extensively. Its strength lies in its powerful abilities to describe graphical objects (fonts, + shapes, patterns, lines, curves, and 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 or her 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 is 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 that 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. @@ -705,119 +643,93 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) PostScript and Ghostscript - PostScript GhostScriptPostScript PostScriptRIP - 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 Raster Image - Processor (RIP) (which makes them more expensive than - other types of printers); throw PostScript toward 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 a file from a Windows origin. + 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 raster image + processor (RIP), (which makes them more expensive than other types of printers; throw PostScript toward them, + and they will spit out your printed pages. The RIP does 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 than PostScript printing a file from a Windows origin. PPD - Traditional UNIX programs and printing systems &smbmdash; while - using PostScript &smbmdash; 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 and 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. + Traditional UNIX programs and printing systems &smbmdash; while using PostScript &smbmdash; 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, and 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. as illustrated in Printing to a PostScript Printer. - -
- Printing to a PostScript printer. - 2small -
-
- +
+ Printing to a PostScript Printer. + 2small +
PDL - However, there are other types of printers out there. These do not know - how to print PostScript. They use their own Page Description - Language (PDL, often proprietary). To print to them is much - more demanding. Since your UNIX applications mostly produce - PostScript, and since these devices do not understand PostScript, you - need to convert the print files to a format suitable for your printer - on the host before you can send it away. + However, there are other types of printers out there. These do not know how to print PostScript. They use + their own PDL, often proprietary. To print to them is much more demanding. Since your UNIX applications mostly + produce PostScript, and since these devices do not understand PostScript, you need to convert the print files + to a format suitable for your printer on the host before you can send it away. +
- Ghostscript &smbmdash; the Software RIP for Non-PostScript Printers - + Ghostscript: The Software RIP for Non-PostScript Printers GhostScript - Here is where Ghostscript kicks in. Ghostscript is - the traditional (and quite powerful) PostScript interpreter used on - UNIX platforms. It is a RIP in software, capable of doing a - lot of file format conversions for a very broad - spectrum of hardware devices as well as software file formats. - Ghostscript technology and drivers are what enable PostScript printing - to non-PostScript hardware. + Here is where Ghostscript kicks in. Ghostscript is the traditional (and quite powerful) PostScript interpreter + used on UNIX platforms. It is a RIP in software, capable of doing a lot of file format + conversions for a very broad spectrum of hardware devices as well as software file formats. Ghostscript + technology and drivers are what enable PostScript printing to non-PostScript hardware. This is shown in + Ghostscript as a RIP for Non-PostScript Printers. - -
- Ghostscript as a RIP for non-postscript printers. - 3small +
+ Ghostscript as a RIP for Non-PostScript Printers. + 3small
- - Use the gs -h command to check for all built-in devices - of your Ghostscript version. If you specify a parameter of - -sDEVICE=png256 on your Ghostscript command - line, you are asking Ghostscript to convert the input into a PNG - file. Naming a device on the command line is the most important - single parameter to tell Ghostscript exactly how 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 some deficiencies. - GhostscriptESPESP GhostScript - 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, Red Hat, and Debian. It includes - the cups device (essential to print to non-PS printers from CUPS). + Use the gs -h command to check for all built-in devices on your Ghostscript + version. If you specify a parameter of -sDEVICE=png256 on your Ghostscript command + line, you are asking Ghostscript to convert the input into a PNG file. Naming a device on the + command line is the most important single parameter to tell Ghostscript exactly how 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 some + deficiencies. GhostscriptESPESP + GhostScript 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, Red Hat, and Debian. It includes the cups device + (essential to print to non-PS printers from CUPS). + PostScript Printer Description (PPD) Specification - PPD - While PostScript in essence is a Page Description - Language (PDL) to represent the page layout in a - device-independent way, real-world print jobs are - always ending up being output on 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 PostScript Printer Description (PPD) - files. Every PostScript printer ships with one of these files. + While PostScript in essence is a PDL to represent the page layout in a device-independent way, real-world + print jobs are always ending up being output on 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 + PostScript Printer Description (PPD) files. Every PostScript printer ships with one of these files. PPDs contain all the 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 + 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. @@ -830,15 +742,15 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) makes sense, the PPD features are presented in the drivers' UI dialogs to display to the user a 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 + PostScript, PJL, JCL, or vendor-dependent commands) into the PostScript file created by the driver. PDF A PostScript file that was created to contain device-specific commands - for achieving a certain print job output (e.g., duplex-ed, stapled and - punched) on a specific target machine, may not print as expected, or + 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). @@ -848,41 +760,33 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) Using Windows-Formatted Vendor PPDs - CUPS can handle all spec-compliant PPDs as supplied by the - manufacturers for their PostScript models. Even if a - vendor might not have mentioned our favorite - OS in his manuals and brochures, you can safely trust this: - If you get the Windows NT version of the PPD, you - can use it unchanged in CUPS and thus access the full - power of your printer just like a Windows NT user could! + CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if + a vendor does not mention our favorite OS in his or her manuals and brochures, you can safely trust this: + If you get the Windows NT version of the PPD, you can use it unchanged in CUPS and thus + access the full power of your printer just like a Windows NT user could! - To check the spec compliance of any PPD online, go to http://www.cups.org/testppd.php - 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 pit-stops. + To check the spec compliance of any PPD online, go to http://www.cups.org/testppd.php and upload your PPD. You will + see the results displayed immediately. CUPS in all versions after 1.1.19 has a much stricter internal PPD + parsing and checking code enabled; in case of printing trouble, this online resource should be one of your + first pit stops. foomatic cupsomatic - For real PostScript printers, do not use the - Foomatic or cupsomatic - PPDs from Linuxprinting.org. With these devices, the original - vendor-provided PPDs are always the first choice! + For real PostScript printers, do not use the Foomatic or + cupsomatic PPDs from Linuxprinting.org. With these devices, the original vendor-provided + PPDs are always the first choice. - 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 - smbclient //NT4-box/print\$ -U username to - access the Windows directory where all printer driver files are - stored. First look in the W32X86/2 subdir for - the PPD you are seeking. + 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 smbclient + //NT4-box/print\$ -U username to access the Windows directory where all printer driver files are + stored. First look in the W32X86/2 subdirectory for the PPD you are seeking. @@ -890,1148 +794,1072 @@ libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) CUPS Also Uses PPDs for Non-PostScript Printers - 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. + 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. + + The CUPS Filtering Architecture -The core of the CUPS filtering system is based on -Ghostscript. 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 MIME types. Every incoming -printfile is subjected to an initial -auto-typing. 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 +The core of the CUPS filtering system is based on Ghostscript. 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 MIME types. Every incoming print file is subjected to an initial +autotyping. The autotyping 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 set up a working filtering chain for any given input data format. -If CUPS rasterizes a PostScript file natively to -a bitmap, this is done in two stages: +If CUPS rasterizes a PostScript file natively to a bitmap, this is done in two stages: - 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. - + + 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. + -The second stage uses a raster driver that converts - the generic CUPS raster to a device-specific raster. + + The second stage uses a raster driver that converts + the generic CUPS raster to a device-specific raster. + -Make sure your Ghostscript version has the cups device compiled in -(check with gs -h | grep cups). Otherwise you -may encounter the dreaded Unable to convert file -0 in your CUPS error_log file. To have cups as a -device in your Ghostscript, you either need to patch GNU -Ghostscript and re-compile, or use ESPGhostscriptESP Ghostscript. 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. +Make sure your Ghostscript version has the cups device compiled in (check with gs -h | +grep cups). Otherwise you may encounter the dreaded Unable to convert file +0 in your CUPS error_log file. To have cups as a device in your Ghostscript, +you either need to patch GNU Ghostscript and recompile or use +ESPGhostscriptESP Ghostscript. The superior alternative is ESP +Ghostscript. It supports not just CUPS, but 300 other devices (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. cupsomatic foomatic -CUPS printers may be setup to use external rendering paths. One of the most common is provided by the -Foomatic/cupsomatic concept from Linuxprinting.org. This -uses the classical Ghostscript approach, doing everything in one step. -It does not use the cups device, but one of the many -others. However, even for Foomatic/cupsomatic usage, best results and -ESPGhostscript -broadest printer model support is provided by ESP Ghostscript (more -about cupsomatic/Foomatic, particularly the new version called now -foomatic-rip, follows below). +CUPS printers may be set up to use external rendering paths. One of the most common is provided by the +Foomatic/cupsomatic concept from Linuxprinting.org. This +uses the classical Ghostscript approach, doing everything in one step. It does not use the +cups device, but one of the many others. However, even for Foomatic/cupsomatic usage, best +results and ESPGhostscript broadest printer +model support is provided by ESP Ghostscript (more about Foomatic/cupsomatic, particularly the new version +called now foomatic-rip, follows). - -MIME Types and CUPS Filters + + MIME Types and CUPS Filters - -MIMEfilters + + MIMEfilters MIME -CUPS reads the file /etc/cups/mime.types -(and all other files carrying a *.types suffix -in the same directory) upon startup. These files contain the MIME -type recognition rules that are applied when CUPS runs its -auto-typing routines. The rule syntax is explained in the man page -for mime.types and in the comments section of the -mime.types file itself. A simple rule reads -like this: - -application/pdf + CUPS reads the file /etc/cups/mime.types (and all other files carrying a + *.types suffix in the same directory) upon startup. These files contain the MIME type + recognition rules that are applied when CUPS runs its autotyping routines. The rule syntax is explained in the + man page for mime.types and in the comments section of the + mime.types file itself. A simple rule reads like this: + application/pdf - application/pdf pdf string(0,%PDF) +application/pdf pdf string(0,%PDF) - -This means if a filename has either a -.pdf suffix or if the magic -string %PDF is right at the -beginning of the file itself (offset 0 from the start), then it is -a PDF file (application/pdf). -Another rule is this: - + This means if a filename has a .pdf suffix or if the magic string + %PDF is right at the beginning of the file itself (offset 0 from the start), then it is a + PDF file (application/pdf). Another rule is this: - application/postscript ai eps ps string(0,%!) string(0,<04>%!) +application/postscript ai eps ps string(0,%!) string(0,<04>%!) + If the filename has one of the suffixes .ai, .eps, + .ps, or if the file itself starts with one of the strings %! or + %!]]>, it is a generic PostScript file + (application/postscript). + -If the filename has one of the suffixes -.ai, .eps, -.ps or if the file itself starts with one of the -strings %! or %!]]>, it -is a generic PostScript file -(application/postscript). - - - -Don't confuse the other mime.types files your system might be using -with the one in the /etc/cups/ directory. - + + Don't confuse the other mime.types files your system might be using + with the one in the /etc/cups/ directory. + - -There is an important difference between two similar MIME types in -CUPS: one is application/postscript, the other is -application/vnd.cups-postscript. While -application/postscript is meant to be device -independent (job options for the file are still outside the PS file -content, embedded in command line or environment variables by CUPS), -application/vnd.cups-postscript may have the job -options inserted into the PostScript data itself (where -applicable). The transformation of the generic PostScript -(application/postscript) to the device-specific version -(application/vnd.cups-postscript) is the responsibility of the -CUPS pstops filter. pstops uses information -contained in the PPD to do the transformation. - + + There is an important difference between two similar MIME types in CUPS: one is + application/postscript, the other is + application/vnd.cups-postscript. While application/postscript is + meant to be device-independent, job options for the file are still outside the PS file content, embedded in + command-line or environment variables by CUPS, application/vnd.cups-postscript may have + the job options inserted into the PostScript data itself (where applicable). The transformation of the generic + PostScript (application/postscript) to the device-specific version + (application/vnd.cups-postscript) is the responsibility of the CUPS + pstops filter. pstops uses information contained in the PPD to do the transformation. + - -CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and -many image formats (GIF. PNG, TIFF, JPEG, Photo-CD, SUN-Raster, -PNM, PBM, SGI-RGB, and more) and their associated MIME types -with its filters. - - + + CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI, and + many image formats (GIF. PNG, TIFF, JPEG, Photo-CD, SUN-Raster, + PNM, PBM, SGI-RGB, and more) and their associated MIME types + with its filters. + - -MIME Type Conversion Rules + + + MIME Type Conversion Rules - -MIME -application/pdf -CUPS reads the file /etc/cups/mime.convs -(and all other files named with a *.convs -suffix in the same directory) upon startup. These files contain -lines naming an input MIME type, an output MIME type, a format -conversion filter that can produce the output from the input type -and virtual costs associated with this conversion. One example line -reads like this: + + MIME + application/pdf + CUPS reads the file /etc/cups/mime.convs + (and all other files named with a *.convs + suffix in the same directory) upon startup. These files contain + lines naming an input MIME type, an output MIME type, a format + conversion filter that can produce the output from the input type, + and virtual costs associated with this conversion. One example line + reads like this: - application/pdf application/postscript 33 pdftops +application/pdf application/postscript 33 pdftops - -This means that the pdftops filter will take -application/pdf as input and produce -application/postscript as output; the virtual -cost of this operation is 33 CUPS-$. The next filter is more -expensive, costing 66 CUPS-$: - -pdf - + This means that the pdftops filter will take + application/pdf as input and produce + application/postscript as output; the virtual + cost of this operation is 33 CUPS-$. The next filter is more + expensive, costing 66 CUPS-$: + pdf - application/vnd.hp-HPGL application/postscript 66 hpgltops +application/vnd.hp-HPGL application/postscript 66 hpgltops - -This is the hpgltops, which processes HP-GL -plotter files to PostScript. - -application/octet-stream - + This is the hpgltops, which processes HP-GL + plotter files to PostScript. + application/octet-stream - application/octet-stream +application/octet-stream - -Here are two more examples: - -text/plain - + Here are two more examples: + text/plain - application/x-shell application/postscript 33 texttops - text/plain application/postscript 33 texttops +application/x-shell application/postscript 33 texttops +text/plain application/postscript 33 texttops -The last two examples name the texttops 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). - - + The last two examples name the texttops 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). + + - -Filtering Overview + + Filtering Overview + + MIME + There are many more combinations named in mime.convs. However, you are not limited to use + the ones predefined there. You can plug in any filter you like to 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 with what CUPS needs and put in the right lines in mime.types and + mime.convs; then it will work seamlessly inside CUPS. + - -MIME -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 mime.types -and mime.convs, then it will work seamlessly -inside CUPS. - + + Filter Requirements - -Filter requirements - -The mentioned CUPS requirements for filters are simple. Take -filenames or stdin as input and write to -stdout. They should take these 5 or 6 arguments: -printer job user title copies options [filename] - + + The CUPS requirements for filters are simple. Take filenames or stdin as + input and write to stdout. They should take these arguments: + - -Printer -The name of the printer queue (normally this is the -name of the filter being run). - - -job -The numeric job ID for the job being -printed. - - -user -The string from the originating-user-name -attribute. - - -title -The string from the job-name attribute. - - -copies -The numeric value from the number-copies -attribute. - - -options -The job options. - - -filename -(Optionally) The print request file (if missing, -filters expected data fed through stdin). In most -cases, it is easy to write a simple wrapper script around existing -filters to make them work with CUPS. - - - - + + printer + + The name of the printer queue (normally this is the name of the filter being run). + + + + job + + The numeric job ID for the job being printed. + + + + user + + The string from the originating-user-name attribute. + + + + title + + The string from the job-name attribute. + + + + copies + + The numeric value from the number-copies attribute. + + + + options + + The job options. + + + + filename + + (optionally) The print request file (if missing, filters expected data + fed through stdin). In most cases, it is easy to + write a simple wrapper script around existing filters to make them work with CUPS. + + + + + - -Prefilters + + + Prefilters - -PostScript -As previously stated, PostScript is the central file format to any UNIX-based -printing system. From PostScript, CUPS generates raster data to feed -non-PostScript printers. - + + PostScript + As previously stated, PostScript is the central file format to any UNIX-based + printing system. From PostScript, CUPS generates raster data to feed + non-PostScript printers. + - -But what happens 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 application/postscript (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 imagetops filter. Its outcome is always of -MIME type application/vnd.cups-postscript -(not application/postscript), meaning it has the -print options already embedded into the file. - + + But what happens if you send one of the supported non-PS formats to print? Then CUPS runs + prefilters on these input formats to generate PostScript first. There are prefilters to create + PostScript from ASCII text, PDF, DVI, or HP-GL. The outcome of these filters is always of MIME type + application/postscript (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 prefilter is + running on all supported image formats, the imagetops filter. Its outcome is always of + MIME type application/vnd.cups-postscript (not application/postscript), meaning it has + the print options already embedded into the file. This is shown in Prefiltering in + CUPS to Form PostScript. + - -
- Pre-filtering in CUPS to form PostScript. +
+ Prefiltering in CUPS to Form PostScript. 4small
- - - -pstops + - -pstops is the filter to convert -application/postscript to -application/vnd.cups-postscript. 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 and punching it, and so on) into the PostScript file. - + + pstops - -
- Adding device-specific print options. + + pstops is a filter that is used to convert application/postscript to + application/vnd.cups-postscript. As stated earlier, this filter inserts all + device-specific print options (commands to the printer to ask for the duplexing of output, or stapling and + punching it, and so on) into the PostScript file. An example is illustrated in Adding Device-Specific Print Options. + + +
+ Adding Device-Specific Print Options. 5small
- - -This is not all. Other tasks performed by it are: - + + This is not all. Other tasks performed by it are: + - - -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). - - - -Putting 2 or more logical pages on one sheet of paper (the -so-called number-up function). - - -Counting the pages of the job to insert the accounting -information into the /var/log/cups/page_log. - - - + + + Selecting the range of pages to be printed (e.g., you can choose to + print only pages 3, 6, 8-11, 16, and 19-21, or only odd-numbered + pages). + - -pstoraster + + Putting two or more logical pages on one sheet of paper (the + so-called number-up function). + - -pstoraster 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 raster drivers -that are able to generate device-specific printer data. - + Counting the pages of the job to insert the accounting + information into the /var/log/cups/page_log. + + + - -
- PostScript to intermediate raster format. + + pstoraster + + + pstoraster 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 raster drivers that are able to + generate device-specific printer data. This is shown in the PostScript to + Intermediate Raster Format diagram. + + +
+ PostScript to Intermediate Raster Format. 6small
- - -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 quite 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 do not need to care -about Ghostscript complications (in fact, there is currently more -than one vendor financing the development of CUPS raster drivers). - + + 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 downstream raster drivers. Its MIME type is registered with IANA + and its specification is, of course, completely open. It is designed to make it quite 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 of the first stage of rasterization so these vendors do not need to care about + Ghostscript complications (in fact, there is currently more than one vendor financing the development of CUPS + raster drivers). This is illustrated in the CUPS-Raster Production Using + Ghostscript illustration. + - -
- CUPS-raster production using Ghostscript. +
+ CUPS-Raster Production Using Ghostscript. 7small
- - -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. - + + CUPS versions before version 1.1.15 shipped a binary (or source code) standalone filter, named + pstoraster. pstoraster, which was derived from GNU Ghostscript + 5.50 and could be installed besides and in addition to any GNU or AFPL Ghostscript package without + conflicting. + - ->From version 1.1.15, this has changed. The functions for this have been -integrated back into Ghostscript (now based on GNU Ghostscript version -7.05). The pstoraster filter is now a simple shell script calling -gs with the -sDEVICE=cups -parameter. If your Ghostscript does not show a success on asking for -gs -h |grep cups, you might not be able to -print. Update your Ghostscript. - - + + From version 1.1.15, this feature has changed. The functions for this filter have been integrated back + into Ghostscript (now based on GNU Ghostscript version 7.05). The pstoraster filter is + now a simple shell script calling gs with the -sDEVICE=cups parameter. + If your Ghostscript fails when this command is executed: gs -h |grep cups, you might not + be able to print, update your Ghostscript. + + - -imagetops and imagetoraster + + imagetops and imagetoraster - -In the section about pre-filters, we mentioned the pre-filter -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 pre-filters. We summarize flowchart of image file -filtering on next picture. - + + 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 previously + mentioned prefilters. We summarize in a flowchart the image file + filtering in the Image Format to CUPS-Raster Format Conversion illustration. + -
- Image format to CUPS-raster format conversion. + Image Format to CUPS-Raster Format Conversion. 8small
-
-
+
- -rasterto [printers specific] + + rasterto [printers specific] - -CUPS ships with quite different raster drivers processing CUPS -raster. On my system I find in /usr/lib/cups/filter/ these: -rastertoalps, rastertobj, rastertoepson, rastertoescp, -rastertopcl, rastertoturboprint, rastertoapdk, rastertodymo, -rastertoescp, rastertohp, and -rastertoprinter. Don't worry if you have less -than this; some of these are installed by commercial add-ons to CUPS -(like rastertoturboprint), others (like -rastertoprinter) by third-party driver -development projects (such as Gimp-Print) wanting to cooperate as -closely as possible with CUPS. - + + CUPS ships with quite a variety of raster drivers for processing CUPS raster. On my system I find in + /usr/lib/cups/filter/ the following: rastertoalps, rastertobj, + rastertoepson, rastertoescp, rastertopcl, + rastertoturboprint, rastertoapdk, + rastertodymo, rastertoescp, rastertohp, + and rastertoprinter. Don't worry if you have fewer drivers than this; some of these are + installed by commercial add-ons to CUPS (like rastertoturboprint), and others (like + rastertoprinter) by third-party driver development projects (such as Gimp-Print) + wanting to cooperate as closely as possible with CUPS. See the Raster to + Printer-Specific Formats illustration. + - -
- Raster to printer-specific formats. - 9small -
-
-
+
+ Raster to Printer-Specific Formats. + 9small +
+
- -CUPS Backends + + CUPS Backends - -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 print jobs over the network, or for every local -interface. Every CUPS print queue 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: - + + 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 for sending print jobs over the network, and one for every local + interface. Every CUPS print queue 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 use + 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 greatly from my examples, if your OS is not Linux: + - - usb - - This backend sends print files to USB-connected printers. An - example for the CUPS device-URI to use is: - usb:/dev/usb/lp0. - + + usb + + This backend sends print files to USB-connected printers. An + example for the CUPS device-URI to use is + usb:/dev/usb/lp0. + - serial - - This backend sends print files to serially connected printers. - An example for the CUPS device-URI to use is: - serial:/dev/ttyS0?baud=11500. - + serial + + This backend sends print files to serially connected printers. + An example for the CUPS device-URI to use is + serial:/dev/ttyS0?baud=11500. + - parallel - - This backend sends print files to printers connected to the - parallel port. An example for the CUPS device-URI to use is: - parallel:/dev/lp0. - + parallel + + This backend sends print files to printers connected to the + parallel port. An example for the CUPS device-URI to use is + parallel:/dev/lp0. + - SCSI - - This backend sends print files to printers attached to the - SCSI interface. An example for the CUPS device-URI to use is: - scsi:/dev/sr1. - + SCSI + + This backend sends print files to printers attached to the + SCSI interface. An example for the CUPS device-URI to use is + scsi:/dev/sr1. + - lpd - - This backend sends print files to LPR/LPD connected network - printers. An example for the CUPS device-URI to use is: - lpd://remote_host_name/remote_queue_name. - + lpd + + This backend sends print files to LPR/LPD-connected network + printers. An example for the CUPS device-URI to use is + lpd://remote_host_name/remote_queue_name. + - AppSocket/HP JetDirect - - This backend sends print files to AppSocket (a.k.a. "HP - JetDirect") connected network printers. An example for the CUPS - device-URI to use is: - socket://10.11.12.13:9100. - + AppSocket/HP JetDirect + + This backend sends print files to AppSocket (a.k.a., HP + JetDirect) connected network printers. An example for the CUPS + device-URI to use is + socket://10.11.12.13:9100. + - ipp - - This backend sends print files to IPP connected network - printers (or to other CUPS servers). Examples for CUPS device-URIs - to use are: - ipp:://192.193.194.195/ipp - (for many HP printers) or - ipp://remote_cups_server/printers/remote_printer_name. - + ipp + + This backend sends print files to IPP-connected network + printers (or to other CUPS servers). Examples for CUPS device-URIs + to use are + ipp:://192.193.194.195/ipp + (for many HP printers) and + ipp://remote_cups_server/printers/remote_printer_name. + + + http + + This backend sends print files 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 + http:://192.193.194.195:631/ipp + (for many HP printers) and + http://remote_cups_server:631/printers/remote_printer_name. + + + smb + + This backend sends print files to printers shared by a Windows + host. Examples of CUPS device-URIs that may be used includes: + - http - - This backend sends print files 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: - http:://192.193.194.195:631/ipp - (for many HP printers) or - http://remote_cups_server:631/printers/remote_printer_name. - + + + smb://workgroup/server/printersharename + smb://server/printersharename + smb://username:password@workgroup/server/printersharename + smb://username:password@server/printersharename + + - smb - - This backend sends print files to printers shared by a Windows - host. An example for CUPS device-URIs that may be used includes: - + + The smb:// backend is a symlink to the Samba utility + smbspool (does not ship with CUPS). If the + symlink is not present in your CUPS backend directory, have your + root user create it: ln -s `which smbspool' + /usr/lib/cups/backend/smb. + + - - smb://workgroup/server/printersharename - smb://server/printersharename - smb://username:password@workgroup/server/printersharename - smb://username:password@server/printersharename - + 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 that send + the print jobs 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 systemwide default printer set up to be connected to + a devnull:/ backend: there are just too many people sending jobs + without specifying a printer, and scripts and programs that do not name + a printer. The systemwide default deletes the job and sends a polite + email back to the $USER asking him or her to always specify the correct + printer name.) - The smb:// backend is a symlink to the Samba utility - smbspool (does not ship with CUPS). If the - symlink is not present in your CUPS backend directory, have your - root user create it: ln -s `which smbspool' - /usr/lib/cups/backend/smb. - - - - -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 that send -the print-jobs 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 do not name -a printer. The system-wide default deletes the job and sends a polite -email back to the $USER asking him to always specify the correct -printer name.) - - - -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 lpinfo -utility. Used with the parameter, it lists -all available backends: - - - -&prompt;lpinfo -v - - + 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 lpinfo + utility. Used with the parameter, it lists + all available backends: + - -The Role of <parameter>cupsomatic/foomatic</parameter> + + &prompt;lpinfo -v + + - -cupsomatic -foomatic -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 that are generated from the Foomatic -Printer & Driver Database at Linuxprinting.org. - + + The Role of <parameter>cupsomatic/foomatic</parameter> - -You can recognize these PPDs from the line calling the -cupsomatic filter: + + cupsomatic + foomatic + cupsomatic filters may be the most widely used on CUPS + installations. You must be clear 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 that are generated from the Foomatic + Printer & Driver Database at Linuxprinting.org. + + + You can recognize these PPDs from the line calling the + cupsomatic filter: - *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" +*cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" + You may find this line among 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 foomatic namepart for + the driver description. cupsomatic is a Perl script that runs + Ghostscript with all the complicated command-line options + autoconstructed from the selected PPD and command line options give to + the print job. + -You may find this line among 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 foomatic namepart for -the driver description. cupsomatic is a Perl script that runs -Ghostscript with all the complicated command line options -auto-constructed from the selected PPD and command line options give to -the print-job. - - - -point 'n' print + + point'n'print 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 stable beta-version: it is called foomatic-rip. To use -foomatic-rip as a filter with CUPS, you need the new-type PPDs. These -have a similar but different line: - + 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 stable beta-version: it is called foomatic-rip. To use + foomatic-rip as a filter with CUPS, you need the new type of PPDs, which + have a similar but different line: - *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip" +*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip" + The PPD-generating engine at Linuxprinting.org has been revamped. + The new PPDs comply with the Adobe spec. They also provide a + new way to specify different quality levels (hi-res photo, normal + color, grayscale, and draft) with a single click, whereas before you + could have required five or more different selections (media type, + resolution, inktype, and 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 that the new foomatic-rip works seamlessly with all + legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR, and so on), providing + for them access to use PPDs for their printing. + + -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, and draft) with a single click, whereas before you -could have required five or more different selections (media type, -resolution, inktype and 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 and so on), providing -for them access to use PPDs for their printing. - - - - -The Complete Picture + + The Complete Picture - -If you want to see an overview of all the filters and how they -relate to each other, the complete picture of the puzzle is at the end -of this document. - - + + If you want to see an overview of all the filters and how they + relate to each other, the complete picture of the puzzle is at the end + of this chapter. + + - -<filename>mime.convs</filename> + + <filename>mime.convs</filename> - -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 third 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. - + + CUPS autoconstructs all possible filtering chain paths for any given + MIME type and every printer installed. But how does it decide in + favor of or against a specific alternative? (There may 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 third 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. + - -The setting of FilterLimit 1000 in -cupsd.conf will not allow more filters to -run concurrently than will consume a total of 1000 virtual filter -cost. This is an efficient way to limit the load of any CUPS -server by setting an appropriate FilterLimit value. A FilterLimit of -200 allows roughly one job at a time, while a FilterLimit of 1000 allows -approximately five jobs maximum at a time. - - + + Setting FilterLimit 1000 in + cupsd.conf will not allow more filters to + run concurrently than will consume a total of 1000 virtual filter + cost. This is an efficient way to limit the load of any CUPS + server by setting an appropriate FilterLimit value. A FilterLimit of + 200 allows roughly one job at a time, while a FilterLimit of 1000 allows + approximately five jobs maximum at a time. + + - + <quote>Raw</quote> Printing - - 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: - - - + + 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: + &prompt;lpadmin -P rawprinter -v socket://11.12.13.14:9100 -E - - - - 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 --P /path/to/PPD to this command line, you would -have installed a normal print queue. - - - -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. - - - - -application/octet-stream Printing + + 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 -P /path/to/PPD to this command line, you would have installed a + normal print queue.) + - -Any MIME type with no rule in the -/etc/cups/mime.types file is regarded as unknown -or application/octet-stream and will not be -sent. Because CUPS refuses to print unknown MIME types per default, -you will probably have experienced the fact that print jobs originating -from Windows clients were not printed. You may have found an error -message in your CUPS logs like: - + + 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. + + - - Unable to convert file 0 to printable format for job - + + application/octet-stream Printing - -To enable the printing of application/octet-stream files, edit -these two files: - + + Any MIME type with no rule in the + /etc/cups/mime.types file is regarded as unknown + or application/octet-stream and will not be + sent. Because CUPS refuses to print unknown MIME types by default, + you will probably have experienced that print jobs originating + from Windows clients were not printed. You may have found an error + message in your CUPS logs like: + - -/etc/cups/mime.convs + + Unable to convert file 0 to printable format for job + -/etc/cups/mime.types - + + To enable the printing of application/octet-stream files, edit + these two files: + - -Both contain entries (at the end of the respective files) which must -be uncommented to allow RAW mode operation for -application/octet-stream. In /etc/cups/mime.types -make sure this line is present: + + /etc/cups/mime.convs -application/octet-stream + /etc/cups/mime.types + + + Both contain entries (at the end of the respective files) that must be uncommented to allow raw mode + operation for application/octet-stream. In /etc/cups/mime.types + make sure this line is present: + application/octet-stream application/octet-stream - -This line (with no specific auto-typing rule set) makes all files -not otherwise auto-typed a member of application/octet-stream. In -/etc/cups/mime.convs, have this -line: - + This line (with no specific autotyping rule set) makes all files + not otherwise auto-typed a member of application/octet-stream. In + /etc/cups/mime.convs, have this + line: application/octet-stream application/vnd.cups-raw 0 - + MIME + This line tells CUPS to use the Null Filter + (denoted as -, doing nothing at all) on + application/octet-stream, and tag the result as + application/vnd.cups-raw. 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. + -MIME - -This line tells CUPS to use the Null Filter -(denoted as -, doing nothing at all) on -application/octet-stream, and tag the result as -application/vnd.cups-raw. 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. - - -Editing the mime.convs and the -mime.types file does not -enforce raw printing, it only -allows it. - - - -Background - - -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 MIME type -application/octet-stream. While you -can send data raw, the MIME type for these must -be one that is known to CUPS and an allowed one. The file -/etc/cups/mime.types defines the rules of how CUPS -recognizes MIME types. The file -/etc/cups/mime.convs decides which file -conversion filter(s) may be applied to which MIME types. - - - - - -PostScript Printer Descriptions (PPDs) for Non-PS Printers + + Editing the mime.convs and the mime.types file does not + enforce raw printing, it only allows it. + + + Background - -PPD -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 job file. CUPS has extended this -scope for PPDs to cover non-PostScript printers too. This was not -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 job files. 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. - + + That CUPS is 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 MIME type application/octet-stream. While you + can send data raw, the MIME type for these must + be one that is known to CUPS and an allowed one. The file + /etc/cups/mime.types defines the rules of how CUPS + recognizes MIME types. The file /etc/cups/mime.convs decides which file + conversion filter(s) may be applied to which MIME types. + + + - -PPDs for a non-PS printer have a few lines that are unique to -CUPS. The most important one looks similar to this: + + PostScript Printer Descriptions for Non-PostScript Printers -application/vnd.cups-raster + + PPD + 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 job file. CUPS has extended this + scope for PPDs to cover non-PostScript printers too. This was not + 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 job files. The only difference is that + a PostScript printer has the RIP built-in, for other types of + printers the Ghostscript RIP runs on the host computer. + + + PPDs for a non-PostScript printer have a few lines that are unique to + CUPS. The most important one looks similar to this: + application/vnd.cups-raster - *cupsFilter: application/vnd.cups-raster 66 rastertoprinter +*cupsFilter: application/vnd.cups-raster 66 rastertoprinter + 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 autoconstruct 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 + 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. + -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. - - - -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. See PPDs shipped with CUPS for summary information. - + + 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. See Table 21.1 for summary information. + - - PPDs shipped with CUPS - - - - PPD filePrinter type - - deskjet.ppdolder HP inkjet printers and compatible +
+ PPDs Shipped with CUPS + + + + PPD filePrinter type + + deskjet.ppdolder HP inkjet printers and compatible - deskjet2.ppd newer HP inkjet printers and compatible + deskjet2.ppd newer HP inkjet printers and compatible - dymo.ppd label printers + dymo.ppd label printers - epson9.ppd Epson 24pin impact printers and compatible + epson9.ppd Epson 24-pin impact printers and compatible - epson24.ppd Epson 24pin impact printers and compatible + epson24.ppd Epson 24-pin impact printers and compatible - okidata9.ppd Okidata 9pin impact printers and compatible + okidata9.ppd Okidata 9-pin impact printers and compatible - okidat24.ppd Okidata 24pin impact printers and compatible + okidat24.ppd Okidata 24-pin impact printers and compatible - stcolor.ppd older Epson Stylus Color printers + stcolor.ppd older Epson Stylus Color printers - stcolor2.ppd newer Epson Stylus Color printers + stcolor2.ppd newer Epson Stylus Color printers - stphoto.ppd older Epson Stylus Photo printers + stphoto.ppd older Epson Stylus Photo printers - stphoto2.ppd newer Epson Stylus Photo printers + stphoto2.ppd newer Epson Stylus Photo printers - laserjet.ppd all PCL printers. Further below is a discussion - of several other driver/PPD-packages suitable for use with CUPS. + laserjet.ppd all PCL printers - - -
+ + + -
+ - -<emphasis>cupsomatic/foomatic-rip</emphasis> Versus <emphasis>native CUPS</emphasis> Printing + + <emphasis>cupsomatic/foomatic-rip</emphasis> Versus <emphasis>Native CUPS</emphasis> Printing + + cupsomatic + foomatic-rip + Native CUPS rasterization works in two steps: + - -cupsomatic -foomatic-rip -Native CUPS rasterization works in two steps: - + + + First is the pstoraster step. It uses the special CUPS + ESPGhostscript + device from ESP Ghostscript 7.05.x as its tool. + - - -First is the pstoraster step. It uses the special CUPS -ESPGhostscript -device from ESP Ghostscript 7.05.x as its tool. - - - -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 and some are proprietary. - + + Second is 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, and some are proprietary. + + - -Often this produces better quality (and has several more -advantages) than other methods. - + + Often this produces better quality (and has several more advantages) than other methods. + This is shown in the cupsomatic/foomatic Processing Versus Native CUPS + illustration. + -
- cupsomatic/foomatic Processing versus Native CUPS. + cupsomatic/foomatic Processing Versus Native CUPS. 10small
-
- -One other method is the cupsomatic/foomatic-rip -way. Note that cupsomatic is not made by the CUPS -developers. It is an independent contribution to printing development, -made by people from Linuxprinting.org see also http://www.cups.org/cups-help.html. -cupsomatic is no longer developed and maintained and is no longer -supported. It has now been replaced by -foomatic-rip. 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. - + + One other method is the cupsomatic/foomatic-rip + way. Note that cupsomatic is not made by the CUPS + developers. It is an independent contribution to printing development, + made by people from Linuxprinting.org.See also http://www.cups.org/cups-help.html + cupsomatic is no longer developed, maintained, or supported. It now been + replaced by foomatic-rip. foomatic-rip is a complete rewrite + 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. + - + cupsomatic foomatic -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 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. - + Like the old cupsomatic method, the foomatic-rip (new) method + from Linuxprinting.org uses the traditional Ghostscript print file processing, doing everything in a single + step. It therefore relies on all the other devices built 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. + - -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. - + + 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. + - -cupsomatic kidnaps the printfile after the -application/vnd.cups-postscript stage and -deviates it through the CUPS-external, system-wide Ghostscript -installation. Therefore the printfile bypasses the pstoraster filter -(and also bypasses the CUPS-raster-drivers -rastertosomething). After Ghostscript finished its rasterization, -cupsomatic hands the rendered file directly to the CUPS backend. The -flowchart in cupsomatic/foomatic processing versus Native CUPS illustrates the difference between native CUPS -rendering and the Foomatic/cupsomatic method. - -
+ + cupsomatic kidnaps the print file after the + application/vnd.cups-postscript stage and deviates it through the CUPS-external, + systemwide Ghostscript installation. Therefore, the print file bypasses the pstoraster + filter (and also bypasses the CUPS raster drivers rastertosomething). After Ghostscript + finished its rasterization, cupsomatic hands the rendered file directly to the CUPS + backend. Figure 21.10, cupsomatic/foomatic Processing Versus Native + CUPS, illustrates the difference between native CUPS rendering and the + Foomatic/cupsomatic method. + +
- -Examples for Filtering Chains + + Examples for Filtering Chains - -Here are a few examples of commonly occurring filtering chains to -illustrate the workings of CUPS. - + + Here are a few examples of commonly occurring filtering chains to + illustrate the workings of CUPS. + - -Assume you want to print a PDF file to an HP JetDirect-connected -PostScript printer, but you want to print the pages 3-5, 7, 11-13 -only, and you want to print them two-up and duplex: - + + Assume you want to print a PDF file to an HP JetDirect-connected + PostScript printer, but you want to print pages 3-5, 7, and 11-13 + only, and you want to print them two-up and duplex: + - -Your print options (page selection as required, two-up, -duplex) are passed to CUPS on the command line. - -The (complete) PDF file is sent to CUPS and auto-typed as -application/pdf. - -The file therefore must first pass the -pdftops pre-filter, which produces PostScript -MIME type application/postscript (a preview here -would still show all pages of the original PDF). - -The file then passes the pstops -filter that applies the command line options: it selects the pages -2-5, 7 and 11-13, creates an imposed layout 2 pages on 1 sheet and -inserts the correct duplex command (as defined in the printer's -PPD) into the new PostScript file; the file is now of PostScript MIME -type -application/vnd.cups-postscript. - -The file goes to the socket -backend, which transfers the job to the printers. - + + Your print options (page selection as required, two-up, + duplex) are passed to CUPS on the command line. + + The (complete) PDF file is sent to CUPS and autotyped as + application/pdf. + + The file therefore must first pass the + pdftops prefilter, which produces PostScript + MIME type application/postscript (a preview here + would still show all pages of the original PDF). + + The file then passes the pstops + filter that applies the command-line options: it selects pages + 2-5, 7, and 11-13, creates the imposed layout two pages on one sheet, and + inserts the correct duplex command (as defined in the printer's + PPD) into the new PostScript file; the file is now of PostScript MIME + type + application/vnd.cups-postscript. + + The file goes to the socket + backend, which transfers the job to the printers. + + + + The resulting filter chain, therefore, is as shown in the PDF to socket chain + illustration. + - - The resulting filter chain, therefore, is as drawn in PDF to socket chain.
- PDF to socket chain. + PDF to Socket Chain. pdftosocket
-
+ + Assume you want to print the same filter to an USB-connected Epson Stylus Photo printer installed with the CUPS + stphoto2.ppd. The first few filtering stages are nearly the same: + - -Assume you want to print the same filter to an USB-connected -Epson Stylus Photo printer installed with the CUPS -stphoto2.ppd. The first few filtering stages -are nearly the same: - + + + Your print options (page selection as required, two-up, + duplex) are passed to CUPS on the command line. + - -Your print options (page selection as required, two-up, -duplex) are passed to CUPS on the command-line. - -The (complete) PDF file is sent to CUPS and auto-typed as -application/pdf. - -The file must first pass the -pdftops pre-filter, which produces PostScript -MIME type application/postscript (a preview here -would still show all pages of the original PDF). - -The file then passes the pstops filter that applies -the command-line options: it selects the pages 2-5, 7 and 11-13, -creates an imposed layout two pages on one sheet and inserts the -correct duplex command... (Oops &smbmdash; this printer and PPD -do not support duplex printing at all &smbmdash; so this option will -be ignored) into the new PostScript file; the file is now of PostScript -MIME type -application/vnd.cups-postscript. - -The file then passes the - -pstoraster stage and becomes MIME type -application/ -cups-raster. - -Finally, the rastertoepson filter -does its work (as indicated in the printer's PPD), creating the -printer-specific raster data and embedding any user-selected -print-options into the print data stream. - -The file goes to the usb backend, -which transfers the job to the printers. - + + The (complete) PDF file is sent to CUPS and autotyped as + application/pdf. + - -The resulting filter chain therefore is as drawn in this figure. - + + The file must first pass the pdftops prefilter, which produces PostScript + MIME type application/postscript (a preview here would still show all + pages of the original PDF). + -
- PDF to USB chain. - pdftoepsonusb -
-
+ + The file then passes the pstops filter that applies + the command-line options: it selects the pages 2-5, 7, and 11-13, + creates the imposed layout two pages on one sheet, and inserts the + correct duplex command (oops &smbmdash; this printer and PPD + do not support duplex printing at all, so this option will + be ignored) into the new PostScript file; the file is now of PostScript + MIME type application/vnd.cups-postscript. + - -Sources of CUPS Drivers/PPDs + + The file then passes the pstoraster stage and becomes MIME type + application/cups-raster. + - -On the Internet you can now find many thousands of CUPS-PPD files -(with their companion filters), in many national languages -supporting more than thousand non-PostScript models. - + + Finally, the rastertoepson filter + does its work (as indicated in the printer's PPD), creating the + printer-specific raster data and embedding any user-selected + print options into the print data stream. + - -ESPPrint Pro -PrintProESP Print Pro -ESP -PrintPro (commercial, -non-free) is packaged with more than three thousand 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). - -The Gimp-Print-Project - (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. - -TurboPrint - (shareware, non-free) supports -roughly the same amount of printers in excellent -quality. - -OMNI - -(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). - -HPIJS - (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). - -Foomatic/cupsomatic - (LPGL, free) from Linuxprinting.org are providing PPDs for practically every Ghostscript -filter known to the world (including Omni, Gimp-Print and HPIJS). - + + The file goes to the usb backend, which transfers the job to the printers. + + - + + The resulting filter chain therefore is as shown in the PDF to USB Chain + illutration. + - -Printing with Interface Scripts +
+ PDF to USB Chain. + pdftoepsonusb +
+
- -CUPS also supports the usage of interface scripts as known from -System V AT&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 -i option: - + + Sources of CUPS Drivers/PPDs - + + On the Internet you can now find many thousands of CUPS-PPD files + (with their companion filters), in many national languages + supporting more than 1,000 non-PostScript models. + + + + ESPPrint Pro + PrintProESP Print Pro + + ESP PrintPro + (commercial, non-free) is packaged with more than 3,000 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 + other 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). + + + + The Gimp-Print Project + (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. + + + + TurboPrint (shareware, non-free) supports + roughly the same number of printers in excellent quality. + + + + OMNI + (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). + + + + HPIJS (BSD-style licenses, free) + supports approximately 150 of HP's own printers and also provides + excellent print quality now (currently available only via the Foomatic path). + + + + Foomatic/cupsomatic + (LPGL, free) from Linuxprinting.org provide PPDs for practically every Ghostscript + filter known to the world (including Omni, Gimp-Print, and HPIJS). + + + + + + + Printing with Interface Scripts + + + CUPS also supports the use of interface scripts as known from + System V AT&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 role similar to + PPDs for PostScript printers. Interface scripts may inject the Escape + sequences as required into the print data stream if the user, for example, selects + a certain paper tray, or changes paper orientation, or uses A3 + paper. Interface 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 -i option: + &rootprompt;lpadmin -p pclprinter -v socket://11.12.13.14:9100 \ - -i /path/to/interface-script + -i /path/to/interface-script - -Interface scripts might be the unknown animal to many. However, -with CUPS they provide the easiest 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 http://playground.sun.com/printing/documentation/interface.html). - - + + Interface scripts might be the unknown animal to many. However, + with CUPS they provide the easiest way to plug in your own custom-written filtering + script or program into one specific print queue (some information about the traditional + use of interface scripts is found at + + http://playground.sun.com/printing/documentation/interface.html). + +
- Network Printing (Purely Windows) +Network Printing (Purely Windows) Network printing covers a lot of ground. To understand what exactly @@ -2057,13 +1885,14 @@ options. They may: Send the GDI output (EMF) to the server, where the -driver is executed to render the printer specific -output. + driver is executed to render the printer-specific output. + -Both print paths are shown in the flowcharts Print driver -execution on the client and Print driver execution on the server. +Both print paths are shown in the flowcharts in +Print Driver Execution on the Client, and +Print Driver Execution on the Server. @@ -2071,23 +1900,20 @@ execution on the client and Print driver executio Driver Execution on the Client -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 a traditional UNIX-based print server can do too, and -at a better performance and more reliably than an 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. +In the first case the print server must spool the file as raw, meaning it shouldn't touch the job file and try +to convert it in any way. This is what a traditional UNIX-based print server can do too, and at a better +performance and more reliably than an 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. This is illustrated in the Print Driver Execution on the +Client diagram. - -
- Print driver execution on the client. - 11small -
-
+
+ Print Driver Execution on the Client. + 11small +
+ @@ -2100,30 +1926,26 @@ clients. ESC/P EMF GDI -The other path executes the printer driver on the server. The client -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. +The other path executes the printer driver on the server. The client 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. +This is illustrated in the Print Driver Execution on the Server diagram. -
- Print driver execution on the server. + Print Driver Execution on the Server. 12small
-
-However, there is something similar possible with CUPS. Read on. +However, something similar is possible with CUPS, so read on.
-Network Printing (Windows Clients &smbmdash; UNIX/Samba Print +<title>Network Printing (Windows Clients and UNIX/Samba Print Servers) @@ -2138,17 +1960,16 @@ features that are not possible otherwise. From Windows Clients to a CUPS/Samba Print Server -Here is a simple recipe showing how you can take advantage of CUPS' +Here is a simple recipe showing how you can take advantage of CUPS's powerful features for the benefit of your Windows network printing clients: + Let the Windows clients send PostScript to the CUPS + server. -Let the Windows clients send PostScript to the CUPS -server. - -Let the CUPS server render the PostScript into device-specific raster format. + Let the CUPS server render the PostScript into device-specific raster format. @@ -2158,9 +1979,8 @@ driver on the CUPS server. -First, to enable CUPS-based printing through Samba the -following options should be set in your &smb.conf; file [global] -section: +First, to enable CUPS-based printing through Samba, the following options should be set in your &smb.conf; +file [global] section: @@ -2169,49 +1989,41 @@ section: -When these parameters are specified, all manually set print directives -(like , or ) in &smb.conf; (as well as -in Samba itself) will be ignored. Instead, Samba will directly -interface with CUPS through its 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 -System V AT&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 sysv). +When these parameters are specified, all manually set print directives (like or ) in &smb.conf; (as well as in Samba itself) will be +ignored. Instead, Samba will directly interface with CUPS through its 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 System V +AT&T command set, with the -oraw option automatically passing through (if you want your own defined print +commands to work with a Samba server that has CUPS support compiled in, simply use sysv). This is illustrated in the Printing via +CUPS/Samba Server diagram. - -
- Printing via CUPS/Samba server. +
+ Printing via CUPS/Samba Server. 13small
- -Samba Receiving Job-files and Passing Them to CUPS +Samba Receiving Job-Files and Passing Them to CUPS -Samba must use its own spool directory (it is set -by a line similar to /var/spool/samba, -in the or - section of -&smb.conf;). 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 RequestRoot -directive, in a line that defaults to RequestRoot -/var/spool/cups). CUPS checks the access rights of its -spool dir and resets it to healthy values with every restart. We have -seen quite a few people who had used a common spooling space for Samba -and CUPS, and were struggling for weeks with this problem. +Samba must use its own spool directory (it is set by a line similar to /var/spool/samba, in the or section of &smb.conf;). Samba receives the job in its own spool space and passes it +into the spool directory of CUPS (the CUPS spool directory is set by the RequestRoot +directive in a line that defaults to RequestRoot /var/spool/cups). CUPS checks the +access rights of its spool directory and resets it to healthy values with every restart. We have seen quite a +few people who used a common spooling space for Samba and CUPS, and struggled for weeks with this +problem. 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 +allow localhost to print. If it runs on different machines, you need to make sure the Samba host gets access to printing on CUPS. @@ -2230,27 +2042,21 @@ clients make use of a PostScript driver with CUPS-PPDs. PostScript PCL PJL -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. +PPDs can control all print device options. They are usually provided by the manufacturer &smbmdash; if you own +a PostScript 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. -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), or a command line interface (see man lpoptions -or see if you have lphelp on your system). There are also some -different GUI front-ends 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. +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) or a command-line interface (see man +lpoptions or see if you have lphelp on your system). There are also some +different GUI front-ends 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. @@ -2259,24 +2065,19 @@ PostScript RIP on the real PostScript printer. PPD -CUPS does not 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 +CUPS does not limit itself to real PostScript printers in its use 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. -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 -*cupsFilter. 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. +This is logical, because 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 +*cupsFilter. 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. @@ -2285,32 +2086,29 @@ proper raster print format. PPD -CUPS-PPDs can also be used on Windows-Clients, on top of a -core PostScript driver (now recommended is the "CUPS PostScript -Driver for Windows NT/200x/XP"; you can also use the Adobe one, with -limitations). This feature enables CUPS to do a few tricks no other -spooler can do: +CUPS-PPDs can also be used on Windows clients, on top of a core PostScript driver (now +recommended is the CUPS PostScript Driver for Windows NT/200x/XP; you can also use the Adobe one, with +limitations). This feature enables CUPS to do a few tricks no other spooler can do: + + Act as a networked PostScript RIP handling print files from all client platforms in a uniform way. + -Act as a networked PostScript RIP (Raster Image -Processor), handling print files from all client platforms in a uniform -way. - -Act as a central accounting and billing server, since -all files are passed through the pstops filter and are, therefore, -logged in the CUPS page_log file. -Note: this cannot happen with raw print jobs, -which always remain unfiltered per definition. + + Act as a central accounting and billing server, since all files are passed through the pstops filter and are therefore + logged in the CUPS page_log file. Note: this cannot happen with + raw print jobs, which always remain unfiltered per definition. + -Enable clients to consolidate on a single PostScript -driver, even for many different target printers. + + Enable clients to consolidate on a single PostScript driver, even for many different target printers. + -Using CUPS PPDs on Windows clients enables these to control -all print job settings just as a UNIX client can do. +Using CUPS PPDs on Windows clients enables them to control all print job settings just as a UNIX client can do. @@ -2319,11 +2117,9 @@ all print job settings just as a UNIX client can do. Windows Terminal Servers (WTS) as CUPS Clients -This setup may be of special interest to people experiencing major -problems in WTS environments. WTS often need 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. +This setup may be of special interest to people experiencing major problems in WTS environments. WTS often +need 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. @@ -2331,22 +2127,17 @@ increased instability. Problems - In Windows NT printer drivers which run in Kernel -Mode, 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 sound-card of their finished jobs. Do I -need to say that this one was also reliably causing blue screens -of death on a regular basis? +Windows NT printer drivers, which run in kernel mode, introduce 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? -PostScript drivers are generally well tested. They are not known -to cause any problems, even though they also run in kernel mode. This -might be because there have been so far only two different PostScript -drivers: the ones from Adobe and the one from Microsoft. Both are -well tested and are as stable as you can imagine on +PostScript drivers are generally well tested. They are not known to cause any problems, even though they also +run in kernel mode. This might be because until now there have been only two different PostScript drivers: the +one from Adobe and the one from Microsoft. Both are well tested and are as stable as you can imagine on Windows. The CUPS driver is derived from the Microsoft one. @@ -2355,58 +2146,47 @@ Windows. The CUPS driver is derived from the Microsoft one. Workarounds Impose Heavy Limitations -In many cases, in an attempt to work around this problem, site -administrators have resorted to restricting the allowed drivers installed -on their WTS to one generic PCL and one PostScript driver. This, -however, restricts the clients in the number 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! +In an attempt to work around problems, site administrators have resorted to restricting the +allowed drivers installed on their WTS to one generic PCL and one PostScript driver. This, however, restricts +the the number of printer options available for clients to use. 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! CUPS: A <quote>Magical Stone</quote>? - PPD PostScript -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 three 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. +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 three different PostScript +drivers now 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) choose +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. -PostScript Drivers with No Major Problems &smbmdash; Even in Kernel +<title>PostScript Drivers with No Major Problems, Even in Kernel Mode DDK -More recent printer drivers on W200x and XP no longer run in kernel mode -(unlike Windows NT). 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 Windows 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 does not allow them to publish the whole of the source code. -However, they have released the diff under the GPL, and if you are -the owner of an MS DDK for Windows NT, you can check the driver yourself. +More recent printer drivers on W200x and XP no longer run in kernel mode (unlike Windows NT). 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 Windows 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 does not +allow them to publish the whole of the source code. However, they have released the diff under +the GPL, and if you are the owner of an MS DDK for Windows NT, you can check the driver +yourself. @@ -2415,12 +2195,10 @@ the owner of an MS DDK for Windows NT, you can check the driver y Configuring CUPS for Driver Download -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/Windows client -relationship. +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 Classical Printing. In reality, this is a pure Samba +business and relates only to the Samba-Windows client relationship. @@ -2429,55 +2207,47 @@ relationship. cupsaddsmb -The cupsaddsmb utility (shipped with all current CUPS versions) is an -alternate method to transfer printer drivers into the Samba - 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 quite easy. cupsaddsmb can use the Adobe PostScript driver as -well as the newly developed CUPS PostScript Driver for -Windows NT/200x/XP. cupsaddsmb does -not work with arbitrary vendor printer drivers, -but only with the exact driver files that are -named in its man page. +The cupsaddsmb utility (shipped with all current CUPS versions) is an alternative +method to transfer printer drivers into the Samba share. Remember, this +share is where clients expect drivers deposited and set up for download and installation. It makes the sharing +of any (or all) installed CUPS printers quite easy. cupsaddsmb can use the Adobe PostScript +driver as well as the newly developed CUPS PostScript driver for Windows NT/200x/XP. +cupsaddsmb does not work with arbitrary vendor printer drivers, +but only with the exact driver files that are named in its man page. -The CUPS printer driver is available from the CUPS download site. Its -package name is cups-samba-[version].tar.gz . It -is preferred over the Adobe drivers since it has a number of -advantages: +The CUPS printer driver is available from the CUPS download site. Its package name is +cups-samba-[version].tar.gz. It is preferred over the Adobe drivers because it has a +number of advantages: -It supports a much more accurate page -accounting. + It supports a much more accurate page accounting. -It supports banner pages, and page labels on all -printers. + It supports banner pages and page labels on all printers. -It supports the setting of a number of job IPP -attributes (such as job-priority, page-label and -job-billing). + It supports the setting of a number of job IPP attributes + (such as job priority, page label, and job billing). -However, currently only Windows NT, 2000 and XP are supported by the -CUPS drivers. You will also need to get the respective part of Adobe driver -if you need to support Windows 95, 98 and ME clients. +However, currently only Windows NT, 2000, and XP are supported by the +CUPS drivers. You will also need to get the respective part of the Adobe driver +if you need to support Windows 95, 98, and Me clients. - Prepare Your &smb.conf; for <command>cupsaddsmb</command> +Prepare Your &smb.conf; for <command>cupsaddsmb</command> Prior to running cupsaddsmb, you need the settings in -&smb.conf; as shown in the next example: +&smb.conf; as shown in the &smb.conf; for cupsaddsmb Usage. -smb.conf for cupsaddsmb usage +smb.conf for cupsaddsmb Usage yes @@ -2510,16 +2280,12 @@ Prior to running cupsaddsmb, you need the settings in PostScript -CUPS users may get the exact same packages from http://www.cups.org/software.html. -It is a separate package from the CUPS base software files, tagged as -CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba -(tar.gz, 192k). The filename to download is -cups-samba-1.1.x.tar.gz. Upon untar and unzipping, -it will reveal these files: - - - +CUPS users may get the exact same package from http://www.cups.org/software.html. It is a separate package +from the CUPS-based software files, tagged as CUPS 1.1.x Windows NT/200x/XP Printer Driver for Samba (tar.gz, +192k). The filename to download is cups-samba-1.1.x.tar.gz. Upon untar and unzipping, it +will reveal these files: + &rootprompt;tar xvzf cups-samba-1.1.19.tar.gz cups-samba.install cups-samba.license @@ -2531,17 +2297,12 @@ cups-samba.ss ESPmeta packager EPMESP meta packager -These have been packaged with the ESP meta packager software -EPM. The *.install and -*.remove files are simple shell scripts, which -untars the *.ss (the *.ss is -nothing else but a tar-archive, which can be untarred by tar -too). Then it puts the content into -/usr/share/cups/drivers/. This content includes three +These have been packaged with the ESP meta-packager software EPM. The *.install and +*.remove files are simple shell scripts, which untar the *.ss (the +*.ss is nothing else but a tar archive, which can be untarred by tar too). +Then it puts the content into /usr/share/cups/drivers/. This content includes three files: - - - + &rootprompt;tar tv cups-samba.ss cupsdrvr.dll cupsui.dll @@ -2551,9 +2312,7 @@ cups.hlp The cups-samba.install shell scripts are easy to handle: - - - + &rootprompt;./cups-samba.install [....] Installing software... @@ -2564,34 +2323,25 @@ Installation is complete. The script should automatically put the driver files into the -/usr/share/cups/drivers/ directory. - - - -Due to a bug, one recent CUPS release puts the -cups.hlp driver file -into/usr/share/drivers/ instead of -/usr/share/cups/drivers/. To work around this, -copy/move the file (after running the -./cups-samba.install script) manually to the -correct place. - - - +/usr/share/cups/drivers/ directory: + &rootprompt;cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/ + +Due to a bug, one recent CUPS release puts the cups.hlp driver file +into/usr/share/drivers/ instead of /usr/share/cups/drivers/. To work +around this, copy/move the file (after running the ./cups-samba.install script) manually to +the correct place. + DDK -This new CUPS PostScript driver is currently binary-only, but free of -charge. No complete source code is provided (yet). The reason is that -it has been developed with the help of the Microsoft Driver -Developer Kit (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. +This new CUPS PostScript driver is currently binary only, but free of charge. No complete source code is +provided (yet). The reason is that it has been developed with the help of the Microsoft 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 for Visual Studio and a DDK will be able to compile for himself or herself. @@ -2599,30 +2349,26 @@ Visual Studio and a DDK will be able to compile for him/herself. Recognizing Different Driver Files -The CUPS drivers do not support the older Windows 95/98/Me, but only -the Windows NT/2000/XP client. +The CUPS drivers do not support the older Windows 95/98/Me, but only the Windows NT/2000/XP client. -Windows NT, 2000 and XP are supported by: +Windows NT, 2000, and XP are supported by: - - - cups.hlp - cupsdrvr.dll - cupsui.dll - - + + cups.hlp + cupsdrvr.dll + cupsui.dll + 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 from the +for Windows NT/2000/XP clients. The set of files is different from the different platforms. -Windows 95, 98 and ME are supported by: +Windows 95, 98, and ME are supported by: - - + ADFONTS.MFM ADOBEPS4.DRV ADOBEPS4.HLP @@ -2630,25 +2376,20 @@ different platforms. ICONLIB.DLL PSMON.DLL - -Windows NT, 2000 and XP are supported by: +Windows NT, 2000, and XP are supported by: - ADOBEPS5.DLL ADOBEPSU.DLL ADOBEPSU.HLP - - -If both the Adobe driver files and the CUPS driver files for the -support of Windows NT/200x/XP are present in FIXME, the Adobe ones will be ignored -and the CUPS ones will be used. If you prefer &smbmdash; for whatever reason -&smbmdash; to use Adobe-only drivers, move away the three CUPS driver files. The -Windows 9x/Me clients use the Adobe drivers in any case. +If both the Adobe driver files and the CUPS driver files for the support of Windows NT/200x/XP are present +installed on the server, the Adobe files will be ignored and the CUPS files will be used. If you prefer +&smbmdash; for whatever reason &smbmdash; to use Adobe-only drivers, move away the three CUPS driver files. +The Windows 9x/Me clients use the Adobe drivers in any case. @@ -2656,119 +2397,93 @@ Windows 9x/Me clients use the Adobe drivers in any case. Acquiring the Adobe Driver Files -Acquiring the Adobe driver files seems to be unexpectedly difficult -for many users. They are not available on the Adobe Web site 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 - share holds the Adobe files, from -where you can get them with smbclient from the CUPS host. +Acquiring the Adobe driver files seems to be unexpectedly difficult for many users. They are not available on +the Adobe Web site as single files, and the self-extracting and/or self-installing Windows-.exe is not easy to +locate either. You probably 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 share holds the Adobe files, which you can get with smbclient from the CUPS host. ESP Print Pro PostScript Driver for Windows NT/200x/XP - - ESPPrint Pro -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 http://www.easysw.com/software.html. -You need to locate the link labeled SAMBA among the -Download Printer Drivers for ESP Print Pro 4.x -area and download the package. Once installed, you can prepare any -driver by simply highlighting the printer in the Printer Manager GUI -and select Export Driver... from the menu. Of -course you need to have prepared Samba beforehand to handle the -driver files; i.e., setup the -share, and so on. 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. +Users of the ESP Print Pro software are able to install the ESP print drivers package as an alternative to the +Adobe postscript drivers. To do so, retrieve the driver files from the normal download area of the ESP Print +Pro software at Easy Software web site. +You need to locate the link labeled SAMBA among the Download Printer Drivers for ESP +Print Pro 4.x area and download the package. Once installed, you can prepare any driver by simply +highlighting the printer in the Printer Manager GUI and selecting Export Driver... from +the menu. Of course, you need to have prepared Samba beforehand to handle the driver files; that is, set up +the share, and so on. 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. -Caveats to be Considered +Caveats to Be Considered cupsaddsmb -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 share (which often maps to -/etc/samba/drivers/ and contains a subdirectory -tree with WIN40 and -W32X86 branches). You do this by running -cupsaddsmb (see also man cupsaddsmb for -CUPS since release 1.1.16). +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 share (which often maps to /etc/samba/drivers/ and contains a +subdirectory tree with WIN40 and W32X86 branches). You do this by +running cupsaddsmb (see also man cupsaddsmb for CUPS since release +1.1.16). Single Sign On -You may need to put root into the smbpasswd file by running -smbpasswd; 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 -single sign on to a Windows Domain Controller. +You may need to put root into the smbpasswd file by running smbpasswd; 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 single sign on to a Windows Domain Controller. -Once the driver files are in the share -and are initialized, they are ready to be downloaded and installed by -the Windows NT/200x/XP clients. +Once the driver files are in the share and are initialized, they are ready +to be downloaded and installed by the Windows NT/200x/XP clients. -Win 9x/Me clients will not work with the CUPS PostScript driver. For -these you still need to use the ADOBE*.* -drivers as previously stated. +Win 9x/Me clients will not work with the CUPS PostScript driver. For these you still need to use the +ADOBE*.* drivers, as previously stated. -It is not harmful if you still have the -ADOBE*.* driver files from previous -installations in the /usr/share/cups/drivers/ -directory. The new cupsaddsmb (from 1.1.16) will -automatically prefer its own drivers if it finds both. +It is not harmful if you still have the ADOBE*.* driver files from previous installations +in the /usr/share/cups/drivers/ directory. The new cupsaddsmb (from +1.1.16) will automatically prefer its own drivers if it finds both. "Printers" folder -Should your Windows clients have had the old ADOBE*.* -files for the Adobe PostScript driver installed, the download and -installation of the new CUPS PostScript driver for Windows NT/200x/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 Start > Settings > Control Panel > Printers), -right-click on the folder background and select Server -Properties. When the new dialog opens, select the -Drivers tab. On the list select the driver you -want to delete and click the Delete -button. This will only work if there is not one single printer left -that 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. +Should your Windows clients have had the old ADOBE*.* files for the Adobe PostScript +driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/200x/XP will +fail at first. You need to wipe the old driver from the clients first. It is not enough to +delete the printer, because 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 on the folder background, and select Server +Properties. When the new dialog opens, select the Drivers tab. On the list +select the driver you want to delete and click the Delete button. This will only work if +there is not one single printer left that 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. rpcclientsetdriver -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 in Classical Printing Support. Either change -a driver for an existing printer by running the Printer Properties -dialog, or use rpcclient with the -setdriver subcommand. +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 in Classical Printing +Support. Either change a driver for an existing printer by running the Printer +Properties dialog, or use rpcclient with the setdriver +subcommand. @@ -2776,72 +2491,64 @@ dialog, or use rpcclient with the Windows CUPS PostScript Driver Versus Adobe Driver -Are you interested in a comparison between the CUPS and the Adobe -PostScript drivers? For our purposes these are the most important -items that weigh in favor of the CUPS ones: +Are you interested in a comparison between the CUPS and the Adobe PostScript drivers? For our purposes these +are the most important items that weigh in favor of CUPS: -No hassle with the Adobe EULA. + No hassle with the Adobe EULA. -No hassle with the question Where do I -get the ADOBE*.* driver files from? + No hassle with the question, Where do I + get the ADOBE*.* driver files? - -PJL -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 -<1B >%-12345X or -<escape>%-12345X instead -of %!PS). 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 -application/postscript -application/postscript, but as -the more special MIME type -application/cups.vnd-postscript -application/cups.vnd-postscript), -which therefore also leads to the page accounting in -/var/log/cups/page_log not -receiving the exact number of pages; instead the dummy page number -of 1 is logged in a standard setup). - -The Adobe driver has more options to mis-configure the -PostScript generated by it (like setting it inadvertently to -Optimize for Speed, instead of -Optimize for Portability, which -could lead to CUPS being unable to process it). - -The CUPS PostScript driver output sent by Windows -clients to the CUPS server is guaranteed to auto-type -as the generic MIME type application/postscript, -thus passing through the CUPS pstops filter and logging the -correct number of pages in the page_log for -accounting and quota purposes. - -The CUPS PostScript driver supports the sending of -additional standard (IPP) print options by Windows NT/200x/XP clients. Such -additional print options are: 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). - -The CUPS PostScript driver supports the inclusion of -the new *cupsJobTicket 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). - -The CUPS PostScript driver will be the heart of the -fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon -(probably alongside the first beta release for CUPS -1.2). + + PJL + 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 print file starts with <1B + >%-12345X or <escape>%-12345X instead of + %!PS. This leads to the CUPS daemon autotyping 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 application/postscript + application/postscript, but as the more special MIME type + application/cups.vnd-postscript + application/cups.vnd-postscript), which therefore also leads to the page accounting in + /var/log/cups/page_log not receiving the exact number of pages; instead the dummy page + number of 1 is logged in a standard setup). + + + The Adobe driver has more options to misconfigure the + PostScript generated by it (like setting it inadvertently to + Optimize for Speed instead of + Optimize for Portability, which + could lead to CUPS being unable to process it). + + The CUPS PostScript driver output sent by Windows + clients to the CUPS server is guaranteed to autotype + as the generic MIME type application/postscript, + thus passing through the CUPS pstops filter and logging the + correct number of pages in the page_log for + accounting and quota purposes. + + The CUPS PostScript driver supports the sending of + additional standard (IPP) print options by Windows NT/200x/XP clients. Such + additional print options are 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). + + The CUPS PostScript driver supports the inclusion of + the new *cupsJobTicket 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 because they will regard it as a comment + and simply ignore it). + + The CUPS PostScript driver will be the heart of the + fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon + (probably alongside the first beta release for CUPS 1.2). @@ -2853,22 +2560,17 @@ fully fledged CUPS IPP client for Windows NT/200x/XP to be released soon cupsaddsmb point 'n' print -The cupsaddsmb command copies the needed files into your - share. Additionally, the PPD -associated with this printer is copied from -/etc/cups/ppd/ to -. 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 -toward Samba. If you have a small network, you are probably using user-level -security (user). +The cupsaddsmb command copies the needed files into your +share. Additionally, the PPD associated with this printer is copied from /etc/cups/ppd/ +to . 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 toward +Samba. If you have a small network, you are probably using user-level security (user). Here is an example of a successfully run cupsaddsmb command: - - - + &rootprompt;cupsaddsmb -U root infotec_IS2027 Password for root required to access localhost via Samba: ['secret'] @@ -2892,18 +2594,9 @@ Probably you want to see what's going on. Use 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: - - - -You will see the root password for the Samba account printed on -screen. - - - - rpcclientadddriver rpcclientsetdriver - + &rootprompt;cupsaddsmb -U root -v infotec_2105 Password for root required to access localhost via &example.server.samba;: Running command: smbclient //localhost/print\$ -N -U'root%secret' \ @@ -2964,66 +2657,59 @@ Running command: smbclient //localhost/print\$ -N -U'root%secret' \ -c 'setdriver infotec_2105 infotec_2105' cmd = setdriver infotec_2105 infotec_2105 Successfully set infotec_2105 to driver infotec_2105. - + +You will see the root password for the Samba account printed on screen. + + -If you look closely, you'll discover your root password was transferred -unencrypted over the wire, so beware! Also, if you look further, -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 driver download share (from a previous driver installation). They are harmless here. +If you look closely, you'll discover your root password was transferred unencrypted over the wire, so beware! +Also, if you look further, you may discover error messages like NT_STATUS_OBJECT_NAME_COLLISION in the output. +This will occur when the directories WIN40 and W32X86 already existed in the +driver download share (from a previous driver installation). These are harmless warning messages. Understanding cupsaddsmb - cupsaddsmb -What has happened? What did cupsaddsmb do? There are five stages of -the procedure: +What has happened? What did cupsaddsmb do? There are five stages of the procedure: IPP - Call the CUPS server via IPP and request the -driver files and the PPD file for the named printer. + Call the CUPS server via IPP and request the driver files and the PPD file for the named printer. -Store the files temporarily in the local -TEMPDIR (as defined in -cupsd.conf). + Store the files temporarily in the local TEMPDIR (as defined in cupsd.conf). -Connect via smbclient to the Samba server's - share and put the files into the - share's WIN40 (for Windows 9x/Me) and W32X86/ (for Windows NT/200x/XP) subdirectories. + Connect via smbclient to the Samba server's share and put the files into the + share's WIN40 (for Windows 9x/Me) and W32X86 (for Windows NT/200x/XP) subdirectories. - -rpcclientadddriver - Connect via rpcclient to the Samba server and -execute the adddriver command with the correct -parameters. + + rpcclientadddriver + Connect via rpcclient to the Samba server and execute the adddriver command with the correct parameters. + - -rpcclientsetdriver - Connect via rpcclient to the Samba server a second -time and execute the setdriver command. + + rpcclientsetdriver + Connect via rpcclient to the Samba server a second time and execute the setdriver command. -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 to 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): - - - +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 +to 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): + &rootprompt;cupsaddsmb -H sambaserver -h cupsserver -v printer - - + + + @@ -3031,30 +2717,29 @@ same host): You must always check if the utility completed -successfully in all fields. You need as a minimum these three messages +successfully in all fields. You need at minimum these three messages among the output: + Printer Driver infotec_2105 successfully + installed. # (for the W32X86 == Windows NT/200x/XP + architecture). -Printer Driver infotec_2105 successfully -installed. # (for the W32X86 == Windows NT/200x/XP -architecture). - -Printer Driver infotec_2105 successfully -installed. # (for the WIN40 == Windows 9x/Me -architecture). + Printer Driver infotec_2105 successfully + installed. # (for the WIN40 == Windows 9x/Me + architecture). -Successfully set [printerXPZ] to driver -[printerXYZ]. + Successfully set [printerXPZ] to driver + [printerXYZ]. These messages are probably not easily recognized in the general output. If you run cupsaddsmb with the parameter (which tries to prepare all active CUPS -printer drivers for download), you might miss if individual printers -drivers had problems installing properly. Here a redirection of the +printer drivers for download), you might miss if individual printer +drivers had problems installing properly. A redirection of the output will help you analyze the results in retrospective. @@ -3064,15 +2749,14 @@ If you get: SetPrinter call failed! result was WERR_ACCESS_DENIED -It means that you might have set yes for this printer. -Set it to no will solve the problem. Refer to man samba(5) for explanantion on -use client driver. +it means that you might have set yes for this printer. +Setting it to no will solve the problem. Refer to the &smb.conf; man page for explanantion of +the use client driver. -It is impossible to see any diagnostic output if you do not run -cupsaddsmb in verbose mode. Therefore, we strongly recommend to not -use the default quiet mode. It will hide any problems from you that +It is impossible to see any diagnostic output if you do not run cupsaddsmb in verbose mode. +Therefore, we strongly recommend to not use the default quiet mode. It will hide any problems from you that might occur. @@ -3080,12 +2764,10 @@ might occur. cupsaddsmb with a Samba PDC - cupsaddsmb -Can't get the standard cupsaddsmb command to run on a Samba PDC? -Are you asked for the password credential all over again and again and -the command just will not take off at all? Try one of these +Can't get the standard cupsaddsmb command to run on a Samba PDC? Are you asked for the +password credential again and again, and the command just will not take off at all? Try one of these variations: @@ -3096,8 +2778,7 @@ variations: -(Note the two backslashes: the first one is required to -escape the second one). +(Note the two backslashes: the first one is required to escape the second one). @@ -3106,77 +2787,59 @@ variations: cupsaddsmb -cupsaddsmb flowchart shows a chart about the procedures, command-flows and -data-flows of the cupaddsmb command. Note again: cupsaddsmb is -not intended to, and does not work with, raw queues! +The cupsaddsmb Flowchart shows a chart about the procedures, command flows, and +data flows of the cupaddsmb command. Note again: cupsaddsmb is +not intended to, and does not work with, raw print queues! -
- cupsaddsmb flowchart. + cupsaddsmb Flowchart. 14small
-
Installing the PostScript Driver on a Client -point 'n' print -After cupsaddsmb is 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: +point'n'print +After cupsaddsmb is 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: + + "Printers" folder + Open the Printers share of Samba in Network Neighborhood. - -"Printers" folder -Open the Printers -share of Samba in Network Neighborhood. - -Right-click on the printer in -question. + Right-click on the printer in question. -From the opening context-menu select -Install... or -Connect... (depending on the Windows version you -use). + From the opening context menu select + Install... or + Connect... (depending on the Windows version you use). -After a few seconds, there should be a new printer in your -client's local Printers folder. On Windows -XP it will follow a naming convention of PrinterName on -SambaServer. (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 appears in a -\\SambaServer\PrinterName entry in the -drop-down list of available printers. +After a few seconds, there should be a new printer in your client's local +Printers folder. On Windows XP it will follow a naming convention of +PrinterName on SambaServer. (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 appears in a +\\SambaServer\PrinterName entry in the drop-down list of available printers. PPD -cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher -and Samba from 2.2.4. If it does not work, or if the automatic printer -driver download to the clients does not succeed, you can still manually -install the CUPS printer PPD on top of the Adobe PostScript driver on -clients. Then point the client's printer queue to the Samba printer -share for a UNC type of connection: - - - +cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher and with Samba +version 2.2.4, or later. If it does not work, or if the automatic printer driver download to the clients does +not succeed, you can still manually install the CUPS printer PPD on top of the Adobe PostScript driver on +clients. Then point the client's printer queue to the Samba printer share for a UNC type of connection: + &dosprompt;net use lpt1: \\sambaserver\printershare /user:ntadmin - - - -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 -sets up the printer connection in the traditional -LanMan way (not using MS-RPC). + +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 sets up the +printer connection in the traditional LanMan way (not using MS-RPC). @@ -3184,45 +2847,39 @@ sets up the printer connection in the traditional Avoiding Critical PostScript Driver Settings on the Client -Printing works, but there are still problems. Most jobs print -well, some do not print at all. Some jobs have problems with fonts, -which do not 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: +Printing works, but there are still problems. Most jobs print well, some do not print at all. Some jobs have +problems with fonts, which do not 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: -Avoid the PostScript Output Option: Optimize -for Speed setting. Use the Optimize for -Portability instead (Adobe PostScript -driver). - -Don't use the Page Independence: -NO setting. Instead, use Page Independence -YES (CUPS PostScript Driver). - -Recommended is the True Type Font -Downloading Option: Native True Type over -Automatic and Outline; you -should by all means avoid Bitmap (Adobe -PostScript Driver). - -Choose True Type Font: Download as Softfont -into Printer over the default Replace by Device -Font (for exotic fonts, you may need to change it back to -get a printout at all) (Adobe). - -Sometimes you can choose PostScript Language -Level: In case of problems try 2 -instead of 3 (the latest ESP Ghostscript package -handles Level 3 PostScript very well) (Adobe). - -Say Yes to PostScript -Error Handler (Adobe). + + Avoid the PostScript Output Option: Optimize for Speed setting. Use the Optimize for Portability instead + (Adobe PostScript driver). + + + Don't use the Page Independence: NO setting. Instead, use Page Independence: YES (CUPS PostScript Driver). + + + + Recommended is the True Type Font Downloading Option: Native True Type over Automatic and Outline; + you should by all means avoid Bitmap (Adobe PostScript Driver). + + + Choose True Type Font: Download as Softfont into Printer over the default Replace by Device + Font (for exotic fonts, you may need to change it back to get a printout at all; Adobe). + + + Sometimes you can choose PostScript Language Level: in case of problems try 2 + instead of 3 (the latest ESP Ghostscript package handles Level 3 PostScript very well; Adobe). + + + + Say Yes to PostScript Error Handler (Adobe). + @@ -3231,27 +2888,24 @@ Error Handler (Adobe). Of course, you can run all the commands that are embedded into the -cupsaddsmb convenience utility yourself, one by one, and hereby upload +cupsaddsmb convenience utility yourself, one by one, and upload and prepare the driver files for future client downloads. -Prepare Samba (A CUPS print queue with the name of the -printer should be there. We are providing the driver -now). + Prepare Samba (a CUPS print queue with the name of the + printer should be there. We are providing the driver now). -Copy all files to - . + Copy all files to . - -rpcclientadddriver -Run rpcclient adddriver -(for each client architecture you want to support). + + rpcclientadddriver + Run rpcclient adddriver + (for each client architecture you want to support). - -rpcclientsetdriver -Run rpcclient -setdriver. + + rpcclientsetdriver + Run rpcclient setdriver. @@ -3260,37 +2914,28 @@ setdriver. rpcclientenumdrivers rpcclientsetdriver rpcclientadddriver -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 -subcommands. enumprinters, -enumdrivers, enumports, -adddriver, setdriver are among -the most interesting ones. rpcclient implements an important part of -the MS-RPC protocol. You can use it to query (and command) a Windows NT -(or 200x/XP) PC, too. MS-RPC is used by Windows clients, among other -things, to benefit from the Point'n'Print features. Samba can now -mimic this as well. +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 subcommands: enumprinters, enumdrivers, +enumports, adddriver, and setdriver are among the +most interesting ones. rpcclient implements an important part of the MS-RPC protocol. +You can use it to query (and command) a Windows NT (or 200x/XP) PC, too. MS-RPC is used by Windows clients, +among other things, to benefit from the Point'n'Print features. Samba can now mimic this as well. A Check of the rpcclient man Page - First let's check the rpcclient man page. Here are -two relevant passages: +First let's check the rpcclient man page. Here are two relevant passages: -adddriver <arch> <config> Execute an -AddPrinterDriver() RPC to install the printer driver information on -the server. The driver files should already exist in the -directory returned by getdriverdir. Possible -values for arch are the same as those for the -getdriverdir command. The -config parameter is defined as follows: - - - +adddriver <arch> <config> Execute an AddPrinterDriver() RPC +to install the printer driver information on the server. The driver files should already exist in the +directory returned by getdriverdir. Possible values for arch are the +same as those for the getdriverdir command. The config parameter is +defined as follows: + Long Printer Name:\ Driver File Name:\ Data File Name:\ @@ -3301,25 +2946,26 @@ Default Data Type:\ Comma Separated list of Files -Any empty fields should be enter as the string NULL. + +Any empty fields should be entered as the string NULL. + -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. + +Samba does not need to support the concept of print monitors, since these only apply to local printers whose +drivers can use a bidirectional link for communication. This field should be NULL. On a remote +NT print server, the print monitor for a driver must already be installed before adding the driver or else the +RPC will fail. -setdriver <printername> <drivername> -Execute a SetPrinter() command to update the -printer driver associated with an installed printer. The printer -driver must already be correctly installed on the print server. +setdriver <printername> <drivername> Execute a SetPrinter() +command to update the printer driver associated with an installed printer. The printer driver must already be +correctly installed on the print server. -See also the enumprinters and enumdrivers commands for -obtaining a list of installed printers and drivers. + +See also the enumprinters and enumdrivers commands to +obtain a list of installed printers and drivers. @@ -3328,46 +2974,34 @@ obtaining a list of installed printers and drivers. Understanding the rpcclient man Page -The exact 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 line-breaks: rpcclientadddriver - - - - adddriver "Architecture" \ - "LongPrinterName:DriverFile:DataFile:ConfigFile:HelpFile:\ - LanguageMonitorFile:DataType:ListOfFiles,Comma-separated" +The exact 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 line +breaks: + +adddriver "Architecture" \ + "LongPrinterName:DriverFile:DataFile:ConfigFile:HelpFile:\ + LanguageMonitorFile:DataType:ListOfFiles,Comma-separated" -What the man pages denote as a simple <config> -keyword, in reality consists of eight 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. -What the man pages names the LongPrinterName in -reality should be called the Driver Name. You can name it -anything you want, as long as you use this name later in the -rpcclient ... setdriver command. For -practical reasons, many name the driver the same as the -printer. - - - -It isn't simple at all. I hear you asking: -How do I know which files are "Driver -File, Data File, Config File, Help File and Language -Monitor File" in each case? &smbmdash; 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 rpcclient to see what it tells us and -try to understand the man page more clearly that we've read just -now. +What the man pages denote as a simple <config> keyword in reality consists of +eight 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. What the man pages call the +LongPrinterName in reality should be called the Driver Name. You can name it +anything you want, as long as you use this name later in the rpcclient ... setdriver +command. For practical reasons, many name the driver the same as the printer. + + + +It isn't simple at all. I hear you asking: How do I know which files are Driver File, +Data File, Config File, Help File and Language Monitor +File in each case? 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 +listening to 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 rpcclient to see what it tells us +and try to understand the man page more clearly. @@ -3375,29 +3009,22 @@ now. Producing an Example by Querying a Windows Box - rpcclientgetdriver - rpcclientgetprinter -We could run rpcclient with a -getdriver or a getprinter -subcommand (in level 3 verbosity) against it. Just sit down at a UNIX or -Linux workstation with the Samba utilities installed, then type the -following command: - - - +rpcclientgetdriver +rpcclientgetprinter +We could run rpcclient with a getdriver or a +getprinter subcommand (in level 3 verbosity) against it. Just sit down at a UNIX or Linux +workstation with the Samba utilities installed, then type the following command: + &rootprompt;rpcclient -U'user%secret' NT-SERVER -c 'getdriver printername 3' From the result it should become clear which is which. Here is an example from my installation: - - - rpcclientgetdriver - + &rootprompt;rpcclient -U'Danka%xxxx' W200xSERVER \ - -c'getdriver "DANKA InfoStream Virtual Printer" 3' - cmd = getdriver "DANKA InfoStream Virtual Printer" 3 + -c'getdriver "DANKA InfoStream Virtual Printer" 3' + cmd = getdriver "DANKA InfoStream Virtual Printer" 3 [Windows NT x86] Printer Driver Info 3: @@ -3419,15 +3046,13 @@ From the result it should become clear which is which. Here is an example from m Monitorname: [] Defaultdatatype: [] - -Some printer drivers list additional files under the label -Dependentfiles and these would go into the last field -ListOfFiles,Comma-separated. For the CUPS -PostScript drivers, we do not need any (nor would we for the Adobe -PostScript driver), therefore, the field will get a NULL entry. +Some printer drivers list additional files under the label Dependentfiles, and these +would go into the last field ListOfFiles,Comma-separated. For the CUPS PostScript +drivers, we do not need any (nor would we for the Adobe PostScript driver); therefore, the field will get a +NULL entry. @@ -3435,51 +3060,43 @@ PostScript driver), therefore, the field will get a NULL entry. Requirements for adddriver and setdriver to Succeed ->From the man page (and from the quoted output -of cupsaddsmb 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 -rpcclientadddriver -subcommands (adddriver and -setdriver) need to encounter the following -preconditions to complete successfully: +From the man page (and from the quoted output of cupsaddsmb 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 +rpcclientadddriver subcommands +(adddriver and setdriver) need to encounter the following preconditions +to complete successfully: + + You are connected as or root (this is + not the Printer Operators group in NT, but the printer + admin group as defined in the section of &smb.conf;). + + + Copy all required driver files to \\SAMBA\print$\w32x86 and + \\SAMBA\print$\win40 as appropriate. They will end up in the 0 respective + 2 subdirectories later. For now, do not put them there; they'll be + automatically used by the adddriver subcommand. (If you use smbclient to + put the driver files into the share, note that you need to escape the $: smbclient + //sambaserver/print\$ -U root.) + + The user you're connecting as must be able to write to + the share and create + subdirectories. + + The printer you are going to set up for the Windows + clients needs to be installed in CUPS already. -You are connected as or root (this is not the Printer Operators group in -NT, but the printer admin group as defined in -the section of -&smb.conf;). - -Copy all required driver files to -\\SAMBA\print$\w32x86 and -\\SAMBA\print$\win40 as appropriate. They -will end up in the 0 respective 2 subdirectories later. For now, -do not put them there, they'll be automatically -used by the adddriver subcommand. (If you use -smbclient to put the driver files into the share, note that you need -to escape the $: smbclient //sambaserver/print\$ -U -root.) - -The user you're connecting as must be able to write to -the share and create -subdirectories. - -The printer you are going to setup for the Windows -clients needs to be installed in CUPS already. - - + rpcclientsetdriver rpcclientenumprinters - The CUPS printer must be known to Samba, otherwise the -setdriver subcommand fails with an -NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by -Samba, you may use the enumprinters 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 -recently and encounter problems: try restarting -Samba. + The CUPS printer must be known to Samba; otherwise the setdriver subcommand fails with an + NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by Samba, you may use the + enumprinters 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 recently and encounter problems: try restarting Samba. + @@ -3488,72 +3105,73 @@ Samba. We are going to install a printer driver now by manually executing all -required commands. As this may seem a rather complicated process at +required commands. Because 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. - Manual Driver Installation +Manual Driver Installation - -Install the printer on CUPS. + + Install the printer on CUPS. - -&rootprompt;lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E \ - -P canonIR85.ppd - + + &rootprompt;lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E \ + -P canonIR85.ppd + - -This installs a printer with the name mysmbtstprn -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. - - + + This installs a printer with the name mysmbtstprn + 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. + + - -(Optional) Check if the printer is recognized by Samba. + + (Optional.) Check if the printer is recognized by Samba. - -rpcclientenumprinters + + rpcclientenumprinters - &rootprompt;rpcclient -Uroot%xxxx -c 'enumprinters' localhost \ +&rootprompt;rpcclient -Uroot%xxxx -c 'enumprinters' localhost \ | grep -C2 mysmbtstprn flags:[0x800000] name:[\\kde-bitshop\mysmbtstprn] description:[\\kde-bitshop\mysmbtstprn,,mysmbtstprn] comment:[mysmbtstprn] - + + - -This should show the printer in the list. If not, stop and restart -the Samba daemon (smbd), or send a HUP signal: + + This should show the printer in the list. If not, stop and restart the Samba daemon (smbd) or send a HUP signal: &rootprompt;kill -HUP `pidof smbd` -Check again. Troubleshoot and repeat until -successful. Note the empty field between the two commas in the -description line. The driver name would appear here if there was one already. You need to know root's Samba password (as set by the -smbpasswd command) for this step and most of the -following steps. Alternately, you can authenticate as one of the -users from the write list as defined in &smb.conf; for -. - - + + Check again. Troubleshoot and repeat until successful. Note the empty field between the two + commas in the description line. The driver name would appear here if there was one already. You + need to know root's Samba password (as set by the smbpasswd 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 &smb.conf; for . + + - -(Optional) Check if Samba knows a driver for the printer. + + (Optional.) Check if Samba knows a driver for the printer. - + rpcclientgetprinter rpcclientgetdriver - -&rootprompt;rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ - | grep driver + +&rootprompt;rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2'\ + localhost | grep driver + drivername:[] -&rootprompt;rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ - | grep -C4 driv +&rootprompt;rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' \ + localhost | grep -C4 driv + servername:[\\kde-bitshop] printername:[\\kde-bitshop\mysmbtstprn] sharename:[mysmbtstprn] @@ -3566,14 +3184,13 @@ printprocessor:[winprint] &rootprompt;rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost result was WERR_UNKNOWN_PRINTER_DRIVER - None 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 of: The server does not have the required printer +attempt to connect to the printer at this stage will prompt a +message along the lines of, The server does not have the required printer driver installed. @@ -3592,14 +3209,12 @@ driver installed. -(This command should be entered in one long single -line. Line-breaks and the line-end indicated by \ have been inserted -for readability reasons.) This step is required -for the next one to succeed. It makes the driver files physically -present in the 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. +(This command should be entered in one long single line. Line breaks and the line ends indicated by +\ have been inserted for readability reasons.) This step is required for +the next one to succeed. It makes the driver files physically present in the +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. @@ -3637,15 +3252,12 @@ Printer Driver mydrivername successfully installed. -You 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 printer name; however, in big installations you may use this driver -for a number of printers that obviously have different names, so the -name of the driver is not fixed. +You 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 printer name; +however, in big installations you may use this driver for a number of printers that obviously have different +names, so the name of the driver is not fixed. @@ -3674,7 +3286,7 @@ subdirectory. Compare this with the situation after step 5. -(Optional) Verify if Samba now recognizes the driver. +(Optional.) Verify if Samba now recognizes the driver. rpcclientenumdrivers @@ -3698,8 +3310,7 @@ driver in step 6. This command must succeed before you can proceed. -Tell Samba which printer should use these driver files (setdriver). - +Tell Samba which printer should use these driver files (<command>setdriver</command>). rpcclientsetdriver @@ -3710,17 +3321,15 @@ Successfully set mysmbtstprn to driver mydrivername -Since you can bind any printername (print queue) to any driver, this -is a convenient way to setup many queues that use the same -driver. You do not need to repeat all the previous steps for the -setdriver command to succeed. The only preconditions are: -enumdrivers must find the driver and +Since you can bind any printer name (print queue) to any driver, this is a convenient way to set up many +queues that use the same driver. You do not need to repeat all the previous steps for the setdriver command to +succeed. The only preconditions are that enumdrivers must find the driver and enumprinters must find the printer. - (Optional) Verify if Samba has recognized this association. +(Optional) Verify if Samba has recognized this association. rpcclientgetprinter @@ -3775,7 +3384,7 @@ on the description line. -(Optional) Tickle the driver into a correct +<title>(Optional.) Tickle the driver into a correct device mode. @@ -3785,10 +3394,10 @@ you are not particularly familiar with Windows, here is a short recipe: Browse the Network Neighborhood, go to the Samba server, and 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 alternate way is to +installed and the network connection set up. Another 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) +question, and select Connect or Install. As a result, a new printer +should appear in your client's local Printers (and Faxes) folder, named something like printersharename on Sambahostname. @@ -3806,25 +3415,19 @@ into the DOS box (type root's smbpassword when prompted): Change any printer setting once (like changing portrait to - landscape), click on Apply; change the setting -back. +landscape), click on Apply, and change the setting back. -Install the printer on a client -(Point'n'Print). - +Install the printer on a client (Point'n'Print). point 'n' print - + &dosprompt;rundll32 printui.dll,PrintUIEntry /in /n "\\sambaserver\mysmbtstprn" - - - -If it does not work it could be a permission problem with the - share. + +If it does not work, it could be a permissions problem with the share. @@ -3836,25 +3439,22 @@ If it does not work it could be a permission problem with the -Then hit [TAB] five times, [ENTER] twice, [TAB] once and [ENTER] again -and march to the printer. +Then hit [TAB] five times, [ENTER] twice, [TAB] once, and [ENTER] again, and march to the printer. -(Recommended) Study the test page. +(Recommended.) Study the test page. -Hmmm.... just kidding! By now you know everything about printer -installations and you do not 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" &smbmdash; why not just throw it away! +Hmmm. Just kidding! By now you know everything about printer installations and you do not 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" +&smbmdash; why not just throw it away! -(Obligatory) Enjoy. Jump. Celebrate your -success. +(Obligatory.) Enjoy. Jump. Celebrate your success. &rootprompt;echo "Cheeeeerioooooo! Success..." >> /var/log/samba/log.smbd @@ -3867,50 +3467,34 @@ success. Troubleshooting Revisited -The setdriver command will fail, if in Samba's mind the queue is not -already there. You had promising messages about the: - - - - Printer Driver ABC successfully installed. - - - -after the adddriver parts of the procedure? But you are also seeing -a disappointing message like this one? - - - - result was NT_STATUS_UNSUCCESSFUL +The setdriver command will fail if in Samba's mind the queue is not +already there. A successful installation displys the promising message that the: + +Printer Driver ABC successfully installed. + +following the adddriver parts of the procedure. But you may also see +a disappointing message like this one: + +result was NT_STATUS_UNSUCCESSFUL lpstat -It is not good enough that you -can see the queue in CUPS, using -the lpstat -p ir85wm command. A -bug in most recent versions of Samba prevents the proper update of -the queue-list. The recognition of newly installed CUPS printers -fails unless you restart Samba or send a HUP to all smbd -processes. To verify if this is the reason why Samba does not -execute the setdriver command successfully, check if Samba sees -the printer: - - - +It is not good enough that you can see the queue in CUPS, using the lpstat -p ir85wm +command. A bug in most recent versions of Samba prevents the proper update of the queue list. The recognition +of newly installed CUPS printers fails unless you restart Samba or send a HUP to all smbd processes. To verify +if this is the reason why Samba does not execute the setdriver command successfully, check +if Samba sees the printer: rpcclientenumprinters - + &rootprompt;rpcclient transmeta -N -U'root%xxxx' -c 'enumprinters 0'|grep ir85wm printername:[ir85wm] An alternate command could be this: - - - rpcclientgetprinter - + &rootprompt;rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' cmd = getprinter ir85wm flags:[0x800000] @@ -3920,8 +3504,7 @@ An alternate command could be this: -By the way, you can use these commands, plus a few more, of course, -to install drivers on remote Windows NT print servers too! +By the way, you can use these commands, plus a few more, of course, to install drivers on remote Windows NT print servers too! @@ -3943,20 +3526,12 @@ to install drivers on remote Windows NT print servers too! ntprinters.tdbTDB sessionid.tdbTDB secrets.tdbTDB -Some mystery is associated with the series of files with a -tdb suffix appearing in every Samba installation. They are -connections.tdb, -printing.tdb, -share_info.tdb, -ntdrivers.tdb, -unexpected.tdb, -brlock.tdb, -locking.tdb, -ntforms.tdb, -messages.tdb , -ntprinters.tdb, -sessionid.tdb and -secrets.tdb. What is their purpose? +Some mystery is associated with the series of files with a tdb suffix appearing in every Samba installation. +They are connections.tdb, printing.tdb, +share_info.tdb, ntdrivers.tdb, unexpected.tdb, +brlock.tdb, locking.tdb, ntforms.tdb, +messages.tdb , ntprinters.tdb, sessionid.tdb, +and secrets.tdb. What is their purpose? @@ -3964,17 +3539,13 @@ tdb suffix appearing in every Samba installation. They are TDB -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 that are saved by writing into -the registry. Samba and UNIX obviously do not have such a -Registry. Samba instead keeps track of all client related information in a -series of *.tdb files. (TDB = Trivial Data -Base). These are often located in /var/lib/samba/ -or /var/lock/samba/. The printing related files -are ntprinters.tdb, -printing.tdb,ntforms.tdb and +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 that are saved by writing into the registry. Samba and UNIX +obviously do not have such a Registry. Samba instead keeps track of all client-related information in a series +of *.tdb files. (TDB stands for trivial data base). These are often located in +/var/lib/samba/ or /var/lock/samba/. The printing-related files are +ntprinters.tdb, printing.tdb,ntforms.tdb, and ntdrivers.tdb. @@ -3983,18 +3554,14 @@ are ntprinters.tdb, Binary Format -*.tdb 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 proven 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 -smbd process for each client connection, in some -environments many thousands of them. Some of these smbds might need to -write-access the same *.tdb file at the -same time. The file format of Samba's -*.tdb files allows for this provision. Many smbd -processes may write to the same *.tdb file at the -same time. This wouldn't be possible with pure ASCII files. +*.tdb 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 proven 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 smbd process for each client connection, in some environments many +thousands of them. Some of these smbds might need to write-access the same +*.tdb file at the same time. The file format of Samba's +*.tdb files allows for this provision. Many smbd processes may write to the same +*.tdb file at the same time. This wouldn't be possible with pure ASCII files. @@ -4002,31 +3569,24 @@ same time. This wouldn't be possible with pure ASCII files. Losing <filename>*.tdb</filename> Files -It is very important that all *.tdb files remain -consistent over all write and read accesses. However, it may happen -that these files do get corrupted. (A -kill -9 `pidof smbd' 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 -*.tdb files may be the only option. After that you need to -re-create all print-related setup or you have made a -backup of the *.tdb files in time. +It is very important that all *.tdb files remain consistent over all write and read +accesses. However, it may happen that these files do get corrupted. (A kill -9 +`pidof smbd' while a write access is in progress could do the damage, as could a power interruption, +etc.). In cases of trouble, a deletion of the old printing-related *.tdb files may be the +only option. After that, you need to re-create all print-related setups unless you have made a backup of the +*.tdb files in time. Using <command>tdbbackup</command> - TDBbacking uptdbbackup tdbbackup -Samba ships with a little utility that helps the root user of your -system to backup your *.tdb files. If you run it -with no argument, it prints a usage message: - - - +Samba ships with a little utility that helps the root user of your system to backup your +*.tdb files. If you run it with no argument, it prints a usage message: + &rootprompt;tdbbackup Usage: tdbbackup [options] <fname...> @@ -4034,7 +3594,6 @@ with no argument, it prints a usage message: -h this help message -s suffix set the backup suffix -v verify mode (restore if corrupt) - @@ -4062,54 +3621,41 @@ ntprinters.tdb sessionid.tdb CUPS Print Drivers from Linuxprinting.org - Linuxprinting.org -CUPS ships with good support for HP LaserJet-type printers. You can -install the generic driver as follows: - - - - +CUPS ships with good support for HP LaserJet-type printers. You can install the generic driver as follows: lpadmin - + &rootprompt;lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd -The switch will retrieve the -laserjet.ppd from the standard repository for -not-yet-installed-PPDs, which CUPS typically stores in -/usr/share/cups/model. Alternately, you may use -. +The switch will retrieve the laserjet.ppd from the standard +repository for not-yet-installed PPDs, which CUPS typically stores in +/usr/share/cups/model. Alternatively, you may use . -The generic laserjet.ppd, however, does not support every special option -for every LaserJet-compatible model. It constitutes a sort of least common -denominator of all the models. If for some reason -you must pay for the commercially available ESP Print Pro drivers, your -first move should be to consult the database on the -Linuxprinting web site. -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. +The generic laserjet.ppd, however, does not support every special option for every +LaserJet-compatible model. It constitutes a sort of least common denominator of all the models. +If for some reason you must pay for the commercially available ESP Print Pro drivers, your first move should +be to consult the database on the Linuxprinting Web site. 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. foomatic-rip -The former cupsomatic concept is now being replaced by the new -successor, a much -more powerful foomatic-rip. -cupsomatic is no longer maintained. Here is the new URL -to the Foomatic-3.0 database. -If you upgrade to foomatic-rip, remember 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 -also intended to be used by Samba and the cupsaddsmb utility, to -provide the driver files for the Windows clients! +The former cupsomatic concept is now being replaced by the new successor, a much more +powerful foomatic-rip. cupsomatic is no longer maintained. Here is the +new URL to the Foomatic-3.0 +database. If you upgrade to foomatic-rip, remember 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 with the Adobe PPD specification. They +are also intended to be used by Samba and the cupsaddsmb utility, to provide the driver files for the Windows +clients! @@ -4119,42 +3665,34 @@ provide the driver files for the Windows clients! foomatic foomatic-rip -Nowadays, most Linux distributions rely on the utilities of Linuxprinting.org -to create their printing-related software (which, by the way, 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 that -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. +Nowadays, most Linux distributions rely on the utilities from the Linuxprinting.org to create their printing-related software +(which, by the way, works on all UNIXes and on Mac OS X and Darwin, too). The utilities from this sire have a +very end-user-friendly interface that 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. Recently, Foomatic has achieved the astonishing milestone of 1000 -listed 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 Foomatic -database. Currently there are 245 drivers -in the database. Many drivers support various models, and many models -may be driven by different drivers &smbmdash; its your choice! +url="http://www.linuxprinting.org/printer_list.cgi?make=Anyone">1,000 listed 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 Foomatic database. Currently there are 245 drivers in the database. Many drivers support +various models, and many models may be driven by different drivers &smbmdash; its your choice! 690 <quote>Perfect</quote> Printers -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 by CUPS to perfection, by using -their own manufacturer-provided Windows-PPD), and that a -multi-functional device never qualifies as working perfectly if it -does not also scan and copy and fax under GNU/Linux &smbmdash; 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 +At present, there are 690 devices dubbed as working perfectly: 181 are mostly perfect, 96 +are partially perfect, and 46 are paperweights. Keeping in mind that most of these are +non-PostScript models (PostScript printers are automatically 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 does not also scan and copy and fax under GNU/Linux &smbmdash; 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. @@ -4163,19 +3701,15 @@ anywhere near the quality it is today. How the Printing HOWTO Started It All -A few years ago Grant Taylor -started it all. The roots of today's Linuxprinting.org are in the -first Linux Printing -HOWTO that 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, 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. +A few years ago Grant Taylor started it all. The +roots of today's Linuxprinting.org are in the first Linux Printing HOWTO that 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), 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. @@ -4185,139 +3719,111 @@ of the data. foomatic -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 -controlling all printer options through -standardized and well-defined PPD files (PostScript Printers -Description files). Plus, CUPS was designed to be easily extensible. +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 controlling all +printer options through standardized and well-defined PPD files. Plus, CUPS was designed to be easily +extensible. -Taylor already had in his database a respectable compilation -of facts about many more printers and the Ghostscript drivers -they run with. His idea, to generate PPDs from the database information -and use them to make standard Ghostscript filters work within CUPS, -proved to work very well. It also killed several birds with one -stone: +Taylor already had in his database a respectable compilation of facts about many more printers and the +Ghostscript drivers they run with. His idea, to generate PPDs from the database information and +use them to make standard Ghostscript filters work within CUPS, proved to work very well. It also killed +several birds with one stone: -It made all current and future Ghostscript filter -developments available for CUPS. + It made all current and future Ghostscript filter + developments available for CUPS. -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). + 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). -It gave all the advanced CUPS options (Web interface, -GUI driver configurations) to users wanting (or needing) to use -Ghostscript filters. + It gave all the advanced CUPS options (Web interface, + GUI driver configurations) to users wanting (or needing) to use + Ghostscript filters. cupsomatic, pdqomatic, lpdomatic, directomatic - cupsomatic CUPS-PPD PPDCUPSCUPS-PPD -CUPS worked through a quickly-hacked up filter script named cupsomatic. -cupsomatic ran the printfile through Ghostscript, constructing -automatically the rather complicated command line needed. It just -needed 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, Taylor implemented within a few -days a similar thing for two other spoolers. Names chosen for the -config-generator scripts were PDQ-O-Matic -(for PDQ) and LPD-O-Matic -(for &smbmdash; you guessed it &smbmdash; LPD); the configuration here didn't use PPDs -but other spooler-specific files. - - - -From late summer of that year, Till Kamppeter -started to put work into the database. Kamppeter had been newly employed by -MandrakeSoft to -convert its printing system over to CUPS, after they had seen his -FLTK-based XPP (a GUI front-end 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 -PPR (via ppromatic), -GNUlpr and -LPRng (both via an extended -lpdomatic) and spooler-less printing (cupsomatic. cupsomatic +ran the printfile through Ghostscript, constructing automatically the rather complicated command line needed. +It just needed 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, Taylor implemented within a few days a similar thing for two other +spoolers. Names chosen for the config-generator scripts were PDQ-O-Matic (for PDQ) +and LPD-O-Matic +(for &smbmdash; you guessed it &smbmdash; LPD); the configuration here didn't use PPDs but other +spooler-specific files. + + + +From late summer of that year, Till Kamppeter started +to put work into the database. Kamppeter had been newly employed by Mandrakesoft to convert its printing system over to CUPS, after +they had seen his FLTK-based XPP (a GUI front-end 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 PPR (via ppromatic), GNUlpr, and LPRng (both via an extended lpdomatic) and spooler-less printing (directomatic). -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 to Linuxprinting.org PPDs for CUPS. It had a different -*omatic script for every spooler, as well as different printer -configuration files. +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 to Linuxprinting.org PPDs for CUPS. It had a different *omatic script for +every spooler, as well as different printer configuration files. The <emphasis>Grand Unification</emphasis> Achieved - foomatic-rip -This has all changed in Foomatic versions 2.9 (beta) and released as -stable 3.0. It has now achieved the convergence of all *omatic -scripts and is called the foomatic-rip. -This single script is the unification of the previously different -spooler-specific *omatic scripts. foomatic-rip is used by all the -different spoolers alike and because it 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 &smbmdash; paper sizes and trays are easier to configure. - - - -Also, the New Generation of Linuxprinting.org PPDs no longer contains -Perl data structures. 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 remember to generate a new-version set of PPDs -via the new foomatic-db-engine! -Individual users just need to generate a single new PPD specific to -their model by stable 3.0. It has now +achieved the convergence of all *omatic scripts and is called the foomatic-rip. +This single script is the unification of the previously different spooler-specific *omatic scripts. +foomatic-rip is used by all the different spoolers alike, and because it 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 &smbmdash; paper sizes and trays are easier to configure. + + + +Also, the new generation of Linuxprinting.org PPDs no longer contains Perl data structures. 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 +remember to generate a new-version set of PPDs via the new foomatic-db-engine!. +Individual users just need to generate a single new PPD specific to their model by following the steps outlined in the Foomatic tutorial or in this chapter. This new development is truly amazing. -foomatic-rip is a very clever wrapper around the need to run -Ghostscript with a different syntax, options, device selections, and/or filters for each different printer -or 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 innovative features of -the Foomatic concept may surprise users. It will support custom paper -sizes for many printers and 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). +foomatic-rip is a very clever wrapper around the need to run Ghostscript with a different syntax, options, +device selections, and/or filters for each different printer or 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 innovative features of the +Foomatic concept may surprise users. It will support custom paper sizes for many printers and 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). @@ -4325,74 +3831,64 @@ drivers). Driver Development Outside -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. +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. -Speaking of the different driver development groups, most of -the work is currently done in three projects. These are: +Speaking of the different driver development groups, most of the work is currently done in three projects: -Omni -&smbmdash; a free software project by IBM that 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. - -HPIJS &smbmdash; -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. - -Gimp-Print &smbmdash; 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. + Omni + &smbmdash; a free software project by IBM that tries to convert its 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. + + HPIJS &smbmdash; + a free software project by HP to provide the support for its own + range of models (very mature, printing in most cases is perfect and + provides true photo quality). This currently supports 369 + models. + + Gimp-Print &smbmdash; 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. -Forums, Downloads, Tutorials, Howtos &smbmdash; also for Mac OS X and Commercial UNIX +Forums, Downloads, Tutorials, Howtos (Also for Mac OS X and Commercial UNIX) -Linuxprinting.org today is the one-stop shop to download printer -drivers. Look for printer information and tutorials -or solve printing problems in its popular forums. This forum -it's not just for GNU/Linux users, but admins of commercial UNIX -systems are also going there, and the relatively new Mac -OS X forum has turned out to be one of the most frequented -forums after only a few weeks. +Linuxprinting.org today is the one-stop shop to download printer drivers. Look for printer information and +tutorials or solve +printing problems in its popular forums. This +forum is not just for GNU/Linux users, but admins of +commercial UNIX systems are also going there, and the relatively new +Mac OS X +forum has turned out to be one of the most frequented forums after only a few weeks. -Linuxprinting.org and the Foomatic driver wrappers around Ghostscript -are now a standard tool-chain 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 Kamppeter (who works at Mandrake), many -additional contributions came from engineers with SuSE, Red Hat, -Conectiva, Debian, and others. Vendor-neutrality is an important goal -of the Foomatic project. +Linuxprinting.org and the Foomatic driver wrappers around Ghostscript are now a standard tool-chain 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 Kamppeter, many additional contributions came from engineers with SuSE, Red +Hat, Conectiva, Debian, and others. Vendor-neutrality is an important goal of the Foomatic project. Mandrake +and Conectiva have merged and are now called Mandriva. -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. +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. @@ -4400,205 +3896,188 @@ it often, please send him a note showing your appreciation. Foomatic Database-Generated PPDs -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 modeled to the -Adobe specification of PostScript Printer Descriptions (PPDs), the -Linuxprinting.org/Foomatic-PPDs do not 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 -cupsomatic filter script, while the new-style -PPDs are now call foomatic-rip). 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 print job 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 marvelous kprinter, -or the GNOME gtklp, xpp and the CUPS -Web interface) read the PPD as well and use this information to present -the available settings to the user as an intuitive menu selection. +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 modeled to the Adobe specification of PPDs, the +Linuxprinting.org/Foomatic-PPDs do not 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 an 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 cupsomatic filter script, while the new-style PPDs are now call +foomatic-rip). 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 print job into a raster format ready for the target device. +This usage of PPDs to describe the options of non-PostScript printers was the invention of the CUPS +developers. The rest is easy. GUI tools (like KDE's marvelous kprinter or the GNOME gtklp xpp and the CUPS Web interface) read the PPD as well and use +this information to present the available settings to the user as an intuitive menu selection. -foomatic-rip and Foomatic-PPD Download and Installation +foomatic-rip and Foomatic PPD Download and Installation -Here are the steps to install a foomatic-rip driven LaserJet 4 Plus-compatible +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 that you get the latest driver/PPD files): +Linuxprinting.org ensures that you get the latest driver/PPD files). -Open your browser at the Linuxprinting.org printer listpage. - - -Check the complete list of printers in the -database.. - - -Select your model and click on the link. - - -You'll arrive at a page listing all drivers working with this -model (for all printers, there will always be one -recommended driver. Try this one first). - - -In our case (HP LaserJet 4 Plus), we'll arrive at the default driver for the -HP-LaserJet 4 Plus. - - -The recommended driver is ljet4. - -Several links are provided here. You should visit them all if you -are not familiar with the Linuxprinting.org database. - - -There is a link to the database page for the -ljet4. -On the driver's page, you'll find important and detailed information -about how to use that driver within the various available -spoolers. - -Another link may lead you to the home-page of the -driver author or the driver. - -Important links are the ones that provide hints with -setup instructions for CUPS, -PDQ, -LPD, LPRng and GNUlpr) -as well as PPR -or spooler-less printing. - - -You can view the PPD in your browser through this link: -http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&printer=HP-LaserJet_4_Plus&show=1 - Most importantly, you can also generate and download -the PPD. - - -The PPD contains all the information needed to use our -model and the driver; once installed, this works transparently -for the user. Later you'll only need to choose resolution, paper size, -and so on from the Web-based menu, or from the print dialog GUI, or from -the command line. - -If you ended up on the drivers -page -you can choose to use the PPD-O-Matic online PPD generator -program. - -Select the exact model and check either Download or -Display PPD file and click Generate PPD file. - -If you save the PPD file from the browser view, please -do not use cut and paste (since it could possibly damage line endings -and tabs, which makes the PPD likely to fail its duty), but use Save -as... in your browsers menu. (It is best to use the Download option -directly from the Web page). - -Another interesting part on each driver page is -the Show execution details button. If you -select your printer model and click on that button, -a complete Ghostscript command line will be displayed, enumerating all options -available for that combination of driver and printer model. 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. - -Some time during your visit to Linuxprinting.org, save -the PPD to a suitable place on your hard-disk, say -/path/to/my-printer.ppd (if you prefer to install -your printers with the help of the CUPS Web interface, save the PPD to -the /usr/share/cups/model/ path and restart -cupsd). - -Then install the printer with a suitable command line, -like this: - + Open your browser at the Linuxprinting.org printer list page. + - -&rootprompt;lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E \ - -P path/to/my-printer.ppd - - -For all the new-style Foomatic-PPDs -from Linuxprinting.org, you also need a special CUPS filter named -foomatic-rip. - - -The foomatic-rip Perl script itself also makes some -interesting reading -because it is well documented by Kamppeter's in-line comments (even -non-Perl hackers will learn quite a bit about printing by reading -it). - -Save foomatic-rip either directly in -/usr/lib/cups/filter/foomatic-rip or somewhere in -your $PATH (and remember to make it world-executable). Again, -do not save by copy and paste but use the appropriate link or the -Save as... menu item in your browser. - -If you save foomatic-rip in your $PATH, create a symlink: - -&rootprompt;cd /usr/lib/cups/filter/ ; ln -s `which foomatic-rip' - - + Check the complete list of printers in the + database.. + - -CUPS will discover this new available filter at startup after restarting -cupsd. + Select your model and click on the link. + + + You'll arrive at a page listing all drivers working with this + model (for all printers, there will always be one + recommended driver. Try this one first). + + + In our case (HP LaserJet 4 Plus), we'll arrive at the default driver for the + HP-LaserJet 4 Plus. + + + The recommended driver is ljet4. + + Several links are provided here. You should visit them all if you + are not familiar with the Linuxprinting.org database. + + + There is a link to the database page for the + ljet4. + On the driver's page, you'll find important and detailed information + about how to use that driver within the various available + spoolers. + + Another link may lead you to the home page of the + author of the driver. + + Important links are the ones that provide hints with + setup instructions for CUPS; + PDQ; + LPD, LPRng, and GNUlpr); + as well as PPR + or spoolerless printing. + + + You can view the PPD in your browser through this link: + http://www.linuxprinting.org/ppd-o-matic.cgi?driver=ljet4&printer=HP-LaserJet_4_Plus&show=1 + Most importantly, you can also generate and download + the PPD. + + + The PPD contains all the information needed to use our + model and the driver; once installed, this works transparently + for the user. Later you'll only need to choose resolution, paper size, + and so on, from the Web-based menu, or from the print dialog GUI, or from + the command line. + + If you ended up on the drivers + page, + you can choose to use the PPD-O-Matic online PPD generator + program. + + Select the exact model and check either Download or + Display PPD file and click Generate PPD file. + + If you save the PPD file from the browser view, please + do not use cut and paste (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. (It is best to use the Download option + directly from the Web page.) + + Another interesting part on each driver page is + the Show execution details button. If you + select your printer model and click on that button, + a complete Ghostscript command line will be displayed, enumerating all options + available for that combination of driver and printer model. This is a great way to + learn Ghostscript by doing. It is also an excellent cheat sheet + for all experienced users who need to reconstruct a good command line + for that darned printing script, but can't remember the exact + syntax. + + Sometime during your visit to Linuxprinting.org, save + the PPD to a suitable place on your hard disk, say + /path/to/my-printer.ppd (if you prefer to install + your printers with the help of the CUPS Web interface, save the PPD to + the /usr/share/cups/model/ path and restart + cupsd). + + Then install the printer with a suitable command line, + like this: + + + + &rootprompt;lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E \ + -P path/to/my-printer.ppd + + + For all the new-style Foomatic-PPDs + from Linuxprinting.org, you also need a special CUPS filter named + foomatic-rip. + + + The foomatic-rip Perl script itself also makes some + interesting reading + because it is well documented by Kamppeter's in-line comments (even + non-Perl hackers will learn quite a bit about printing by reading + it). + + Save foomatic-rip either directly in + /usr/lib/cups/filter/foomatic-rip or somewhere in + your $PATH (and remember to make it world-executable). Again, + do not save by copy and paste but use the appropriate link or the + Save as... menu item in your browser. + + If you save foomatic-rip in your $PATH, create a symlink: + + &rootprompt;cd /usr/lib/cups/filter/ ; ln -s `which foomatic-rip' + + + + + CUPS will discover this new available filter at startup after restarting + cupsd. -Once you print to a print queue 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 and 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 the printer driver exactly how the resulting raster -data should look and which printer commands to embed into the -data stream. You need: +Once you print to a print queue set up with the Foomatic PPD, CUPS will insert the appropriate commands and +comments into the resulting PostScript job file. foomatic-rip is able to read and act upon these and uses some +specially encoded Foomatic comments embedded in the job file. These in turn are used to construct +(transparently for you, the user) the complicated Ghostscript command line telling the printer driver exactly +how the resulting raster data should look and which printer commands to embed into the data stream. You need: + A foomatic+something PPD &smbmdash; but this is not enough + to print with CUPS (it is only one important + component). -A foomatic+something PPD &smbmdash; but this is not enough -to print with CUPS (it is only one important -component). - -The foomatic-rip filter script (Perl) in -/usr/lib/cups/filters/. + The foomatic-rip filter script (Perl) in + /usr/lib/cups/filters/. -Perl to make foomatic-rip run. + Perl to make foomatic-rip run. -Ghostscript (because it is doing the main work, -controlled by the PPD/foomatic-rip combo) to produce the raster data -fit for your printer model's consumption. + Ghostscript (because it is doing the main work, + controlled by the PPD/foomatic-rip combo) to produce the raster data + fit for your printer model's consumption. -Ghostscript must (depending on -the driver/model) contain support for a certain device representing -the selected driver for your model (as shown by gs - -h). + Ghostscript must (depending on + the driver/model) contain support for a certain device representing + the selected driver for your model (as shown by gs -h). -foomatic-rip needs a new version of PPDs (PPD versions -produced for cupsomatic do not work with -foomatic-rip). + foomatic-rip needs a new version of PPDs (PPD versions + produced for cupsomatic do not work with foomatic-rip). @@ -4609,20 +4088,15 @@ foomatic-rip). CUPSPage Accounting -Often there are questions regarding print quotas where Samba users -(that is, Windows clients) should not be able to print beyond a -certain number 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 or unfiltered) and hand it over to this -printing subsystem. +Often there are questions regarding print quotas where Samba users (that is, Windows clients) should not be +able to print beyond a certain number 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 or unfiltered) and hand them over to this printing subsystem. -Of course one could hack things with one's own scripts. But then -there is CUPS. CUPS supports quotas that can be based on the size of -jobs or on the number of pages or both, and span any time -period you want. +Of course one could hack things with one's own scripts. But then there is CUPS. CUPS supports quotas that can +be based on the size of jobs or on the number of pages or both, and can span any time period you want. @@ -4630,22 +4104,17 @@ period you want. CUPSquotas -This is an example command of how root would set a print quota in CUPS, -assuming an existing printer named quotaprinter: - - - - +This is an example command of how root would set a print quota in CUPS, assuming an existing printer named +quotaprinter: lpadmin - + &rootprompt;lpadmin -p quotaprinter -o job-quota-period=604800 \ -o job-k-limit=1024 -o job-page-limit=100 -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). +This would limit every single user to print no more than 100 pages or 1024 KB of +data (whichever comes first) within the last 604,800 seconds ( = 1 week). @@ -4653,23 +4122,18 @@ week). Correct and Incorrect Accounting -For CUPS to count correctly, the printfile needs to pass the CUPS -pstops filter, otherwise it uses a dummy count of one. Some -print files do not pass it (e.g., image files) but then those are mostly one- -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 one-pagers too! +For CUPS to count correctly, the printfile needs to pass the CUPS pstops filter; otherwise it uses a dummy +count of one. Some print files do not pass it (e.g., image files), but then those are mostly +one-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 one-pagers too! -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 -is currently working for about a thousand different printer models. -Linuxprinting has a driver -list. +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 is currently working for about a thousand different +printer models. Linuxprinting.org has a driver list. @@ -4677,39 +4141,35 @@ Linuxprinting has a driver Adobe and CUPS PostScript Drivers for Windows Clients -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). +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). -From CUPS 1.1.16 onward, you can use the CUPS PostScript Driver for -Windows NT/200x/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 not work for Windows 9x/ME clients, but it guarantees: +From CUPS 1.1.16 onward, you can use the CUPS PostScript driver for Windows NT/200x/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 not work for Windows +9x/Me clients, but it guarantees: + PJL To not write a PJL-header. - PJL To not write a PJL-header. + To still read and support all PJL-options named in the + driver PPD with its own means. -To still read and support all PJL-options named in the -driver PPD with its own means. + That the file will pass through the pstops filter + on the CUPS/Samba server. -That the file will pass through the pstops filter -on the CUPS/Samba server. - -To page-count correctly the print file. + To page-count correctly the print file. -You can read more about the setup of this combination in the man page -for cupsaddsmb (which is only present with CUPS installed, and only -current from CUPS 1.1.16). +You can read more about the setup of this combination in the man page for cupsaddsmb (which +is only present with CUPS installed, and only current from CUPS 1.1.16). @@ -4718,26 +4178,25 @@ current from CUPS 1.1.16). page_log -These are the items CUPS logs in the page_log for every -page of a job: +These are the items CUPS logs in the page_log for every page of a job: -Printer name + Printer name -User name + User name -Job ID + Job ID -Time of printing + Time of printing -The page number + Page number -The number of copies + Number of copies -A billing information string (optional) + A billing information string (optional) -The host that sent the job (included since version 1.1.19) + The host that sent the job (included since version 1.1.19) @@ -4755,10 +4214,10 @@ Dig9110 boss 402 [22/Apr/2003:10:33:22 +0100] 1 440 finance-dep 10.160.51.33 This was job ID 401, printed on tec_IS2027 -by user kurt, a 64-page job printed in three copies and billed to -#marketing, sent from IP address 10.160.50.13. +by user kurt, a 64-page job printed in three copies, billed to +#marketing, and 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 +from IP address 10.160.51.33, printed from one page 440 copies, and is set to be billed to finance-dep. @@ -4771,29 +4230,29 @@ What flaws or shortcomings are there with this quota system? -The ones named above (wrongly logged job in case of -printer hardware failure, and so on). + The ones named above (wrongly logged job in case of + printer hardware failure, and so on). -In reality, CUPS counts the job pages that are being -processed in software (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 fifth sheet out -of a thousand and the job is aborted by the printer, the page count will -still show the figure of a thousand for that job. + In reality, CUPS counts the job pages that are being + processed in software (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 fifth sheet out + of 1,000 and the job is aborted by the printer, the page count will + still show the figure of 1,000 for that job. -All quotas are the same for all users (no flexibility -to give the boss a higher quota than the clerk) and no support for -groups. + All quotas are the same for all users (no flexibility + to give the boss a higher quota than the clerk) and no support for + groups. -No means to read out the current balance or the -used-up number of current quota. + No means to read out the current balance or the + used-up number of current quota. -A user having used up 99 sheets of a 100 quota will -still be able to send and print a thousand sheet job. + A user having used up 99 sheets of a 100 quota will + still be able to send and print a 1,000 sheet job. -A user being denied a job because of a filled-up quota -does not get a meaningful error message from CUPS other than -client-error-not-possible. + A user being denied a job because of a filled-up quota + does not get a meaningful error message from CUPS other than + client-error-not-possible. @@ -4806,30 +4265,30 @@ improvements under development for CUPS 1.2: -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 fifth sheet will lead to a -stop in the counting). + 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 fifth sheet will lead to a + stop in the counting). -Quotas will be handled more flexibly. + Quotas will be handled more flexibly. -Probably there will be support for users to inquire -about their accounts in advance. + Probably there will be support for users to inquire + about their accounts in advance. -Probably there will be support for some other tools -around this topic. + Probably there will be support for some other tools + around this topic. - @@ -4837,10 +4296,10 @@ PrintAnalyzer, pyKota, printbill, LogReport. A printer queue with no PPD associated to it is a -raw printer and all files will go directly there as received by the +raw printer, and all files will go directly there as received by the spooler. The exceptions are file types application/octet-stream -that need pass-through feature enabled. Raw queues do not do any -filtering at all, they hand the file directly to the CUPS backend. +that need the pass-through feature enabled. Raw queues do not do any +filtering at all; they hand the file directly to the CUPS backend. This backend is responsible for sending the data to the device (as in the device URI notation: lpd://, socket://, smb://, ipp://, http://, parallel:/, serial:/, usb:/, and so on). @@ -4848,25 +4307,25 @@ smb://, ipp://, http://, parallel:/, serial:/, usb:/, and so on). cupsomatic/Foomatic are not native CUPS drivers -and they do not ship with CUPS. They are a third party add-on +and they do not 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 command-line at that stage in the CUPS filtering chain, +Ghostscript command line at that stage in the CUPS filtering chain where normally the native CUPS pstoraster filter would kick -in. cupsomatic bypasses pstoraster, kidnaps the printfile from CUPS -away and redirects it to go through Ghostscript. CUPS accepts this, +in. cupsomatic bypasses pstoraster, kidnaps the print file from CUPS, +and redirects it to go through Ghostscript. CUPS accepts this because the associated cupsomatic/foomatic-PPD specifies: - *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" +*cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" -This line persuades CUPS to hand the file to cupsomatic, once it has +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 that are auto-typed +jobs arriving from Windows that are autotyped application/octet-stream, with the according changes in /etc/cups/mime.types in place. @@ -4877,18 +4336,18 @@ mechanism. Another workaround in some situations would be to have in /etc/cups/mime.types entries as follows: - application/postscript application/vnd.cups-raw 0 - - application/vnd.cups-postscript application/vnd.cups-raw 0 - +application/postscript application/vnd.cups-raw 0 - +application/vnd.cups-postscript application/vnd.cups-raw 0 - This would prevent all PostScript files from being filtered (rather, they will through the virtual nullfilter -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 +denoted with -). This could only be useful for PostScript printers. If you +want to print PostScript code on non-PostScript printers (provided they support ASCII text printing), an entry as follows could be useful: - */* application/vnd.cups-raw 0 - +*/* application/vnd.cups-raw 0 - and would effectively send all files to the @@ -4907,7 +4366,7 @@ You will need to write a my_PJL_stripping_filter (which could be a shell script) that parses the PostScript and removes the unwanted PJL. This needs to conform to CUPS filter design (mainly, receive and pass the parameters printername, job-id, -username, jobtitle, copies, print options and possibly the +username, jobtitle, copies, print options, and possibly the filename). It is installed as world executable into /usr/lib/cups/filters/ and is called by CUPS if it encounters a MIME type application/vnd.cups-postscript. @@ -4926,16 +4385,13 @@ requested by marketing for the mailing, and so on). -Auto-Deletion or Preservation of CUPS Spool Files +Autodeletion or Preservation of CUPS Spool Files -Samba print files pass through two spool directories. One is the -incoming directory managed by Samba, (set in the -/var/spool/samba -directive in the section of -&smb.conf;). The other is the spool directory of -your UNIX print subsystem. For CUPS it is normally -/var/spool/cups/, as set by the cupsd.conf +Samba print files pass through two spool directories. One is the incoming directory managed by Samba (set in +the /var/spool/samba directive in the section of &smb.conf;). The other 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. @@ -4949,57 +4405,56 @@ Some important parameter settings in the CUPS configuration file -PreserveJobHistory Yes - -This keeps some details of jobs in cupsd's mind (well it keeps the -c12345, c12346, and so on, 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. - - -PreserveJobFiles Yes - -This keeps the job files themselves in cupsd's mind -(it keeps the d12345, d12346 etc. files in the CUPS spool -directory). This is set to No as the CUPS -default. - - -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. - + PreserveJobHistory Yes + + This keeps some details of jobs in cupsd's mind (well, it keeps the + c12345, c12346, and so on, files in the CUPS spool directory, which does a + similar job as the old-fashioned BSD-LPD control files). This is set + to Yes as a default. + + + PreserveJobFiles Yes + + This keeps the job files themselves in cupsd's mind + (it keeps the d12345, d12346, etc., files in the CUPS spool + directory). This is set to No as the CUPS + default. + + + 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. + (There are also additional settings for MaxJobsPerUser and -MaxJobsPerPrinter...) +MaxJobsPerPrinter.) -Pre-Conditions +Preconditions -For everything to work as announced, you need to have three -things: +For everything to work as it should, you need to have three things: -A Samba-smbd that is compiled against libcups (check -on Linux by running ldd `which smbd'). + A Samba smbd that is compiled against libcups (check + on Linux by running ldd `which smbd'). -A Samba-&smb.conf; setting of - cups. + A Samba-&smb.conf; setting of + cups. -Another Samba-&smb.conf; setting of - cups. + Another Samba &smb.conf; setting of + cups. @@ -5007,8 +4462,8 @@ In this case, all other manually set printing-related commands (like , , , - or -) are ignored and they should normally have no +, and +) are ignored, and they should normally have no influence whatsoever on your printing. @@ -5019,33 +4474,26 @@ influence whatsoever on your printing. If you want to do things manually, replace the cups by bsd. Then your manually set commands may work -(I haven't tested this), and a lp -d %P %s; rm %s" +(I haven't tested this), and a lp -d %P %s; rm %s may do what you need. -Printing from CUPS to Windows Attached Printers - - ->From time to time the question arises, how can you print -to a Windows attached printer -from Samba? Normally the local connection -from Windows host to printer would be done by USB or parallel -cable, but this does not 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 -backends to talk to printers and other -servers. To talk to Windows shared printers, you need to use the -smb (surprise, surprise!) backend. Check if this -is in the CUPS backend directory. This usually resides in -/usr/lib/cups/backend/. You need to find an smb -file there. It should be a symlink to smbspool -and the file must exist and be executable: - - - +Printing from CUPS to Windows-Attached Printers + + +From time to time the question arises, how can you print to a Windows-attached printer +from Samba? Normally the local connection from Windows host to printer would be done by +USB or parallel cable, but this does not 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 +backends to talk to printers and other servers. To talk to Windows shared printers, you +need to use the smb (surprise, surprise!) backend. Check if this is in the CUPS backend +directory. This usually resides in /usr/lib/cups/backend/. You need to find an +smb file there. It should be a symlink to smbspool, and the file +must exist and be executable: + &rootprompt;ls -l /usr/lib/cups/backend/ total 253 drwxr-xr-x 3 root root 720 Apr 30 19:04 . @@ -5069,25 +4517,19 @@ lrwxrwxrwx 1 root root 17 Apr 2 03:11 smb -> /usr/bin/smbspool If this symlink does not exist, create it: - - - + &rootprompt;ln -s `which smbspool` /usr/lib/cups/backend/smb -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, and so on. +smbspool was 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, and so on. @@ -5100,13 +4542,10 @@ To install a printer with the smb backend on CUPS, use th -The PPD 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 -smb:// device-URI like this: +The PPD 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 smb:// device-URI like this: @@ -5116,95 +4555,92 @@ for: You can include the required parameters as part of the -Note that the device-URI will be visible in the process list of the -Samba server (e.g., when someone uses the ps -aux -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 -does not require a password! Printing will only work if you have a -working netbios name resolution up and running. Note that this is a +Note that the device URI will be visible in the process list of the Samba server (e.g., when someone uses the +ps -aux command on Linux), even if the username and passwords are sanitized before they get +written into the log files. 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 does not 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 do not necessarily need to have smbd running. -More CUPS-Filtering Chains +More CUPS Filtering Chains -The following diagrams reveal how CUPS handles print jobs. +The diagrams in Filtering Chain 1 and Filtering Chain with +cupsomatic show how CUPS handles print jobs.
- Filtering chain 1. + Filtering Chain 1. cups1
- Filtering chain with cupsomatic + Filtering Chain with cupsomatic cups2
- Common Errors +Common Errors - Windows 9x/ME Client Can't Install Driver + Windows 9x/Me Client Can't Install Driver - For Windows 9x/ME, clients require the printer names to be eight -characters (or 8 plus 3 chars suffix) max; otherwise, the driver files -will not get transferred when you want to download them from -Samba. + For Windows 9x/Me, clients require the printer names to be eight + characters (or 8 plus 3 chars suffix) max; otherwise, the driver files + will not get transferred when you want to download them from Samba. - <quote>cupsaddsmb</quote> Keeps Asking for Root Password in Never-ending Loop + <quote>cupsaddsmb</quote> Keeps Asking for Root Password in Never-ending Loop - Have you user? Have - you used smbpasswd to give root a Samba account? - You can do two things: open another terminal and execute - smbpasswd -a root to create the account and - continue entering the password into the first terminal. Or break - out of the loop by pressing ENTER twice (without trying to type a - password). + Have you set user? Have + you used smbpasswd to give root a Samba account? + You can do two things: open another terminal and execute + smbpasswd -a root to create the account and + continue entering the password into the first terminal. Or, break + out of the loop by pressing Enter twice (without trying to type a + password). - - If the error is: tree connect failed: NT_STATUS_BAD_NETWORK_NAME, - you may have forgotten to create the /etc/samba/drivers directory. - + + If the error is Tree connect failed: NT_STATUS_BAD_NETWORK_NAME, + you may have forgotten to create the /etc/samba/drivers directory. + - <quote>cupsaddsmb</quote> or <quote>rpcclient addriver</quote> Keeps Giving WERR_BAD_PASSWORD + <quote>cupsaddsmb</quote> or <quote>rpcclient addriver</quote> Keeps Giving WERR_BAD_PASSWORD - See the previous common error. + See the previous common error. - <quote>cupsaddsmb</quote> Errors + <quote>cupsaddsmb</quote> Errors - - The use of cupsaddsmb gives No PPD file for printer... - Message While PPD File Is Present. What might the problem be? - + + The use of cupsaddsmb gives No PPD file for printer... + message while PPD file is present. What might the problem be? + - Have you enabled printer sharing on CUPS? This means: - Do you have a <Location - /printers>....</Location> section in CUPS - server's cupsd.conf that does not deny access to - the host you run cupsaddsmb from? It could be - an issue if you use cupsaddsmb remotely, or if you use it with a - parameter: cupsaddsmb -H - sambaserver -h cupsserver -v printername. - + Have you enabled printer sharing on CUPS? This means, + do you have a <Location + /printers>....</Location> section in CUPS + server's cupsd.conf that does not deny access to + the host you run cupsaddsmb from? It could be + an issue if you use cupsaddsmb remotely, or if you use it with a + parameter: cupsaddsmb -H + sambaserver -h cupsserver -v printername. + - Is your TempDir directive in - cupsd.conf set to a valid value and is it writable? - + Is your TempDir directive in + cupsd.conf set to a valid value, and is it writable? + @@ -5221,274 +4657,272 @@ Samba. New Account Reconnection from Windows 200x/XP Troubles -Once you are connected as the wrong user (for -example, as nobody, which often occurs if you have -bad user), Windows Explorer will not accept an -attempt to connect again as a different user. There will not be any byte -transfered on the wire to Samba, but still you'll see a stupid error -message that makes you think Samba has denied access. Use -smbstatus to check for active connections. Kill the -PIDs. You still can't re-connect and you get the dreaded -You can't connect with a second account from the same -machine message, as soon as you are trying. And you -do not 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 reconnect as the right user. The best -method is to use a DOS terminal window and first -do net use z: \\&example.server.samba;\print$ /user:root. Check -with smbstatus that you are connected under a -different account. Now open the Printers folder (on the Samba server -in the Network Neighborhood), right-click on the -printer in question and select -Connect... + +Once you are connected as the wrong user (for example, as nobody, which often occurs if +you have bad user), Windows Explorer will not accept an +attempt to connect again as a different user. There will not be any bytes transferred on the wire to Samba, +but still you'll see a stupid error message that makes you think Samba has denied access. Use +smbstatus to check for active connections. Kill the PIDs. You still can't re-connect, and +you get the dreaded You can't connect with a second account from the same +machine message as soon as you try. And you do not see a 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 reconnect as the right +user. The best method is to use a DOS terminal window and first do net use z: +\\&example.server.samba;\print$ /user:root. Check with smbstatus that you are +connected under a different account. Now open the Printers folder (on the Samba server in +the Network Neighborhood), right-click on the printer in question, and select +Connect..... + + Avoid Being Connected to the Samba Server as the Wrong User -You see per smbstatus that you are -connected as user nobody; while you want to be root or -printer admin. This is probably due to -bad user, which silently connects you under the guest account -when you gave (maybe by accident) an incorrect username. Remove -, if you want to prevent -this. + +You see per smbstatus that you are connected as user nobody, but you want to be root or +printer admin. This is probably due to bad user, which +silently connected you under the guest account when you gave (maybe by accident) an incorrect username. Remove + if you want to prevent this. + + Upgrading to CUPS Drivers from Adobe Drivers This information came from a mailing list posting regarding problems experienced when -upgrading from Adobe drivers to CUPS drivers on Microsoft Windows NT/200x/XP Clients. +upgrading from Adobe drivers to CUPS drivers on Microsoft Windows NT/200x/XP clients. -First delete all old Adobe-using printers. Then -delete all old Adobe drivers. (On Windows 200x/XP, right-click in +First delete all old Adobe-using printers. Then delete all old Adobe drivers. (On Windows 200x/XP, right-click in the background of Printers folder, select Server Properties..., select -tab Drivers and delete here). +tab Drivers, and delete here). + + + +Can't Use <quote>cupsaddsmb</quote> on Samba Server, Which Is a PDC -Can't Use <quote>cupsaddsmb</quote> on Samba Server Which Is a PDC Do you use the naked root user name? Try to do it this way: cupsaddsmb -U DOMAINNAME\\root -v printername> (note the two backslashes: the first one is -required to escape the second one). +required to escape the second one). + + + + +Deleted Windows 200x Printer Driver Is Still Shown -Deleted Windows 200x Printer Driver Is Still Shown Deleting a printer on the client will not 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. +other printer uses the same driver. + + + +Windows 200x/XP Local Security Policies + +Local security policies may not allow the installation of unsigned drivers &smbmdash; local +security policies may not allow the installation of printer drivers at all. -Windows 200x/XP "Local Security Policies" -Local Security Policies may not -allow the installation of unsigned drivers. Local Security Policies -may not allow the installation of printer drivers at -all. + + + +Administrator Cannot Install Printers for All Local Users -Administrator Cannot Install Printers for All Local Users 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 Win XP. Add a printer with the print path of -http://cupsserver:631/printers/printername. -We're still looking into this one. Maybe a logon script could -automatically install printers for all -users. - -Print Change Notify Functions on NT-clients -For print change, notify functions on NT++ clients. -These need to run the Server service first (renamed to -File & Print Sharing for MS Networks in -XP). +This means every user needs to install the printer himself or herself. To have a printer available for +everybody, you might want to use the built-in IPP client capabilities of Win XP. Add a printer with the print +path of http://cupsserver:631/printers/printername. We're still looking into this one. +Maybe a logon script could automatically install printers for all users. + + + + + +Print Change, Notify Functions on NT Clients + +For print change, notify functions on NT++ clients. These need to run the Server +service first (renamed to File & Print Sharing for MS Networks in XP). + + Win XP-SP1 Win XP-SP1 introduced a Point and Print Restriction Policy (this restriction does not apply to -Administrator or Power User groups of users). In Group Policy -Object Editor, go to User Configuration -> Administrative Templates -> - Control Panel -> Printers. The policy is automatically set to -Enabled and the Users can only Point -and Print to machines in their Forest . You probably need -to change it to Disabled or Users can -only Point and Print to these servers to make -driver downloads from Samba possible. +Administrator or Power User groups of users). In Group Policy Object Editor, go +to User Configuration -> Administrative Templates -> Control Panel -> Printers. The policy +is automatically set to Enabled and the Users can only Point and Print to +machines in their Forest . You probably need to change it to Disabled or +Users can only Point and Print to these servers to make driver downloads from Samba +possible. Print Options for All Users Can't Be Set on Windows 200x/XP -How are you doing it? I bet the wrong way (it is not -easy to find out, though). There are three different ways to bring -you to a dialog that seems to set everything. All -three dialogs look the same, yet only one of them -does 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: +How are you doing it? I bet the wrong way (it is not easy to find out, though). There are three +different ways to bring you to a dialog that seems to set everything. All three dialogs +look the same, yet only one of them does 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: -The first wrong way: + The first wrong way: - -Open the Printers -folder. + + Open the Printers + folder. -Right-click on the printer -(remoteprinter on cupshost) and -select in context menu Printing -Preferences... + Right-click on the printer + (remoteprinter on cupshost) and + select in context menu Printing + Preferences.... -Look at this dialog closely and remember what it looks -like. - - - + Look at this dialog closely and remember what it looks like. + + -The second wrong way: + The second wrong way: + + Open the Printers folder. - -Open the Printers -folder. + Right-click on the printer (remoteprinter on + cupshost) and select the context menu + Properties. -Right-click on the printer (remoteprinter on -cupshost) and select the context menu -Properties. + Click on the General tab. -Click on the General -tab. + Click on the button Printing + Preferences.... -Click on the button Printing -Preferences... + A new dialog opens. Keep this dialog open and go back + to the parent dialog. + + -A new dialog opens. Keep this dialog open and go back -to the parent dialog. - - - + The third and correct way: + + Open the Printers folder. -The third, and the correct way: + Click on the Advanced + tab. (If everything is grayed out, then you are not logged + in as a user with enough privileges). - + Click on the Printing + Defaults... button. -Open the Printers -folder. + On any of the two new tabs, click on the + Advanced... button. -Click on the Advanced -tab. (If everything is grayed out, then you are not logged -in as a user with enough privileges). + A new dialog opens. Compare this one to the other + identical-looking one from step B.5 or A.3". + + + + + +Do you see any difference? I don't either. However, only the last one, which you arrived at with steps +C.1. to C.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 as Administrator +( in &smb.conf;) before a client downloads the +driver (the clients can later set their own per-user defaults by following the procedures +A or B). + -Click on the Printing -Defaults... button. + -On any of the two new tabs, click on the -Advanced... -button. + +Most Common Blunders in Driver Settings on Windows Clients -A new dialog opens. Compare this one to the other -identical looking one from B.5 or A.3". - + +Don't use Optimize for Speed, but use Optimize for Portability +instead (Adobe PS Driver). Don't use Page Independence: No. Always settle with +Page Independence: Yes (Microsoft PS Driver and CUPS PS Driver for Windows NT/200x/XP). +If there are problems with fonts, use Download as Softfont into printer (Adobe PS +Driver). For TrueType Download Options choose Outline. Use +PostScript Level 2 if you are having trouble with a non-PS printer and if there is a choice. - - + + + + +<command>cupsaddsmb</command> Does Not Work with Newly Installed Printer -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 as -Administrator ( in -&smb.conf;) before a client -downloads the driver (the clients can later set their own -per-user defaults by following the -procedures A or B -above). - -Most Common Blunders in Driver Settings on Windows Clients -Don't use Optimize for -Speed, but use Optimize for -Portability instead (Adobe PS Driver). Don't use -Page Independence: No: always -settle with Page Independence: -Yes (Microsoft PS Driver and CUPS PS Driver for -Windows NT/200x/XP). If there are problems with fonts, use -Download as Softfont into -printer (Adobe PS Driver). For -TrueType Download Options -choose Outline. Use PostScript -Level 2, if you are having trouble with a non-PS printer and if -there is a choice. - -<command>cupsaddsmb</command> Does Not Work with Newly Installed Printer -Symptom: The last command of -cupsaddsmb does not complete successfully: -cmd = setdriver printername printername result was -NT_STATUS_UNSUCCESSFUL then possibly the printer was not yet -recognized by Samba. Did it show up in Network -Neighborhood? Did it show up i n rpcclient -hostname -c `enumprinters'? Restart smbd (or send a -kill -HUP to all processes listed by -smbstatus and try -again. +Symptom: The last command of cupsaddsmb does not complete successfully. If the cmd += setdriver printername printername result was NT_STATUS_UNSUCCESSFUL, then possibly the printer was +not yet recognized by Samba. Did it show up in Network Neighborhood? Did it show up in rpcclient +hostname -c `enumprinters'? Restart smbd (or send a kill -HUP to all processes +listed by smbstatus, and try again. + Permissions on <filename>/var/spool/samba/</filename> Get Reset After Each Reboot -Have you ever by accident set the CUPS spool directory to -the same location? (RequestRoot /var/spool/samba/ in cupsd.conf or -the other way round: /var/spool/cups/ is set as -> in the -section). These must be different. Set - -RequestRoot /var/spool/cups/ in -cupsd.conf and -/var/spool/samba in the -section of &smb.conf;. Otherwise cupsd will -sanitize permissions to its spool directory with each restart and -printing will not work reliably. + + +Have you ever by accident set the CUPS spool directory to the same location (RequestRoot +/var/spool/samba/ in cupsd.conf or the other way round: +/var/spool/cups/ is set as > in the section)? These must be different. Set RequestRoot +/var/spool/cups/ in cupsd.conf and +/var/spool/samba in the section of &smb.conf;. Otherwise, +cupsd will sanitize permissions to its spool directory with each restart and printing will not work reliably. + + + -Print Queue Called <quote>lp</quote> Mis-handles Print Jobs +Print Queue Called <quote>lp</quote> Mishandles Print Jobs In this case a print queue called lp intermittently swallows jobs and spits out completely different ones from what was sent. -It is a 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 -load-balancing the jobs across them in a round-robin fashion. Chances -are high that someone else has a printer named lp too. You may -receive his jobs and send your own to his device unwittingly. To have -tight control over the printer names, set BrowseShortNames -No. It will present any printer as printername@cupshost -and then gives you better control over what may happen in a large -networked environment. - -Location of Adobe PostScript Driver Files for <quote>cupsaddsmb</quote> -Use smbclient to connect to any -Windows box with a shared PostScript printer: smbclient -//windowsbox/print\$ -U guest. You can navigate to the -W32X86/2 subdir to mget ADOBE* -and other files or to WIN40/0 to do the same. -Another option is to download the *.exe packaged -files from the Adobe Web site. + +It is a 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 load-balance the jobs across them in a round-robin fashion. +Chances are high that someone else has a printer named lp too. You may receive that person's +jobs and send your own to his or her device unwittingly. To have tight control over the printer names, set +BrowseShortNames No. It will present any printer as +printername@cupshost, which gives you better control over what may happen in a +large networked environment. + + + + + +Location of Adobe PostScript Driver Files for <quote>cupsaddsmb</quote> + + +Use smbclient to connect to any Windows box with a shared PostScript printer: +smbclient //windowsbox/print\$ -U guest. You can navigate to the +W32X86/2 subdir to mget ADOBE* and other files or to +WIN40/0 to do the same. Another option is to download the *.exe +packaged files from the Adobe Web site. + + + Overview of the CUPS Printing Processes -A complete overview of the CUPS printing processes can be found in the next flowchart. + +A complete overview of the CUPS printing processes can be found in the CUPS +Printing Overview diagram. +
- CUPS printing overview. + CUPS Printing Overview. a_small
diff --git a/docs/Samba3-HOWTO/TOSHARG-DomainMember.xml b/docs/Samba3-HOWTO/TOSHARG-DomainMember.xml index 0afacff24f..b35160cad1 100644 --- a/docs/Samba3-HOWTO/TOSHARG-DomainMember.xml +++ b/docs/Samba3-HOWTO/TOSHARG-DomainMember.xml @@ -14,19 +14,19 @@ Domain Membership -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, +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 able to offer a viable option for many users. -This chapter covers background information pertaining to Domain Membership, +This chapter covers background information pertaining to domain membership, the 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 +within the current MS Windows networking world, and particularly in the UNIX/Linux networking and administration world, a considerable level of -misinformation, incorrect understanding and a lack of knowledge. Hopefully +misinformation, incorrect understanding, and lack of knowledge. Hopefully this chapter will fill the voids. @@ -34,19 +34,19 @@ this chapter will fill the voids. Features and Benefits -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 -Single Sign On or SSO for short. This +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 +single sign-on, or SSO for short. This chapter describes the process that must be followed to make a workstation -(or another server &smbmdash; be it an MS Windows NT4 / 200x -server) or a Samba server a member of an MS Windows Domain Security context. +(or another server &smbmdash; be it an MS Windows NT4/200x +server) or a Samba server a member of an MS Windows domain security context. Server TypeDomain Member 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. Domain Membership has many advantages: +MS Windows Active Directory domain as a native member server, or a Samba domain +control network. Domain membership has many advantages: @@ -58,18 +58,18 @@ Control network. Domain Membership has many advantages: Domain user access rights and file ownership/access controls can be set from the single Domain Security Account Manager (SAM) database - (works with Domain Member servers as well as with MS Windows workstations - that are Domain Members). + (works with domain member servers as well as with MS Windows workstations + that are domain members). Only MS Windows NT4/200x/XP Professional - workstations that are Domain Members can use network logon facilities. + workstations that are domain members can use network logon facilities. - 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 (NTConfig.POL) and desktop profiles. @@ -80,8 +80,8 @@ Control network. Domain Membership has many advantages: 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 backend-ed with an + client or server other than the central domain database + (either NT4/Samba SAM-style domain, NT4 domain that is backend-ed with an LDAP directory, or via an Active Directory infrastructure). @@ -94,22 +94,22 @@ Control network. Domain Membership has many advantages: Machine Trust Accounts 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. The purpose of the machine account -is to prevent a rogue user and Domain Controller from colluding to gain access to a +machine (rather than a user) to the domain controller server. In Windows terminology, +this is known as a computer account. The purpose of the machine account +is to prevent a rogue user and domain controller from colluding to gain access to a domain member workstation. The password of a Machine Trust Account acts as the shared secret for -secure communication with the Domain Controller. This is a security +secure communication with the domain controller. This is a security feature to prevent an unauthorized machine with the same NetBIOS name from joining the domain and gaining access to domain user/group accounts. Windows NT/200x/XP Professional clients use machine trust accounts, but Windows 9x/Me/XP Home clients do not. Hence, a -Windows 9x/Me/XP Home client is never a true member of a Domain +Windows 9x/Me/XP Home client is never a true member of a domain because it does not possess a Machine Trust Account, and, thus, has no -shared secret with the Domain Controller. +shared secret with the domain controller. @@ -121,8 +121,8 @@ as follows: - A Domain Security Account (stored in the - that has been configured in the + A domain security account (stored in the + ) 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. @@ -130,12 +130,12 @@ as follows: The older format of this data is the smbpasswd database that contains the UNIX login ID, the UNIX user identifier (UID), and the - LanMan and NT encrypted passwords. There is also some other information in + LanMan and NT-encrypted passwords. There is also some other information in this file that we do not need to concern ourselves with here. - The two newer database types are called ldapsam, and + The two newer database types are called ldapsam and tdbsam. Both store considerably more data than the older smbpasswd file did. The extra information enables new user account controls to be implemented. @@ -163,8 +163,8 @@ There are three ways to create Machine Trust Accounts: Server Manager - 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. + 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 as long as the user is logged on as the administrator account. @@ -200,8 +200,8 @@ a Linux-based Samba server: In the example above there is an existing system group machines which is used -as the primary group for all machine accounts. In the following examples the machines group has -numeric GID equal 100. +as the primary group for all machine accounts. In the following examples the machines group +numeric GID is 100. chpass @@ -217,7 +217,7 @@ On *BSD systems, this can be done using the chpass utility: The /etc/passwd entry will list the machine name -with a $ appended, will not have a password, will have a null shell and no +with a $ appended, and will not have a password, will have a null shell and no home directory. For example, a machine named doppy would have an /etc/passwd entry like this: @@ -227,8 +227,8 @@ doppy$:x:505:100:machine_nickname:/dev/null:/bin/fals -Above, machine_nickname can be any -descriptive name for the client, i.e., BasementComputer. +in which machine_nickname can be any +descriptive name for the client, such as BasementComputer. machine_name absolutely must be the NetBIOS name of the client to be joined to the domain. The $ must be appended to the NetBIOS name of the client or Samba will not recognize @@ -278,7 +278,7 @@ information to such clients. You have been warned! A working is essential for machine trust accounts to be automatically created. This applies no matter whether -one uses automatic account creation, or if one wishes to use the NT4 Domain Server Manager. +you use automatic account creation or the NT4 Domain Server Manager. @@ -292,9 +292,9 @@ and UsrMgr.exe (both are domain management tools for MS Windo Nexus.exe -If your workstation is a Microsoft Windows 9x/Me family 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 +If your workstation is a Microsoft Windows 9x/Me family product, + you should download the Nexus.exe package from the Microsoft Web site. +When executed from the target directory, it will unpack the same tools but for use on this platform. @@ -304,8 +304,10 @@ Further information about these tools may be obtained from the following locatio - - +Knowledge +Base article 173673 +Knowledge +Base article 172540 @@ -358,7 +360,7 @@ is joined to the domain. Since each Samba Machine Trust Account requires a corresponding UNIX account, a method for automatically creating the UNIX account is usually supplied; this requires configuration of the -add machine script option in &smb.conf;. This method is not required, however, corresponding UNIX +add machine script option in &smb.conf;. This method is not required; however, corresponding UNIX accounts may also be created manually. @@ -367,11 +369,11 @@ accounts may also be created manually. Here is an example for a Red Hat Linux system. - + <...remainder of parameters...> /usr/sbin/useradd -d /var/lib/nobody -g 100 -s /bin/false -M %u - + @@ -388,27 +390,27 @@ with the version of Windows. Windows 200x/XP Professional Client - When the user elects to make the client a Domain Member, Windows 200x prompts for + When the user elects to make the client a domain member, Windows 200x prompts for an account and password that has privileges to create machine accounts in the domain. - A Samba Administrator Account (i.e., a Samba account that has root privileges on the + A Samba administrator account (i.e., a Samba account that has root privileges on the Samba server) must be entered here; the operation will fail if an ordinary user account is given. - For security reasons, the password for this Administrator Account should be set + For security reasons, the password for this administrator account should be set to a password that is other than that used for the root user in /etc/passwd. - 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 root + 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 root, then this is easily mapped to root in the file named in the &smb.conf; parameter /etc/samba/smbusers. - The session key of the Samba Administrator Account acts as an encryption key for setting the password of the machine trust + The session key of the Samba administrator account acts as an 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. @@ -425,9 +427,9 @@ with the version of Windows. - If the Machine Trust Account is to be created on-the-fly, on the Identification Changes menu enter the domain + 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 Administrator Account when + the domain proceeds as above for Windows 2000 (i.e., you must supply a Samba administrator account when prompted). @@ -436,7 +438,7 @@ with the version of Windows. Samba Client Joining a Samba client to a domain is documented in - Domain Member Server. + the next section. @@ -465,7 +467,7 @@ Server, and so on. -When Samba is configured to use an LDAP, or other identity management and/or +When Samba is configured to use an LDAP or other identity management and/or directory service, it is Samba that continues to perform user and machine authentication. It should be noted that the LDAP server does not perform authentication handling in place of what Samba is designed to do. @@ -473,15 +475,15 @@ authentication handling in place of what Samba is designed to do. Please refer to Domain Control, for more information regarding -how to create a domain machine account for a Domain Member server as well as for -information on how to enable the Samba Domain Member machine to join the domain +how to create a domain machine account for a domain member server as well as for +information on how to enable the Samba domain member machine to join the domain and be fully trusted by it. Joining an NT4-type Domain with Samba-3 -Next table lists names that have been used in the remainder of this chapter. +Assumptions lists names that have been used in the remainder of this chapter. Assumptions @@ -509,27 +511,22 @@ First, you must edit your &smb.conf; file to tell Samba it should now use domain - Change (or add) your - line in the [global] section +Change (or add) your line in the [global] section of your &smb.conf; to read: - domain - Next change the line in the section to read: - &example.workgroup; - This is the name of the domain we are joining. @@ -547,14 +544,12 @@ Finally, add (or modify) a line in the [ section to read: - DOMPDC DOMBDC1 DOMBDC2 - -These are the primary and backup Domain Controllers Samba +These are the PDC and BDCs Samba will attempt to contact in order to authenticate users. Samba will try to contact each of these servers in order, so you may want to rearrange this list in order to spread out the authentication load @@ -563,21 +558,19 @@ among Domain Controllers. Alternately, if you want smbd to automatically determine -the list of Domain Controllers to use for authentication, you may +the list of domain controllers to use for authentication, you may set this line to be: - * - This method allows Samba to use exactly the same mechanism that NT does. The method either uses broadcast-based name resolution, performs a WINS database -lookup in order to find a Domain Controller against which to authenticate, -or locates the Domain Controller using DNS name resolution. +lookup in order to find a domain controller against which to authenticate, +or locates the domain controller using DNS name resolution. @@ -596,11 +589,11 @@ If the argument is not given, the domain name will be The machine is joining the domain DOM, and the PDC for that domain (the only machine -that has write access to the domain SAM database) is DOMPDC, therefore use the +that has write access to the domain SAM database) is DOMPDC; therefore, use the option. The Administrator%password is the login name and password for an account that has the necessary privilege to add machines to the -domain. If this is successful, you will see the message in your terminal window the -text shown below. Where the older NT4 style domain architecture is used: +domain. If this is successful, you will see the following message in your terminal window. +Where the older NT4-style domain architecture is used: Joined domain DOM. @@ -635,7 +628,7 @@ or This file is created and owned by root and is not readable by any other user. It is -the key to the Domain-level security for your system, and should be treated as carefully +the key to the domain-level security for your system and should be treated as carefully as a shadow password file. @@ -656,8 +649,8 @@ but in most cases the following will suffice: Currently, domain security in Samba does not free you from having to create local UNIX users to represent the users attaching -to your server. This means that if Domain user DOM\fred - attaches to your Domain Security Samba server, there needs +to your server. This means that if domain user DOM\fred + attaches to your domain security Samba server, there needs to be a local UNIX user fred to represent that user in the UNIX file system. This is similar to the older Samba security mode server, @@ -666,13 +659,13 @@ NT server in the same way as a Windows 95 or Windows 98 server would. -Please refer to Winbind: Use of Domain Accounts chapter, for information on a system -to automatically assign UNIX UIDs and GIDs to Windows NT Domain users and groups. +Please refer to Winbind: Use of Domain Accounts, for information on a system +to automatically assign UNIX UIDs and GIDs to Windows NT domain users and groups. -The advantage to Domain-level security is that the -authentication in Domain-level security is passed down the authenticated +The advantage of domain-level security is that the +authentication in domain-level security is passed down the authenticated RPC channel in exactly the same way that an NT server would do it. This means Samba servers now participate in domain trust relationships in exactly the same way NT servers do (i.e., you can add Samba servers into @@ -686,13 +679,13 @@ 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 domain, -however, the Samba daemons connect to the PDC/BDC only for as long +however, the Samba daemons connect to the PDC or BDC only for as long as is necessary to authenticate the user and then drop the connection, thus conserving PDC connection resources. -And finally, acting in the same manner as an NT server +Finally, acting in the same manner as an NT server authenticating to a PDC means that as part of the authentication reply, the Samba server gets the user identification information such as the user SID, the list of NT groups the user belongs to, and so on. @@ -701,7 +694,7 @@ as the user SID, the list of NT groups the user belongs to, and so on. Much of the text of this document was first published in the Web magazine -LinuxWorld as the article LinuxWorld as the article Doing the NIS/NT Samba. @@ -729,24 +722,25 @@ Windows 200x KDC. A familiarity with Kerberos is assumed. You must use at least the following three options in &smb.conf;: - + your.kerberos.REALM ADS The following parameter need only be specified if present. The default setting is not present is Yes. yes - + In case samba cannot correctly identify the appropriate ADS server using the realm name, use the option in &smb.conf;: + + your.kerberos.server - -You do not need a smbpasswd file, and older clients will be authenticated as +You do not need an smbpasswd file, and older clients will be authenticated as if domain, although it will not do any harm and allows you to have local users not in the domain. @@ -764,9 +758,9 @@ With both MIT and Heimdal Kerberos, it is unnecessary to configure the -Microsoft Active Directory servers automatically create SRV records in the DNS zone +Microsoft ADS automatically create SRV records in the DNS zone _kerberos.REALM.NAME for each KDC in the realm. This is part -of the installation and configuration process used to create an Active Directory Domain. +of the installation and configuration process used to create an Active Directory domain. @@ -778,10 +772,7 @@ libraries to use whichever KDCs are available. When manually configuring krb5.conf, the minimal configuration is: - - - - + [libdefaults] default_realm = YOUR.KERBEROS.REALM @@ -792,10 +783,11 @@ When manually configuring krb5.conf, the minimal configurat [domain_realms] .kerberos.server = YOUR.KERBEROS.REALM - + + -When using Heimdal versions before 0.6 use the following configuration settings: +When using Heimdal versions before 0.6, use the following configuration settings: [libdefaults] default_realm = YOUR.KERBEROS.REALM @@ -820,16 +812,16 @@ making sure that your password is accepted by the Win2000 KDC. -With Heimdal versions earlier than 0.6.x you only can use newly created accounts +With Heimdal versions earlier than 0.6.x you can use only newly created accounts in ADS or accounts that have had the password changed once after migration, or in case of Administrator after installation. At the -moment, a Windows 2003 KDC can only be used with a Heimdal releases later than 0.6 -(and no default etypes in krb5.conf). Unfortunately this whole area is still +moment, a Windows 2003 KDC can only be used with Heimdal releases later than 0.6 +(and no default etypes in krb5.conf). Unfortunately, this whole area is still in a state of flux. -The realm must be in uppercase or you will get Cannot find KDC for +The realm must be in uppercase or you will get a Cannot find KDC for requested realm while getting initial credentials error (Kerberos is case-sensitive!). @@ -849,18 +841,18 @@ five minutes. 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 (i.e., the hostname with no -domain attached) or it can alternately be the NetBIOS name followed by the realm. +domain attached) or it can be the NetBIOS name followed by the realm. The easiest way to ensure you get this right is to add a /etc/hosts entry mapping the IP address of your KDC to -its NetBIOS name. If you do not get this correct then you will get a +its NetBIOS name. If you do not get this correct, then you will get a local error when you try to join the realm. -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 directly to Testing with &smbclient; now. Create the Computer Account and Testing Server Setup @@ -891,14 +883,12 @@ this to be done using the following syntax: For example, you may want to create the machine account in a container called Servers -under the organizational directory Computers\BusinessUnit\Department like this: +under the organizational directory Computers\BusinessUnit\Department, like this: &rootprompt; net ads join "Computers\BusinessUnit\Department\Servers" - - Possible Errors @@ -910,7 +900,7 @@ under the organizational directory Computers\BusinessUnit\Department net ads join prompts for user name - You need to login to the domain using kinit + You need to log in to the domain using kinit USERNAME@REALM. USERNAME must be a user who has rights to add a machine to the domain. @@ -938,7 +928,7 @@ folder under Users and Computers. On a Windows 2000 client, try net use * \\server\share. You should -be logged in with Kerberos without needing to know a password. If this fails then run +be logged in with Kerberos without needing to know a password. If this fails, then run klist tickets. Did you get a ticket for the server? Does it have an encryption type of DES-CBC-MD5? @@ -955,7 +945,7 @@ Samba can use both DES-CBC-MD5 encryption as well as ARCFOUR-HMAC-MD5 encoding. smbclient -On your Samba server try to login to a Win2000 server or your Samba +On your Samba server try to log in to a Win2000 server or your Samba server using &smbclient; and Kerberos. Use &smbclient; as usual, but specify the option to choose Kerberos authentication. @@ -966,8 +956,8 @@ specify the option to choose Kerberos authentication. Notes -You must change administrator password at least once after DC -install, to create the right encryption types. +You must change the administrator password at least once after installing a domain controller, +to create the right encryption types. @@ -987,7 +977,7 @@ These mappings are done by the idmap subsystem of Samba. -In some cases it is useful to share these mappings between Samba Domain Members, +In some cases it is useful to share these mappings between Samba domain members, so name->id mapping is identical on all machines. This may be needed in particular when sharing files over both CIFS and NFS. @@ -1014,12 +1004,12 @@ and to make certain to set the LDAP administrative password into the s Common Errors -In the process of adding/deleting/re-adding Domain Member machine accounts, there are +In the process of adding/deleting/re-adding domain member machine accounts, there are many traps for the unwary player and many little 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 +after repeated failed attempts to add a machine account that it is necessary to reinstall MS Windows on the machine. In truth, it is seldom necessary to reinstall because of this type -of problem. The real solution is often quite simple and with an understanding of how MS Windows +of problem. The real solution is often quite simple, and with an understanding of how MS Windows networking functions, it is easy to overcome. @@ -1027,7 +1017,7 @@ networking functions, it is easy to overcome. Cannot Add Machine Back to Domain -A Windows workstation was re-installed. The original domain machine +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 &smbmdash; I know it does not. Why is this failing? @@ -1035,7 +1025,7 @@ exists on the network &smbmdash; I know it does not. Why is this failing? The original name is still in the NetBIOS name cache and must expire after machine account -deletion before adding that same name as a Domain Member again. The best advice is to delete +deletion before adding that same name as a domain member again. The best advice is to delete the old account and then add the machine with a new name. @@ -1046,8 +1036,8 @@ the old account and then add the machine with a new name. 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 says, "The machine could not be added at this time, there is a network problem. +Please try again later." Why? @@ -1080,14 +1070,14 @@ Possible causes include: Corrective action: Check that the machine name is a legal UNIX system account name. If the UNIX utility useradd is called, then make sure that the machine name you are trying to add can be added using this - tool. Useradd on some systems will not allow any upper case characters + tool. Useradd on some systems will not allow any uppercase characters nor will it allow spaces in the name. The does not create the -machine account in the Samba backend database, it is there only to create a UNIX system +machine account in the Samba backend database; it is there only to create a UNIX system account to which the Samba backend database account can be mapped. @@ -1096,7 +1086,7 @@ account to which the Samba backend database account can be mapped. I Can't Join a Windows 2003 PDC - Windows 2003 requires SMB signing. Client side SMB signing has been implemented in Samba-3.0. + Windows 2003 requires SMB signing. Client-side SMB signing has been implemented in Samba-3.0. Set yes when communicating with a Windows 2003 server. diff --git a/docs/Samba3-HOWTO/TOSHARG-FastStart.xml b/docs/Samba3-HOWTO/TOSHARG-FastStart.xml index 108c787d64..5d1df13111 100644 --- a/docs/Samba3-HOWTO/TOSHARG-FastStart.xml +++ b/docs/Samba3-HOWTO/TOSHARG-FastStart.xml @@ -10,7 +10,7 @@ When we first asked for suggestions for inclusion in the Samba HOWTO documentation, someone wrote asking for example configurations &smbmdash; and lots of them. That is remarkably -difficult to do, without losing a lot of value that can be derived from presenting +difficult to do without losing a lot of value that can be derived from presenting many extracts from working systems. That is what the rest of this document does. It does so with extensive descriptions of the configuration possibilities within the context of the chapter that covers it. We hope that this chapter is the medicine @@ -19,21 +19,21 @@ that has been requested. The information in this chapter is very sparse compared with the book Samba-3 by Example -that was written after the original version of this book was nearly complete. Samba-3 by Example +that was written after the original version of this book was nearly complete. Samba-3 by Example was the result of feedback from reviewers during the final copy editing of the first edition. It -was interesting to see that reader feedback mirrored that given be the original reviewers. +was interesting to see that reader feedback mirrored that given by the original reviewers. In any case, a month and a half was spent in doing basic research to better understand what -new as well as experienced network administrators would best benefit from. The book Samba-3 by Example +new as well as experienced network administrators would best benefit from. The book Samba-3 by Example is the result of that research. What is presented in the few pages of this book is covered -far more comprehensively in the second edition of Samba-3 by Example. The second edition +far more comprehensively in the second edition of Samba-3 by Example. The second edition of both books will be released at the same time. So in summary, the book The Official Samba-3 HOWTO & Reference Guide is intended -as the equivalent of a auto mechanics' repair guide. The book Samba-3 by Example is the -equivalent of the drivers guide that explains how to drive the car. If you want complete network -configuration examples go to Samba-3 by Example. +as the equivalent of an auto mechanic's repair guide. The book Samba-3 by Example is the +equivalent of the driver's guide that explains how to drive the car. If you want complete network +configuration examples, go to Samba-3 by Example. @@ -50,7 +50,7 @@ features. These additional features are covered in the remainder of this documen The examples used here have been obtained from a number of people who made requests for example configurations. All identities have been obscured to protect -the guilty and any resemblance to unreal non-existent sites is deliberate. +the guilty, and any resemblance to unreal nonexistent sites is deliberate. @@ -80,16 +80,15 @@ mirror of the system described in , The next example is of a secure office file and print server that will be accessible only to users who have an account on the system. This server is meant to closely resemble a -Workgroup file and print server, but has to be more secure than an anonymous access machine. +workgroup file and print server, but has to be more secure than an anonymous access machine. This type of system will typically suit the needs of a small office. The server provides no -network logon facilities, offers no Domain Control; instead it is just a network -attached storage (NAS) device and a print server. +network logon facilities, offers no domain control; instead it is just a network-attached storage (NAS) device and a print server. Finally, we start looking at more complex systems that will either integrate into existing -Microsoft Windows networks, or replace them entirely. The examples provided cover domain -member servers as well as Samba Domain Control (PDC/BDC) and finally describes in detail +MS Windows networks or replace them entirely. The examples provided cover domain +member servers as well as Samba domain control (PDC/BDC) and finally describes in detail a large distributed network with branch offices in remote locations. @@ -106,17 +105,17 @@ clearly beyond the scope of this text. It is also assumed that Samba has been correctly installed, either by way of installation -of the packages that are provided by the operating system vendor, or through other means. +of the packages that are provided by the operating system vendor or through other means. - Stand-alone Server + Standalone Server Server TypeStand-alone - A Stand-alone Server implies no more than the fact that it is not a Domain Controller - and it does not participate in Domain Control. It can be a simple workgroup-like - server, or it may be a complex server that is a member of a domain security context. + A standalone server implies no more than the fact that it is not a domain controller + and it does not participate in domain control. It can be a simple, workgroup-like + server, or it can be a complex server that is a member of a domain security context. @@ -137,10 +136,13 @@ of the packages that are provided by the operating system vendor, or through oth change. - The configuration file is: + + The configuration file is presented in Anonymous Read-Only Server + Configuration. + - Anonymous Read-Only Server Configuration + Anonymous Read-Only Server Configuration Global parameters @@ -171,9 +173,9 @@ of the packages that are provided by the operating system vendor, or through oth - Installation Procedure &smbmdash; Read-Only Server + Installation Procedure: Read-Only Server - Add user to system (with creation of the users' home directory): + Add user to system (with creation of the user's home directory): &rootprompt;useradd -c "Jack Baumbach" -m -g users -p m0r3pa1n jackb @@ -233,12 +235,12 @@ Press enter to see a dump of your service definitions - Configure your Microsoft Windows client for workgroup MIDEARTH, + Configure your MS Windows client for workgroup MIDEARTH, set the machine name to ROBBINS, reboot, wait a few (2 - 5) minutes, - then open Windows Explorer and visit the network neighborhood. + then open Windows Explorer and visit the Network Neighborhood. The machine HOBBIT should be visible. When you click this machine icon, it should open up to reveal the data share. After - clicking the share it, should open up to reveal the files previously + you click the share, it should open up to reveal the files previously placed in the /export directory. @@ -259,7 +261,7 @@ Press enter to see a dump of your service definitions The difference is that shared access is now forced to the user identity of jackb and to the primary group jackb belongs to. One other refinement we can make is to add the user jackb to the smbpasswd file. - To do this execute: + To do this, execute: &rootprompt;smbpasswd -a jackb New SMB password: m0r3pa1n @@ -275,8 +277,9 @@ Added user jackb. The complete, modified &smb.conf; file is as shown in . -Modified Anonymous Read-Write smb.conf - + +Modified Anonymous Read-Write smb.conf + Global parameters MIDEARTH @@ -323,12 +326,13 @@ Added user jackb. - In this configuration it is undesirable to present the Add Printer Wizard and we do - not want to have automatic driver download, so we will disable it in the following + In this configuration, it is undesirable to present the Add Printer Wizard, and we do + not want to have automatic driver download, so we disable it in the following configuration. is the resulting &smb.conf; file. -Anonymous Print Server smb.conf + +Anonymous Print Server smb.conf Global parameters @@ -376,12 +380,12 @@ Added user jackb. Directory permissions should be set for public read-write with the - sticky-bit set as shown: + sticky bit set as shown: &rootprompt;chmod a+trw TX /var/spool/samba The purpose of setting the sticky bit is to prevent who does not own the temporary print file - from being able to take control of it with the potential for devious mis-use. + from being able to take control of it with the potential for devious misuse. @@ -389,8 +393,8 @@ Added user jackb. MIMEraw raw printing - On CUPS enabled systems there is a facility to pass raw data directly to the printer without - intermediate processing via CUPS print filters. Where use of this mode of operation is desired + On CUPS-enabled systems there is a facility to pass raw data directly to the printer without + intermediate processing via CUPS print filters. Where use of this mode of operation is desired, it is necessary to configure a raw printing device. It is also necessary to enable the raw mime handler in the /etc/mime.conv and /etc/mime.types files. Refer to . @@ -419,19 +423,19 @@ Added user jackb. - Site users will be: Jack Baumbach, Mary Orville and Amed Sehkah. Each will have + Site users will be Jack Baumbach, Mary Orville, and Amed Sehkah. Each will have a password (not shown in further examples). Mary will be the printer administrator and will own all files in the public share. - This configuration will be based on User Level Security that + This configuration will be based on user-level security that is the default, and for which the default is to store Microsoft Windows-compatible encrypted passwords in a file called /etc/samba/smbpasswd. - The default &smb.conf; entry that makes this happen is: - smbpasswd, guest. Since this is the default + The default &smb.conf; entry that makes this happen is + smbpasswd, guest. Since this is the default, it is not necessary to enter it into the configuration file. Note that guest backend is - added to the list of active passdb backends not matter was it specified directly in Samba configuration + added to the list of active passdb backends no matter whether it specified directly in Samba configuration file or not. @@ -440,7 +444,7 @@ Added user jackb. Installing the Secure Office Server office server - Add all users to the Operating System: + Add all users to the operating system: &rootprompt;useradd -c "Jack Baumbach" -m -g users -p m0r3pa1n jackb &rootprompt;useradd -c "Mary Orville" -m -g users -p secret maryo @@ -450,10 +454,11 @@ Added user jackb. Configure the Samba &smb.conf; file as shown in . - + + - Secure Office Server smb.conf - +Secure Office Server smb.conf + Global parameters MIDEARTH @@ -486,8 +491,8 @@ Added user jackb. Yes Yes No - - + + Initialize the Microsoft Windows password database with the new users: @@ -530,7 +535,7 @@ Added user ameds. &rootprompt; nmbd; smbd; - Both applications automatically will execute as daemons. Those who are paranoid about + Both applications automatically execute as daemons. Those who are paranoid about maintaining control can add the -D flag to coerce them to start up in daemon mode. @@ -592,8 +597,8 @@ smb: \> q By now you should be getting the hang of configuration basics. Clearly, it is time to - explore slightly more complex examples. For the remainder of this chapter we will abbreviate - instructions since there are previous examples. + explore slightly more complex examples. For the remainder of this chapter we abbreviate + instructions, since there are previous examples. @@ -603,10 +608,9 @@ smb: \> q Domain Member Server - Server TypeDomain Member - In this instance we will consider the simplest server configuration we can get away with + In this instance we consider the simplest server configuration we can get away with to make an accounting department happy. Let's be warned, the users are accountants and they do have some nasty demands. There is a budget for only one server for this department. @@ -616,23 +620,23 @@ smb: \> q Internal politics are typical of a medium-sized organization; Human Resources is of the opinion that they run the ISG because they are always adding and disabling users. Also, departmental managers have to fight tooth and nail to gain basic network resources access for - their staff. Accounting is different though, they get exactly what they want. So this should + their staff. Accounting is different, though, they get exactly what they want. So this should set the scene. - We will use the users from the last example. The accounting department - has a general printer that all departmental users may. There is also a check printer - that may be used only by the person who has authority to print checks. The Chief Financial - Officer (CFO) wants that printer to be completely restricted and for it to be located in the + We use the users from the last example. The accounting department + has a general printer that all departmental users may use. There is also a check printer + that may be used only by the person who has authority to print checks. The chief financial + officer (CFO) wants that printer to be completely restricted and for it to be located in the private storage area in her office. It therefore must be a network printer. - Accounting department uses an accounting application called SpytFull + The accounting department uses an accounting application called SpytFull that must be run from a central application server. The software is licensed to run only off one server, there are no workstation components, and it is run off a mapped share. The data - store is in a UNIX-based SQL backend. The UNIX gurus look after that, so is not our + store is in a UNIX-based SQL backend. The UNIX gurus look after that, so it is not our problem. @@ -640,7 +644,7 @@ smb: \> q The accounting department manager (maryo) wants a general filing system as well as a separate file storage area for form letters (nastygrams). The form letter area should be read-only to all accounting staff except the manager. The general filing system has to have a structured - layout with a general area for all staff to store general documents, as well as a separate + layout with a general area for all staff to store general documents as well as a separate file area for each member of her team that is private to that person, but she wants full access to all areas. Users must have a private home share for personal work-related files and for materials not related to departmental operations. @@ -651,7 +655,7 @@ smb: \> q The server valinor will be a member server of the company domain. - Accounting will have only a local server. User accounts will be on the Domain Controllers + Accounting will have only a local server. User accounts will be on the domain controllers, as will desktop profiles and all network policy files. @@ -662,13 +666,14 @@ smb: \> q - Configure &smb.conf; according to - and . - + Configure &smb.conf; according to Member server smb.conf + (globals) and Member server smb.conf (shares + and services). + - - Member server smb.conf (globals) - + +Member server smb.conf (globals) + Global parameters MIDEARTH @@ -681,11 +686,12 @@ smb: \> q 15000-20000 Yes cups - + + - - Member server smb.conf (shares and services) - + +Member server smb.conf (shares and services) + Home Directories %S @@ -713,12 +719,11 @@ smb: \> q Yes Yes No - - - + + -netrpc + netrpc Join the domain. Note: Do not start Samba until this step has been completed! &rootprompt;net rpc join -Uroot%'bigsecret' @@ -733,7 +738,7 @@ Joined domain MIDEARTH. Start Samba following the normal method for your operating system platform. - If you wish to this manually execute as root: + If you wish to do this manually, execute as root: smbd nmbd winbindd @@ -746,7 +751,7 @@ Joined domain MIDEARTH. - Configure the name service switch control file on your system to resolve user and group names + Configure the name service switch (NSS) control file on your system to resolve user and group names via winbind. Edit the following lines in /etc/nsswitch.conf: passwd: files winbind @@ -825,25 +830,25 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false Server TypeDomain Controller - For the remainder of this chapter the focus is on the configuration of Domain Control. + For the remainder of this chapter the focus is on the configuration of domain control. The examples that follow are for two implementation strategies. Remember, our objective is to create a simple but working solution. The remainder of this book should help to highlight opportunity for greater functionality and the complexity that goes with it. - A Domain Controller configuration can be achieved with a simple configuration using the new + A domain controller configuration can be achieved with a simple configuration using the new tdbsam password backend. This type of configuration is good for small - offices, but has limited scalability (cannot be replicated) and performance can be expected + offices, but has limited scalability (cannot be replicated), and performance can be expected to fall as the size and complexity of the domain increases. The use of tdbsam is best limited to sites that do not need - more than a primary Domain Controller (PDC). As the size of a domain grows the need - for additional Domain Controllers becomes apparent. Do not attempt to under-resource - a Microsoft Windows network environment; Domain Controllers provide essential - authentication services. The following are symptoms of an under-resourced Domain Control + more than a Primary Domain Controller (PDC). As the size of a domain grows the need + for additional domain controllers becomes apparent. Do not attempt to under-resource + a Microsoft Windows network environment; domain controllers provide essential + authentication services. The following are symptoms of an under-resourced domain control environment: @@ -853,27 +858,27 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false - File access on a Domain Member server intermittently fails, giving a permission denied + File access on a domain member server intermittently fails, giving a permission denied error message. - A more scalable Domain Control authentication backend option might use - Microsoft Active Directory, or an LDAP-based backend. Samba-3 provides - for both options as a Domain Member server. As a PDC Samba-3 is not able to provide + A more scalable domain control authentication backend option might use + Microsoft Active Directory or an LDAP-based backend. Samba-3 provides + for both options as a domain member server. As a PDC, Samba-3 is not able to provide an exact alternative to the functionality that is available with Active Directory. Samba-3 can provide a scalable LDAP-based PDC/BDC solution. The tdbsam authentication backend provides no facility to replicate - the contents of the database, except by external means. (i.e., there is no self-contained protocol - in Samba-3 for Security Account Manager database [SAM] replication.) + the contents of the database, except by external means (i.e., there is no self-contained protocol + in Samba-3 for Security Account Manager database [SAM] replication). - If you need more than one Domain Controller, do not use a tdbsam authentication backend. + If you need more than one domain controller, do not use a tdbsam authentication backend. @@ -889,15 +894,15 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false A working PDC configuration using the tdbsam - password backend can be found in together with - : - - - -pdbedit - - Engineering Office smb.conf (globals) - + password backend can be found in Engineering Office smb.conf + (globals) together with Engineering Office smb.conf + (shares and services): + pdbedit + + + +Engineering Office smb.conf (globals) + MIDEARTH FRODO @@ -924,13 +929,12 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false 15000-20000 15000-20000 cups - - - + + - - Engineering Office smb.conf (shares and services) - + +Engineering Office smb.conf (shares and services) + Home Directories %S @@ -970,8 +974,8 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false Yes Other resource (share/printer) definitions would follow below. - - + + Create UNIX group accounts as needed using a suitable operating system tool: @@ -993,13 +997,11 @@ maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false -netgroupmap -initGroups.sh - Assign each of the UNIX groups to NT groups: - (It may be useful to copy this text to a shell script called - initGroups.sh.) - Shell script for initializing group mappings - + netgroupmap + initGroups.sh + Assign each of the UNIX groups to NT groups by executing this shell script + (You could name the script initGroups.sh): + #!/bin/bash #### Keep this as a shell script for future re-use @@ -1012,7 +1014,7 @@ net groupmap modify ntgroup="Domain Guests" unixgroup=nobody net groupmap add ntgroup="Designers" unixgroup=designers type=d net groupmap add ntgroup="Engineers" unixgroup=engineers type=d net groupmap add ntgroup="QA Team" unixgroup=qateam type=d - + @@ -1027,7 +1029,7 @@ net groupmap add ntgroup="QA Team" unixgroup=qateam type=d - The above configuration provides a functional Primary Domain Control (PDC) + The above configuration provides a functional PDC system to which must be added file shares and printers as required. @@ -1038,7 +1040,7 @@ net groupmap add ntgroup="QA Team" unixgroup=qateam type=d In this section we finally get to review in brief a Samba-3 configuration that - uses a Light Weight Directory Access (LDAP)-based authentication backend. The + uses a Lightweight Directory Access (LDAP)-based authentication backend. The main reasons for this choice are to provide the ability to host primary and Backup Domain Control (BDC), as well as to enable a higher degree of scalability to meet the needs of a very distributed environment. @@ -1054,7 +1056,7 @@ net groupmap add ntgroup="QA Team" unixgroup=qateam type=d - The Idealx scripts (or equivalent) are needed to manage LDAP based Posix and/or + The Idealx scripts (or equivalent) are needed to manage LDAP-based POSIX and/or SambaSamAccounts. The Idealx scripts may be downloaded from the Idealx Web site. They may also be obtained from the Samba tarball. Linux distributions tend to install the Idealx scripts in the @@ -1070,10 +1072,10 @@ net groupmap add ntgroup="QA Team" unixgroup=qateam type=d Set up the LDAP server. This example is suitable for OpenLDAP 2.1.x. - The /etc/openldap/slapd.conf file: -/etc/openldap/slapd.conf + The /etc/openldap/slapd.conf file. + /etc/openldap/slapd.conf Example slapd.conf file - + # Note commented out lines have been removed include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema @@ -1104,7 +1106,7 @@ index sambaSID eq index sambaPrimaryGroupSID eq index sambaDomainName eq index default sub - + @@ -1160,8 +1162,9 @@ userPassword: {SSHA}0jBHgQ1vp4EDX2rEMMfIudvRMJoGwjVb - The &smb.conf; file that drives this backend can be found in example . - + The &smb.conf; file that drives this backend can be found in example LDAP backend smb.conf for PDC. + LDAP backend smb.conf for PDC @@ -1201,7 +1204,7 @@ userPassword: {SSHA}0jBHgQ1vp4EDX2rEMMfIudvRMJoGwjVb 15000-20000 cups - + Add the LDAP password to the secrets.tdb file so Samba can update @@ -1213,7 +1216,7 @@ userPassword: {SSHA}0jBHgQ1vp4EDX2rEMMfIudvRMJoGwjVb Add users and groups as required. Users and groups added using Samba tools - will automatically be added to both the LDAP backend as well as to the operating + will automatically be added to both the LDAP backend and the operating system as required. @@ -1231,9 +1234,11 @@ userPassword: {SSHA}0jBHgQ1vp4EDX2rEMMfIudvRMJoGwjVb Decide if the BDC should have its own LDAP server or not. If the BDC is to be - the LDAP server change the following &smb.conf; as indicated. The default - configuration in uses a central LDAP server. - + the LDAP server, change the following &smb.conf; as indicated. The default + configuration in Remote LDAP BDC smb.conf + uses a central LDAP server. + + Remote LDAP BDC smb.conf @@ -1264,7 +1269,7 @@ userPassword: {SSHA}0jBHgQ1vp4EDX2rEMMfIudvRMJoGwjVb 15000-20000 cups - + Configure the NETLOGON and PROFILES directory as for the PDC in . diff --git a/docs/Samba3-HOWTO/TOSHARG-Group-Mapping.xml b/docs/Samba3-HOWTO/TOSHARG-Group-Mapping.xml index a2625edb77..cd541cac18 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Group-Mapping.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Group-Mapping.xml @@ -8,7 +8,7 @@ &author.jerry; -Group Mapping &smbmdash; MS Windows and UNIX +Group Mapping: MS Windows and UNIX @@ -19,8 +19,8 @@ - The new facility for mapping NT Groups to UNIX system groups allows the administrator to decide - which NT Domain Groups are to be exposed to MS Windows clients. Only those NT Groups that map + The new facility for mapping NT groups to UNIX system groups allows the administrator to decide + which NT domain groups are to be exposed to MS Windows clients. Only those NT groups that map to a UNIX group that has a value other than the default (-1) will be exposed in group selection lists in tools that access domain users and groups. @@ -30,7 +30,7 @@ domain admin group The domain admin group parameter has been removed in Samba-3 and should no longer be specified in &smb.conf;. In Samba-2.2.x, this parameter was used to give the listed users membership in the - Domain Admins Windows group which gave local admin rights on their workstations + Domain Admins Windows group, which gave local admin rights on their workstations (in default configurations). @@ -44,39 +44,39 @@ -UID -GID -idmap uid + UID + GID + idmap uid Group accounts can be managed using the MS Windows NT4 or MS Windows 200x/XP Professional MMC tools. Appropriate interface scripts should be provided in &smb.conf; if it is desired that UNIX/Linux system accounts should be automatically created when these tools are used. In the absence of these scripts, and so long as winbindd is running, Samba group accounts that are created using these - tools will be allocated UNIX UIDs/GIDs from the ID range specified by the + tools will be allocated UNIX UIDs and GIDs from the ID range specified by the / parameters in the &smb.conf; file.
- IDMAP: group SID to GID resolution. + IDMAP: Group SID-to-GID Resolution. idmap-sid2gid
- IDMAP: GID resolution to matching SID. + IDMAP: GID Resolution to Matching SID. idmap-gid2sid
IDMAP In both cases, when winbindd is not running, only locally resolvable groups can be recognized. Please refer to - IDMAP: group SID to GID resolution and - IDMAP: GID resolution to matching SID. - The net groupmap is - used to establish UNIX group to NT SID mappings as shown in IDMAP: storing group mappings. + IDMAP: Group SID-to-GID Resolution and IDMAP: GID Resolution to Matching SID. The net groupmap is + used to establish UNIX group to NT SID mappings as shown in IDMAP: storing + group mappings.
- IDMAP storing group mappings. + IDMAP Storing Group Mappings. idmap-store-gid2sid
@@ -86,8 +86,8 @@ Administrators should be aware that where &smb.conf; group interface scripts make direct calls to the UNIX/Linux system tools (the shadow utilities, groupadd, groupdel, and groupmod), 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 + to any limits imposed by these tools. If the tool does not allow uppercase characters + or space characters, then the creation of an MS Windows NT4/200x-style group of Engineering Managers will attempt to create an identically named UNIX/Linux group, an attempt that will of course fail. @@ -95,15 +95,15 @@ GID SID - There are several possible work-arounds for the operating system tools limitation. One + There are several possible workarounds 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. + 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 workaround solution. - 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 net groupmap + Another workaround 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 net groupmap tool to connect the two to each other. @@ -113,9 +113,9 @@ Discussion - When installing MS Windows NT4/200x on a computer, the installation + When you install MS Windows NT4/200x on a computer, the installation program creates default users and groups, notably the Administrators group, - and gives that group privileges necessary privileges to perform essential system tasks, + and gives that group privileges necessary to perform essential system tasks, such as the ability to change the date and time or to kill (or close) any process running on the local machine. @@ -124,29 +124,29 @@ Administrator 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 - Administrators group, joe has exactly the same rights as the user, + Administrators group, joe has exactly the same rights as the user Administrator. - When an MS Windows NT4/200x/XP machine is made a Domain Member, the Domain Admins group of the + When an MS Windows NT4/200x/XP machine 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. - The following steps describe how to make Samba PDC users members of the Domain Admins group? + The following steps describe how to make Samba PDC users members of the Domain Admins group. - Create a UNIX group (usually in /etc/group), let's call it domadm. + Create a UNIX group (usually in /etc/group); let's call it domadm. Add to this group the users that must be Administrators. For example, - if you want joe, john and mary to be administrators, + if you want joe, john, and mary to be administrators, your entry in /etc/group will look like this: @@ -168,18 +168,18 @@ Domain Admins group The quotes around Domain Admins are necessary due to the space in the group name. - Also make sure to leave no white-space surrounding the equal character (=). + Also make sure to leave no white space surrounding the equal character (=). - Now joe, john and mary are domain administrators. + Now joe, john, and mary are domain administrators. groupsdomain 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 + to make any UNIX group a Windows domain group. For example, if you wanted to include a UNIX group (e.g., acct) in an 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: @@ -191,7 +191,7 @@ - Be aware that the RID parameter is a unsigned 32-bit integer that should + Be aware that the RID parameter is an unsigned 32-bit integer that should normally start at 1000. However, this RID must not overlap with any RID assigned to a user. Verification for this is done differently depending on the passdb backend you are using. Future versions of the tools may perform the verification automatically, @@ -199,18 +199,18 @@ - Warning &smbmdash; User Private Group Problems + Warning: User Private Group Problems Windows does not permit user and group accounts to have the same name. This has serious implications for all sites that use private group accounts. A private group account is an administrative practice whereby users are each given their own group account. Red Hat Linux, as well as several free distributions - of Linux by default create private groups. + of Linux, by default create private groups. - When mapping a UNIX/Linux group to a Windows group account all conflict can + When mapping a UNIX/Linux group to a Windows group account, all conflict can be avoided by assuring that the Windows domain group name does not overlap with any user account name. @@ -228,16 +228,16 @@ - All Microsoft Windows products since the release of Windows NT 3.10 support the use of nested groups. - Many Windows network administrators depend on this capability becasue it greatly simplifies security + All MS Windows products since the release of Windows NT 3.10 support the use of nested groups. + Many Windows network administrators depend on this capability because it greatly simplifies security administration. The nested group architecture was designed with the premise that day-to-day user and group membership management should be performed on the domain security database. The application of group security - should be implemented on domain member servers using only local groups. On the domain member server - all file system security controls are then limited to use of the local groups which will contain + should be implemented on domain member servers using only local groups. On the domain member server, + all file system security controls are then limited to use of the local groups, which will contain domain global groups and domain global users. @@ -245,13 +245,13 @@ You may ask, What are the benefits of this arrangement? The answer is obvious to those who have plumbed the dark depths of Windows networking architecture. Consider for a moment a server on which are stored 200,000 files, each with individual domain user and domain group settings. The company that owns the - file server is bought by another company resulting in the server being moved to another location and then + file server is bought by another company, resulting in the server being moved to another location, and then it is made a member of a different domain. Who would you think now owns all the files and directories? Answer: Account Unknown. - Unravelling the file ownership mess is an unenviable administrative task that can be avoided simply + Unraveling the file ownership mess is an unenviable administrative task that can be avoided simply by using local groups to control all file and directory access control. In this case, only the members of the local groups will have been lost. The files and directories in the storage subsystem will still be owned by the local groups. The same goes for all ACLs on them. It is administratively much simpler @@ -262,35 +262,35 @@ Another prominent example of the use of nested groups involves implementation of administrative privileges on domain member workstations and servers. Administrative privileges are given to all members of the - builtin + built-in local group Administrators on each domain member machine. To ensure that all domain - administrators have full rights on the member server or workstation, on joining the domain the + administrators have full rights on the member server or workstation, on joining the domain, the Domain Admins group is added to the local Administrators group. Thus everyone who is - logged into the domain as a member of the Domain Admins group is also granted local adminitrative + logged into the domain as a member of the Domain Admins group is also granted local administrative privileges on each domain member. UNIX/Linux has no concept of support for nested groups, and thus Samba has for a long time not supported - them either. The problem is that you would have to enter unix groups as auxiliary members of a group in + them either. The problem is that you would have to enter UNIX groups as auxiliary members of a group in /etc/group. This does not work because it was not a design requirement at the time - the UNIX file system security model was implemented. Since Samba-2.2 the winbind daemon can provide - /etc/group entries on demand by obtaining user and group information from the Domain - Controller that the Samba server is a member of. + the UNIX file system security model was implemented. Since Samba-2.2, the winbind daemon can provide + /etc/group entries on demand by obtaining user and group information from the domain + controller that the Samba server is a member of. In effect, Samba supplements the /etc/group data via the dynamic - libnss_winbind mechanism. Beginning with Samba-3.0.3 this facility is used to provide + libnss_winbind mechanism. Beginning with Samba-3.0.3, this facility is used to provide local groups in the same manner as Windows does it. It works by expanding the local groups on the fly as they are accessed. For example, the Domain Users group of the domain is made a member of the local group demo. Whenever Samba needs to resolve membership of the - demo local (alias) group winbind asks the DC for demo members of the Domain Users - group. By definition it can only contain user objects which can then be faked to be member of the + demo local (alias) group, winbind asks the domain controller for demo members of the Domain Users + group. By definition, it can only contain user objects, which can then be faked to be member of the UNIX/Linux group demo. - To enable the use of nested groups, winbindd must be used together with NSS winbind. + To enable the use of nested groups, winbindd must be used with NSS winbind. Creation and administration of the local groups is done best via the Windows Domain User Manager or its Samba equivalent, the utility net rpc group. Creating the local group demo is achieved by executing: @@ -298,16 +298,16 @@ &rootprompt; net rpc group add demo -L -Uroot%not24get Here the -L switch means that you want to create a local group. It may be necessary to add -S and -U - switches for accessing the correct host with appropriate user or root priviliges. Adding and removing + switches for accessing the correct host with appropriate user or root privileges. Adding and removing group members can be done via the addmem and delmem subcommands of - net rpc group command. For example addition of DOM\Domain Users to the + net rpc group command. For example, addition of DOM\Domain Users to the local - group demo would be done by executing: + group demo is done by executing: net rpc group addmem demo "DOM\Domain Users" - Having completed these two steps the execution of getent group demo will show demo + Having completed these two steps, the execution of getent group demo will show demo members of the global Domain Users group as members of the group demo. This also works with any local or domain user. In case the domain DOM trusts another domain, it is also possible to add global users and groups of the trusted domain as members of @@ -324,26 +324,26 @@ - For Samba-3 Domain Controllers and - Domain Member Servers/Clients. - To manage Domain Member Windows workstations. + For Samba-3 domain controllers and + domain member servers/clients. + To manage domain member Windows workstations. Versions of Samba up to and including 3.0.10 do not provide a means for assigning rights and privileges - that are necessary for system administration tasks from a Windows Domain Member Client machine so that - domain administration tasks such as adding/deleting/changing user and group account information, and + that are necessary for system administration tasks from a Windows domain Member client machine, so + domain administration tasks such as adding, deleting, and changing user and group account information, and managing workstation domain membership accounts, can be handled by any account other than root. - Samba-3.0.11 introduced a new privilege management interface (see Chapter on Rights and Privileges) - that permits these tasks to be delegated to non-root (i.e.: accounts other than the equivalent of the - MS Windows Administrator) account. + Samba-3.0.11 introduced a new privilege management interface (see User Rights and Privileges) + that permits these tasks to be delegated to non-root (i.e., accounts other than the equivalent of the + MS Windows Administrator) accounts. - Administrative tasks on a Windows Domain Member workstation, can be done by anyone who is a member of the + Administrative tasks on a Windows domain member workstation can be done by anyone who is a member of the Domain Admins group. This group can be mapped to any convenient UNIX group. @@ -351,25 +351,25 @@ Applicable Only to Versions Earlier than 3.0.11 - Administrative tasks on UNIX/Linux systems, such as adding users or groups, requires root - level privilege. The addition of a Windows client to a Samba Domain involves the addition of a user account - for the Windows client. + Administrative tasks on UNIX/Linux systems, such as adding users or groups, requires + root-level privilege. The addition of a Windows client to a Samba domain involves the + addition of a user account for the Windows client. - Many UNIX administrators continue to request the Samba Team make it possible to add Windows workstations, or - to ability to add/delete or modify user accounts, without requiring root privileges. + Many UNIX administrators continue to request that the Samba Team make it possible to add Windows workstations, or + the ability to add, delete, or modify user accounts, without requiring root privileges. Such a request violates every understanding of basic UNIX system security. - There is no safe way to provide access on a UNIX/Linux system without providing root - level privilege. Provision of root privileges can be done either by logging onto - the Domain as the user root, or by permitting particular users to use a UNIX account - that has a UID=0 in the /etc/passwd database. Users of such accounts can use tools - like the NT4 Domain User Manager, and the NT4 Domain Server Manager to manage user and group accounts as - well as Domain Member server and client accounts. This level of privilege is also needed to manage share - level ACLs. + There is no safe way to provide access on a UNIX/Linux system without providing + root-level privilege. Provision of root privileges can be done + either by logging onto the Domain as the user root or by permitting particular users to + use a UNIX account that has a UID=0 in the /etc/passwd database. Users of such accounts + can use tools like the NT4 Domain User Manager and the NT4 Domain Server Manager to manage user and group + accounts as well as domain member server and client accounts. This level of privilege is also needed to manage + share-level ACLs. @@ -377,38 +377,38 @@ - Default Users, Groups and Relative Identifiers + Default Users, Groups, and Relative Identifiers -Relative IdentifierRID -RID - When first installed, Microsoft Windows NT4/200x/XP are pre-configured with certain User, Group, and - Alias entities. Each has a well-known Relative Identifier (RID). These must be preserved for continued - integrity of operation. Samba must be provisioned with certain essential Domain Groups that require - the appropriate RID value. When Samba-3 is configured to use tdbsam the essential - Domain Groups are automatically created. It is the LDAP administrators' responsibility to create - (provision) the default NT Groups. + Relative IdentifierRID + RID + When first installed, Windows NT4/200x/XP are preconfigured with certain user, group, and + alias entities. Each has a well-known RID. These must be preserved for continued + integrity of operation. Samba must be provisioned with certain essential domain groups that require + the appropriate RID value. When Samba-3 is configured to use tdbsam, the essential + domain groups are automatically created. It is the LDAP administrator's responsibility to create + (provision) the default NT groups. - Each essential Domain Group must be assigned its respective well-known RID. The default Users, Groups, - Aliases, and RIDs are shown in Well-Known User Default RIDs table. + Each essential domain group must be assigned its respective well-known RID. The default users, groups, + aliases, and RIDs are shown in Well-Known User Default RIDs. - When the passdb backend uses LDAP (ldapsam) it is the - administrators' responsibility to create the essential Domain Groups, and to assign each its default RID. + When the passdb backend uses LDAP (ldapsam), it is the + administrator's responsibility to create the essential domain groups and to assign each its default RID. - It is permissible to create any Domain Group that may be necessary, just make certain that the essential - Domain Groups (well known) have been created and assigned its default RID. Other groups you create may + It is permissible to create any domain group that may be necessary; just make certain that the essential + domain groups (well known) have been created and assigned their default RIDs. Other groups you create may be assigned any arbitrary RID you care to use. - Be sure to map each Domain Group to a UNIX system group. That is the only way to ensure that the group - will be available for use as an NT Domain Group. + Be sure to map each domain group to a UNIX system group. That is the only way to ensure that the group + will be available for use as an NT domain group. @@ -609,10 +609,10 @@ Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -> domguest smbgrpadd.sh groupadd limitations A script to create complying group names for use by the Samba group interfaces - is provided in smbgrpadd.sh. This script will - add a temporary entry in the /etc/group file and then rename - it to to the desired name. This is an example of a method to get around operating - system maintenance tool limititations such as that present in some version of the + is provided in smbgrpadd.sh. This script + adds a temporary entry in the /etc/group file and then renames + it to the desired name. This is an example of a method to get around operating + system maintenance tool limitations such as those present in some version of the groupadd tool. @@ -641,9 +641,10 @@ exit 0 - The &smb.conf; entry for the above script would be something like that in the following example. + The &smb.conf; entry for the above script would be something like that in "smbgrpadd". + -Configuration of &smb.conf; for the add group script. +Configuration of &smb.conf; for the add group Script /path_to_tool/smbgrpadd.sh "%g" @@ -659,7 +660,7 @@ exit 0 In our example we have created a UNIX/Linux group called ntadmin. Our script will create the additional groups Orks, Elves, and Gnomes. - It is a good idea to save this shell script for later re-use just in case you ever need to rebuild your mapping database. + It is a good idea to save this shell script for later use just in case you ever need to rebuild your mapping database. For the sake of convenience we elect to save this script as a file called initGroups.sh. This script is given in intGroups.sh. @@ -701,8 +702,8 @@ net groupmap add ntgroup="Gnomes" unixgroup=Gnomes type=d 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. +it is imperative that every step of automated control scripts be carefully tested +manually before putting it into active service. @@ -716,11 +717,11 @@ manually before putting them into active service. 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. + that has an uppercase character and/or a space character in it. - There are three possible work-arounds. First, use only group names that comply + There are three possible workarounds. First, use only group names that comply with the limitations of the UNIX/Linux groupadd system tool. Second, it involves the use of the script mentioned earlier in this chapter, and third is the option is to manually create a UNIX/Linux group account that can substitute @@ -731,10 +732,10 @@ manually before putting them into active service. - Adding <emphasis>Domain Users</emphasis> to the <emphasis>Power Users</emphasis> Group + Adding <emphasis>Domain Users</emphasis> to the <literal>Power Users</literal> Group - What must I do to add Domain Users to the Power Users group? + What must I do to add domain users to the Power Users group? Domain Users group @@ -764,8 +765,8 @@ manually before putting them into active service.
- Double click Power Users. This will launch the panel to add users or groups - to the local machine Power Uses group. + Double-click Power Users. This will launch the panel to add users or groups + to the local machine Power Users group. @@ -777,12 +778,12 @@ manually before putting them into active service. - Double click the Domain Users group. + Double-click the Domain Users group. - Click the Ok button. If a logon box is presented during this process - please remember to enter the connect as DOMAIN\UserName. i.e., For the + Click the OK button. If a logon box is presented during this process, + please remember to enter the connect as DOMAIN\UserName, that is, for the domain MIDEARTH and the user root enter MIDEARTH\root. diff --git a/docs/Samba3-HOWTO/TOSHARG-IDMAP.xml b/docs/Samba3-HOWTO/TOSHARG-IDMAP.xml index 0ea50280a7..e975158e55 100644 --- a/docs/Samba3-HOWTO/TOSHARG-IDMAP.xml +++ b/docs/Samba3-HOWTO/TOSHARG-IDMAP.xml @@ -16,23 +16,23 @@ UID GID The Microsoft Windows operating system has a number of features that impose specific challenges -to interoperability with operating system on which Samba is implemented. This chapter deals +to interoperability with the operating system on which Samba is implemented. This chapter deals explicitly with the mechanisms Samba-3 (version 3.0.8 and later) uses to overcome one of the key challenges in the integration of Samba servers into an MS Windows networking environment. -This chapter deals with Identify Mapping (IDMAP) of Windows Security Identifers (SIDs) +This chapter deals with identity mapping (IDMAP) of Windows security identifiers (SIDs) to UNIX UIDs and GIDs. -To ensure good sufficient coverage each possible Samba deployment type will be discussed. +To ensure sufficient coverage, each possible Samba deployment type is discussed. This is followed by an overview of how the IDMAP facility may be implemented. network client The IDMAP facility is usually of concern where more than one Samba server (or Samba network client) -is installed in the one Domain. Where there is a single Samba server do not be too concerned regarding -the IDMAP infrastructure - the default behavior of Samba is nearly always sufficient. +is installed in one domain. Where there is a single Samba server, do not be too concerned regarding +the IDMAP infrastructure &smbmdash; the default behavior of Samba is nearly always sufficient. @@ -44,7 +44,7 @@ of foreign SIDs to local UNIX UIDs and GIDs. winbindd -The use of the IDMAP facility requires that the winbindd be executed on Samba start-up. +The use of the IDMAP facility requires that the winbindd be executed on Samba startup. @@ -52,25 +52,25 @@ The use of the IDMAP facility requires that the winbindd be e Server Types -There are four (4) basic server deployment types, as documented in the chapter +There are four basic server deployment types, as documented in the chapter on Server Types and Security Modes. - Stand-Alone Samba Server + Standalone Samba Server stand-alone server Active Directory NT4 Domain - A stand-alone Samba server is an implementation that is not a member of a Windows NT4 Domain, - a Windows 200X Active Directory Domain, or of a Samba Domain. + A standalone Samba server is an implementation that is not a member of a Windows NT4 domain, + a Windows 200X Active Directory domain, or a Samba domain. IDMAP identity - By definition, this means that users and groups will be created and controlled locally and + By definition, this means that users and groups will be created and controlled locally, and the identity of a network user must match a local UNIX/Linux user login. The IDMAP facility is therefore of little to no interest, winbind will not be necessary, and the IDMAP facility will not be relevant or of interest. @@ -87,17 +87,17 @@ on Server Types and Security Modes. NT4 SID Active Directory - Samba-3 can act as a Windows NT4 PDC or BDC thereby providing domain control protocols that + Samba-3 can act as a Windows NT4 PDC or BDC, thereby providing domain control protocols that are compatible with Windows NT4. Samba-3 file and print sharing protocols are compatible with - all version of Microsoft Windows products. Windows NT4, as with Microsoft Active Directory, - extensively makes use of Windows security identifiers (SIDs). + all version of MS Windows products. Windows NT4, as with MS Active Directory, + extensively makes use of Windows SIDs. MS Windows SID UID GID - Samba-3 Domain Member servers and clients must interact correctly with MS Windows SIDs. Incoming + Samba-3 domain member servers and clients must interact correctly with MS Windows SIDs. Incoming Windows SIDs must be translated to local UNIX UIDs and GIDs. Outgoing information from the Samba server must provide to MS Windows clients and servers appropriate SIDs. @@ -106,21 +106,21 @@ on Server Types and Security Modes. ADS winbind A Samba member of a Windows networking domain (NT4-style or ADS) can be configured to handle - identity mapping in a variety of ways. The mechanism is will use depends on whether or not - the winbindd daemon is used, and how the winbind functionality is configured. + identity mapping in a variety of ways. The mechanism it uses depends on whether or not + the winbindd daemon is used and how the winbind functionality is configured. The configuration options are briefly described here: - Winbind is not used, users and groups are local: &smbmdash; + Winbind is not used; users and groups are local: Where winbindd is not used Samba (smbd) uses the underlying UNIX/Linux mechanisms to resolve the identity of incoming - network traffic. This will be done using the LoginID (account name) in the + network traffic. This is done using the LoginID (account name) in the session setup request and passing it to the getpwnam() system function call. This call is implemented using the name service switch (NSS) mechanism on - modern UNIX/Linux systems. By saying users and groups are local + modern UNIX/Linux systems. By saying "users and groups are local," we are implying that they are stored only on the local system, in the /etc/passwd and /etc/group respectively. @@ -133,45 +133,45 @@ on Server Types and Security Modes. - This configuration may be used with stand-alone Samba servers, Domain Member - servers (NT4 or ADS), and may be used for a PDC that uses either an smbpasswd - or a tdbsam based Samba passdb backend. + This configuration may be used with standalone Samba servers, domain member + servers (NT4 or ADS), and for a PDC that uses either an smbpasswd + or a tdbsam-based Samba passdb backend. - Winbind is not used, users and groups resolved via NSS: &smbmdash; + Winbind is not used; users and groups resolved via NSS: In this situation user and group accounts are treated as if they are local - accounts, the only way in which this differs from having local accounts is + accounts. The only way in which this differs from having local accounts is that the accounts are stored in a repository that can be shared. In practice - this means that they will reside in either a NIS type database or else in LDAP. + this means that they will reside in either an NIS-type database or else in LDAP. - This configuration may be used with stand-alone Samba servers, Domain Member - servers (NT4 or ADS), and may be used for a PDC that uses either an smbpasswd - or a tdbsam based Samba passdb backend. + This configuration may be used with standalone Samba servers, domain member + servers (NT4 or ADS), and for a PDC that uses either an smbpasswd + or a tdbsam-based Samba passdb backend. - Winbind/NSS with the default local IDMAP table: &smbmdash; + Winbind/NSS with the default local IDMAP table: - There are many sites that require only a simple Samba server, or a single Samba - server that is a member of a Windows NT4 Domain or an ADS Domain. A typical example + There are many sites that require only a simple Samba server or a single Samba + server that is a member of a Windows NT4 domain or an ADS domain. A typical example is an appliance like file server on which no local accounts are configured and winbind is used to obtain account credentials from the domain controllers for the - domain. The domain control can be provided by Samba-3, MS Windows NT4 or MS Windows + domain. The domain control can be provided by Samba-3, MS Windows NT4, or MS Windows Active Directory. Winbind is a great convenience in this situation. All that is needed is a range of - UID numbers and GID numbers that can be defined in the &smb.conf; file, the - /etc/nsswitch.conf file is configured to use winbind + UID numbers and GID numbers that can be defined in the &smb.conf; file. The + /etc/nsswitch.conf file is configured to use winbind, which does all the difficult work of mapping incoming SIDs to appropriate UIDs and GIDs. The SIDs are allocated a UID/GID in the order in which winbind receives them. @@ -180,15 +180,15 @@ on Server Types and Security Modes. This configuration is not convenient or practical in sites that have more than one Samba server and that require the same UID or GID for the same user or group across all servers. One of the hazards of this method is that in the event that the winbind - IDMAP file may become corrupted or lost, the repaired or rebuilt IDMAP file may allocate - UIDs and GIDs to differing users and groups from what was there previously with the + IDMAP file becomes corrupted or lost, the repaired or rebuilt IDMAP file may allocate + UIDs and GIDs to different users and groups from what was there previously with the result that MS Windows files that are stored on the Samba server may now not belong to - to rightful owner. + the rightful owners. - Winbind/NSS uses RID based IDMAP: &smbmdash; + Winbind/NSS uses RID based IDMAP: RID @@ -196,8 +196,8 @@ on Server Types and Security Modes. ADS LDAP The IDMAP_RID facility is new to Samba version 3.0.8. It was added to make life easier - for a number of sites that are committed to use of MS ADS, who do not want to apply - an ADS schema extension, and who do not wish to install an LDAP directory server just for + for a number of sites that are committed to use of MS ADS, that do not apply + an ADS schema extension, and that do not have an installed an LDAP directory server just for the purpose of maintaining an IDMAP table. If you have a single ADS domain (not a forest of domains, and not multiple domain trees) and you want a simple cookie-cutter solution to the IDMAP table problem, then IDMAP_RID is an obvious choice. @@ -213,7 +213,7 @@ on Server Types and Security Modes. idmap backend This facility requires the allocation of the idmap uid and the idmap gid ranges, and within the idmap uid - it is possible to allocate a sub-set of this range for automatic mapping of the relative + it is possible to allocate a subset of this range for automatic mapping of the relative identifier (RID) portion of the SID directly to the base of the UID plus the RID value. For example, if the idmap uid range is 1000-100000000 and the idmap backend = idmap_rid:DOMAIN_NAME=1000-50000000, and @@ -223,40 +223,40 @@ on Server Types and Security Modes. - Winbind with an NSS/LDAP backend based IDMAP facility: &smbmdash; + Winbind with an NSS/LDAP backend-based IDMAP facility: Domain Member In this configuration winbind resolved SIDs to UIDs and GIDs from the idmap uid and idmap gid ranges specified - in the &smb.conf; file, but instead of using a local winbind IDMAP table it is stored - in an LDAP directory so that all Domain Member machines (clients and servers) can share + in the &smb.conf; file, but instead of using a local winbind IDMAP table, it is stored + in an LDAP directory so that all domain member machines (clients and servers) can share a common IDMAP table. idmap backend - It is important that all LDAP IDMAP clients use only the master LDAP server as the + It is important that all LDAP IDMAP clients use only the master LDAP server because the idmap backend facility in the &smb.conf; file does not correctly handle LDAP redirects. - Winbind with NSS to resolve UNIX/Linux user and group IDs: &smbmdash; + Winbind with NSS to resolve UNIX/Linux user and group IDs: - The use of LDAP as the passdb backend is a smart solution for PDC, BDC as well as for - Domain Member servers. It is a neat method for assuring that UIDs, GIDs and the matching - SIDs will be consistent across all servers. + The use of LDAP as the passdb backend is a smart solution for PDC, BDC, and + domain member servers. It is a neat method for assuring that UIDs, GIDs, and the matching + SIDs are consistent across all servers. LDAP PADL - The use of the LDAP based passdb backend requires use of the PADL nss_ldap utility, or - an equivalent. In this situation winbind is used to handle foreign SIDs; ie: SIDs from - stand-alone Windows clients (i.e.: not a member of our domain) as well as SIDs from + The use of the LDAP-based passdb backend requires use of the PADL nss_ldap utility or + an equivalent. In this situation winbind is used to handle foreign SIDs, that is, SIDs from + standalone Windows clients (i.e., not a member of our domain) as well as SIDs from another domain. The foreign UID/GID is mapped from allocated ranges (idmap uid and idmap gid) in precisely the same manner as when using winbind with a local IDMAP table. @@ -266,12 +266,12 @@ on Server Types and Security Modes. AD4UNIX MMC The nss_ldap tool set can be used to access UIDs and GIDs via LDAP as well as via Active - Directory. In order to use Active Directory it is necessary to modify the ADS schema by - installing either the AD4UNIX schema extension or else use the Microsoft Services for UNIX - version 3.5 of later to extend the ADS schema so it maintains UNIX account credentials. - Where the ADS schema is extended a Microsoft Management Console (MMC) snap-in in also + Directory. In order to use Active Directory, it is necessary to modify the ADS schema by + installing either the AD4UNIX schema extension or using the Microsoft Services for UNIX + version 3.5 or later to extend the ADS schema so it maintains UNIX account credentials. + Where the ADS schema is extended, a Microsoft Management Console (MMC) snap-in is also installed to permit the UNIX credentials to be set and managed from the ADS User and Computer - management tool. Each account must be separately UNIX enabled before the UID and GID data can + Management tool. Each account must be separately UNIX-enabled before the UID and GID data can be used by Samba. @@ -289,17 +289,17 @@ on Server Types and Security Modes. SID RID algorithmic mapping - Microsoft Windows domain security systems generate the user and group security identifier (SID) as part - of the process of creation of an account. Windows does not have a concept of the UNIX UID or a GID, rather - it has its own type of security descriptor. When Samba is used as a Domain Controller, it provides a method + Microsoft Windows domain security systems generate the user and group SID as part + of the process of creation of an account. Windows does not have a concept of the UNIX UID or a GID; rather, + it has its own type of security descriptor. When Samba is used as a domain controller, it provides a method of producing a unique SID for each user and group. Samba generates a machine and a domain SID to which it - adds a relative identifier (RID) that is calculated algorithmically from a base value that can be specified - in the &smb.conf; file, plus twice (2X) the UID or GID. This method is called algorithmic mapping. + adds an RID that is calculated algorithmically from a base value that can be specified + in the &smb.conf; file, plus twice (2x) the UID or GID. This method is called algorithmic mapping. RID base - For example, a user has a UID of 4321, and the algorithmic RID base has a value of 1000, the RID will + For example, ifa user has a UID of 4321, and the algorithmic RID base has a value of 1000, the RID will be 1000 + (2 x 4321) = 9642. Thus, if the domain SID is S-1-5-21-89238497-92787123-12341112, the resulting SID is S-1-5-21-89238497-92787123-12341112-9642. @@ -307,14 +307,14 @@ on Server Types and Security Modes. on-the-fly - The foregoing type SID is produced by Samba as an automatic function and is either produced on-the-fly - (as in the case when using a passdb backend = [tdbsam | smbpasswd], or may be stored - as a permanent part of an account in an LDAP based ldapsam. + The foregoing type of SID is produced by Samba as an automatic function and is either produced on the fly + (as is the case when using a passdb backend = [tdbsam | smbpasswd]), or may be stored + as a permanent part of an account in an LDAP-based ldapsam. SFU 3.5 - MS Active Directory Server (ADS) uses a directory schema that can be extended to accommodate additional + ADS uses a directory schema that can be extended to accommodate additional account attributes such as UIDs and GIDs. The installation of Microsoft Service for UNIX 3.5 will expand the normal ADS schema to include UNIX account attributes. These must of course be managed separately through a snap-in module to the normal ADS account management MMC interface. @@ -323,7 +323,7 @@ on Server Types and Security Modes. PDC Security identifiers used within a domain must be managed to avoid conflict and to preserve itegrity. - In an NT4 domain context that PDC manages the distribution of all security credentials to the backup + In an NT4 domain context, that PDC manages the distribution of all security credentials to the backup domain controllers. At this time the only passdb backend for a Samba domain controller that is suitable for such information is an LDAP backend. @@ -335,13 +335,13 @@ on Server Types and Security Modes. BDC - Backup Domain Controllers (BDCs) have read-only access to security credentials that are stored in LDAP. + BDCs have read-only access to security credentials that are stored in LDAP. Changes in user or group account information are passed by the BDC to the PDC. Only the PDC can write changes to the directory. - IDMAP information can however be written directly to the LDAP server so long as all domain controllers + IDMAP information can, however, be written directly to the LDAP server so long as all domain controllers have access to the master (writable) LDAP server. Samba-3 at this time does not handle LDAP redirects in the IDMAP backend. This means that it is is unsafe to use a slave (replicate) LDAP server with the IDMAP facility. @@ -361,7 +361,7 @@ on Server Types and Security Modes. DMC Anyone who wishes to use winbind will find the following example configurations helpful. Remember that in the majority of cases winbind is of primary interest for use with -Domain Member Servers (DMSs) and Domain Member Clients (DMCs). +domain member servers (DMSs) and domain member clients (DMCs). @@ -377,12 +377,12 @@ Domain Member Servers (DMSs) and Domain Member Clients (DMCs). - Networks that use MS Windows 200X ADS. + Networks that use MS Windows 200x ADS. - NT4 Style Domains (includes Samba Domains) + NT4-Style Domains (Includes Samba Domains) The following is a simple example of an NT4 DMS &smb.conf; file that shows only the global section. @@ -420,7 +420,7 @@ hosts: files wins - Create or install and &smb.conf; file with the above configuration. + Create or install an &smb.conf; file with the above configuration. @@ -456,7 +456,7 @@ Join to domain 'MEGANET2' is not valid domain join - The procedure for joining and ADS domain is similar to the NT4 domain join, except the &smb.conf; file + The procedure for joining an ADS domain is similar to the NT4 domain join, except the &smb.conf; file will have the following contents: # Global parameters @@ -482,9 +482,9 @@ Join to domain 'MEGANET2' is not valid MIT kerberos Heimdal Heimdal kerberos - ADS DMS operation requires use of kerberos (KRB). For this to work the krb5.conf - must be configured. The exact requirements depends on which version of MIT or Heimdal kerberos is being - used. It is sound advice to use only the latest version, which at this time are MIT kerberos version + ADS DMS operation requires use of kerberos (KRB). For this to work, the krb5.conf + must be configured. The exact requirements depends on which version of MIT or Heimdal Kerberos is being + used. It is sound advice to use only the latest version, which at this time are MIT Kerberos version 1.3.5 and Heimdal 0.61. @@ -494,7 +494,7 @@ Join to domain 'MEGANET2' is not valid - Create or install and &smb.conf; file with the above configuration. + Create or install an &smb.conf; file with the above configuration. @@ -526,13 +526,13 @@ GARGOYLE$@'s password: Join to domain is not valid error message - The specific error message may differ from the above as it depends on the type of failure that - may have occured. Increase the log level to 10, repeat the above test + The specific error message may differ from the above because it depends on the type of failure that + may have occurred. Increase the log level to 10, repeat the test, and then examine the log files produced to identify the nature of the failure. - Start the nmbd, winbind, and smbd daemons in the order shown. + Start the nmbd, winbind, and smbd daemons in the order shown. @@ -551,7 +551,7 @@ Join to domain is not valid The idmap_rid facility is a new tool that, unlike native winbind, creates a predictable mapping of MS Windows SIDs to UNIX UIDs and GIDs. The key benefit of this method of implementing the Samba IDMAP facility is that it eliminates the need to store the IDMAP data - in a central place. The down-side is that it can be used only within a single ADS Domain and + in a central place. The downside is that it can be used only within a single ADS domain and is not compatible with trusted domain implementations. @@ -560,10 +560,10 @@ Join to domain is not valid allow trusted domains idmap uid idmap gid - This alternate method of SID to UID/GID mapping can be achieved uses the idmap_rid + This alternate method of SID to UID/GID mapping can be achieved using the idmap_rid plug-in. This plug-in uses the RID of the user SID to derive the UID and GID by adding the RID to a base value specified. This utility requires that the parameter - allow trusted domains = No must be specified, as it is not compatible + allow trusted domains = No be specified, as it is not compatible with multiple domain environments. The idmap uid and idmap gid ranges must be specified. @@ -571,8 +571,8 @@ Join to domain is not valid idmap_rid realm - The idmap_rid facility can be used both for NT4/Samba style domains as well as with Active Directory. - To use this with an NT4 Domain the realm is not used, additionally the + The idmap_rid facility can be used both for NT4/Samba-style domains and Active Directory. + To use this with an NT4 domain, the realm is not used; additionally, the method used to join the domain uses the net rpc join process. @@ -605,13 +605,12 @@ Join to domain is not valid response getent In a large domain with many users it is imperative to disable enumeration of users and groups. - For examplem, at a site that has 22,000 users in Active Directory the winbind based user and - group resolution is unavailable for nearly 12 minutes following first start-up of - winbind. Disabling of such enumeration resulted in instantaneous response. + For example, at a site that has 22,000 users in Active Directory the winbind-based user and + group resolution is unavailable for nearly 12 minutes following first startup of + winbind. Disabling enumeration resulted in instantaneous response. The disabling of user and group enumeration means that it will not be possible to list users or groups using the getent passwd and getent group - commands. It will be possible to perform the lookup for individual users, as shown in the procedure - below. + commands. It will be possible to perform the lookup for individual users, as shown in the following procedure. @@ -636,7 +635,7 @@ hosts: files wins - Create or install and &smb.conf; file with the above configuration. + Create or install an &smb.conf; file with the above configuration. @@ -662,13 +661,13 @@ BIGJOE$@'s password: ads_connect: No results returned Join to domain is not valid - The specific error message may differ from the above as it depends on the type of failure that - may have occured. Increase the log level to 10, repeat the above test + The specific error message may differ from the above because it depends on the type of failure that + may have occurred. Increase the log level to 10, repeat the test, and then examine the log files produced to identify the nature of the failure. - Start the nmbd, winbind, and smbd daemons in the order shown. + Start the nmbd, winbind, and smbd daemons in the order shown. @@ -684,19 +683,20 @@ administrator:x:1000:1013:Administrator:/home/BE/administrator:/bin/bash
- IDMAP Storage in LDAP using Winbind + IDMAP Storage in LDAP Using Winbind ADAM ADS - The storage of IDMAP information in LDAP can be used with both NT4/Samba-3 style domains as well as - with ADS domains. OpenLDAP is a commonly used LDAP server for this purpose, although any standards - complying LDAP server can be used. It is therefore possible to deploy this IDMAP configuration using - the Sun iPlanet LDAP server, Novell eDirectory, Microsoft ADS plus ADAM, and so on. + The storage of IDMAP information in LDAP can be used with both NT4/Samba-3-style domains and + ADS domains. OpenLDAP is a commonly used LDAP server for this purpose, although any + standards-complying LDAP server can be used. It is therefore possible to deploy this IDMAP + configuration using the Sun iPlanet LDAP server, Novell eDirectory, Microsoft ADS plus ADAM, + and so on. - The following example is for an ADS style domain: + The following example is for an ADS domain: @@ -722,17 +722,16 @@ administrator:x:1000:1013:Administrator:/home/BE/administrator:/bin/bash realm - In the case of an NT4 or Samba-3 style Domain the realm is not used and the - command used to join the domain is: net rpc join. The above example also demonstrates - advanced error reporting techniques that are documented in the chapter called - Reporting Bugs. + In the case of an NT4 or Samba-3-style domain the realm is not used, and the + command used to join the domain is net rpc join. The above example also demonstrates + advanced error-reporting techniques that are documented in Reporting Bugs. MIT kerberos Heimdal kerberos /etc/krb5.conf - Where MIT kerberos is installed (version 1.3.4 or later) edit the /etc/krb5.conf + Where MIT kerberos is installed (version 1.3.4 or later), edit the /etc/krb5.conf file so it has the following contents: [logging] @@ -757,8 +756,8 @@ administrator:x:1000:1013:Administrator:/home/BE/administrator:/bin/bash - Where Heimdal kerberos is installed edit the /etc/krb5.conf - file so it is either empty (i.e.: no contents) or it has the following contents: + Where Heimdal kerberos is installed, edit the /etc/krb5.conf + file so it is either empty (i.e., no contents) or it has the following contents: [libdefaults] default_realm = SNOWSHOW.COM @@ -775,9 +774,9 @@ administrator:x:1000:1013:Administrator:/home/BE/administrator:/bin/bash - Samba can not use the Heimdal libraries if there is no /etc/krb5.conf file. - So long as there is an empty file the Heimdal kerberos libraries will be usable. There is no - need to specify any settings as Samba using the Heimdal libraries can figure this out automatically. + Samba cannot use the Heimdal libraries if there is no /etc/krb5.conf file. + So long as there is an empty file, the Heimdal kerberos libraries will be usable. There is no + need to specify any settings because Samba, using the Heimdal libraries, can figure this out automatically. @@ -815,7 +814,7 @@ ssl no - The following procedure may be followed to affect a working configuration: + The following procedure may be followed to effect a working configuration: @@ -824,7 +823,7 @@ ssl no - Create the /etc/krb5.conf file following the indications above. + Create the /etc/krb5.conf file as shown above. @@ -832,13 +831,13 @@ ssl no - Download, build and install the PADL nss_ldap tool set. Configure the + Download, build, and install the PADL nss_ldap tool set. Configure the /etc/ldap.conf file as shown above. - Configure an LDAP server, initialize the directory with the top level entries needed by IDMAP - as shown in the following LDIF file: + Configure an LDAP server and initialize the directory with the top-level entries needed by IDMAP, + shown in the following LDIF file: dn: dc=snowshow,dc=com objectClass: dcObject @@ -859,7 +858,7 @@ ou: idmap - Execute the command to join the Samba Domain Member Server to the ADS domain as shown here: + Execute the command to join the Samba DMS to the ADS domain as shown here: &rootprompt; net ads testjoin Using short domain name -- SNOWSHOW @@ -875,7 +874,7 @@ Joined 'GOODELF' to realm 'SNOWSHOW.COM' - Start the nmbd, winbind, and smbd daemons in the order shown. + Start the nmbd, winbind, and smbd daemons in the order shown. @@ -889,7 +888,7 @@ Joined 'GOODELF' to realm 'SNOWSHOW.COM' - IDMAP and NSS Using LDAP From ADS with RFC2307bis Schema Extension + IDMAP and NSS Using LDAP from ADS with RFC2307bis Schema Extension rfc2307bis @@ -950,12 +949,12 @@ hosts: files wins - The next step involves preparation on the ADS schema. This is briefly discussed in the remaining + The next step involves preparation of the ADS schema. This is briefly discussed in the remaining part of this chapter. - IDMAP, Active Directory and MS Services for UNIX 3.5 + IDMAP, Active Directory, and MS Services for UNIX 3.5 SFU @@ -973,7 +972,7 @@ hosts: files wins Instructions for obtaining and installing the AD4UNIX tool set can be found from the - Geekcomix web site. + Geekcomix Web site. diff --git a/docs/Samba3-HOWTO/TOSHARG-Install.xml b/docs/Samba3-HOWTO/TOSHARG-Install.xml index 1d9445e50b..7ecc33bdce 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Install.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Install.xml @@ -19,13 +19,13 @@ Binary packages of Samba are included in almost any Linux or UNIX distribution. There are also some packages available at - the Samba home-page. Refer to + the Samba home page. Refer to the manual of your operating system for details on installing packages for your specific operating system. If you need to compile Samba from source, check - How to compile Samba. + How to Compile Samba. @@ -43,13 +43,13 @@ - Configuration file syntax + Configuration File Syntax The &smb.conf; file uses the same syntax as the various old .ini files in Windows 3.1: Each file consists of various sections, which are started by putting the section name between brackets ([]) - on a new line. Each contains zero or more key/value-pairs separated by an - equality sign (=). The file is just a plain-text file, so you can + on a new line. Each contains zero or more key/value pairs separated by an + equality sign (=). The file is just a plaintext file, so you can open and edit it with your favorite editing tool. Each section in the &smb.conf; file represents a share @@ -57,7 +57,7 @@ contains settings that apply to the whole Samba server and not to one share in particular. -Following example contains a very minimal &smb.conf;. +A minimal smb.conf contains a very minimal &smb.conf;. minimal configuration @@ -98,8 +98,8 @@ smbd starting sambasmbd This daemon handles all name registration and resolution requests. It is the primary vehicle involved - in network browsing. It handles all UDP based protocols. The nmbd daemon should - be the first command started as part of the Samba start-up process. + in network browsing. It handles all UDP-based protocols. The nmbd daemon should + be the first command started as part of the Samba startup process. @@ -107,8 +107,8 @@ nmbd starting sambanmbd - This daemon handles all TCP/IP based connection services for file and print based operations. It also - manages local authentication. It should be started immediately following the start-up of nmbd. + This daemon handles all TCP/IP-based connection services for file- and print-based operations. It also + manages local authentication. It should be started immediately following the startup of nmbd. @@ -116,18 +116,18 @@ winbindd starting sambawinbindd - This daemon should be started when Samba is a member of a Windows NT4 or ADS Domain. It is also needed when - Samba has trust relationships with another Domain. The winbindd daemon will check the + This daemon should be started when Samba is a member of a Windows NT4 or ADS domain. It is also needed when + Samba has trust relationships with another domain. The winbindd daemon will check the &smb.conf; file for the presence of the idmap uid and idmap gid - parameters. If they are not found winbindd will bail-out and refuse to start. + parameters. If they are not found, winbindd will bail out and refuse to start. - When Samba has been packaged by an operating system vendor the start-up process is typically a custom feature of its + When Samba has been packaged by an operating system vendor, the startup process is typically a custom feature of its integration into the platform as a whole. Please refer to your operating system platform administration manuals for - specific information pertaining to correct management of Samba start-up. + specific information pertaining to correct management of Samba startup. @@ -145,24 +145,22 @@ - The simplest useful configuration file would contain something like shown in - the next example. + The simplest useful configuration file would contain something like that shown in + Another simple smb.conf File. + simple configuration - - simple configuration - - Another simple smb.conf File - + +Another simple smb.conf File + &example.workgroup; no no - + - This will allow connections by anyone with an account on the server, using either @@ -177,8 +175,8 @@ For more information about security settings for the - share please refer to - Securing Samba chapter. + share, please refer to + Securing Samba. @@ -194,7 +192,7 @@ &rootprompt; testparm /etc/samba/smb.conf - Testparm will parse your configuration file and report + testparm will parse your configuration file and report any unknown parameters or incorrect syntax. @@ -214,7 +212,7 @@ SWAT is a Web-based interface that can be used to facilitate the configuration of Samba. SWAT might not be available in the Samba package that shipped with your platform, but in a separate package. Please read the SWAT man page - on compiling, installing and configuring SWAT from source. + on compiling, installing, and configuring SWAT from source. @@ -226,10 +224,10 @@ SWAT can be used from a browser on any IP-connected machine, but be aware that connecting from a remote - machine leaves your connection open to password sniffing as passwords will be sent over the wire in the clear. + machine leaves your connection open to password sniffing because passwords will be sent over the wire in the clear. - More information about SWAT can be found in corresponding chapter. + More information about SWAT can be found in . @@ -239,7 +237,7 @@ List Shares Available on the Server - To list shares that are available from the configured Samba server execute the + To list shares that are available from the configured Samba server, execute the following command: @@ -251,7 +249,7 @@ something is incorrectly configured. This method can also be used to see what shares are available on other SMB servers, such as Windows 2000. - If you choose user-level security you may find that Samba requests a password + If you choose user-level security, you may find that Samba requests a password before it will list the shares. See the smbclient man page for details. You can force it to list the shares without a password by adding the option to the command line. @@ -268,7 +266,7 @@ Typically yourhostname is the name of the host on which &smbd; has been installed. The aservice is any service that has been defined in the &smb.conf; - file. Try your user name if you just have a section in the &smb.conf; file. + file. Try your username if you just have a section in the &smb.conf; file. Example: If the UNIX host is called bambi and a valid login name is fred, you would type: @@ -285,15 +283,15 @@ access it from other clients. Within a few minutes, the Samba host should be listed in the Network Neighborhood on all Windows clients of its subnet. Try browsing the server from another client - or 'mounting' it. + or "mounting" it. - Mounting disks from a DOS, Windows or OS/2 client can be done by running a command such as: + Mounting disks from a DOS, Windows, or OS/2 client can be done by running a command such as: &dosprompt;net use d: \\servername\service - Try printing, e.g. + Try printing, for example, @@ -308,12 +306,13 @@ What If Things Don't Work? - You might want to read The Samba Checklist. - If you are still stuck, refer to Analyzing and Solving Samba Problems chapter. - Samba has been successfully installed at thousands of sites worldwide. - It is unlikely that your particular problem is unique, so it might be - productive to perform an Internet search to see if someone else has encountered - your problem and has found a way to overcome it. + + You might want to read The Samba Checklist. If you are still + stuck, refer to Analyzing and Solving Samba Problems. Samba has + been successfully installed at thousands of sites worldwide. It is unlikely that your particular problem is + unique, so it might be productive to perform an Internet search to see if someone else has encountered your + problem and has found a way to overcome it. + @@ -329,12 +328,12 @@ The following questions and issues are raised repeatedly on the Samba mailing li Samba consists of three core programs: &nmbd;, &smbd;, and &winbindd;. &nmbd; is the name server message daemon, -&smbd; is the server message daemon, and &winbindd; is the daemon that handles communication with Domain Controllers. +&smbd; is the server message daemon, and &winbindd; is the daemon that handles communication with domain controllers. If Samba is not running as a WINS server, then there will be one single instance of - &nmbd; 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 instances &smbmdash; one to handle the WINS requests. @@ -366,11 +365,11 @@ run in split mode (in which case there will be two instance <quote><errorname>The network name cannot be found</errorname></quote> - This error can be caused by one of these mis-configurations: + This error can be caused by one of these misconfigurations: - You specified an non-existing path + You specified a nonexisting path for the share in &smb.conf;. The user you are trying to access the share with does not diff --git a/docs/Samba3-HOWTO/TOSHARG-Integrating-with-Windows.xml b/docs/Samba3-HOWTO/TOSHARG-Integrating-with-Windows.xml index 0fa90c9cb2..0aa798e3e4 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Integrating-with-Windows.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Integrating-with-Windows.xml @@ -11,18 +11,18 @@ NetBIOS -This section deals with NetBIOS over TCP/IP name to IP address resolution. If +This chapter deals with NetBIOS over TCP/IP name to IP address resolution. If your MS Windows clients are not configured to use NetBIOS over TCP/IP, then this section does not apply to your installation. If your installation involves the use of -NetBIOS over TCP/IP then this section may help you to resolve networking problems. +NetBIOS over TCP/IP, then this chapter may help you to resolve networking problems. NetBIOS over TCP/IP has nothing to do with NetBEUI. NetBEUI is NetBIOS over Logical Link Control (LLC). On modern networks it is highly advised -to not run NetBEUI at all. Note also there is no such thing as +to not run NetBEUI at all. Note also that there is no such thing as NetBEUI over TCP/IP &smbmdash; the existence of such a protocol is a complete and utter misapprehension. @@ -35,7 +35,7 @@ and utter misapprehension. 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). +networking (and may have no desire to be, either). @@ -52,15 +52,15 @@ its IP address for each operating system environment. 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 name resolution and uses TCP port 139 for NetBIOS session services. When NetBIOS over -TCP/IP is disabled on MS Windows 2000 and later clients, then only the TCP port 445 will be -used and the UDP port 137 and TCP port 139 will not. +TCP/IP is disabled on MS Windows 2000 and later clients, then only the TCP port 445 is +used, and the UDP port 137 and TCP port 139 are not. When using Windows 2000 or later clients, if NetBIOS over TCP/IP is not disabled, then the client will use UDP port 137 (NetBIOS Name Service, also known as the Windows Internet -Name Service or WINS), TCP port 139 and TCP port 445 (for actual file and print traffic). +Name Service, or WINS), TCP port 139, and TCP port 445 (for actual file and print traffic). @@ -68,7 +68,7 @@ Name Service or WINS), TCP port 139 and TCP port 445 (for actual file and print When NetBIOS over TCP/IP is disabled, the use of DNS is essential. Most installations that disable NetBIOS over TCP/IP today use MS Active Directory Service (ADS). ADS requires DNSDynamic -Dynamic DNS with Service Resource Records (SRV RR) and with Incremental Zone Transfers (IXFR). +dynamic DNS with Service Resource Records (SRV RR) and with Incremental Zone Transfers (IXFR). DHCP Use of DHCP with ADS is recommended as a further means of maintaining central control over the client workstation network configuration. @@ -111,13 +111,13 @@ IP addresses. 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 -32 bits in length and are typically presented as four (4) decimal -numbers that are separated by a dot (or period). For example, 168.192.1.1. +32 bits in length and are typically presented as four decimal +numbers that are separated by a dot (or period) &smbmdash; for example, 168.192.1.1. MAC Addresses -MAC Addresses use 48 bits (or 6 bytes) and are typically represented +MAC addresses use 48 bits (or 6 bytes) and are typically represented as two-digit hexadecimal numbers separated by colons: 40:8e:0a:12:34:56. @@ -132,7 +132,7 @@ any particular interface, the assignment of an IP address makes sense from a network management perspective. More than one IP address can be assigned per MAC address. One address must be the primary IP address &smbmdash; -this is the address that will be returned in the ARP reply. +this is the address that will be returned in the Address Resolution Protocol (ARP) reply. @@ -146,8 +146,8 @@ by the TCP/IP configuration control files. The file When the IP address of the destination interface has been determined, a protocol called ARP/RARP is used to identify -the MAC address of the target interface. ARP stands for Address -Resolution Protocol and is a broadcast-oriented method that +the MAC address of the target interface. ARP +is a broadcast-oriented method that uses User Datagram Protocol (UDP) to send a request to all interfaces on the local network segment using the all 1s MAC address. Network interfaces are programmed to respond to two @@ -188,8 +188,8 @@ This file tells the name resolution libraries: host names to their IP address. - The name or IP address of available Domain - Name Servers that may be asked to perform name-to-address + The name or IP address of available domain + name servers that may be asked to perform name-to-address translation lookups. @@ -207,15 +207,12 @@ This file tells the name resolution libraries: which the setting in /etc/resolv.conf may be effected. It is a critical configuration file. This file controls the order by which name resolution may proceed. The typical structure is: - - - + order hosts,bind multi on - -then both addresses should be returned. Please refer to the +Both addresses should be returned. Please refer to the man page for host.conf for further details. @@ -232,10 +229,7 @@ man page for host.conf for further details. /etc/nsswitch.conf This file controls the actual name resolution targets. The file typically has resolver object specifications as follows: - - - - + # /etc/nsswitch.conf # # Name Service Switch configuration file. @@ -275,10 +269,10 @@ principal of speaking only when necessary. Starting with version 2.2.0, Samba has Linux support for extensions to the name service switch infrastructure so 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 +addresses. To gain this functionality, Samba needs to be compiled with appropriate arguments to the make command (i.e., make nsswitch/libnss_wins.so). The resulting library should -then be installed in the /lib directory and +then be installed in the /lib directory, and the wins parameter needs to be added to the hosts: line in the /etc/nsswitch.conf file. At this point, it will be possible to ping any MS Windows machine by its NetBIOS @@ -294,22 +288,22 @@ which both the Samba machine and the MS Windows machine belong. Name Resolution as Used within MS Windows Networking -MS Windows networking is predicated about the name each machine +MS Windows networking is predicated on the name each machine is given. This name is known variously (and inconsistently) as -the computer name, machine name, networking name, netbios name, +the computer name, machine name, networking name, NetBIOS name, or SMB name. All terms mean the same thing with the exception of -netbios name that can also apply to the name of the workgroup or the +NetBIOS name, which can also apply to the name of the workgroup or the domain name. The terms workgroup and domain are really just a 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 +It is used to store a 1-byte value that indicates service level information for the NetBIOS name that is registered. A NetBIOS machine -name is, therefore, registered for each service type that is provided by +name is therefore registered for each service type that is provided by the client/server. -Unique NetBIOS Names and Group Names tables +Unique NetBIOS names and group names tables list typical NetBIOS name/service type registrations. @@ -320,9 +314,9 @@ list typical NetBIOS name/service type registrations.
MACHINENAME<00>Server Service is running on MACHINENAME -MACHINENAME<03>Generic Machine Name (NetBIOS name) -MACHINENAME<20>LanMan Server service is running on MACHINENAME -WORKGROUP<1b>Domain Master Browser +MACHINENAME<03>Generic machine name (NetBIOS name) +MACHINENAME<20>LanMan server service is running on MACHINENAME +WORKGROUP<1b>Domain master browser
@@ -333,10 +327,10 @@ list typical NetBIOS name/service type registrations. -WORKGROUP<03>Generic Name registered by all members of WORKGROUP -WORKGROUP<1c>Domain Controllers / Netlogon Servers -WORKGROUP<1d>Local Master Browsers -WORKGROUP<1e>Browser Election Service +WORKGROUP<03>Generic name registered by all members of WORKGROUP +WORKGROUP<1c>Domain cntrollers/netlogon servers +WORKGROUP<1d>Local master browsers +WORKGROUP<1e>Browser election service @@ -344,16 +338,17 @@ list typical NetBIOS name/service type registrations. NetBIOS It should be noted that all NetBIOS machines register their own -names as per the above. This is in vast contrast to TCP/IP -installations where traditionally the system administrator will -determine in the /etc/hosts or in the DNS database what names +names as per Unique NetBIOS names and group names. This is in vast contrast to TCP/IP +installations where the system administrator traditionally +determines in the /etc/hosts or in the DNS database what names are associated with each IP address. NetBIOS One further point of clarification should be noted. The /etc/hosts -file and the DNS records do not provide the NetBIOS name type information +file and the DNS records do not provide the NetBIOS name information that MS Windows clients depend on to locate the type of service that may be needed. An example of this is what happens when an MS Windows client wants to locate a domain logon server. It finds this service and the IP @@ -365,27 +360,27 @@ Whichever machine first replies, it then ends up providing the logon services. -The name workgroup or domain really can be confusing since these +The name workgroup or domain really can be confusing, since these have the added significance of indicating what is the security architecture of the MS Windows network. The term workgroup indicates that the primary nature of the network environment is that of a -peer-to-peer design. In a WORKGROUP, all machines are responsible for +peer-to-peer design. In a workgroup, all machines are responsible for their own security, and generally such security is limited to the use of -just a password (known as Share Level security). In most situations +just a password (known as share-level security). In most situations with peer-to-peer networking, the users who control their own machines will simply opt to have no security at all. It is possible to have -User Level Security in a WORKGROUP environment, thus requiring the use -of a user name and a matching password. +user-level security in a workgroup environment, thus requiring the use +of a username and a matching password. MS Windows networking is thus predetermined to use machine names for all local and remote machine message passing. The protocol used is -called Server Message Block (SMB) and this is implemented using -the NetBIOS protocol (Network Basic Input Output System). NetBIOS can +called Server Message Block (SMB), and this is implemented using +the NetBIOS protocol (Network Basic Input/Output System). NetBIOS can be encapsulated using LLC (Logical Link Control) protocol &smbmdash; in which case the resulting protocol is called NetBEUI (Network Basic Extended User -Interface). NetBIOS can also be run over IPX (Inter-networking Packet +Interface). NetBIOS can also be run over IPX (Internetworking Packet Exchange) protocol as used by Novell NetWare, and it can be run over TCP/IP protocols &smbmdash; in which case the resulting protocol is called NBT or NetBT, the NetBIOS over TCP/IP. @@ -404,16 +399,16 @@ limited to this area. All MS Windows machines employ an in-memory buffer in which is stored the NetBIOS names and IP addresses for all external machines that machine has communicated with over the -past 10-15 minutes. It is more efficient to obtain an IP address +past 10 to 15 minutes. It is more efficient to obtain an IP address for a machine from the local cache than it is to go through all the configured name resolution mechanisms. -If a machine whose name is in the local name cache has been shut -down before the name had been expired and flushed from the cache, then +If a machine whose name is in the local name cache is shut +down before the name is expired and flushed from the cache, then an attempt to exchange a message with that machine will be subject -to time-out delays. Its name is in the cache, so a name resolution +to timeout delays. Its name is in the cache, so a name resolution lookup will succeed, but the machine cannot respond. This can be frustrating for users but is a characteristic of the protocol. @@ -422,7 +417,7 @@ frustrating for users but is a characteristic of the protocol. nbtstat nmblookup The MS Windows utility that allows examination of the NetBIOS -name cache is called nbtstat. The Samba equivalent of this +name cache is called nbtstat. The Samba equivalent is called nmblookup.
@@ -434,7 +429,7 @@ is called nmblookup. LMHOSTS This file is usually located in MS Windows NT 4.0 or Windows 200x/XP in the directory -%SystemRoot%\SYSTEM32\DRIVERS\ETC and contains the IP Address +%SystemRoot%\SYSTEM32\DRIVERS\ETC and contains the IP address and the machine name in matched pairs. The LMHOSTS file performs NetBIOS name to IP address mapping. @@ -468,8 +463,8 @@ It typically looks like this: # \0xnn (non-printing character support) # # Following any entry in the file with the characters "#PRE" will cause -# the entry to be pre-loaded into the name cache. By default, entries are -# not pre-loaded, but are parsed only after dynamic name resolution fails. +# the entry to be preloaded into the name cache. By default, entries are +# not preloaded, but are parsed only after dynamic name resolution fails. # # Following an entry with the "#DOM:<domain>" tag will associate the # entry with the domain specified by <domain>. This effects how the @@ -531,7 +526,7 @@ It typically looks like this: This file is usually located in MS Windows NT 4.0 or Windows 200x/XP in the directory %SystemRoot%\SYSTEM32\DRIVERS\ETC and contains -the IP Address and the IP hostname in matched pairs. It can be +the IP address and the IP hostname in matched pairs. It can be used by the name resolution infrastructure in MS Windows, depending on how the TCP/IP environment is configured. This file is in every way the equivalent of the UNIX/Linux /etc/hosts file. @@ -547,13 +542,13 @@ every way the equivalent of the UNIX/Linux /etc/hosts file. DNS 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 how the NetBIOS +is followed, the precise nature of which is dependent 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 +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 -WINS Server to obtain a lookup before DNS, HOSTS, LMHOSTS, or broadcast +WINS server to obtain a lookup before DNS, HOSTS, LMHOSTS, or broadcast lookup is used. @@ -568,7 +563,7 @@ lookup is used. 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. +if the TCP/IP setup has been given at least one WINS server IP address. @@ -606,12 +601,12 @@ of the WINS server. TCP/IP network configuration problems find every network administrator sooner or later. -The cause can be anything from keyboard mishaps, forgetfulness, simple mistakes, and +The cause can be anything from keyboard mishaps to forgetfulness to simple mistakes to carelessness. Of course, no one is ever deliberately careless! - Pinging Works Only in One Way + Pinging Works Only One Way I can ping my Samba server from Windows, but I cannot ping my Windows @@ -619,8 +614,8 @@ carelessness. Of course, no one is ever deliberately careless! - Answer: 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 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. @@ -644,17 +639,17 @@ carelessness. Of course, no one is ever deliberately careless! remote connection is down. Client is configured to use a WINS server, but there is no WINS server. Client is not configured to use a WINS server, but there is a WINS server. - Firewall is filtering our DNS or WINS traffic. + Firewall is filtering out DNS or WINS traffic. - Samba Server Name Change Problem + Samba Server Name-Change Problem - The name of the Samba server was changed, Samba was restarted, Samba server cannot be - ping-ed by new name from MS Windows NT4 Workstation, but it does still respond to ping using + The name of the Samba server was changed, Samba was restarted, and now the Samba server cannot be + pinged by its new name from an MS Windows NT4 workstation, but it does still respond to pinging using the old name. Why? @@ -663,9 +658,9 @@ carelessness. Of course, no one is ever deliberately careless! - WINS is not in use, only broadcast-based name resolution is used. - The Samba server was renamed and restarted within the last 10-15 minutes. - The old Samba server name is still in the NetBIOS name cache on the MS Windows NT4 Workstation. + WINS is not in use; only broadcast-based name resolution is used. + The Samba server was renamed and restarted within the last 10 or 15 minutes. + The old Samba server name is still in the NetBIOS name cache on the MS Windows NT4 workstation. @@ -702,9 +697,9 @@ SARDON <00> GROUP Registered - In the above example, &example.server.samba; is the Samba server and &example.workstation.windows; 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) and the second shows the NetBIOS name in the NetBIOS name cache. + In this example, &example.server.samba; is the Samba server and &example.workstation.windows; 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), and the second shows the NetBIOS name in the NetBIOS name cache. The name cache contains the remote machines known to this workstation. diff --git a/docs/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml b/docs/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml index 9a574c2639..1265e5ddae 100644 --- a/docs/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml +++ b/docs/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml @@ -25,7 +25,7 @@ Active Directory Samba-3 supports NT4-style domain trust relationships. This is a feature that many sites will want to use if they migrate to Samba-3 from an NT4-style domain and do not want to -adopt Active Directory or an LDAP-based authentication backend. This section explains +adopt Active Directory or an LDAP-based authentication backend. This chapter explains some background information regarding trust relationships and how to create them. It is now possible for Samba-3 to trust NT4 (and vice versa), as well as to create Samba-to-Samba trusts. @@ -35,17 +35,17 @@ trusts. winbind UID range GID range -The use of interdomain trusts requires use of winbind. Thus the +The use of interdomain trusts requires use of winbind, so the winbindd daemon must be running. Winbind operation in this mode is -dependant on the specification of a valid UID range and a valid GID range in the &smb.conf; file. +dependent on the specification of a valid UID range and a valid GID range in the &smb.conf; file. These are specified respectively using 10000-20000 and 10000-20000. -The use of winbind is necessary only when Samba is the trusting Domain, not when it is the -trusted Domain. +The use of winbind is necessary only when Samba is the trusting domain, not when it is the +trusted domain. @@ -53,14 +53,14 @@ trusted Domain. 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 with MS Windows NT4. +trust relationships. This imparts to Samba scalability similar to that with MS Windows NT4. -Given that Samba-3 has the capability to function with a scalable backend authentication -database such as LDAP, and given its ability to run in Primary as well as Backup Domain Control +Given that Samba-3 can function with a scalable backend authentication +database such as LDAP, and given its 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. +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. @@ -70,7 +70,7 @@ That was, after all, a key reason for the development and adoption of Microsoft Trust Relationship Background -MS Windows NT3/4 type security domains employ a non-hierarchical security structure. +MS Windows NT3/4-type security domains employ a nonhierarchical security structure. The limitations of this architecture as it effects the scalability of MS Windows networking in large organizations is well known. Additionally, the flat namespace that results from this design significantly impacts the delegation of administrative responsibilities in @@ -81,35 +81,35 @@ large and diverse organizations. Microsoft developed Active Directory Service (ADS), based on Kerberos and LDAP, as a means of circumventing the limitations of the older technologies. Not every organization is ready or willing to embrace ADS. For small companies the older NT4-style domain security paradigm -is quite adequate, there remains an entrenched user base for whom there is no direct +is quite adequate, so there remains an entrenched user base for whom there is no direct desire to go through a disruptive change to adopt ADS. -With MS Windows NT, Microsoft introduced the ability to allow differing security domains +With Windows NT, Microsoft introduced the ability to allow different security domains to effect a mechanism so users from one domain may be given access rights and privileges in another domain. The language that describes this capability is couched in terms of -Trusts. Specifically, one domain will trust the users +trusts. Specifically, one domain will trust the users from another domain. The domain from which users are available to another security domain is said to be a trusted domain. The domain in which those users have assigned rights and privileges is the trusting domain. With NT3.x/4.0 all trust relationships are always in one direction only, -thus if users in both domains are to have privileges and rights in each others' domain, then it is +so if users in both domains are to have privileges and rights in each others' domain, then it is necessary to establish two relationships, one in each direction. -In an NT4-style MS security domain, all trusts are non-transitive. This means that if there -are three domains (let's call them RED, WHITE and BLUE) where RED and WHITE have a trust -relationship, and WHITE and BLUE have a trust relationship, then it holds that there is no -implied trust between the RED and BLUE domains. Relationships are explicit and not +In an NT4-style MS security domain, all trusts are nontransitive. This means that if there +are three domains (let's call them red, white, and blue), where red and white have a trust +relationship, and white and blue have a trust relationship, then it holds that there is no +implied trust between the red and blue domains. Relationships are explicit and not transitive. New to MS Windows 2000 ADS security contexts is the fact that trust relationships are two-way -by default. Also, all inter-ADS domain trusts are transitive. In the case of the RED, WHITE and BLUE -domains above, with Windows 2000 and ADS the RED and BLUE domains can trust each other. This is -an inherent feature of ADS domains. Samba-3 implements MS Windows NT4-style Interdomain trusts +by default. Also, all inter-ADS domain trusts are transitive. In the case of the red, white, and blue +domains, with Windows 2000 and ADS, the red and blue domains can trust each other. This is +an inherent feature of ADS domains. Samba-3 implements MS Windows NT4-style interdomain trusts and interoperates with MS Windows 200x ADS security domains in similar manner to MS Windows NT4-style domains. @@ -151,17 +151,17 @@ The password needs to be typed twice (for standard confirmation). Interdomain TrustsCompleting A trust relationship will work only when the other (trusting) domain makes the appropriate connections -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, click on the Add button -next to the box that is labeled Trusted Domains. A panel will open in which +with the trusted domain. To consummate the trust relationship, the administrator launches the +Domain User Manager from the menu selects Policies, then select +Trust Relationships, and clicks on the Add button +next to the box that is labeled Trusted Domains. A panel opens in which must be entered the name of the remote domain as well as the password assigned to that trust. -Inter-Domain Trust Facilities +Interdomain Trust Facilities @@ -216,12 +216,12 @@ DomA and DomB), the following facilities are created: - Users/Groups in a trusting domain cannot be granted rights, permissions or access + Users and groups in a trusting domain cannot be granted rights, permissions, or access to a trusted domain. - The trusting domain can access and use accounts (Users/Global Groups) in the + The trusting domain can access and use accounts (users/global groups) in the trusted domain. @@ -236,13 +236,13 @@ DomA and DomB), the following facilities are created: - Trusted domain Global Groups can be given rights and permissions in the trusting + Trusted domain global groups can be given rights and permissions in the trusting domain. - Global Groups from the trusted domain can be made members in Local Groups on - MS Windows Domain Member machines. + Global groups from the trusted domain can be made members in local groups on + MS Windows domain member machines. @@ -260,10 +260,10 @@ is at an early stage, so do not be surprised if something does not function as i -Each of the procedures described below assumes the peer domain in the trust relationship is +Each of the procedures described next assumes the peer domain in the trust relationship is controlled by a Windows NT4 server. However, the remote end could just as well be another Samba-3 domain. It can be clearly seen, after reading this document, that combining -Samba-specific parts of what's written below leads to trust between domains in a purely Samba +Samba-specific parts of what's written in the following sections leads to trust between domains in a purely Samba environment. @@ -288,23 +288,23 @@ Added user rumba$ where means to add a new account into the -passdb database and means: create this -account with the Inter-Domain trust flag. +passdb database and means to create this +account with the Interdomain trust flag. The account name will be rumba$ (the name of the remote domain). If this fails, you should check that the trust account has been added to the system password database (/etc/passwd). If it has not been added, you -can add it manually and then repeat the step above. +can add it manually and then repeat the previous step. After issuing this command, you will 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 seven days following account creation. +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 standard way as appropriate for your configuration) and see that accounts name is +(in the standard way as appropriate for your configuration) and see that the account's name is really RUMBA$ and it has the I flag set in the flags field. Now you are ready to confirm the trust by establishing it from Windows NT Server. @@ -314,13 +314,15 @@ the trust by establishing it from Windows NT Server. User Manager Open User Manager for Domains and from the Policies menu, select Trust Relationships.... -Beside the Trusted domains list box click the +Beside the Trusted domains list box, click the Add... button. You will be prompted for the trusted domain name and the relationship password. Type in SAMBA, as this is the name of the remote domain and the password used at the time of account creation. -Click on OK and, if everything went without incident, you will see -the Trusted domain relationship successfully -established message. +Click on OK and, if everything went without incident, you will see the + +Trusted domain relationship successfully established + +message. @@ -341,19 +343,19 @@ The very first step is to add an account for the SAMBA domain on RUMBA's PDC. User Manager Launch the Domain User Manager, then from the menu select Policies, Trust Relationships. -Now, next to the Trusted Domains box press the Add +Now, next to the Trusted Domains box, press the Add button and type in the name of the trusted domain (SAMBA) and the password to use in securing the relationship. The password can be arbitrarily chosen. It is easy to change the password -from the Samba server whenever you want. After confirming the password your account is +from the Samba server whenever you want. After you confirm the password, your account is ready for use. Now its Samba's turn. -Using your favorite shell while being logged in as root, issue this command: +Using your favorite shell while logged in as root, issue this command: @@ -362,12 +364,12 @@ Using your favorite shell while being logged in as root, issue this command: You will be prompted for the password you just typed on your Windows NT4 Server box. -An error message `NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT' +An error message, "NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT," that may be reported periodically is of no concern and may safely be ignored. -It means the password you gave is correct and the NT4 Server says the account is ready for +It means the 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), but eventually you should see -the Success message. Congratulations! Your trust +the Success message. Congratulations! Your trust relationship has just been established. @@ -385,25 +387,27 @@ the secrets.tdb file. Although Domain User Manager is not present in Windows 2000, it is also possible to establish an NT4-style trust relationship with a Windows 2000 domain controller running in mixed mode as the trusting server. It should also be possible for -Samba to trust a Windows 2000 server, however, more testing is still needed in this area. +Samba to trust a Windows 2000 server; however, more testing is still needed in this area. After creating the interdomain trust account on the -Samba server as described above, open Active Directory Domains and +Samba server as described previously, open Active Directory Domains and Trusts on the AD controller of the domain whose resources you wish Samba users to have access to. Remember that since NT4-style trusts are not transitive, if you want your users to have access to multiple mixed-mode domains in your AD forest, you will need to -repeat this process for each of those domains. With Active Directory Domains -and Trusts open, right-click on the name of the Active Directory domain that +repeat this process for each of those domains. With Active Directory domains +and trusts open, right-click on the name of the Active Directory domain that will trust our Samba domain and choose Properties, then click on the Trusts tab. In the upper part of the panel, you will see a list box -labeled Domains trusted by this domain:, and an -Add... button next to it. Press this button and just as with NT4, you -will be prompted for the trusted domain name and the relationship password. Press OK and -after a moment, Active Directory will respond with The trusted domain has -been added and the trust has been verified. Your Samba users can now be -granted access to resources in the AD domain. +labeled Domains trusted by this domain: and an +Add... button next to it. Press this button and, just as with NT4, you +will be prompted for the trusted domain name and the relationship password. Press OK and +after a moment, Active Directory will respond with + +The trusted domain has been added and the trust has been verified. + +Your Samba users can now be granted access to resources in the AD domain. @@ -420,8 +424,8 @@ distributed trusted domains. Browsing of Trusted Domain Fails -Browsing from a machine in a trusted Windows 200x Domain to a Windows 200x member of -a trusting samba domain, I get the following error: +Browsing from a machine in a trusted Windows 200x domain to a Windows 200x member of +a trusting Samba domain, I get the following error: @@ -430,34 +434,34 @@ you can contact the server that authenticated you. -The event logs on the box I'm trying to connect to have entries regarding group -policy not being applied because it is a member of a down-level domain. +The event logs on the box I'm trying to connect to have entries regarding group +policy not being applied because it is a member of a down-level domain. -Answer: If there is a computer account in the Windows -200x Domain for the machine in question, and it is disabled, this problem can +If there is a computer account in the Windows +200x domain for the machine in question, and it is disabled, this problem can occur. If there is no computer account (removed or never existed), or if that -account is still intact (i.e.: you just joined it to another domain) everything -seems to be fine. By default, when you un-join a domain (the Windows 200x -Domain), the computer tries to automatically disable the computer account in -the domain. If you are running as an account which has privileges to do this -when you un-join the machine, it is done, otherwise it is not done. +account is still intact (i.e., you just joined it to another domain), everything +seems to be fine. By default, when you unjoin a domain (the Windows 200x +domain), the computer tries to automatically disable the computer account in +the domain. If you are running as an account that has privileges to do this +when you unjoin the machine, it is done; otherwise it is not done. -Problems With LDAP ldapsam And The smbldap-tools +Problems with LDAP ldapsam and the smbldap-tools If you use the smbldap-useradd script to create a trust -account to set up Interdomain trusts the process of setting up the trust will +account to set up interdomain trusts, the process of setting up the trust will fail. The account that was created in the LDAP database will have an account -flags field that has [W ], when it must have -[I ] for Interdomain trusts to work. +flags field that has [W ], when it must have +[I ] for interdomain trusts to work. -Answer: Here is a simple solution. +Here is a simple solution. Create a machine account as follows: &rootprompt; smbldap-useradd -w domain_name @@ -485,8 +489,8 @@ Create a single-sided trust under the NT4 Domain User Manager, then execute: -It works with Samba-3 and NT4 Domains, and also with Samba-3 and Windows 200x ADS in mixed mode. -Both DC's, samba and NT, must have the same WINS server otherwise +It works with Samba-3 and NT4 domains, and also with Samba-3 and Windows 200x ADS in mixed mode. +Both domain controllers, Samba and NT must have the same WINS server; otherwise, the trust will never work. diff --git a/docs/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml b/docs/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml index e9f39414d5..f5a37f20d0 100644 --- a/docs/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml +++ b/docs/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml @@ -11,10 +11,10 @@ Network Browsing -This document contains detailed information as well as a fast track guide to +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 addresses. WINS is -not involved in browse list handling except by way of name to address resolution. +not involved in browse list handling except by way of name-to-address resolution. @@ -29,7 +29,7 @@ The following information assumes that your site is running NetBIOS over TCP/IP. Features and Benefits -Someone once referred to the past in these words It was the best of times, +Charles Dickens once referred to the past in these words: It was the best of times, it was the worst of times. The more we look back, the more we long for what was and hope it never returns. @@ -45,11 +45,11 @@ lusty features, NetBIOS is like Paterson's Curse. For those not familiar with botanical problems in Australia, Paterson's Curse, -Echium plantagineum, was introduced to Australia from Europe during the mid-nineteenth +Echium plantagineum, was introduced to Australia from Europe during the mid-19th century. Since then it has spread rapidly. The high seed production, with densities of -thousands of seeds per square meter, a seed longevity of more than seven years, and an +thousands of seeds per square meter, a seed longevity of more than 7 years, and an ability to germinate at any time of year, given the right conditions, are some of the -features which make it such a persistent weed. +features that make it such a persistent weed. @@ -61,7 +61,7 @@ remember to use nothing but TCP/IP on all our MS Windows network clients. -Samba provides the ability to implement a WINS (Windows Inter-networking Name Server) +Samba provides the ability to implement a WINS (Windows Internetworking Name Server) and implements extensions to Microsoft's implementation of WINS. These extensions help Samba to effect stable WINS operations beyond the normal scope of MS WINS. @@ -73,8 +73,8 @@ support for NetBIOS disabled, in which case WINS is of no relevance. Samba suppo -For those networks on which NetBIOS has been disabled (i.e., WINS is not required) -the use of DNS is necessary for host name resolution. +For those networks on which NetBIOS has been disabled (i.e., WINS is not required), +the use of DNS is necessary for hostname resolution. @@ -83,7 +83,7 @@ the use of DNS is necessary for host name resolution. What Is Browsing? -To most people browsing means they can see the MS Windows and Samba servers +To most people, browsing means they can see the MS Windows and Samba servers in the Network Neighborhood, and when the computer icon for a particular server is clicked, it opens up and shows the shares and printers available on the target server. @@ -96,7 +96,7 @@ The technologies (or methods) employed in making all of this work include: MS Windows machines register their presence to the network. Machines announce themselves to other machines on the network. - One or more machine on the network collates the local announcements. + One or more machines on the network collate the local announcements. The client machine finds the machine that has the collated list of machines. The client machine is able to resolve the machine names to IP addresses. The client machine is able to connect to a target machine. @@ -107,7 +107,8 @@ The Samba application that controls browse list management and name resolution i called nmbd. The configuration parameters involved in nmbd's operation are: -Browsing options: (*), +Browsing options: + (*), , , (*), @@ -165,16 +166,16 @@ UDP messages can be broadcast or unicast. UDP -Normally, only uni-cast UDP messaging can be forwarded by routers. The +Normally, only unicast UDP messaging can be forwarded by routers. The parameter to smb.conf helps to project browse announcements -to remote network segments via uni-cast UDP. Similarly, the +to remote network segments via unicast UDP. Similarly, the parameter of &smb.conf; -implements browse list collation using uni-cast UDP. +implements browse list collation using unicast UDP. The methods used by MS Windows to perform name lookup requests (name resolution) is determined by a -configuration parameter called the netbios node-type. There are four (4) basic NetBIOS node types: +configuration parameter called the netbios node-type. There are four basic NetBIOS node types: b-node @@ -201,8 +202,8 @@ configuration parameter called the netbios node-type. There are four (4) basic N Hybrid The default Windows network client (or server) network configuration enables NetBIOS over TCP/IP -and b-node configuration. The use of WINS makes most sense with h-node (Hybid mode) operation so that -in the event of a WINS breakdown or non-availability the client can use broadcast based name resolution. +and b-node configuration. The use of WINS makes most sense with h-node (hybrid mode) operation so that +in the event of a WINS breakdown or non-availability, the client can use broadcast-based name resolution. @@ -220,7 +221,7 @@ parameters to your &smb.conf; file. WINS -If only one WINS server is used for an entire multi-segment network, then +If only one WINS server is used for an entire multisegment network, then the use of the and the parameters should not be necessary. @@ -240,21 +241,21 @@ configured as a WINS server on the network. Some sites have used multiple Samba servers for redundancy (one server per subnet) and then used and to effect browse list collation across all segments. Note that this means clients -will only resolve local names, and must be configured to use DNS to resolve names +will only resolve local names and must be configured to use DNS to resolve names on other subnets in order to resolve the IP addresses of the servers they can see -on other subnets. This setup is not recommended, but is mentioned as a practical +on other subnets. This setup is not recommended but is mentioned as a practical consideration (i.e., an if all else fails scenario). Lastly, take note that browse lists are a collection of unreliable broadcast messages that are repeated at intervals of not more than 15 minutes. This means -that it will take time to establish a browse list and it can take up to 45 +that it will take time to establish a browse list, and it can take up to 45 minutes to stabilize, particularly across network segments. -When an MS Windows 200x/XP system attempts to resolve a host name to an IP address +When an MS Windows 200x/XP system attempts to resolve a host name to an IP address, it follows a defined path: @@ -295,38 +296,38 @@ it follows a defined path: NetBIOS NetBIOS-less DNS -All TCP/IP-enabled systems use various forms of host name resolution. The primary +All TCP/IP-enabled systems use various forms of hostname resolution. The primary methods for TCP/IP hostname resolution involve either a static file (/etc/hosts) or the Domain Name System (DNS). DNS is the technology that makes -the Internet usable. DNS-based host name resolution is supported by nearly all +the Internet usable. DNS-based hostname resolution is supported by nearly all TCP/IP-enabled systems. Only a few embedded TCP/IP systems do not support DNS. DNS -Windows 200x/XP can register its host name with a Dynamic DNS server. You can -force register with a Dynamic DNS server in Windows 200x/XP using: +Windows 200x/XP can register its hostname with a dynamic DNS server. You can +force register with a dynamic DNS server in Windows 200x/XP using ipconfig /registerdns. -With Active Directory (ADS), a correctly functioning DNS server is absolutely +With Active Directory, a correctly functioning DNS server is absolutely essential. In the absence of a working DNS server that has been correctly configured, MS Windows clients and servers will be unable to locate each other, so -consequently network services will be severely impaired. +network services consequently will be severely impaired. -The use of Dynamic DNS is highly recommended with Active Directory, in which case +The use of dynamic DNS is highly recommended with Active Directory, in which case the use of BIND9 is preferred for its ability to adequately support the SRV (service) records that are needed for Active Directory. Use of raw SMB over TCP/IP (No NetBIOS layer) can be done only with Active -Directory domains. Samba is not an Active Directory Domain Controller: ergo, -it is not possible run Samba as a domain controller and at the same time NOT use -NetBIOS. Where Samba is used as an Active Directory Domain Member Server (DMS) +Directory domains. Samba is not an Active Directory domain controller: ergo, +it is not possible run Samba as a domain controller and at the same time not use +NetBIOS. Where Samba is used as an Active Directory domain member server (DMS) it is possible to configure Samba to not use NetBIOS over TCP/IP. A Samba DMS can integrate fully into an Active Directory domain. @@ -339,11 +340,11 @@ can integrate fully into an Active Directory domain. DNSActive Directory -Occasionally we hear from UNIX network administrators who want to use a UNIX-based Dynamic +Occasionally we hear from UNIX network administrators who want to use a UNIX-based dynamic DNS server in place of the Microsoft DNS server. While this might be desirable to some, the -MS Windows 200x DNS server is auto-configured to work with Active Directory. It is possible +MS Windows 200x DNS server is autoconfigured to work with Active Directory. It is possible to use BIND version 8 or 9, but it will almost certainly be necessary to create service records -(SRV records) so MS Active Directory clients can resolve host names to locate essential network services. +(SRV records) so MS Active Directory clients can resolve hostnames to locate essential network services. The following are some of the default service records that Active Directory requires: @@ -352,7 +353,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.pdc._msdcs.Domain - This provides the address of the Windows NT PDC for the Domain. + This provides the address of the Windows NT PDC for the domain. @@ -360,7 +361,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.pdc._msdcs.DomainTree - Resolves the addresses of Global Catalog servers in the domain. + Resolves the addresses of global catalog servers in the domain. @@ -368,7 +369,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.site.sites.writable._msdcs.Domain - Provides list of Domain Controllers based on sites. + Provides list of domain controllers based on sites. @@ -376,7 +377,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.writable._msdcs.Domain - Enumerates list of Domain Controllers that have the writable copies of the Active Directory data-store. + Enumerates list of domain controllers that have the writable copies of the Active Directory data store. @@ -384,7 +385,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.GUID.domains._msdcs.DomainTree - Entry used by MS Windows clients to locate machines using the Global Unique Identifier. + Entry used by MS Windows clients to locate machines using the global unique identifier. @@ -392,7 +393,7 @@ The following are some of the default service records that Active Directory requ _ldap._tcp.Site.gc._msdcs.DomainTree - Used by MS Windows clients to locate site configuration dependent Global Catalog server. + Used by MS Windows clients to locate site configuration-dependent global catalog server. @@ -400,7 +401,7 @@ The following are some of the default service records that Active Directory requ Specific entries used by Microsoft clients to locate essential services for an example domain - called quenya.org includes: + called quenya.org include: @@ -431,13 +432,13 @@ The following are some of the default service records that Active Directory requ - _gc._tcp.quenya.org &smbmdash; Used to locate the Global Catalog server for the + _gc._tcp.quenya.org &smbmdash; Used to locate the global catalog server for the top of the domain. This must list port 3268. - The following records are also used by the Windows Domain Member client to locate vital + The following records are also used by the Windows domain member client to locate vital services on the Windows ADS domain controllers. @@ -521,11 +522,11 @@ noldor.quenya.org. 1200 IN A 10.1.1.17 MS Windows machines register their NetBIOS names -(i.e., the machine name for each service type in operation) on start-up. +(i.e., the machine name for each service type in operation) on startup. The exact method by which this name registration takes place is determined by whether or not the MS Windows client/server has been given a WINS server address, whether or not LMHOSTS lookup -is enabled, or if DNS for NetBIOS name resolution is enabled, etc. +is enabled, whether or not DNS for NetBIOS name resolution is enabled, and so on. @@ -540,29 +541,29 @@ list of a remote MS Windows network (using the Where a WINS server is used, the MS Windows client will use UDP -uni-cast to register with the WINS server. Such packets can be routed +unicast to register with the WINS server. Such packets can be routed, and thus WINS allows name resolution to function across routed networks. -During the startup process an election will take place to create a -Local Master Browser if one does not already exist. On each NetBIOS network -one machine will be elected to function as the Domain Master Browser. This +During the startup process, an election takes place to create a +local master browser (LMB) if one does not already exist. On each NetBIOS network +one machine will be elected to function as the domain master browser (DMB). This domain browsing has nothing to do with MS security Domain Control. -Instead, the Domain Master Browser serves the role of contacting each local -master browser (found by asking WINS or from LMHOSTS) and exchanging browse +Instead, the DMB serves the role of contacting each +LMB (found by asking WINS or from LMHOSTS) and exchanging browse list contents. This way every master browser will eventually obtain a complete list of all machines that are on the network. Every 11 to 15 minutes an election is held to determine which machine will be the master browser. By the nature of the election criteria used, the machine with the highest uptime, or the most senior protocol version or other criteria, will win the election -as Domain Master Browser. +as DMB. -Clients wishing to browse the network make use of this list, but also depend +Clients wishing to browse the network make use of this list but also depend on the availability of correct name resolution to the respective IP -address/addresses. +address or addresses. @@ -574,39 +575,39 @@ inability to use the network services. Samba supports a feature that allows forced synchronization of browse lists across routed networks using the -parameter in the &smb.conf; file. This causes Samba to contact the local master -browser on a remote network and to request browse list synchronization. This +parameter in the &smb.conf; file. This causes Samba to contact the LMB +on a remote network and to request browse list synchronization. This effectively bridges two networks that are separated by routers. The two remote networks may use either broadcast-based name resolution or WINS-based name resolution, but it should be noted that the parameter provides -browse list synchronization &smbmdash; and that is distinct from name to address -resolution. In other words, for cross-subnet browsing to function correctly it is +browse list synchronization &smbmdash; and that is distinct from name-to-address +resolution. In other words, for cross-subnet browsing to function correctly, it is essential that a name-to-address resolution mechanism be provided. This mechanism could be via DNS, /etc/hosts, and so on. -Configuring WORKGROUP Browsing +Configuring Workgroup Browsing To configure cross-subnet browsing on a network containing machines -in a WORKGROUP, not an NT Domain, you need to set up one -Samba server to be the Domain Master Browser (note that this is not -the same as a Primary Domain Controller, although in an NT Domain the -same machine plays both roles). The role of a Domain Master Browser is -to collate the browse lists from Local Master Browsers on all the +in a workgroup, not an NT domain, you need to set up one +Samba server to be the DMB (note that this is not +the same as a Primary Domain Controller, although in an NT domain the +same machine plays both roles). The role of a DMB is +to collate the browse lists from LMB on all the subnets that have a machine participating in the workgroup. Without -one machine configured as a Domain Master Browser, each subnet would +one machine configured as a DMB, each subnet would be an isolated workgroup unable to see any machines on another -subnet. It is the presence of a Domain Master Browser that makes +subnet. It is the presence of a DMB that makes cross-subnet browsing possible for a workgroup. -In a 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, +In a workgroup environment the DMB must be a +Samba server, and there must only be one DMB per +workgroup name. To set up a Samba server as a DMB, set the following option in the section of the &smb.conf; file: @@ -618,10 +619,10 @@ of the &smb.conf; file: -The Domain Master Browser should preferably be the local master -browser for its own subnet. In order to achieve this, set the following +The DMB should preferably be the LMB +for its own subnet. In order to achieve this, set the following options in the section of the &smb.conf; -file as shown in the following example: +file as shown in Domain Master Browser smb.conf @@ -636,17 +637,17 @@ file as shown in the following example: -The Domain Master Browser may be the same machine as the WINS server, if necessary. +The DMB may be the same machine as the WINS server, if necessary. Next, you should ensure that each of the subnets contains a machine that can act as -a Local Master Browser for the workgroup. Any MS Windows NT/200x/XP machine should +an LMB for the workgroup. Any MS Windows NT/200x/XP machine should be able to do this, as will Windows 9x/Me machines (although these tend to get -rebooted more often, so it is not such a good idea to use these). To make a Samba -server a Local Master Browser set the following options in the +rebooted more often, so it is not such a good idea to use them). To make a Samba +server an LMB, set the following options in the section of the &smb.conf; file as -shown in following example: +shown in Local master browser smb.conf @@ -662,24 +663,25 @@ shown in following example: Do not do this for more than one Samba server on each subnet, or they will war with -each other over which is to be the Local Master Browser. +each other over which is to be the LMB. The parameter allows Samba to act as a -Local Master Browser. The causes nmbd +LMB. The causes nmbd to force a browser election on startup and the parameter sets Samba high enough so it should win any browser elections. -If you have an NT machine on the subnet that you wish to be the Local Master Browser, you can disable Samba from -becoming a Local Master Browser by setting the following options in the section of the -&smb.conf; file as shown in following example: +If you have an NT machine on the subnet that you wish to be the LMB, you can disable Samba from +becoming an LMB by setting the following options in the section of the +&smb.conf; file as shown in smb.conf for Not Being a Master Browser. + -smb.conf for not being a Master Browser +smb.conf for Not Being a Master Browser no @@ -688,23 +690,24 @@ becoming a Local Master Browser by setting the following options in the 0 + -DOMAIN Browsing Configuration +Domain Browsing Configuration -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 is also the Domain Master Browser for that domain. Network -browsing may break if a Samba server registers the domain master browser NetBIOS name (DOMAIN<1B>) +If you are adding Samba servers to a Windows NT domain, then you must not set up a Samba server as a DMB. +By default, a Windows NT PDC for a domain is also the DMB for that domain. Network +browsing may break if a Samba server registers the DMB NetBIOS name (DOMAIN<1B>) with WINS instead of the PDC. -For subnets other than the one containing the Windows NT PDC, you may set up Samba servers as Local Master Browsers as +For subnets other than the one containing the Windows NT PDC, you may set up Samba servers as LMBs as described. To make a Samba server a Local Master Browser, set the following options in the section -of the &smb.conf; file as shown in following example: +of the &smb.conf; file as shown in Local Master Browser smb.conf @@ -719,29 +722,30 @@ of the &smb.conf; file as shown in following example -If you wish to have a Samba server fight the election with machines on the same subnet you +If you wish to have a Samba server fight the election with machines on the same subnet, you may set the 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 refer to Forcing Samba to Be the Master section. +By doing this you can tune the order of machines that will become LMBs if +they are running. For more details on this, refer to Section 9.4.3, Forcing Samba to Be the Master. If you have Windows NT machines that are members of the domain on all subnets and you are sure they will always be running, you can disable Samba from taking part in browser elections -and ever becoming a Local Master Browser by setting the following options in the - section of the &smb.conf; file as shown in next example: +and ever becoming an LMB by setting the following options in the + section of the &smb.conf; file as shown in &smb.conf; +for Not Being a master browser + -&smb.conf; for not being a master browser - +&smb.conf; for Not Being a master browser no no no 0 - + @@ -757,36 +761,36 @@ elections to just about every Windows network server or client. If you want Samba to win elections, set the global option in &smb.conf; to a higher number. It defaults to 20. Using 34 would make it win -all elections every other system (except other samba systems). +all elections over every other system (except other Samba systems). An of two would make it beat Windows for Workgroups and Windows 9x/Me, but not MS Windows -NT/200x Server. An MS Windows NT/200x Server Domain Controller uses level 32. The maximum os level is 255. +NT/200x Server. An MS Windows NT/200x Server domain controller uses level 32. The maximum os level is 255. If you want Samba to force an election on startup, set the global option in &smb.conf; to yes. -Samba will then have a slight advantage over other potential master browsers that are not Preferred Master Browsers. -Use this parameter with care, as if you have two hosts (whether they are Windows 9x/Me or +Samba will then have a slight advantage over other potential master browsers that are not preferred master browsers. +Use this parameter with care, because if you have two hosts (whether they are Windows 9x/Me or NT/200x/XP or Samba) on the same local subnet both set with to yes, then periodically and continually they will force an election in order -to become the Local Master Browser. +to become the LMB. -If you want Samba to be a Domain Master Browser, then it is recommended that +If you want Samba to be a DMB, then it is recommended that you also set to yes, because -Samba will not become a Domain Master Browser for the whole of your LAN or WAN if it is not also a -Local Master Browser on its own broadcast isolated subnet. +Samba will not become a DMB for the whole of your LAN or WAN if it is not also a +LMB on its own broadcast isolated subnet. -It is possible to configure two Samba servers to attempt to become the Domain Master Browser for a domain. The first server that comes -up will be the Domain Master Browser. All other Samba servers will attempt to become the Domain Master Browser every five minutes. They -will find that another Samba server is already the domain master browser and will fail. This provides automatic redundancy, should -the current Domain Master Browser fail. +It is possible to configure two Samba servers to attempt to become the DMB for a domain. The first server that comes +up will be the DMB. All other Samba servers will attempt to become the DMB every 5 minutes. They +will find that another Samba server is already the DMB and will fail. This provides automatic redundancy should +the current DMB fail. @@ -796,20 +800,20 @@ the current Domain Master Browser fail. The domain master is responsible for collating the browse lists of multiple subnets so browsing can occur between subnets. You can -make Samba act as the Domain Master by setting yes -in &smb.conf;. By default it will not be a Domain Master. +make Samba act as the domain master by setting yes +in &smb.conf;. By default it will not be a domain master. -Do not set Samba to be the Domain Master for a workgroup that has the same name as an NT/200x Domain. -If Samba is configured to be the Domain Master for a workgroup that is present on the same +Do not set Samba to be the domain master for a workgroup that has the same name as an NT/200x domain. +If Samba is configured to be the domain master for a workgroup that is present on the same network as a Windows NT/200x domain that has the same name, network browsing problems will certainly be experienced. -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 +When Samba is the domain master and the master browser, it will listen for master +announcements (made roughly every 12 minutes) from LMBs on other subnets and then contact them to synchronize browse lists. @@ -828,7 +832,7 @@ clients are only using broadcasting to resolve NetBIOS names, then two things wi - Local Master Browsers will be unable to find a Domain Master Browser, as they will be looking only on the local subnet. + LMBs will be unable to find a DMB because they will be looking only on the local subnet. @@ -847,8 +851,8 @@ If, however, both Samba and your clients are using a WINS server, then: - 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, the Local Master Browser will receive Samba's IP address as its Domain Master Browser. + LMBs will contact the WINS server and, as long as Samba has registered that it is a DMB with the WINS + server, the LMB will receive Samba's IP address as its DMB. @@ -867,8 +871,8 @@ If, however, both Samba and your clients are using a WINS server, then: Note about Broadcast Addresses -If your network uses a 0 based broadcast address (for example, if it ends in a 0) then you will strike problems. Windows for Workgroups -does not seem to support a zeros broadcast and you will probably find that browsing and name lookups will not work. +If your network uses a zero-based broadcast address (for example, if it ends in a 0), then you will strike problems. Windows for Workgroups +does not seem to support a zeros broadcast, and you will probably find that browsing and name lookups will not work. @@ -901,8 +905,8 @@ where: LMBLocal Master Browser Local Master Browser - is either the LMB (Local Master Browser) IP address or the broadcast address of the remote network. - i.e., the LMB is at 192.168.1.10, or the address could be given as 192.168.1.255 where the netmask + is either the LMB IP address or the broadcast address of the remote network. + That is, the LMB is at 192.168.1.10, or the address could be given as 192.168.1.255 where the netmask is assumed to be 24 bits (255.255.255.0). When the remote announcement is made to the broadcast address of the remote network, every host will receive our announcements. This is noisy and therefore undesirable but may be necessary if we do not know the IP address of the remote LMB. @@ -939,7 +943,7 @@ The syntax of the parameter is: where a.b.c.d is either the IP address of the -remote LMB or else is the network broadcast address of the remote segment. +remote LMB or the network broadcast address of the remote segment. @@ -947,14 +951,14 @@ remote LMB or else is the network broadcast address of the remote segment. -WINS &smbmdash; The Windows Inter-networking Name Server +WINS: The Windows Internetworking Name Server Use of WINS (either Samba WINS or 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. It registers its name directly as a unique (the type 0x03) name. -It also registers its name if it is running the LanManager compatible +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. @@ -979,39 +983,39 @@ absence of WINS. -WINS also serves the purpose of forcing browse list synchronization by all -LMBs. LMBs must synchronize their browse list with the DMB (Domain Master -Browser) and WINS helps the LMB to identify its DMB. By definition this -will work only within a single workgroup. Note that the Domain Master Browser -has nothing to do with what is referred to as an MS Windows NT Domain. The -later is a reference to a security environment while the DMB refers to the +WINS also forces browse list synchronization by all +LMBs. LMBs must synchronize their browse list with the DMB, +and WINS helps the LMB to identify its DMB. By definition this +will work only within a single workgroup. Note that the DMB +has nothing to do with what is referred to as an MS Windows NT domain. The +latter is a reference to a security environment, while the DMB refers to the master controller for browse list information only. WINS will work correctly only if every client TCP/IP protocol stack -has been configured to use the WINS servers. Any client that has not been +is configured to use the WINS servers. Any client that is not configured to use the WINS server will continue to use only broadcast-based -name registration so WINS may never get to know about it. In any case, -machines that have not registered with a WINS server will fail name to address +name registration, so WINS may never get to know about it. In any case, +machines that have not registered with a WINS server will fail name-to-address lookup attempts by other clients and will therefore cause workstation access errors. -To configure Samba as a WINS server just add +To configure Samba as a WINS server, just add yes to the &smb.conf; file [global] section. -To configure Samba to register with a WINS server just add +To configure Samba to register with a WINS server, just add a.b.c.d to your &smb.conf; file section. -Never use both yes together +Never use yes together with a.b.c.d particularly not using its own IP address. Specifying both will cause &nmbd; to refuse to start! @@ -1020,8 +1024,8 @@ particularly not using its own IP address. Specifying both will cause &nmbd; to WINS Server Configuration -Either a Samba Server or a Windows NT Server machine may be set up -as a WINS server. To configure a Samba Server to be a WINS server you must +Either a Samba server or a Windows NT server machine may be set up +as a WINS server. To configure a Samba server to be a WINS server, you must add to the &smb.conf; file on the selected Server the following line to the section: @@ -1034,7 +1038,7 @@ the section: Versions of Samba prior to 1.9.17 had this parameter default to -yes. If you have any older versions of Samba on your network it is +yes. If you have any older versions of Samba on your network, it is strongly suggested you upgrade to a recent version, or at the very least set the parameter to no on all these machines. @@ -1055,7 +1059,7 @@ server. To configure Windows NT/200x Server as a WINS server, install and configure the WINS service. See the Windows NT/200x documentation for details. Windows NT/200x WINS servers can replicate to each other, allowing more -than one to be set up in a complex subnet environment. As Microsoft +than one to be set up in a complex subnet environment. Because Microsoft refuses to document the replication protocols, Samba cannot currently participate in these replications. It is possible in the future that a Samba-to-Samba WINS replication protocol may be defined, in which @@ -1097,9 +1101,9 @@ server acting as the WINS server itself. If you set both the There are two possible scenarios for setting up cross-subnet browsing. The first details setting up cross-subnet browsing on a network containing -Windows 9x/Me, Samba and Windows NT/200x machines that are not configured as -part of a Windows NT Domain. The second details setting up cross-subnet -browsing on networks that contain NT Domains. +Windows 9x/Me, Samba, and Windows NT/200x machines that are not configured as +part of a Windows NT domain. The second details setting up cross-subnet +browsing on networks that contain NT domains. @@ -1110,7 +1114,7 @@ browsing on networks that contain NT Domains. replicationWINS Samba-3 permits WINS replication through the use of the wrepld utility. -This tool is not currently capable of being used as it is still in active development. +This tool is not currently in use because it is still in active development. As soon as this tool becomes moderately functional, we will prepare man pages and enhance this section of the documentation to provide usage and technical details. @@ -1135,7 +1139,7 @@ Entries in wins.dat take the form of: 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 +addresses corresponding to the registration, and FLAGS are the NetBIOS flags for the registration. @@ -1145,7 +1149,7 @@ A typical dynamic entry looks like this: "MADMAN#03" 1055298378 192.168.1.2 66R -To make it static, all that has to be done is set the TTL to 0, like this: +To make it static, simply set the TTL to 0, like this: "MADMAN#03" 0 192.168.1.2 66R @@ -1165,7 +1169,7 @@ is added. Helpful Hints -The following hints should be carefully considered as they are stumbling points +The following hints should be carefully considered because they are stumbling points for many new network administrators. @@ -1185,20 +1189,20 @@ Do not use more than one protocol on MS Windows clients. 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 precedence for winning this election process. A machine running Samba or -Windows NT will be biased so the most suitable machine will predictably +Windows NT will be biased, so the most suitable machine will predictably win and thus retain its role. -The election process is fought out so to speak over every NetBIOS network +The election process is fought out over every NetBIOS network interface. In the case of a Windows 9x/Me machine that has both TCP/IP and IPX installed and has NetBIOS enabled over both protocols, the election will be decided over both protocols. As often happens, if the Windows 9x/Me machine is -the only one with both protocols then the LMB may be won on the NetBIOS -interface over the IPX protocol. Samba will then lose the LMB role as Windows +the only one with both protocols, then the LMB may be won on the NetBIOS +interface over the IPX protocol. Samba will then lose the LMB role because Windows 9x/Me will insist it knows who the LMB is. Samba will then cease to function -as an LMB and thus browse list operation on all TCP/IP-only machines will -fail. +as an LMB, and browse list operation on all TCP/IP-only machines will +therefore fail. @@ -1211,7 +1215,7 @@ the newer or extended protocol, these will fall back to the NT4 protocols. -The safest rule of all to follow is: use only one protocol! +The safest rule of all to follow is: Use only one protocol! @@ -1235,7 +1239,7 @@ are: Alternative means of name resolution include: -Static /etc/hosts &smbmdash; hard to maintain, and lacks name_type info. +Static /etc/hosts &smbmdash; hard to maintain and lacks name_type info. DNS &smbmdash; is a good choice but lacks essential name_type info. @@ -1252,7 +1256,7 @@ The syntax of the name resolve order parameter is: The default is: -host lmhost wins bcast +host lmhost wins bcast, where host refers to the native methods used by the UNIX system to implement the gethostbyname() function call. This is normally @@ -1266,9 +1270,9 @@ controlled by /etc/host.conf, /etc/nsswitch.conf< SMB networking provides a mechanism by which clients can access a list -of machines in a network, a so-called . This list +of machines in a network called . 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 +to other machines within the network. It therefore does not include machines that aren't currently able to do server tasks. The browse list is heavily used by all SMB clients. Configuration of SMB browsing has been problematic for some Samba users, hence this @@ -1296,22 +1300,22 @@ that cannot be provided by any other means of name resolution. Samba facilitates browsing. The browsing is supported by &nmbd; and is also controlled by options in the &smb.conf; file. -Samba can act as a local browse master for a workgroup and the ability +Samba can act as an LMB for a workgroup, and the ability to support domain logons and scripts is now available. -Samba can also act as a Domain Master Browser for a workgroup. This -means that it will collate lists from Local Master Browsers into a -wide area network server list. In order for browse clients to +Samba can also act as a DMB for a workgroup. This +means that it will collate lists from LMBs 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. -Do not set Samba to be the Domain Master for a workgroup that has the same -name as an NT Domain. On each wide area network, you must only ever have one -Domain Master Browser per workgroup, regardless of whether it is NT, Samba +Do not set Samba to be the domain master for a workgroup that has the same +name as an NT Domain. On each wide-area network, you must only ever have one +DMB per workgroup, regardless of whether it is NT, Samba, or any other type of domain master that is providing this service. @@ -1320,21 +1324,21 @@ or any other type of domain master that is providing this service. necessary to specifically use Samba as your WINS server. MS Windows NT4, Server or Advanced Server 200x can be configured as your WINS server. In a mixed NT/200x server and Samba environment on -a Wide Area Network, it is recommended that you use the Microsoft +a WAN, it is recommended that you use the Microsoft WINS server capabilities. In a Samba-only environment, it is recommended that you use one and only one Samba server as the WINS server.
-To get browsing to work you need to run nmbd as usual, but will need -to use the option in &smb.conf; +To get browsing to work, you need to run nmbd as usual, but must +use the option in &smb.conf; 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 +browsing on another subnet. It is recommended that this option is +used only for unusual purposes: announcements over the Internet, for example. See in the &smb.conf; man page. @@ -1353,13 +1357,13 @@ in text form in a file called browse.dat. If it does not work, you should still be able to type the server name as \\SERVER in filemanager, then -press enter and filemanager should display the list of available shares. +press enter, and filemanager should display the list of available shares. Some people find browsing fails because they do not have the global 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. +IPC$ connection that lists the shares is done as guest and so you must have a valid guest account. @@ -1373,7 +1377,7 @@ server resources. The other big problem people have is that their broadcast address, -netmask or IP address is wrong (specified with the option +netmask, or IP address is wrong (specified with the option in &smb.conf;) @@ -1403,19 +1407,19 @@ another subnet without using a WINS server. Remember, for browsing across subnets to work correctly, all machines, -be they Windows 95, Windows NT or Samba servers, must have the IP address -of a WINS server given to them by a DHCP server, or by manual configuration -(for Windows 9x/Me and Windows NT/200x/XP, this is in the TCP/IP Properties, under Network -settings); for Samba, this is in the &smb.conf; file. +be they Windows 95, Windows NT, or Samba servers, must have the IP address +of a WINS server given to them by a DHCP server or by manual configuration: +for Windows 9x/Me and Windows NT/200x/XP, this is in the TCP/IP Properties, under Network +settings; for Samba, this is in the &smb.conf; file. Behavior of Cross-Subnet Browsing -Cross-subnet Browsing is a complicated dance, containing multiple +Cross-subnet browsing is a complicated dance, containing multiple moving parts. It has taken Microsoft several years to get the code -that achieves this correct, and Samba lags behind in some areas. +that correctly achieves this, and Samba lags behind in some areas. Samba is capable of cross-subnet browsing when configured correctly. @@ -1429,31 +1433,30 @@ Consider a network set up as in Cross-Subnet Browsing
-This consists of 3 subnets (1, 2, 3) connected by two routers -(R1, R2) which do not pass broadcasts. Subnet 1 has five machines -on it, subnet 2 has four machines, subnet 3 has four machines. Assume +This consists of three subnets (1, 2, 3) connected by two routers +(R1, R2), which do not pass broadcasts. Subnet 1 has five machines +on it, subnet 2 has four machines, and subnet 3 has four machines. Assume for the moment that all machines are configured to be in the same workgroup (for simplicity's sake). Machine N1_C on subnet 1 -is configured as Domain Master Browser (i.e., it will collate the +is configured as the DMB (i.e., 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 +a WINS server, and all the other machines are configured to register their NetBIOS names with it. As these machines are booted up, elections for master browsers -will take place on each of the three subnets. Assume that machine +take place on each of the three subnets. Assume that machine N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on -subnet 3. These machines are known as Local Master Browsers for +subnet 3. These machines are known as LMBs for their particular subnet. N1_C has an advantage in winning as the -Local Master Browser on subnet 1 as it is set up as Domain Master -Browser. +LMB on subnet 1 because it is set up as DMB. On each of the three networks, machines that are configured to offer sharing services will broadcast that they are offering -these services. The Local Master Browser on each subnet will +these services. The LMB on each subnet will receive these broadcasts and keep a record of the fact that the machine is offering a service. This list of records is the basis of the browse list. For this case, assume that @@ -1462,19 +1465,19 @@ will be on the browse list. -For each network, the Local Master Browser on that network is -considered authoritative for all the names it receives via -local broadcast. This is because a machine seen by the Local Master -Browser via a local broadcast must be on the same network as the -Local Master Browser and thus is a trusted -and verifiable resource. Machines on other networks that -the Local Master Browsers learn about when collating their +For each network, the LMB on that network is +considered authoritative for all the names it receives via +local broadcast. This is because a machine seen by the LMB +via a local broadcast must be on the same network as the +Local Master Browser and thus is a trusted +and verifiable resource. Machines on other networks that +the LMBs learn about when collating their browse lists have not been directly seen. These records are -called non-authoritative. +called non-authoritative. -At this point the browse lists appear as shown in the next example (these are +At this point the browse lists appear as shown in Browse Subnet Example 1 (these are the machines you would see in your network neighborhood if you looked in it on a particular network right now). @@ -1500,24 +1503,24 @@ At this point all the subnets are separate, and no machine is seen across any of
-Now examine subnet 2. As soon as N2_B has become the Local -Master Browser it looks for a Domain Master Browser with which to synchronize +Now examine subnet 2 in Browse Subnet Example 2. +As soon as N2_B has become the LMB, it looks for a DMB with which to synchronize its browse list. It does this by querying the WINS server (N2_D) for the IP address associated with the NetBIOS name -WORKGROUP<1B>. This name was registered by the Domain Master -Browser (N1_C) with the WINS server as soon as it was started. +WORKGROUP<1B>. This name was registered by the DMB +(N1_C) with the WINS server as soon as it was started. -Once N2_B knows the address of the Domain Master Browser, it -tells it that is the Local Master Browser for subnet 2 by +Once N2_B knows the address of the DMB, it +tells it that is the LMB for subnet 2 by sending a MasterAnnouncement packet as a UDP port 138 packet. It then synchronizes with it by doing a NetServerEnum2 call. This -tells the Domain Master Browser to send it all the server -names it knows about. Once the Domain Master Browser receives +tells the DMB to send it all the server +names it knows about. Once the DMB receives the MasterAnnouncement packet, it schedules a synchronization request to the sender of that packet. After both synchronizations -are complete the browse lists look as shown in following example: +are complete, the browse lists look like those in Browse Subnet Example 2 @@ -1545,18 +1548,18 @@ Servers with an (*) after them are non-authoritative names. -At this point users looking in their network neighborhood on -subnets 1 or 2 will see all the servers on both, users on -subnet 3 will still only see the servers on their own subnet. +At this point users looking in their Network Neighborhood on +subnets 1 or 2 will see all the servers on both; users on +subnet 3 will still see only the servers on their own subnet. The same sequence of events that occurred for N2_B now occurs -for the Local Master Browser on subnet 3 (N3_D). When it -synchronizes browse lists with the Domain Master Browser (N1_A) -it gets both the server entries on subnet 1, and those on +for the LMB on subnet 3 (N3_D). When it +synchronizes browse lists with the DMB (N1_A) +it gets both the server entries on subnet 1 and those on subnet 2. After N3_D has synchronized with N1_C and vica versa, -the browse lists will appear as shown in following example. +the browse lists will appear as shown in Browse Subnet Example 3
@@ -1586,17 +1589,17 @@ Servers with an (*) after them are non-authoritative names. -At this point, users looking in their network neighborhood on +At this point, users looking in their Network Neighborhood on subnets 1 or 3 will see all the servers on all subnets, while users on -subnet 2 will still only see the servers on subnets 1 and 2, but not 3. +subnet 2 will still see only the servers on subnets 1 and 2, but not 3. -Finally, the Local Master Browser for subnet 2 (N2_B) will sync again -with the Domain Master Browser (N1_C) and will receive the missing +Finally, the LMB for subnet 2 (N2_B) will sync again +with the DMB (N1_C) and will receive the missing server entries. Finally, as when a steady state (if no machines are removed or shut off) has been achieved, the browse lists will appear -as shown in example below. +as shown in Browse Subnet Example 4.
@@ -1629,9 +1632,9 @@ Servers with an (*) after them are non-authoritative names. -Synchronizations between the Domain Master Browser and Local -Master Browsers will continue to occur, but this should remain a -steady state operation. +Synchronizations between the DMB and LMBs +will continue to occur, but this should remain a +steady-state operation. @@ -1642,7 +1645,7 @@ If either router R1 or R2 fails, the following will occur: Names of computers on each side of the inaccessible network fragments - will be maintained for as long as 36 minutes in the network neighborhood + will be maintained for as long as 36 minutes in the Network Neighborhood lists. @@ -1650,7 +1653,7 @@ If either router R1 or R2 fails, the following will occur: Attempts to connect to these inaccessible computers will fail, but the - names will not be removed from the network neighborhood lists. + names will not be removed from the Network Neighborhood lists. @@ -1658,7 +1661,7 @@ If either router R1 or R2 fails, the following will occur: If one of the fragments is cut off from the WINS server, it will only be able to access servers on its local subnet using subnet-isolated - broadcast NetBIOS name resolution. The effects are similar to that of + broadcast NetBIOS name resolution. The effect is similar to that of losing access to a DNS server. @@ -1683,10 +1686,10 @@ particular note. flush name cache 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. This does not make certain that a rogue machine name will not re-appear +to be rebuilt. This does not make certain that a rogue machine name will not reappear 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 -want to clear a rogue machine from the list, every machine on the network will need to be +become the browse master. This new list may still have the rogue entry in it. If you really +want to clear a rogue machine from the list, every machine on the network must be shut down and restarted after all machines are down. Failing a complete restart, the only other thing you can do is wait until the entry times out and is then flushed from the list. This may take a long time on some networks (perhaps months). @@ -1695,9 +1698,9 @@ This may take a long time on some networks (perhaps months). - Server Resources Can Not Be Listed + Server Resources Cannot Be Listed -My Client Reports This server is not configured to list shared resources +My Client Reports "This server is not configured to list shared resources." @@ -1711,18 +1714,18 @@ valid. - I get an <errorname>`Unable to browse the network'</errorname> error + I Get an "<errorname>Unable to browse the network</errorname>" Error This error can have multiple causes: browsing problems - There is no Local Master Browser. Configure &nmbd; - or any other machine to serve as Local Master Browser. - You cannot log onto the machine that is the local master - browser. Can you logon to it as a guest user? - There is no IP connectivity to the Local Master Browser. + There is no LMB. Configure &nmbd; + or any other machine to serve as LMB. + You cannot log onto the machine that is the LMB. + Can you log on to it as a guest user? + There is no IP connectivity to the LMB. Can you reach it by broadcast? @@ -1732,16 +1735,16 @@ valid. slow browsing -There are only two machines on a test network. One a Samba server, the other a Windows XP machine. +There are only two machines on a test network. One is a Samba server, the other a Windows XP machine. Authentication and logons work perfectly, but when I try to explore shares on the Samba server, the Windows XP client becomes unresponsive. Sometimes it does not respond for some minutes. Eventually, Windows Explorer will respond and displays files and directories without problem. -display file and directory. + But, the share is immediately available from a command shell (cmd, followed by -exploration with dos command. Is this a Samba problem or is it a Windows problem? How can I solve this? +exploration with DOS command. Is this a Samba problem, or is it a Windows problem? How can I solve this? @@ -1754,8 +1757,8 @@ Here are a few possibilities: bad hardware WebClient - Most common defective hardware problems center around low cost or defective HUBs, routers, - Network Interface Controllers (NICs) and bad wiring. If one piece of hardware is defective + Most common defective hardware problems center around low cost or defective hubs, routers, + network interface controllers (NICs), and bad wiring. If one piece of hardware is defective, the whole network may suffer. Bad networking hardware can cause data corruption. Most bad networking hardware problems are accompanied by an increase in apparent network traffic, but not all. @@ -1767,7 +1770,7 @@ Here are a few possibilities: A number of sites have reported similar slow network browsing problems and found that when the WebClient service is turned off, the problem disappears. This is certainly something - that should be explored as it is a simple solution &smbmdash; if it works. + that should be explored because it is a simple solution &smbmdash; if it works. @@ -1775,11 +1778,11 @@ Here are a few possibilities: Inconsistent WINS Configuration This type of problem is common when one client is configured to use a WINS server (that is - a TCP/IP configuration setting) and there is no WINS server on the network. Alternately, - this will happen is there is a WINS server and Samba is not configured to use it. The use of + a TCP/IP configuration setting) and there is no WINS server on the network. Alternatively, + this will happen if there is a WINS server and Samba is not configured to use it. The use of WINS is highly recommended if the network is using NetBIOS over TCP/IP protocols. If use of NetBIOS over TCP/IP is disabled on all clients, Samba should not be configured as a WINS - server neither should it be configured to use one. + server, nor should it be configured to use one. @@ -1787,7 +1790,8 @@ Here are a few possibilities: Incorrect DNS Configuration If use of NetBIOS over TCP/IP is disabled, Active Directory is in use and the DNS server - has been incorrectly configured. Refer DNS and Active Directory for more information. + has been incorrectly configured. For further information refer to + DNS and Active Directory. diff --git a/docs/Samba3-HOWTO/TOSHARG-PAM.xml b/docs/Samba3-HOWTO/TOSHARG-PAM.xml index 82c006f271..dc405cd1a9 100644 --- a/docs/Samba3-HOWTO/TOSHARG-PAM.xml +++ b/docs/Samba3-HOWTO/TOSHARG-PAM.xml @@ -16,8 +16,8 @@ This chapter 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 +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. @@ -38,16 +38,16 @@ Please refer to Winbind: Use of Domain Accounts, A number of UNIX systems (e.g., 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 +authorization, and resource control services. Prior to the introduction of PAM, a decision to use an alternative to the system password database (/etc/passwd) would require the provision of alternatives for all programs that provide security services. -Such a choice would involve provision of alternatives to programs such as: login, +Such a choice would involve provision of alternatives to programs such as login, passwd, chown, and so on. PAM provides a mechanism that disconnects these security programs from the underlying -authentication/authorization infrastructure. PAM is configured by making appropriate modifications to one file +authentication/authorization infrastructure. PAM is configured by making appropriate modifications to one file, /etc/pam.conf (Solaris), or by editing individual control files that are located in /etc/pam.d. @@ -55,7 +55,7 @@ located in /etc/pam.d. 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 centralized on a +are available for it. The backend may be local to the system or may be centralized on a remote server. @@ -67,14 +67,14 @@ PAM support modules are available for: /etc/passwd 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 + database. The most common are called pam_unix.so, pam_unix2.so, pam_pwdb.so and pam_userdb.so. Kerberos - The pam_krb5.so module allows the use of any Kerberos compliant server. + 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). @@ -82,9 +82,9 @@ PAM support modules are available for: LDAP - 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. + 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, and Microsoft Active Directory. @@ -97,7 +97,7 @@ PAM support modules are available for: SMB Password - This module, called pam_smbpass.so, will allow user authentication off + This module, called pam_smbpass.so, allows user authentication of the passdb backend that is configured in the Samba &smb.conf; file. @@ -112,7 +112,7 @@ PAM support modules are available for: Winbind 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 + MS Windows domain controller. It can just as easily be used to authenticate users for access to any PAM-enabled application. @@ -120,7 +120,7 @@ PAM support modules are available for: RADIUS There is a PAM RADIUS (Remote Access Dial-In User Service) authentication - module. In most cases, administrators will need to locate the source code + module. In most cases, administrators 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. @@ -128,12 +128,12 @@ PAM support modules are available for: -Of the above, Samba provides the pam_smbpasswd.so and the pam_winbind.so modules alone. +Of the modules listed, Samba provides the pam_smbpasswd.so and the pam_winbind.so modules alone. Once configured, these permit a remarkable level of flexibility in the location and use -of distributed Samba Domain Controllers that can provide wide area network bandwidth +of distributed Samba domain controllers that can provide wide-area 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. @@ -145,10 +145,10 @@ single-user account database. Technical Discussion -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 +PAM is designed to provide system administrators 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 +either the single system file /etc/pam.conf or the /etc/pam.d/ directory. @@ -158,15 +158,15 @@ either the single system file, /etc/pam.conf, or the 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 +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. +The case sensitivity of the arguments to any given module is defined for each module in turn. 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. +module specification lines may be extended with a \-escaped newline. @@ -188,7 +188,7 @@ auth required /other_path/pam_strange_module.so The remaining information in this subsection was taken from the documentation of the Linux-PAM project. For more information on PAM, see -The Official Linux-PAM home page. +the Official Linux-PAM home page. @@ -202,22 +202,22 @@ service-name module-type control-flag module-path args -Below, we explain the meaning of each of these tokens. The second (and more recently adopted) +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 /etc/pam.d/ directory. -Once we have explained the meaning of the above tokens, we will describe this method. +Once we have explained the meaning of the tokens, we describe this method. service-name - 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 + The name of the service associated with this entry. Frequently, the service-name is the conventional + name of the given application &smbmdash; for example, ftpd, rlogind and su, and so on. 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. + the name OTHER and may be specified in either lower- or uppercase characters. Note, when there is a module specified for a named service, the OTHER entries are ignored. @@ -232,30 +232,30 @@ Once we have explained the meaning of the above tokens, we will describe this me auth: This module type provides two aspects of authenticating the user. - It establishes that the user is who he claims 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 /etc/groups file discussed - above) or other privileges through its credential granting properties. + It establishes that the user is who he or she claims to be by instructing the application + to prompt the user for a password or other means of identification. Second, the module can + grant group membership (independently of the /etc/groups file) + or other privileges through its credential-granting properties. account: 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. + available system resources (maximum number of users), or perhaps the location of the user + login. For example, the root login may be permitted only on the console. session: Primarily, this module is associated with doing things that need - to be done for the user before and after they can be given service. Such things include the logging - of information concerning the opening and closing of some data exchange with a user, mounting + to be done for the user before and after he or she can be given service. Such things include logging + information concerning the opening and closing of some data exchange with a user, mounting directories, and so on. password: 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. + token associated with the user. Typically, there is one module for each + challenge/response-based authentication (auth) module type. @@ -276,7 +276,8 @@ Once we have explained the meaning of the above tokens, we will describe this me 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 - keywords: required, requisite, sufficient and optional. + keywords: required, requisite, + sufficient, and optional. @@ -291,7 +292,7 @@ Once we have explained the meaning of the above tokens, we will describe this me - requisite: Like required, however, in the case that such a module returns a + requisite: Like required, except that if 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. 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 @@ -314,13 +315,13 @@ Once we have explained the meaning of the above tokens, we will describe this me 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. + this latter case is when the other modules return something like PAM_IGNORE. 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 + 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: @@ -342,12 +343,13 @@ Once we have explained the meaning of the above tokens, we will describe this me - The last of these (default) can be used to set the action for those return values that are not explicitly defined. + The last of these (default) can be used to set the action for those return values that are not explicitly defined. The action1 can be a positive integer or one of the following tokens: - ignore; ok; done; bad; die; and reset. + 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 @@ -375,7 +377,7 @@ Once we have explained the meaning of the above tokens, we will describe this me ok: 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 + this value. Note, if the former state of the stack holds some value that is indicative of a module's failure, this ok value will not be used to override that value. @@ -391,7 +393,7 @@ Once we have explained the meaning of the above tokens, we will describe this me - Each of the four keywords: required; requisite; sufficient; and optional, + Each of the four keywords, required; requisite; sufficient; and optional, have an equivalent expression in terms of the [...] syntax. They are as follows: @@ -417,26 +419,26 @@ Once we have explained the meaning of the above tokens, we will describe this me 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 + the notion of client plug-in agents was introduced. This makes it possible for PAM to support machine-machine authentication using the transport protocol inherent to the client/server application. With the [ ... value=action ... ] 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. + to support binary prompts with compliant clients, but to gracefully fail over into an alternative authentication + mode for legacy applications. module-path - The path-name of the dynamically loadable object file; the pluggable module itself. If the first character of the + The pathname 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: /lib/security (but see the notes above). + to the default module path: /lib/security (but see the previous notes). The arguments 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 + 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. @@ -452,7 +454,7 @@ user_name=%u and password=PASSWORD(%p) and service When using this convention, you can include [ characters inside the string, and if you wish to have a ] - character inside the string that will survive the argument parsing, you should use \[. In other words: + character inside the string that will survive the argument parsing, you should use \[. In other words, @@ -479,7 +481,7 @@ user_name=%u and password=PASSWORD(%p) and service The following is an example /etc/pam.d/login configuration file. This example had all options uncommented and is probably not usable because it stacks many conditions before allowing successful completion -of the login process. Essentially all conditions can be disabled +of the login process. Essentially, all conditions can be disabled by commenting them out, except the calls to pam_pwdb.so. @@ -536,10 +538,10 @@ the pam_pwdb.so module that uses the system password database (/etc/passwd, /etc/shadow, /etc/group) with the module pam_smbpass.so, which uses the Samba -database which contains the Microsoft MD4 encrypted password -hashes. This database is stored in either +database containing the Microsoft MD4 encrypted password +hashes. This database is stored either in /usr/local/samba/private/smbpasswd, -/etc/samba/smbpasswd, or in +/etc/samba/smbpasswd or in /etc/samba.d/smbpasswd, depending on the Samba implementation for your UNIX/Linux system. The pam_smbpass.so module is provided by @@ -607,7 +609,7 @@ provide the pam_stack.so module that allows all authentication to be configured in a single central file. The pam_stack.so method has some devoted followers on the basis that it allows for easier administration. As with all issues in -life though, every decision makes trade-offs, so you may want to examine the +life, though, every decision has trade-offs, so you may want to examine the PAM documentation for further helpful information. @@ -619,10 +621,11 @@ PAM documentation for further helpful information. &smb.conf; PAM Configuration - There is an option in &smb.conf; called . -The following is from the online help for this option in SWAT; +There is an option in &smb.conf; called . +The following is from the online help for this option in SWAT: +
When Samba is configured to enable PAM support (i.e., ), this parameter will control whether or not Samba should obey PAM's account and session management directives. The default behavior @@ -633,6 +636,7 @@ password encryption. Default: no +
@@ -640,9 +644,9 @@ password encryption. Remote CIFS Authentication Using <filename>winbindd.so</filename> -All operating systems depend on the provision of users credentials acceptable to the platform. +All operating systems depend on the provision of user 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 +These are both simple integer numbers that are obtained from a password backend such as /etc/passwd. @@ -654,7 +658,7 @@ is one of the jobs that winbind performs.
-As Winbind users and groups are resolved from a server, user and group IDs are allocated +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 @@ -663,11 +667,11 @@ lock directory and will be remembered. The astute administrator will realize from this that the combination of pam_smbpass.so, -winbindd and a distributed , -such as ldap, will allow the establishment of a centrally managed, distributed user/password +winbindd, and a distributed +such as ldap will allow the establishment of a centrally managed, distributed user/password database that can also be used by all PAM-aware (e.g., Linux) programs and applications. This arrangement can have -particularly potent advantages compared with the use of Microsoft Active Directory Service (ADS) in so far as -the reduction of wide area network authentication traffic. +particularly potent advantages compared with the use of Microsoft Active Directory Service (ADS) insofar as +the reduction of wide-area network authentication traffic. @@ -684,8 +688,8 @@ to determine which user and group IDs correspond to Windows NT user and group RI pam_smbpass is a PAM module that can be used on conforming systems to keep the smbpasswd (Samba password) database in sync with the UNIX -password file. PAM (Pluggable Authentication Modules) is an API supported -under some UNIX operating systems, such as Solaris, HPUX and Linux, that provides a +password file. PAM is an API supported +under some UNIX operating systems, such as Solaris, HPUX, and Linux, that provides a generic interface to authentication mechanisms. @@ -704,25 +708,25 @@ Options recognized by this module are shown in ne - debuglog more debugging info. - auditlike debug, but also logs unknown usernames. - use_first_passdo not prompt the user for passwords; take them from PAM_ items instead. - try_first_passtry to get the password from a previous PAM module fall back to prompting the user. + debugLog more debugging info. + auditLike debug, but also logs unknown usernames. + use_first_passDo not prompt the user for passwords; take them from PAM_ items instead. + try_first_passTry 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_passdo not make passwords used by this module available to other modules. - nodelaydo not insert ~1 second delays on authentication failure. - nulloknull passwords are allowed. - nonullnull passwords are not allowed. Used to override the Samba configuration. - migrateonly meaningful in an auth context; used to update smbpasswd file with a password used for successful authentication. - smbconf=filespecify an alternate path to the &smb.conf; file. + Like try_first_pass, but *fail* if the new PAM_AUTHTOK has not been previously set (intended for stacking password modules only). + not_set_passDo not make passwords used by this module available to other modules. + nodelaydDo not insert ~1-second delays on authentication failure. + nulloknNull passwords are allowed. + nonullNull passwords are not allowed. Used to override the Samba configuration. + migrateoOnly meaningful in an auth context; used to update smbpasswd file with a password used for successful authentication. + smbconf=fileSpecify an alternate path to the &smb.conf; file.
-The following are examples of the use of pam_smbpass.so in the format of Linux +The following are examples of the use of pam_smbpass.so in the format of the Linux /etc/pam.d/ files structure. Those wishing to implement this tool on other platforms will need to adapt this appropriately. @@ -731,9 +735,9 @@ tool on other platforms will need to adapt this appropriately. Password Synchronization Configuration -A sample PAM configuration that shows the use of pam_smbpass to make +The following is a sample PAM configuration that shows the use of pam_smbpass to make sure private/smbpasswd is kept in sync when /etc/passwd (/etc/shadow) -is changed. Useful when an expired password might be changed by an +is changed. It is useful when an expired password might be changed by an application (such as ssh). @@ -756,7 +760,7 @@ session required pam_unix.so Password Migration Configuration -A sample PAM configuration that shows the use of pam_smbpass to migrate +The following PAM configuration shows the use of pam_smbpass to migrate from plaintext to encrypted passwords for Samba. Unlike other methods, this can be used for users who have never connected to Samba shares: password migration takes place when users ftp in, login using ssh, pop @@ -784,7 +788,7 @@ session required pam_unix.so Mature Password Configuration -A sample PAM configuration for a mature smbpasswd installation. +The following is a sample PAM configuration for a mature smbpasswd installation. private/smbpasswd is fully populated, and we consider it an error if the SMB password does not exist or does not match the UNIX password. @@ -808,7 +812,7 @@ session required pam_unix.so Kerberos Password Integration Configuration -A sample PAM configuration that shows pam_smbpass used together with +The following is a sample PAM configuration that shows pam_smbpass used together with pam_krb5. This could be useful on a Samba PDC that is also a member of a Kerberos realm. @@ -842,12 +846,11 @@ PAM can be fickle and sensitive to configuration glitches. Here we look at a few the Samba mailing list. - pam_winbind Problem - A user reported: I have the following PAM configuration: + A user reported, I have the following PAM configuration: @@ -864,17 +867,17 @@ password required /lib/security/pam_stack.so service=system-auth - When I open a new console with [ctrl][alt][F1], I can't log in with my user pitie. - I have tried with user scienceu\pitie also. + When I open a new console with [ctrl][alt][F1], I can't log in with my user pitie. + I have tried with user scienceu\pitie also. - Answer: The problem may lie with your inclusion of pam_stack.so + The problem may lie with the inclusion of pam_stack.so service=system-auth. That file often contains a lot of stuff that may duplicate what you are already doing. Try commenting out the pam_stack lines for auth and account and see if things work. If they do, look at /etc/pam.d/system-auth and copy only what you need from it into your - /etc/pam.d/login file. Alternately, if you want all services to use + /etc/pam.d/login file. Alternatively, if you want all services to use Winbind, you can put the Winbind-specific stuff in /etc/pam.d/system-auth. @@ -886,8 +889,8 @@ password required /lib/security/pam_stack.so service=system-auth My &smb.conf; file is correctly configured. I have specified - 12000, - and 3000-3500 + 12000 + and 3000-3500, and winbind is running. When I do the following it all works fine. @@ -926,7 +929,7 @@ chown: 'maryo': invalid user - Answer: Your system is likely running nscd, the name service + Your system is likely running nscd, the name service caching daemon. Shut it down, do not restart it! You will find your problem resolved. diff --git a/docs/Samba3-HOWTO/TOSHARG-PDC.xml b/docs/Samba3-HOWTO/TOSHARG-PDC.xml index e28de99470..7cd744767f 100644 --- a/docs/Samba3-HOWTO/TOSHARG-PDC.xml +++ b/docs/Samba3-HOWTO/TOSHARG-PDC.xml @@ -14,22 +14,22 @@ There are many who approach MS Windows networking with incredible misconceptions. That's okay, 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 +Those who really want help are well advised to become familiar with information that is already available. -The reader is advised not to tackle this section without having first understood +You are advised not to tackle this section without having first understood and mastered some basics. MS Windows networking is not particularly forgiving of -mis-configuration. Users of MS Windows networking are likely to complain +misconfiguration. Users of MS Windows networking are likely to complain of persistent niggles that may be caused by a broken network configuration. -To a great many people, however, MS Windows networking starts with a Domain Controller +To a great many people, however, MS Windows networking starts with a domain controller that in some magical way is expected to solve all network operational ills. -The diagram shows a typical MS Windows Domain Security -network environment. Workstations A, B and C are representative of many physical MS Windows +The Example Domain illustration shows a typical MS Windows domain security +network environment. Workstations A, B, and C are representative of many physical MS Windows network clients. @@ -38,10 +38,8 @@ network clients. domain
- - -From the Samba mailing list one can readily identify many common networking issues. +From the Samba mailing list we 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: @@ -69,7 +67,7 @@ organization. Where is the right place to make mistakes? Only out of harms way. If you are going to -make mistakes, then please do it on a test network, away from users and in such a way as +make mistakes, then please do it 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. @@ -82,29 +80,29 @@ to not inflict pain on others. Do your learning on a test network. -In a word, Single Sign On, or SSO for short. To many, this is the Holy +In a word, single sign-on, 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) -and they will be able to log onto the network and access resources (shares, files and printers) -as if they are sitting at their home (personal) workstation. This is a feature of the Domain -Security protocols. +and they will be able to log onto the network and access resources (shares, files, and printers) +as if they are sitting at their home (personal) workstation. This is a feature of the domain +security protocols. SID -The benefits of Domain Security are available to those sites that deploy a Samba PDC. -A Domain provides a unique network security identifier (SID). Domain user and group security +The benefits of domain security are available to those sites that deploy a Samba PDC. +A domain provides a unique network security identifier (SID). Domain user and group security identifiers are comprised of the network SID plus a relative identifier (RID) that is unique to -the account. User and Group SIDs (the network SID plus the RID) can be used to create Access Control -Lists (ACLs) attached to network resources to provide organizational access control. UNIX systems +the account. User and group SIDs (the network SID plus the RID) can be used to create access control +lists (ACLs) attached to network resources to provide organizational access control. UNIX systems recognize only local security identifiers. -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 +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). Refer to Domain Membership for more information. @@ -129,12 +127,12 @@ The following functionalities are new to the Samba-3 release: Introduces replaceable and multiple user account (authentication) backends. In the case where the backend is placed in an LDAP database, - Samba-3 confers the benefits of a backend that can be distributed, replicated + Samba-3 confers the benefits of a backend that can be distributed and replicated and is highly scalable. - Implements full Unicode support. This simplifies cross locale internationalization + Implements full Unicode support. This simplifies cross-locale internationalization 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. @@ -147,17 +145,17 @@ The following functionalities are not provided by Samba-3: SAM replication - SAM replication with Windows NT4 Domain Controllers - (i.e., a Samba PDC and a Windows NT BDC or vice versa). This means Samba + SAM replication with Windows NT4 domain controllers + (i.e., a Samba PDC and a Windows NT BDC, or vice versa). This means Samba cannot operate as a BDC when the PDC is Microsoft-based or replicate account data to Windows BDCs. - Acting as a Windows 2000 Domain Controller (i.e., Kerberos and + Acting as a Windows 2000 domain controller (i.e., Kerberos and Active Directory). In point of fact, Samba-3 does have some - Active Directory Domain Control ability that is at this time - purely experimental that is certain to change as it becomes a + Active Directory domain control ability that is at this time + purely experimental. That is certain to change as it becomes a fully supported feature some time during the Samba-3 (or later) life cycle. However, Active Directory is more then just SMB &smbmdash; it's also LDAP, Kerberos, DHCP, and other protocols (with proprietary @@ -165,34 +163,34 @@ The following functionalities are not provided by Samba-3: - The Windows 200x/XP MMC (Computer Management) Console can not be used + The Windows 200x/XP Microsoft Management Console (MMC) cannot be used to manage a Samba-3 server. For this you can use only the MS Windows NT4 - Domain Server manager and the MS Windows NT4 Domain User Manager. Both are + Domain Server Manager and the MS Windows NT4 Domain User Manager. Both are part of the SVRTOOLS.EXE package mentioned later. Windows 9x/Me/XP Home clients are not true members of a domain for reasons outlined -in this chapter. The protocol for support of Windows 9x/Me style network (domain) logons -is completely different from NT4/Windows 200x type domain logons and has been officially supported -for some time. These clients use the old LanMan Network Logon facilities that are supported +in this chapter. The protocol for support of Windows 9x/Me-style network (domain) logons +is completely different from NT4/Windows 200x-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. Samba-3 implements 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 Group Mapping &smbmdash; MS Windows and UNIX. +discussed more fully in Group Mapping: MS Windows and UNIX. Machine Trust Accounts -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. -Refer to MS Windows Workstation/Server Machine Trust Accounts. With Samba-3 there can be multiple -backends for this. A complete discussion of account database backends can be found in -Account Information Databases. +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. Refer to MS +Windows Workstation/Server Machine Trust Accounts. With Samba-3 there can be multiple backends for +this. A complete discussion of account database backends can be found in Account +Information Databases. @@ -201,9 +199,9 @@ backends for this. A complete discussion of account database backends can be fou Basics 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. +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. @@ -216,34 +214,34 @@ there are three basic types of Domain Controllers. -The Primary Domain Controller or PDC plays an important role in MS -Windows NT4. In Windows 200x Domain Control architecture, this role is held by Domain Controllers. -Folklore dictates that because of its role in the MS Windows -network, the Domain Controller should be the most powerful and most capable machine in the network. -As strange as it may seem to say this here, good overall network performance dictates that -the entire infrastructure needs to be balanced. It is advisable to invest more in Stand-alone -(Domain Member) servers than in the Domain Controllers. +The Primary Domain Controller or PDC plays an important role in MS Windows NT4. In +Windows 200x domain control architecture, this role is held by domain controllers. Folklore dictates that +because of its role in the MS Windows network, the domain controller should be the most powerful and most +capable machine in the network. As strange as it may seem to say this here, good overall network performance +dictates that the entire infrastructure needs to be balanced. It is advisable to invest more in standalone +(domain member) servers than in the domain controllers. SAM -In the case of MS Windows NT4-style domains, it is the PDC that initiates a new Domain Control database. +In the case of MS Windows NT4-style domains, it is the PDC that initiates a new domain control database. This forms a part of the Windows registry called the Security Account Manager (SAM). It plays a key part in NT4-type domain user authentication and in synchronization of the domain authentication -database with Backup Domain Controllers. +database with BDCs. -With MS Windows 200x Server-based Active Directory domains, one Domain Controller initiates a potential -hierarchy of Domain Controllers, each with their own area of delegated control. The master domain -controller has the ability to override any downstream controller, but a down-line controller has -control only over its down-line. With Samba-3, this functionality can be implemented using an +With MS Windows 200x Server-based Active Directory domains, one domain controller initiates a potential +hierarchy of domain controllers, each with its own area of delegated control. The master domain +controller has the ability to override any downstream controller, but a downline controller has +control only over its downline. With Samba-3, this functionality can be implemented using an LDAP-based user and machine account backend. -New to Samba-3 is the ability to use a backend database that holds the same type of data as -the NT4-style SAM database (one of the registry files)See also Account Information Databases.. +New to Samba-3 is the ability to use a backend database that holds the same type of data as the NT4-style SAM +database (one of the registry files)See also Account Information +Databases.. @@ -253,51 +251,52 @@ On a network segment that has a BDC and a PDC, the BDC will most likely service 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 online 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 also need to be made. +operation; the PDC and BDC must be manually configured, and changes also need to be made. With MS Windows NT4, a decision is made at installation to determine what type of machine the server will be. -It is possible to promote a BDC to a PDC and vice versa. 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: +It is possible to promote a BDC to a PDC, and vice versa. The only way to convert a domain controller to a +domain member server or a standalone server is to reinstall it. The install time choices offered are: Primary Domain Controller &smbmdash; the one that seeds the domain SAM. Backup Domain Controller &smbmdash; one that obtains a copy of the domain SAM. - Domain Member Server &smbmdash; one that has no copy of the domain SAM, rather it obtains authentication from a Domain Controller for all access controls. - Stand-alone Server &smbmdash; one that plays no part is SAM synchronization, has its own authentication database and plays no role in Domain Security. + Domain Member Server &smbmdash; one that has no copy of the domain SAM; rather + it obtains authentication from a domain controller for all access controls. + Standalone Server &smbmdash; one that plays no part in SAM synchronization, + has its own authentication database, and plays no role in domain security. -With MS Windows 2000, the configuration of Domain Control is done after the server has been +With MS Windows 2000, the configuration of domain control is done after the server has been installed. Samba-3 is capable of acting fully as a native member of a Windows 200x server Active Directory domain. replicationSAM -New to Samba-3 is the ability to function fully as an MS Windows NT4-style Domain Controller, +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 also supports the -MS Windows 200x Domain Control protocols. +MS Windows 200x domain control protocols. -At this time any appearance that Samba-3 is capable of acting as an -Domain Controller in native ADS mode is limited and experimental in nature. +At this time any appearance that Samba-3 is capable of acting as a +domain controller in native ADS mode 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 duly reflect all configuration and -management requirements. Samba can act as a NT4-style DC in a Windows 2000/XP +management requirements. Samba can act as a NT4-style domain controller in a Windows 2000/XP environment. However, there are certain compromises: No machine policy files. No Group Policy Objects. - No synchronously executed AD logon scripts. + No synchronously executed Active Directory logon scripts. Can't use Active Directory management tools to manage users and machines. - Registry changes tattoo the main registry, while with AD they do not leave permanent changes in effect. - Without AD you cannot perform the function of exporting specific applications to specific users or groups. + Registry changes tattoo the main registry, while with Active Directory they do not leave permanent changes in effect. + Without Active Directory you cannot perform the function of exporting specific applications to specific users or groups. @@ -307,36 +306,36 @@ environment. However, there are certain compromises: Preparing for Domain Control -There are two ways that MS Windows machines may interact with each other, with other servers -and with Domain Controllers: either as Stand-alone systems, more commonly -called Workgroup members, or as full participants in a security system, -more commonly called Domain members. +There are two ways that MS Windows machines may interact with each other, with other servers, +and with domain controllers: either as standalone systems, more commonly +called workgroup members, or as full participants in a security system, +more commonly called domain members. -It should be noted that Workgroup membership involves no special configuration +It should be noted that workgroup membership involves no special configuration other than the machine being configured so the network configuration has a commonly used name for its 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 +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 neighborhood to be logically grouped together. Again, just to be clear: workgroup mode does not involve security machine accounts. -Domain Member machines have a machine account in the Domain accounts database. A special procedure -must be followed on each machine to effect Domain Membership. This procedure, which can be done -only by the local machine Administrator account, will create the Domain machine account (if it does +Domain member machines have a machine account in the domain accounts database. A special procedure +must be followed on each machine to effect domain membership. This procedure, which can be done +only by the local machine Administrator account, creates the domain machine account (if it does not exist), and then initializes that account. When the client first logs onto the -Domain it triggers a machine password change. +domain, it triggers a machine password change. -When Samba is configured as a Domain Controller, secure network operation demands that -all MS Windows NT4/200x/XP Professional clients should be configured as Domain Members. -If a machine is not made a member of the Domain, then it will operate like a workgroup -(Stand-alone) machine. Please refer to Domain Membership chapter for -information regarding Domain Membership. +When Samba is configured as a domain controller, secure network operation demands that +all MS Windows NT4/200x/XP Professional clients should be configured as domain members. +If a machine is not made a member of the domain, then it will operate like a workgroup +(standalone) machine. Please refer to Domain Membership, for +information regarding domain membership. @@ -346,14 +345,14 @@ NT4/200x/XP clients: Configuration of basic TCP/IP and MS Windows networking. - Correct designation of the Server Role (user). - Consistent configuration of Name ResolutionSee Network Browsing, and - Integrating MS Windows Networks with Samba.. + Correct designation of the server role (user). + Consistent configuration of name resolution.See Network Browsing, and + Integrating MS Windows Networks with Samba. Domain logons for Windows NT4/200x/XP Professional clients. - Configuration of Roaming Profiles or explicit configuration to force local profile usage. + Configuration of roaming profiles or explicit configuration to force local profile usage. Configuration of network/system policies. Adding and managing domain user accounts. - Configuring MS Windows client machines to become Domain Members. + Configuring MS Windows client machines to become domain members. @@ -363,38 +362,38 @@ The following provisions are required to serve MS Windows 9x/Me clients: Configuration of basic TCP/IP and MS Windows networking. Correct designation of the server role (user). - Network Logon Configuration (since Windows 9x/Me/XP Home are not technically domain + Network logon configuration (since Windows 9x/Me/XP Home are not technically domain members, they do not really participate in the security aspects of Domain logons as such). - Roaming Profile Configuration. - Configuration of System Policy handling. + Roaming profile configuration. + Configuration of system policy handling. Installation of the network driver Client for MS Windows Networks and configuration to log onto the domain. - Placing Windows 9x/Me clients in User Level Security &smbmdash; if it is desired to allow - all client share access to be controlled according to domain user/group identities. + Placing Windows 9x/Me clients in user-level security &smbmdash; if it is desired to allow + all client-share access to be controlled according to domain user/group identities. Adding and managing domain user accounts. -Roaming Profiles and System/Network policies are advanced network administration topics -that are covered in the Desktop Profile Management and -System and Account Policies chapters of this document. However, these are not +Roaming profiles and system/network policies are advanced network administration topics +that are covered in Desktop Profile Management and +System and Account Policies of this document. However, these are not necessarily specific to a Samba PDC as much as they are related to Windows NT networking concepts. -A Domain Controller is an SMB/CIFS server that: +A domain controller is an SMB/CIFS server that: - Registers and advertises 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 uni-cast, or via DNS and Active Directory). + to a WINS server over UDP unicast, or via DNS and Active Directory). Provides the NETLOGON service. (This is actually a collection of services that runs over - multiple protocols. These include the LanMan Logon service, the Netlogon service, + multiple protocols. These include the LanMan logon service, the Netlogon service, the Local Security Account service, and variations of them.) @@ -404,26 +403,27 @@ A Domain Controller is an SMB/CIFS server that: -It is rather easy to configure Samba to provide these. Each Samba Domain Controller must provide -the NETLOGON service that Samba calls the functionality -(after the name of the parameter in the &smb.conf; file). Additionally, one server in a Samba-3 -Domain must advertise itself as the Domain Master BrowserSee Network Browsing.. -This causes the Primary Domain Controller to claim a domain-specific NetBIOS name that identifies it as a -Domain Master Browser for its given domain or workgroup. Local master browsers in the same domain or workgroup on -broadcast-isolated subnets then ask for a complete copy of the browse list for the whole wide area network. -Browser clients will then contact their Local Master Browser, and will receive the domain-wide browse list, -instead of just the list for their broadcast-isolated subnet. +It is rather easy to configure Samba to provide these. Each Samba domain controller must provide the NETLOGON +service that Samba calls the functionality (after the name of the +parameter in the &smb.conf; file). Additionally, one server in a Samba-3 domain must advertise itself as the +domain master browser.See Network +Browsing. This causes the PDC to claim a domain-specific NetBIOS name that identifies +it as a DMB for its given domain or workgroup. Local master browsers (LMBs) in the same domain or workgroup on +broadcast-isolated subnets then ask for a complete copy of the browse list for the whole wide-area network. +Browser clients then contact their LMB, and will receive the domain-wide browse list instead of just the list +for their broadcast-isolated subnet. -Domain Control &smbmdash; Example Configuration +Domain Control: Example Configuration The first step in creating a working Samba PDC is to understand the parameters necessary -in &smb.conf;. An example &smb.conf; for acting as a PDC can be found in the next example. +in &smb.conf;. An example &smb.conf; for acting as a PDC can be found in the +smb.conf for being a PDC. @@ -469,7 +469,7 @@ The basic options shown in this example are e default accounts and is included by default, there is no need to add it explicitly.
- Where use of backup Domain Controllers (BDCs) is intended, the only logical choice is + Where use of BDCs is intended, the only logical choice is to use LDAP so the passdb backend can be distributed. The tdbsam and smbpasswd files cannot effectively be distributed and therefore should not be used. @@ -477,12 +477,12 @@ The basic options shown in this example are e Domain Control Parameters The parameters os level, preferred master, domain master, security, - encrypt passwords, and domain logons play a central role in assuring domain + encrypt passwords, and domain logons play a central role in assuring domain control and network logon support. - The os level must be set at or above a value of 32. A Domain Controller - must be the Domain Master Browser, must be set in user mode security, + The os level must be set at or above a value of 32. A domain controller + must be the DMB, must be set in user mode security, must support Microsoft-compatible encrypted passwords, and must provide the network logon service (domain logons). Encrypted passwords must be enabled. For more details on how to do this, refer to Account Information Databases. @@ -490,7 +490,7 @@ The basic options shown in this example are e Environment Parameters - The parameters logon path, logon home, logon drive, and logon script are + The parameters logon path, logon home, logon drive, and logon script are environment support settings that help to facilitate client logon operations and that help to provide automated control facilities to ease network management overheads. Please refer to the man page information for these parameters. @@ -498,10 +498,10 @@ The basic options shown in this example are e NETLOGON Share - The NETLOGON share plays a central role in domain logon and Domain Membership support. - This share is provided on all Microsoft Domain Controllers. It is used to provide logon - scripts, to store Group Policy files (NTConfig.POL), as well as to locate other common - tools that may be needed for logon processing. This is an essential share on a Domain Controller. + The NETLOGON share plays a central role in domain logon and domain membership support. + This share is provided on all Microsoft domain controllers. It is used to provide logon + scripts, to store group policy files (NTConfig.POL), as well as to locate other common + tools that may be needed for logon processing. This is an essential share on a domain controller. PROFILE Share @@ -531,7 +531,7 @@ of operation. The following &smb.conf; parameters are the essentials alone: -The additional parameters shown in the longer listing above just makes for +The additional parameters shown in the longer listing in this section just make for a more complete explanation. @@ -541,21 +541,21 @@ a more complete explanation. Samba ADS Domain Control -Samba-3 is not, and cannot act as, an Active Directory Server. It cannot truly function as -an Active Directory Primary Domain Controller. The protocols for some of the functionality -of Active Directory Domain Controllers has been partially implemented on an experimental +Samba-3 is not, and cannot act as, an Active Directory server. It cannot truly function as +an Active Directory PDC. The protocols for some of the functionality +of Active Directory domain controllers has been partially implemented on an experimental only basis. Please do not expect Samba-3 to support these protocols. Do not depend on any such functionality either now or in the future. The Samba Team may remove these experimental features or may change their behavior. This is mentioned for the benefit of those who have discovered secret capabilities in Samba-3 and who have asked when this functionality will be -completed. The answer is maybe or maybe never! +completed. The answer is maybe someday or maybe never! To be sure, Samba-3 is designed to provide most of the functionality that Microsoft Windows NT4-style -Domain Controllers have. Samba-3 does not have all the capabilities of Windows NT4, but it does have +domain controllers have. Samba-3 does not have all the capabilities of Windows NT4, but it does have a number of features that Windows NT4 domain controllers do not have. In short, Samba-3 is not NT4 and it -is not Windows Server 200x, it is not an Active Directory server. We hope this is plain and simple +is not Windows Server 200x: it is not an Active Directory server. We hope this is plain and simple enough for all to understand. @@ -565,17 +565,17 @@ enough for all to understand. Domain and Network Logon Configuration -The subject of Network or Domain Logons is discussed here because it forms -an integral part of the essential functionality that is provided by a Domain Controller. +The subject of network or domain logons is discussed here because it forms +an integral part of the essential functionality that is provided by a domain controller. Domain Network Logon Service -All Domain Controllers must run the netlogon service (domain logons -in Samba). One Domain Controller must be configured with Yes -(the Primary Domain Controller); on all Backup Domain Controllers No +All domain controllers must run the netlogon service (domain logons +in Samba). One domain controller must be configured with Yes +(the PDC); on all BDCs No must be set. @@ -603,14 +603,14 @@ must be set. To be completely clear: If you want MS Windows XP Home Edition to integrate with your -MS Windows NT4 or Active Directory Domain Security, understand it cannot be done. +MS Windows NT4 or Active Directory domain security, understand it cannot be done. The only option is to purchase the upgrade from MS Windows XP Home Edition to MS Windows XP Professional. -MS Windows XP Home Edition does not have the ability to join any type of Domain -Security facility. Unlike MS Windows 9x/Me, MS Windows XP Home Edition also completely +MS Windows XP Home Edition does not have the ability to join any type of domain +security facility. Unlike MS Windows 9x/Me, MS Windows XP Home Edition also completely lacks the ability to log onto a network. @@ -645,26 +645,26 @@ It should be noted that browsing is totally orthogonal to logon support. Issues related to the single-logon network model are discussed in this -section. Samba supports domain logons, network logon scripts and user -profiles for MS Windows for workgroups and MS Windows 9X/ME clients, +section. Samba supports domain logons, network logon scripts, and user +profiles for MS Windows for Workgroups and MS Windows 9x/Me clients, which are the focus of this section. -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 +When an SMB client in a domain wishes to log on, 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 ill advised ) to create a domain where the user -database is not shared between servers, i.e., they are effectively workgroup +It is possible (but ill advised) to create a domain where the user +database is not shared between servers; that is, they are effectively workgroup servers advertising themselves as participating in a domain. This demonstrates how authentication is quite different from but closely involved with domains. -Using these features you can make your clients verify their logon via -the Samba server; make clients run a batch file when they logon to -the network and download their preferences, desktop and start menu. +Using these features, you can make your clients verify their logon via +the Samba server, make clients run a batch file when they log on to +the network and download their preferences, desktop, and start menu. @@ -745,7 +745,7 @@ The main difference between a PDC and a Windows 9x/Me logon server configuration Password encryption is not required for a Windows 9x/Me logon server. But note - that beginning with MS Windows 98 the default setting is that plain-text + that beginning with MS Windows 98 the default setting is that plaintext password support is disabled. It can be re-enabled with the registry changes that are documented in System and Account Policies. @@ -761,7 +761,7 @@ network logon services that MS Windows 9x/Me expect to find. -Use of plain-text passwords is strongly discouraged. Where used they are easily detected +Use of plaintext passwords is strongly discouraged. Where used they are easily detected using a sniffer tool to examine network traffic. @@ -773,39 +773,37 @@ using a sniffer tool to examine network traffic. There are a few comments to make in order to tie up some loose ends. There has been -much debate over the issue of whether it is okay to configure Samba as a Domain -Controller in security modes other than user. The only security mode that will +much debate over the issue of whether it is okay to configure Samba as a domain +controller in security modes other than user. The only security mode that will not work due to technical reasons is share-mode security. Domain and server mode -security are really just a variation on SMB User Level Security. +security are really just a variation on SMB user-level security. -Actually, this issue is also closely tied to the debate on whether -Samba must be the Domain Master Browser for its workgroup -when operating as a DC. While it may technically be possible -to configure a server as such (after all, browsing and domain logons -are two distinctly different functions), it is not a good idea to do -so. You should remember that the DC must register the DOMAIN<#1b> NetBIOS -name. This is the name used by Windows clients to locate the DC. -Windows clients do not distinguish between the DC and the DMB. -A DMB is a Domain Master Browser &smbmdash; see Configuring WORKGROUP Browsing section. -For this reason, it is wise to configure the Samba DC as the DMB. +Actually, this issue is also closely tied to the debate on whether Samba must be the DMB for its workgroup +when operating as a domain controller. While it may technically be possible to configure a server as such +(after all, browsing and domain logons are two distinctly different functions), it is not a good idea to do +so. You should remember that the domain controller must register the DOMAIN<#1b> NetBIOS name. This is +the name used by Windows clients to locate the domain controller. Windows clients do not distinguish between +the domain controller and the DMB. A DMB is a Domain Master Browser &smbmdash; see The Network Browsing Chapter, Configuring WORKGROUP +Browsing section. For this reason, it is wise to configure the Samba domain controller as the DMB. -Now back to the issue of configuring a Samba DC to use a mode other than +Now back to the issue of configuring a Samba domain controller to use a mode other than user. If a Samba host is -configured to use another SMB server or DC in order to validate user connection requests, +configured to use another SMB server or domain controller in order to validate user connection requests, it is a fact that some other machine on the network (the ) -knows more about the user than the Samba host. About 99% of the time, this other host is -a Domain Controller. Now to operate in domain mode security, the -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, you do not yet have a Domain. +knows more about the user than the Samba host. About 99 percent of the time, this other host is +a domain controller. Now to operate in domain mode security, the +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, you do not yet have a domain. -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 +Configuring a Samba box as a domain controller for a domain that already by definition has a +PDC is asking for trouble. Therefore, you should always configure the Samba domain controller to be the DMB for its domain and set user. This is the only officially supported mode of operation. @@ -858,9 +856,9 @@ will remove all network drive connections: Further, if the machine is already a member of a workgroup that -is the same name as the domain you are joining (bad idea) you will -get this message. Change the workgroup name to something else, it -does not matter what, reboot, and try again. +is the same name as the domain you are joining (bad idea), you will +get this message. Change the workgroup name to something else &smbmdash; it +does not matter what &smbmdash; reboot, and try again. @@ -869,7 +867,7 @@ does not matter what, reboot, and try again. I joined the domain successfully but after upgrading to a newer version of the Samba code I get the message, `The system -cannot log you on (C000019B), Please try again or consult your +cannot log you on (C000019B). Please try again or consult your system administrator when attempting to logon.' @@ -893,9 +891,9 @@ To reset or change the domain SID you can use the net command as follows: -Workstation Machine Trust Accounts work only with the Domain (or network) SID. If this SID changes -Domain Members (workstations) will not be able to log onto the domain. The original Domain SID -can be recovered from the secrets.tdb file. The alternative is to visit each workstation to re-join +Workstation Machine Trust Accounts work only with the domain (or network) SID. If this SID changes, +domain members (workstations) will not be able to log onto the domain. The original domain SID +can be recovered from the secrets.tdb file. The alternative is to visit each workstation to rejoin it to the domain. @@ -905,20 +903,20 @@ it to the domain. The Machine Trust Account Is Not Accessible -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, "The machine account +for this computer either does not exist or is not accessible." What's wrong? This problem is caused by the PDC not having a suitable Machine Trust Account. If you are using the method to create -accounts then this would indicate that it has not worked. Ensure the domain +accounts, then this would indicate that it has not worked. Ensure the domain admin user system is working. -Alternately, if you are creating account entries manually then they +Alternately, 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. If you added the account using an editor rather than using the smbpasswd @@ -936,7 +934,7 @@ client can cause this problem. Make sure that these are consistent for both cli Account Disabled -When I attempt to login to a Samba Domain from a NT4/W200x workstation, +When I attempt to log in to a Samba domain from a NT4/W200x workstation, I get a message about my account being disabled. @@ -952,7 +950,7 @@ Enable the user accounts with smbpasswd -e usernameUntil a few minutes after Samba has started, clients get the error `Domain Controller Unavailable' -A Domain Controller has to announce its role on the network. This usually takes a while. Be patient for up to fifteen minutes, +A domain controller has to announce its role on the network. This usually takes a while. Be patient for up to 15 minutes, then try again. @@ -964,21 +962,21 @@ then try again. schannel signing After successfully joining the domain, user logons fail with one of two messages: one to the -effect that the Domain Controller cannot be found; the other claims that the account does not +effect that the domain controller cannot be found; the other claims that the account does not exist in the domain or that the password is incorrect. This may be due to incompatible settings between the Windows client and the Samba-3 server for schannel (secure channel) settings or smb signing settings. Check your Samba -settings for client schannel, server schannel, client signing, server signing -by executing: +settings for client schannel, server schannel, +client signing, server signing by executing: testparm -v | more and looking for the value of these parameters. -Also use the Microsoft Management Console &smbmdash; Local Security Settings. This tool is available from the +Also use the MMC &smbmdash; Local Security Settings. This tool is available from the Control Panel. The Policy settings are found in the Local Policies/Security Options area and are prefixed by -Secure Channel: ..., and Digitally sign ..... +Secure Channel:..., and Digitally sign.... diff --git a/docs/Samba3-HOWTO/TOSHARG-Passdb.xml b/docs/Samba3-HOWTO/TOSHARG-Passdb.xml index 00ac479e2b..200861919e 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Passdb.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Passdb.xml @@ -37,23 +37,20 @@ as follows: encrypted passwords - - Backward Compatibility Backends - Plain Text + Plaintext - This isn't really a backend at all, but is listed here for simplicity. Samba can be - configured to pass plaintext authentication requests to the traditional UNIX/Linux - /etc/passwd and /etc/shadow - style subsystems. On systems that have Pluggable Authentication Modules (PAM) - support, all PAM modules are supported. The behavior is just as it was with - Samba-2.2.x, and the protocol limitations imposed by MS Windows clients - apply likewise. Please refer to Technical Information for more information - regarding the limitations of Plain Text password usage. + This isn't really a backend at all, but is listed here for simplicity. Samba can be configured to pass + plaintext authentication requests to the traditional UNIX/Linux /etc/passwd and + /etc/shadow-style subsystems. On systems that have Pluggable Authentication Modules + (PAM) support, all PAM modules are supported. The behavior is just as it was with Samba-2.2.x, and the + protocol limitations imposed by MS Windows clients apply likewise. Please refer to Technical Information, for more information regarding the limitations of plaintext + password usage. @@ -63,11 +60,11 @@ as follows: This option allows continued use of the smbpasswd file that maintains a plain ASCII (text) layout that includes the MS Windows - LanMan and NT encrypted passwords as well as a field that stores some + LanMan and NT-encrypted passwords as well as a field that stores some account information. This form of password backend does not store any of the MS Windows NT/200x SAM (Security Account Manager) information required to provide the extended controls that are needed for more comprehensive - inter-operation with MS Windows NT4/200x servers. + interoperation with MS Windows NT4/200x servers. @@ -108,13 +105,13 @@ Samba-3 introduces a number of new password backend capabilities. This backend provides a rich database backend for local servers. This - backend is not suitable for multiple Domain Controllers (i.e., PDC + one + backend is not suitable for multiple domain controllers (i.e., PDC + one or more BDC) installations. The tdbsam password backend stores the old - smbpasswd information plus the extended MS Windows NT / 200x + smbpasswd information plus the extended MS Windows NT/200x SAM information into a binary format TDB (trivial database) file. The inclusion of the extended information makes it possible for Samba-3 to implement the same account and system access controls that are possible @@ -146,14 +143,14 @@ Samba-3 introduces a number of new password backend capabilities. 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 + 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. + requests both for capability and greater scalability. - mysqlsam (MySQL based backend) + mysqlsam (MySQL-based backend) It is expected that the MySQL-based SAM will be very popular in some corners. @@ -163,18 +160,18 @@ Samba-3 introduces a number of new password backend capabilities. - pgsqlsam (PostGreSQL based backend) + pgsqlsam (PostGreSQL-based backend) Stores user information in a PostgreSQL database. This backend is largely undocumented at - the moment, though it's configuration is very similar to + the moment, though its configuration is very similar to that of the mysqlsam backend. - xmlsam (XML based datafile) + xmlsam (XML-based datafile) pdbedit @@ -186,7 +183,7 @@ Samba-3 introduces a number of new password backend capabilities. The xmlsam option can be useful for account migration between database - backends or backups. Use of this tool will allow the data to be edited before migration + backends or backups. Use of this tool allows the data to be edited before migration into another backend format. @@ -202,15 +199,14 @@ Samba-3 introduces a number of new password backend capabilities. Technical Information - Old Windows clients send plain text passwords over the wire. Samba can check these + Old Windows clients send plaintext passwords over the wire. Samba can check these passwords by encrypting them and comparing them to the hash stored in the UNIX user database. encrypted passwords - Newer Windows clients send encrypted passwords (so-called LanMan and NT hashes) over - the wire, instead of plain text passwords. The newest clients will send only encrypted - passwords and refuse to send plain text passwords, unless their registry is tweaked. + Newer Windows clients send encrypted passwords (LanMan and NT hashes) instead of plaintext passwords over the wire. The newest clients will send only encrypted + passwords and refuse to send plaintext passwords unless their registry is tweaked. @@ -221,7 +217,7 @@ Samba-3 introduces a number of 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. For example, workstations the user may logon from, + user that is not stored in a UNIX user database: for example, workstations the user may logon from, the location where the user's profile is stored, and so on. Samba retrieves and stores this information using a . Commonly available backends are LDAP, plain text file, and MySQL. For more information, see the man page for &smb.conf; regarding the @@ -235,10 +231,11 @@ Samba-3 introduces a number of new password backend capabilities.
-SID - The resolution of SIDs to UIDs is fundamental to correct operation of Samba. In both cases shown, if winbindd is not running, or cannot - be contacted, then only local SID/UID resolution is possible. See resolution of SIDs to UIDs and - resolution of UIDs to SIDs diagrams. + SID + The resolution of SIDs to UIDs is fundamental to correct operation of Samba. In both cases shown, if winbindd + is not running or cannot be contacted, then only local SID/UID resolution is possible. See resolution of SIDs to UIDs and resolution of UIDs + to SIDs diagrams.
@@ -253,20 +250,20 @@ Samba-3 introduces a number of new password backend capabilities. The UNIX and SMB password encryption techniques seem similar on the surface. This similarity is, however, only skin deep. The UNIX scheme typically sends clear-text passwords over the network when logging in. This is bad. The SMB encryption scheme - never sends the clear-text password over the network but it does store the 16 byte + never sends the clear-text password over the network, but it does store the 16-byte hashed values on disk. This is also bad. Why? Because the 16 byte hashed values are a password equivalent. You cannot derive the user's password from them, but they could potentially be used in a modified client to gain access to a server. This would require considerable technical knowledge on behalf of the attacker but - is perfectly possible. You should thus treat the data stored in whatever passdb + is perfectly possible. You should therefore treat the data stored in whatever passdb backend you use (smbpasswd file, LDAP, MYSQL) as though it contained the clear-text - passwords of all your users. Its contents must be kept secret and the file should + passwords of all your users. Its contents must be kept secret, and the file should be protected accordingly. - Ideally, we would like a password scheme that involves neither plain text passwords - on the network nor on disk. Unfortunately, this is not available as Samba is stuck with + Ideally, we would like a password scheme that involves neither plaintext passwords + on the network nor plaintext passwords on disk. Unfortunately, this is not available because Samba is stuck with having to be compatible with other SMB systems (Windows NT, Windows for Workgroups, Windows 9x/Me). @@ -290,7 +287,7 @@ Samba-3 introduces a number of new password backend capabilities. - MS Windows XP Home does not have facilities to become a Domain Member and it cannot participate in domain logons. + MS Windows XP Home does not have facilities to become a domain member, and it cannot participate in domain logons. @@ -308,18 +305,18 @@ Samba-3 introduces a number of new password backend capabilities. All current releases of Microsoft SMB/CIFS clients support authentication via the - SMB Challenge/Response mechanism described here. Enabling clear-text authentication + SMB challenge/response mechanism described here. Enabling clear-text authentication does not disable the ability of the client to participate in encrypted authentication. - Instead, it allows the client to negotiate either plain text or encrypted password + Instead, it allows the client to negotiate either plaintext or encrypted password handling. - MS Windows clients will cache the encrypted password alone. Where plain text passwords - are re-enabled through the appropriate registry change, the plain text password is never + MS Windows clients will cache the encrypted password alone. Where plaintext passwords + are re-enabled through the appropriate registry change, the plaintext password is never cached. This means that in the event that a network connections should become disconnected (broken), only the cached (encrypted) password will be sent to the resource server to - effect an auto-reconnect. If the resource server does not support encrypted passwords the + effect an auto-reconnect. If the resource server does not support encrypted passwords, the auto-reconnect will fail. Use of encrypted passwords is strongly advised. @@ -336,10 +333,10 @@ Samba-3 introduces a number of new password backend capabilities. Windows NT does not like talking to a server that does not support encrypted passwords. It will refuse - to browse the server if the server is also in User Level + to browse the server if the server is also in user-level security mode. It will insist on prompting the user for the password on each connection, which is very annoying. The - only things you can do to stop this is to use SMB encryption. + only thing you can do to stop this is to use SMB encryption. Encrypted password support allows automatic share @@ -356,13 +353,13 @@ Samba-3 introduces a number of new password backend capabilities. Plaintext passwords are not kept - on disk, and are not cached in memory. + on disk and are not cached in memory. - Uses same password file as other UNIX - services such as Login and FTP. + Plaintext passwords use the same password file as other UNIX + services, such as Login and FTP. Use of other services (such as Telnet and FTP) that - send plain text passwords over the network, so sending them for SMB + send plaintext passwords over the network makes sending them for SMB is not such a big deal. @@ -373,12 +370,12 @@ Samba-3 introduces a number of new password backend capabilities. 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 + 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. - First, all Samba SAM (Security Account Manager database) accounts require + First, all Samba SAM database accounts require a UNIX/Linux UID that the account will map to. As users are added to the account information database, Samba will call the interface to add the account to the Samba host OS. In essence all accounts in @@ -388,7 +385,7 @@ Samba-3 introduces a number of new password backend capabilities. idmap uid idmap gid - The second way to effect Windows SID to UNIX UID mapping is via the + The second way to map Windows SID to UNIX UID is via the idmap uid and idmap gid 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. @@ -402,7 +399,7 @@ Samba-3 introduces a number of new password backend capabilities. Samba-3 has a special facility that makes it possible to maintain identical UIDs and GIDs on all servers in a distributed network. A distributed network is one where there exists - a PDC, one or more BDCs and/or one or more Domain Member servers. Why is this important? + a PDC, one or more BDCs, and/or one or more domain member servers. Why is this important? This is important if files are being shared over more than one protocol (e.g., NFS) and where users are copying files across UNIX/Linux systems using tools such as rsync. @@ -411,23 +408,22 @@ Samba-3 introduces a number of new password backend capabilities. idmap backend The special facility is enabled using a parameter called idmap backend. The default setting for this parameter is an empty string. Technically it is possible to use - an LDAP based idmap backend for UIDs and GIDs, but it makes most sense when this is done for - network configurations that also use LDAP for the SAM backend. Following - example shows that. + an LDAP-based idmap backend for UIDs and GIDs, but it makes most sense when this is done for + network configurations that also use LDAP for the SAM backend. + Example Configuration with the LDAP idmap Backend + shows that configuration. - SAM backendldapsam -Example configuration with the LDAP idmap backend +Example Configuration with the LDAP idmap Backend ldap:ldap://ldap-server.quenya.org:636 -Alternately, this could be specified as: +Alternatively, this could be specified as: ldap:ldaps://ldap-server.quenya.org - A network administrator who wants to make significant use of LDAP backends will sooner or later be @@ -438,9 +434,9 @@ Samba-3 introduces a number of new password backend capabilities. - nss_ldap: An LDAP Name Service Switch module to provide native + nss_ldap: An LDAP name service switch (NSS) module to provide native name service support for AIX, Linux, Solaris, and other operating systems. This tool - can be used for centralized storage and retrieval of UIDs/GIDs. + can be used for centralized storage and retrieval of UIDs and GIDs. @@ -453,7 +449,7 @@ Samba-3 introduces a number of new password backend capabilities. idmap_ad: An IDMAP backend that supports the Microsoft Services for - UNIX RFC 2307 schema available from the PADL web + UNIX RFC 2307 schema available from the PADL Web site. @@ -467,7 +463,7 @@ Samba-3 introduces a number of new password backend capabilities. Samba doesn't provide a turnkey solution to LDAP. It is best to deal with the design and configuration of an LDAP directory prior to integration with Samba. A working knowledge of LDAP makes Samba integration - easy and the lack of a working knowledge of LDAP can make it one a frustrating experience. + easy, and the lack of a working knowledge of LDAP can make it one a frustrating experience. @@ -476,32 +472,32 @@ Samba-3 introduces a number of new password backend capabilities. - The POSIX and SambaSAMAccount components of computer (machine) accounts are both used by Samba. - i.e.: Machine accounts are treated inside Samba in the same way that Windows NT4/200X treats + The POSIX and sambaSamAccount components of computer (machine) accounts are both used by Samba. + That is, machine accounts are treated inside Samba in the same way that Windows NT4/200X treats them. A user account and a machine account are indistinquishable from each other, except that - the machine account ends in a '$' character, as do trust accounts. + the machine account ends in a $ character, as do trust accounts. - The need for Windows user, group, machine, trust, etc. accounts to be tied to a valid UNIX uid + The need for Windows user, group, machine, trust, and other accounts to be tied to a valid UNIX UID is a design decision that was made a long way back in the history of Samba development. It is - unlikely that this decision will be reversed of changed during the remaining life of the + unlikely that this decision will be reversed or changed during the remaining life of the Samba-3.x series. The resolution of a UID from the Windows SID is achieved within Samba through a mechanism that - must refer back to the host operating system on which Samba is running. The Name Service - Switcher (NSS) is the preferred mechanism that shields applications (like Samba) from the + must refer back to the host operating system on which Samba is running. The + NSS is the preferred mechanism that shields applications (like Samba) from the need to know everything about every host OS it runs on. - Samba asks the host OS to provide a UID via the passwd, shadow + Samba asks the host OS to provide a UID via the passwd, shadow, and group facilities in the NSS control (configuration) file. The best tool for achieving this is left up to the UNIX administrator to determine. It is not imposed by - Samba. Samba provides winbindd together with its support libraries as one method. It is - possible to do this via LDAP - and for that Samba provides the appropriate hooks so that + Samba. Samba provides winbindd with its support libraries as one method. It is + possible to do this via LDAP, and for that Samba provides the appropriate hooks so that all account entities can be located in an LDAP directory. @@ -522,15 +518,15 @@ Samba-3 introduces a number of new password backend capabilities. pdbedit -Samba provides two tools for management of user and machine accounts. These tools are -called smbpasswd and pdbedit. +Samba provides two tools for management of user and machine accounts: +smbpasswd and pdbedit. The <emphasis>smbpasswd</emphasis> Command The smbpasswd utility is similar to the passwd - or yppasswd programs. It maintains the two 32 byte password + and yppasswd programs. It maintains the two 32 byte password fields in the passdb backend. @@ -541,8 +537,8 @@ called smbpasswd and pdbedit. smbpasswd has the capability to change passwords on Windows NT - servers (this only works when the request is sent to the NT Primary Domain Controller - if changing an NT Domain user's password). + servers (this only works when the request is sent to the NT PDC + if changing an NT domain user's password). @@ -558,11 +554,11 @@ called smbpasswd and pdbedit. enable user or machine accounts. disable user or machine accounts. set to NULL user passwords. - manage interdomain trust accounts. + manage interdomain trust accounts. - To run smbpasswd as a normal user just type: + To run smbpasswd as a normal user, just type: @@ -570,7 +566,7 @@ called smbpasswd and pdbedit. &prompt;smbpasswd Old SMB password: secret - For secret, type old value here or press return if + For secret, type the old value here or press return if there is no old password. New SMB Password: new secret @@ -584,13 +580,13 @@ called smbpasswd and pdbedit. - When invoked by an ordinary user, the command will only allow the user to change his or her own + When invoked by an ordinary user, the command will allow only the user to change his or her own SMB password. When run by root, smbpasswd may take an optional argument specifying - the user name whose SMB password you wish to change. When run as root, smbpasswd + the username whose SMB password you wish to change. When run as root, smbpasswd does not prompt for or check the old password value, thus allowing root to set passwords for users who have forgotten their passwords. @@ -598,7 +594,7 @@ called smbpasswd and pdbedit. smbpasswd is designed to work in the way familiar to UNIX users who use the passwd or yppasswd commands. - While designed for administrative use, this tool provides essential User Level + While designed for administrative use, this tool provides essential user-level password change capabilities. @@ -621,7 +617,7 @@ called smbpasswd and pdbedit. - add, remove or modify user accounts. + add, remove, or modify user accounts. list user accounts. migrate user accounts. @@ -630,7 +626,7 @@ called smbpasswd and pdbedit. pdbedit The pdbedit tool is the only one that can manage the account security and policy settings. It is capable of all operations that smbpasswd can - do as well as a super set of them. + do as well as a superset of them. @@ -672,7 +668,7 @@ Password must change: Mon, 18 Jan 2038 20:14:07 GMT pdbedit The pdbedit tool allows migration of authentication (account) - databases from one backend to another. For example: To migrate accounts from an + databases from one backend to another. For example, to migrate accounts from an old smbpasswd database to a tdbsam backend: @@ -690,7 +686,7 @@ Password must change: Mon, 18 Jan 2038 20:14:07 GMT - Now remove the smbpasswd from the passdb backend + Remove the smbpasswd from the passdb backend configuration in &smb.conf;. @@ -708,7 +704,7 @@ capability. -It is possible to specify not only multiple different password backends, but even multiple +It is possible to specify not only multiple password backends, but even multiple backends of the same type. For example, to use two different tdbsam databases: @@ -726,15 +722,15 @@ backends of the same type. For example, to use two different tdbsam databases: Older versions of Samba retrieved user information from the UNIX user database and eventually some other fields from the file /etc/samba/smbpasswd or /etc/smbpasswd. When password encryption is disabled, no - SMB specific data is stored at all. Instead all operations are conducted via the way + SMB-specific data is stored at all. Instead, all operations are conducted via the way that the Samba host OS will access its /etc/passwd database. - Linux systems For example, all operations are done via PAM. + On Linux systems, for example, all operations are done via PAM. - smbpasswd &smbmdash; Encrypted Password Database + smbpasswd: Encrypted Password Database SAM backendsmbpasswd @@ -755,29 +751,29 @@ backends of the same type. For example, to use two different tdbsam databases: - The second problem is that administrators who desire to replicate a smbpasswd file - to more than one Samba server were left to use external tools such as - rsync(1) and ssh(1) and wrote custom, + The second problem is that administrators who desire to replicate an smbpasswd file + to more than one Samba server are left to use external tools such as + rsync(1) and ssh(1) and write custom, in-house scripts. Finally, the amount of information that is stored in an smbpasswd entry leaves no room for additional attributes such as a home directory, password expiration time, - or even a Relative Identifier (RID). + or even a relative identifier (RID). 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). + used by smbd was developed. The API that 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). Samba provides an enhanced set of passdb backends that overcome the deficiencies - of the smbpasswd plain text database. These are tdbsam, ldapsam and xmlsam. + of the smbpasswd plaintext database. These are tdbsam, ldapsam, and xmlsam. Of these, ldapsam will be of most interest to large corporate or enterprise sites. @@ -788,7 +784,7 @@ backends of the same type. For example, to use two different tdbsam databases: SAM backendtdbsam - Samba can store user and machine account data in a TDB (Trivial Database). + Samba can store user and machine account data in a TDB (trivial database). Using this backend does not require any additional configuration. This backend is recommended for new installations that do not require LDAP. @@ -801,10 +797,10 @@ backends of the same type. For example, to use two different tdbsam databases: - The recommendation of a 250 user limit is purely based on the notion that this + The recommendation of a 250-user limit is purely based on the notion that this would generally involve a site that has routed networks, possibly spread across more than one physical location. The Samba Team has not at this time established - the performance based scalability limits of the tdbsam architecture. + the performance-based scalability limits of the tdbsam architecture. @@ -820,7 +816,7 @@ backends of the same type. For example, to use two different tdbsam databases: A means of retrieving user account information from - an Windows 200x Active Directory server. + a Windows 200x Active Directory server. A means of replacing /etc/passwd. @@ -828,9 +824,9 @@ backends of the same type. For example, to use two different tdbsam databases: The second item can be accomplished by using LDAP NSS and PAM modules. LGPL versions of these libraries can be obtained from PADL Software. - More information about the configuration of these packages may be found at + More information about the configuration of these packages may be found in - LDAP, System Administration; Gerald Carter by O'Reilly; Chapter 6: Replacing NIS." + LDAP, System Administration by Gerald Carter, Chapter 6, Replacing NIS". @@ -847,7 +843,7 @@ backends of the same type. For example, to use two different tdbsam databases: - Two additional Samba resources which may prove to be helpful are: + Two additional Samba resources that may prove to be helpful are: @@ -855,7 +851,7 @@ backends of the same type. For example, to use two different tdbsam databases: maintained by Ignacio Coupeau. The NT migration scripts from IDEALX that are - geared to manage users and group in such a Samba-LDAP Domain Controller configuration. + geared to manage users and groups in such a Samba-LDAP domain controller configuration. @@ -863,10 +859,10 @@ backends of the same type. For example, to use two different tdbsam databases: Supported LDAP Servers - The LDAP ldapsam code has been developed and tested using the OpenLDAP 2.0 and 2.1 server and + The LDAP ldapsam code was 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 the process outlined in Reporting Bugs chapter. + Please submit fixes via the process outlined in Reporting Bugs. @@ -904,8 +900,8 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY Just as the smbpasswd file is meant to store information that provides information additional to a user's /etc/passwd entry, so is the sambaSamAccount object - meant to supplement the UNIX user account information. A sambaSamAccount is a - AUXILIARY ObjectClass so it can be used to augment existing + meant to supplement the UNIX user account information. A sambaSamAccount is an + AUXILIARY ObjectClass, so it can be used to augment existing user account information in the LDAP directory, thus providing information needed for Samba account handling. However, there are several fields (e.g., uid) that overlap with the posixAccount ObjectClass outlined in RFC2307. This is by design. @@ -916,9 +912,9 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY In order to store all user account information (UNIX and Samba) in the directory, - it is necessary to use the sambaSamAccount and posixAccount ObjectClass es 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). + information via the standard C library calls, such as getpwnam(). This means that the Samba server must also have the LDAP NSS library installed and functioning correctly. This division of information makes it possible to store all Samba account information in LDAP, but still maintain UNIX account @@ -968,7 +964,7 @@ include /etc/openldap/schema/samba.schema It is recommended that you maintain some indices on some of the most useful attributes, - as in the following example, to speed up searches made on sambaSamAccount objectclasses + as in the following example, to speed up searches made on sambaSamAccount ObjectClasses (and possibly posixAccount and posixGroup as well): @@ -1024,7 +1020,7 @@ index default sub Initialize the LDAP Database - Before you can add accounts to the LDAP database you must create the account containers + 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 (DNS entries, and so on): @@ -1111,8 +1107,8 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz - Before Samba can access the LDAP server you need to store the LDAP admin password - into the Samba-3 secrets.tdb database by: + Before Samba can access the LDAP server, you need to store the LDAP admin password + in the Samba-3 secrets.tdb database by: &rootprompt;smbpasswd -w secret @@ -1130,7 +1126,7 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz LDAP libraries are found. - LDAP related smb.conf options: + LDAP-related smb.conf options are ldapsam:url, , , @@ -1146,8 +1142,8 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz These are described in the &smb.conf; man - page and so will not be repeated here. However, a sample &smb.conf; file for - use with an LDAP directory could appear as shown below. + page and so are not repeated here. However, a sample &smb.conf; file for + use with an LDAP directory could appear as in Example 10.4.1. @@ -1204,13 +1200,13 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz User Management User AccountsAdding/Deleting - As user accounts are managed through the sambaSamAccount objectclass, you should + Because user accounts are managed through the sambaSamAccount ObjectClass, you should modify your existing administration tools to deal with sambaSamAccount attributes. - Machine accounts are managed with the sambaSamAccount objectclass, just - like users accounts. However, it is up to you to store those accounts + Machine accounts are managed with the sambaSamAccount ObjectClass, just + like user accounts. However, it is up to you to store those accounts in a different tree of your LDAP namespace. You should use ou=Groups,dc=quenya,dc=org to store groups and ou=People,dc=quenya,dc=org to store users. Just configure your @@ -1220,7 +1216,7 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz In Samba-3, the group management system is based on POSIX - groups. This means that Samba makes use of the posixGroup objectclass. + 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). Samba-3 knows only about Domain Groups and, unlike MS Windows 2000 and Active Directory, Samba-3 does not @@ -1248,8 +1244,8 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz These password hashes are clear-text equivalents and can be used to impersonate the user without deriving the original clear-text strings. For more information - on the details of LM/NT password hashes, refer to the - Account Information Database section of this chapter. + on the details of LM/NT password hashes, refer to the Account Information + Database section. @@ -1288,44 +1284,44 @@ access to attrs=SambaLMPassword,SambaNTPassword LDAP Special Attributes for sambaSamAccounts - The sambaSamAccount objectclass is composed of the attributes shown in next tables: The sambaSamAccount ObjectClass is composed of the attributes shown in next tables: Part A, and Part B. - Attributes in the sambaSamAccount objectclass (LDAP) &smbmdash; Part A + Attributes in the sambaSamAccount ObjectClass (LDAP), Part A - sambaLMPasswordThe LANMAN password 16-byte hash stored as a character + sambaLMPasswordThe LanMan password 16-byte hash stored as a character representation of a hexadecimal string. - sambaNTPasswordThe NT password hash 16-byte stored as a character + sambaNTPasswordThe NT password 16-byte hash stored as a character representation of a hexadecimal string. sambaPwdLastSetThe integer time in seconds since 1970 when the sambaLMPassword and sambaNTPassword attributes were last set. - sambaAcctFlagsString of 11 characters surrounded by square brackets [] + sambaAcctFlagsString 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), + I (domain trust account), H (home dir required), S (server trust account), and D (disabled). - sambaLogonTimeInteger value currently unused + sambaLogonTimeInteger value currently unused. - sambaLogoffTimeInteger value currently unused + sambaLogoffTimeInteger value currently unused. sambaKickoffTimeSpecifies the time (UNIX time format) when the user will be locked down and cannot login any longer. If this attribute is omitted, then the account will never expire. - If you use this attribute together with `shadowExpire' of the `shadowAccount' objectClass, will enable accounts to + Using this attribute together with shadowExpire of the shadowAccount ObjectClass will enable accounts to expire completely on an exact date. - sambaPwdCanChangeSpecifies the time (UNIX time format) from which on the user is allowed to + sambaPwdCanChangeSpecifies the time (UNIX time format) after which the user is allowed to change his password. If attribute is not set, the user will be free to change his password whenever he wants. - sambaPwdMustChangeSpecifies the time (UNIX time format) since when the user is - forced to change his password. If this value is set to `0', the user will have to change his password at first login. + sambaPwdMustChangeSpecifies the time (UNIX time format) when the user is + forced to change his password. If this value is set to 0, the user will have to change his password at first login. If this attribute is not set, then the password will never expire. sambaHomeDriveSpecifies the drive letter to which to map the @@ -1353,21 +1349,21 @@ access to attrs=SambaLMPassword,SambaNTPassword
- Attributes in the sambaSamAccount objectclass (LDAP) &smbmdash; Part B + Attributes in the sambaSamAccount ObjectClass (LDAP), Part B sambaUserWorkstationsHere you can give a comma-separated list of machines - on which the user is allowed to login. You may observe problems when you try to connect to an Samba Domain Member. - Because Domain Members are not in this list, the Domain Controllers will reject them. Where this attribute is omitted, + on which the user is allowed to login. You may observe problems when you try to connect to a Samba domain member. + Because domain members are not in this list, the domain controllers will reject them. Where this attribute is omitted, the default implies no restrictions. sambaSIDThe security identifier(SID) of the user. The Windows equivalent of UNIX UIDs. - sambaPrimaryGroupSIDThe Security IDentifier (SID) of the primary group + sambaPrimaryGroupSIDThe security identifier (SID) of the primary group of the user. sambaDomainNameDomain the user is part of. @@ -1378,7 +1374,7 @@ access to attrs=SambaLMPassword,SambaNTPassword The majority of these parameters are only used when Samba is acting as a PDC of a domain (refer to Domain Control, for details on - how to configure Samba as a Primary Domain Controller). The following four attributes + how to configure Samba as a PDC). The following four attributes are only stored with the sambaSamAccount entry if the values are non-default values: @@ -1393,7 +1389,7 @@ access to attrs=SambaLMPassword,SambaNTPassword These attributes are only stored with the sambaSamAccount entry if the values are non-default values. For example, assume MORIA has now been configured as a PDC and that \\%L\%u was defined in - its &smb.conf; file. When a user named becky logons to the domain, + its &smb.conf; file. When a user named becky logs on to the domain, the string is expanded to \\MORIA\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 @@ -1408,7 +1404,7 @@ access to attrs=SambaLMPassword,SambaNTPassword Example LDIF Entries for a sambaSamAccount - The following is a working LDIF that demonstrates the use of the SambaSamAccount objectclass: + The following is a working LDIF that demonstrates the use of the SambaSamAccount ObjectClass: @@ -1432,7 +1428,7 @@ access to attrs=SambaLMPassword,SambaNTPassword The following is an LDIF entry for using both the sambaSamAccount and - posixAccount objectclasses: + posixAccount ObjectClasses: @@ -1468,15 +1464,15 @@ access to attrs=SambaLMPassword,SambaNTPassword Password Synchronization - Samba-3 and later can update the non-samba (LDAP) password stored with an account. When + Samba-3 and later can update the non-Samba (LDAP) password stored with an account. When using pam_ldap, this allows changing both UNIX and Windows passwords at once. The options can have the values shown in - the next table. + Table 10.3.
- Possible <emphasis>ldap passwd sync</emphasis> values + Possible <emphasis>ldap passwd sync</emphasis> Values @@ -1485,13 +1481,13 @@ access to attrs=SambaLMPassword,SambaNTPassword yesWhen the user changes his password, update - SambaNTPassword, SambaLMPassword + SambaNTPassword, SambaLMPassword, and the password fields.noOnly update SambaNTPassword and SambaLMPassword.onlyOnly update the LDAP password and let the LDAP server worry about the other fields. - This option is only available on some LDAP servers. Only when the LDAP server + This option is only available on some LDAP servers and only when the LDAP server supports LDAP_EXOP_X_MODIFY_PASSWD. @@ -1509,10 +1505,10 @@ access to attrs=SambaLMPassword,SambaNTPassword SAM backendmysqlsam - Every so often someone will come along with a great new idea. Storing user accounts in a + Every so often someone comes along with a great new idea. Storing user accounts in a 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 cannot attempt - to document every little detail why certain things of marginal utility to the bulk of + to document every little detail of 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. @@ -1521,10 +1517,11 @@ access to attrs=SambaLMPassword,SambaNTPassword Creating the Database - You can set up your own table and specify the field names to pdb_mysql (see below - for the column names) or use the default table. The file examples/pdb/mysql/mysql.dump - contains the correct queries to create the required tables. Use the command: - + You can set up your own table and specify the field names to pdb_mysql (see + MySQL field names for MySQL passdb backend for + the column names) or use the default table. The file + examples/pdb/mysql/mysql.dump contains the correct queries to + create the required tables. Use the command: &prompt;mysql -uusername -hhostname -ppassword \ databasename < /path/to/samba/examples/pdb/mysql/mysql.dump @@ -1550,11 +1547,11 @@ access to attrs=SambaLMPassword,SambaNTPassword Additional options can be given through the &smb.conf; file in the section. - Refer to the following table. + Refer to Basic smb.conf Options for MySQL passdb Backend.
- Basic smb.conf options for MySQL passdb backend + Basic smb.conf Options for MySQL passdb Backend @@ -1579,8 +1576,8 @@ access to attrs=SambaLMPassword,SambaNTPassword - Names of the columns are given in the next table. - The default column names can be found in the example table dump. + Names of the columns are given in MySQL field names for MySQL + passdb backend. The default column names can be found in the example table dump. @@ -1594,12 +1591,12 @@ access to attrs=SambaLMPassword,SambaNTPassword FieldTypeContents - logon time columnint(9)UNIX time stamp of last logon of user - logoff time columnint(9)UNIX time stamp of last logoff of user - kickoff time columnint(9)UNIX time stamp of moment user should be kicked off workstation (not enforced) - pass last set time columnint(9)UNIX time stamp of moment password was last set - pass can change time columnint(9)UNIX time stamp of moment from which password can be changed - pass must change time columnint(9)UNIX time stamp of moment on which password must be changed + logon time columnint(9)UNIX timestamp of last logon of user + logoff time columnint(9)UNIX timestamp of last logoff of user + kickoff time columnint(9)UNIX timestamp of moment user should be kicked off workstation (not enforced) + pass last set time columnint(9)UNIX timestamp of moment password was last set + pass can change time columnint(9)UNIX timestamp of moment from which password can be changed + pass must change time columnint(9)UNIX timestamp of moment on which password must be changedusername columnvarchar(255)UNIX usernamedomain columnvarchar(255)NT domain user belongs tont username columnvarchar(255)NT username @@ -1630,15 +1627,16 @@ access to attrs=SambaLMPassword,SambaNTPassword You can put a colon (:) after the name of each column, which - should specify the column to update when updating the table. One can also specify nothing behind the colon, in which case the field data will not be updated. Setting a column name to NULL means the field should not be used. + should specify the column to update when updating the table. You can also specify nothing behind the colon, in which case the field data will not be updated. Setting a column name to NULL means the field should not be used. - An example configuration looks like: + An example configuration is shown in Example Configuration for the MySQL passdb Backend. - Example configuration for the MySQL passdb backend - + Example Configuration for the MySQL passdb Backend + mysql:foo samba @@ -1653,8 +1651,8 @@ access to attrs=SambaLMPassword,SambaNTPassword nt_pass: The unknown 3 column is not stored NULL - - + + @@ -1662,7 +1660,7 @@ access to attrs=SambaLMPassword,SambaNTPassword encrypted passwords - I strongly discourage the use of plaintext passwords, however, you can use them. + I strongly discourage the use of plaintext passwords; however, you can use them. @@ -1683,7 +1681,7 @@ access to attrs=SambaLMPassword,SambaNTPassword Getting Non-Column Data from the Table - It is possible to have not all data in the database by making some `constant'. + It is possible to have not all data in the database by making some "constant." @@ -1693,7 +1691,7 @@ access to attrs=SambaLMPassword,SambaNTPassword Or, set `identifier:workstations column' to: - NULL + NULL. See the MySQL documentation for more language constructs. @@ -1716,7 +1714,7 @@ access to attrs=SambaLMPassword,SambaNTPassword - (where filename is the name of the file to put the data in) + where filename is the name of the file to put the data in. @@ -1735,7 +1733,7 @@ access to attrs=SambaLMPassword,SambaNTPassword I've installed Samba, but now I can't log on with my UNIX account! Make sure your user has been added to the current Samba . - Read the section Account Management Tools for details. + Read the Account Management Tools, for details. @@ -1743,8 +1741,8 @@ access to attrs=SambaLMPassword,SambaNTPassword Users Being Added to the Wrong Backend Database - 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 + A few complaints have been received from users who 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: @@ -1778,7 +1776,7 @@ access to attrs=SambaLMPassword,SambaNTPassword When explicitly setting an parameter, - guest must be specified as the first entry on the line, + guest must be specified as the first entry on the line &smbmdash; for example, guest sam. diff --git a/docs/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml b/docs/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml index c529963155..b4d6b68047 100644 --- a/docs/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml +++ b/docs/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml @@ -12,7 +12,7 @@ This chapter summarizes the current state of knowledge derived from personal practice and knowledge from Samba mailing list subscribers. Before reproduction of posted information, every effort has been made to validate the information given. -Where additional information was uncovered through this validation it is provided +Where additional information was uncovered through this validation, it is provided also. @@ -35,7 +35,7 @@ got the message: Group Policies are a good thing! They can help reduce administr costs and actually make 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 obvious from the Samba -mailing list as in 2000 and 2001 when there were few postings regarding GPOs and +mailing list back in 2000 and 2001 when there were few postings regarding GPOs and how to replicate them in a Samba environment. @@ -49,7 +49,7 @@ network client workstations. A tool new to Samba &smbmdash; the editreg tool &smbmdash; may become an important part of the future Samba administrators' -arsenal is described in this document. +arsenal and is described in this document. @@ -60,7 +60,7 @@ arsenal is described in this document. Under MS Windows platforms, particularly those following the release of MS Windows NT4 and MS Windows 95, it is possible to create a type of file that would be placed -in the NETLOGON share of a Domain Controller. As the client logs onto the network, +in the NETLOGON share of a domain controller. As the client logs onto the network, this file is read and the contents initiate changes to the registry of the client machine. This file allows changes to be made to those parts of the registry that affect users, groups of users, or machines. @@ -68,17 +68,17 @@ affect users, groups of users, or machines. Config.POL -For MS Windows 9x/ME, this file must be called Config.POL and may +For MS Windows 9x/Me, this file must be called Config.POL and may be generated using a tool called poledit.exe, better known as the -Policy Editor. The policy editor was provided on the Windows 98 installation CD, but -disappeared again with the introduction of MS Windows Me (Millennium Edition). From +Policy Editor. The policy editor was provided on the Windows 98 installation CD-ROM, but +disappeared again with the introduction of MS Windows Me. From comments of MS Windows network administrators, it would appear that this tool became a part of the MS Windows Me Resource Kit. System Policy Editor -MS Windows NT4 Server products include the System Policy Editor +MS Windows NT4 server products include the System Policy Editor under Start -> Programs -> Administrative Tools. For MS Windows NT4 and later clients, this file must be called NTConfig.POL. @@ -96,7 +96,7 @@ be a step forward, but improved functionality comes at a great price. Before embarking on the configuration of network and system policies, it is highly advisable to read the documentation available from Microsoft's Web site regarding -Implementing Profiles and Policies in Windows NT 4.0 available from Microsoft. +Implementing Profiles and Policies in Windows NT 4.0. There are a large number of documents in addition to this old one that should also be read and understood. Try searching on the Microsoft Web site for Group Policies. @@ -110,10 +110,10 @@ here is incomplete &smbmdash; you are warned. Windows 9x/ME Policies - You need the Windows 98 Group Policy Editor to set up Group Profiles under Windows 9x/ME. - It can be found on the original full product Windows 98 installation CD under + You need the Windows 98 Group Policy Editor to set up Group Profiles under Windows 9x/Me. + It can be found on the original full-product Windows 98 installation CD-ROM under tools/reskit/netadmin/poledit. Install this using the - Add/Remove Programs facility and then click on Have Disk. + Add/Remove Programs facility, and then click on Have Disk. @@ -123,7 +123,7 @@ here is incomplete &smbmdash; you are warned. user profiles and/or My Documents, and so on. Then save these settings in a file called Config.POL that needs to be placed in the root of the share. If Windows 98 is configured to log onto - the Samba Domain, it will automatically read this file and update the Windows 9x/Me registry + the Samba domain, it will automatically read this file and update the Windows 9x/Me registry of the machine as it logs on. @@ -132,16 +132,16 @@ here is incomplete &smbmdash; you are warned. - If you do not take the correct steps, then every so often Windows 9x/ME will check the - integrity of the registry and restore its settings from the back-up - copy of the registry it stores on each Windows 9x/ME machine. So, you will + If you do not take the correct steps, then every so often Windows 9x/Me will check the + integrity of the registry and restore its settings from the backup + copy of the registry it stores on each Windows 9x/Me machine. So, you will occasionally notice things changing back to the original settings. - Install the group policy handler for Windows 9x/Me to pick up Group Policies. Look on the - Windows 98 CDROM in \tools\reskit\netadmin\poledit. - Install group policies on a Windows 9x/Me client by double-clicking on + Install the Group Policy handler for Windows 9x/Me to pick up Group Policies. Look on the + Windows 98 CD-ROM in \tools\reskit\netadmin\poledit. + Install Group Policies on a Windows 9x/Me client by double-clicking on grouppol.inf. Log off and on again a couple of times and see if Windows 98 picks up Group Policies. Unfortunately, this needs to be done on every Windows 9x/Me machine that uses Group Policies. @@ -152,28 +152,28 @@ here is incomplete &smbmdash; you are warned. Windows NT4-Style Policy Files - To create or edit ntconfig.pol you must use the NT Server + To create or edit ntconfig.pol, you must use the NT Server Policy Editor, poledit.exe, which is included with NT4 Server - but not with NT Workstation. There is a Policy Editor on an NT4 + but not with NT workstation. There is a Policy Editor on an NT4 Workstation but it is not suitable for creating domain policies. Furthermore, 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. + workstation/server, it will not work with NT clients. However, the files from + the NT Server will run happily enough on an NT4 workstation. - You need poledit.exe, common.adm and winnt.adm. + You need poledit.exe, common.adm, and winnt.adm. It is convenient to put the two *.adm files in the c:\winnt\inf directory, which is where the binary will look for them unless told otherwise. This directory is normally hidden. - The Windows NT policy editor is also included with the Service Pack 3 (and - later) for Windows NT 4.0. Extract the files using servicepackname /x, - that's Nt4sp6ai.exe /x for service pack 6a. The Policy Editor, + The Windows NT Policy Editor is also included with the Service Pack 3 (and + later) for Windows NT 4.0. Extract the files using servicepackname /x + &smbmdash; that's Nt4sp6ai.exe /x for service pack 6a. The Policy Editor, poledit.exe, and the associated template files (*.adm) should - be extracted as well. It is also possible to downloaded the policy template + be extracted as well. It is also possible to download 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. @@ -186,7 +186,7 @@ here is incomplete &smbmdash; you are warned. automatically reversed as the user logs off. The settings that were in the NTConfig.POL file were applied to the client machine registry and apply to the hive key HKEY_LOCAL_MACHINE are permanent until explicitly reversed. This is known - as tattooing. It can have serious consequences downstream and the administrator must + as tattooing. It can have serious consequences downstream, and the administrator must be extremely careful not to lock out the ability to manage the machine at a later date. @@ -197,22 +197,22 @@ here is incomplete &smbmdash; you are warned. Windows NT4 system policies allow the setting of registry parameters specific to - users, groups and computers (client workstations) that are members of the NT4-style + users, groups, and computers (client workstations) that are members of the NT4-style domain. Such policy files will work with MS Windows 200x/XP clients also. - New to MS Windows 2000, Microsoft recently introduced a style of group policy that confers + New to MS Windows 2000, Microsoft recently introduced a 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 improved. -GPOs + GPOs The older NT4-style registry-based policies are known as Administrative Templates - in MS Windows 2000/XP Group Policy Objects (GPOs). The latter includes the ability to set various security + in MS Windows 2000/XP GPOs. The latter includes the ability to set various security configurations, enforce Internet Explorer browser settings, change and redirect aspects of the - users desktop (including the location of My Documents files (directory), as + users desktop (including the location of My Documents files, 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. @@ -220,7 +220,7 @@ here is incomplete &smbmdash; you are warned. Remember, NT4 policy files are named NTConfig.POL and are stored in the root - of the NETLOGON share on the Domain Controllers. A Windows NT4 user enters a username, password + of the NETLOGON share on the domain controllers. A Windows NT4 user enters a username and 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 and modifies the local registry values according to the settings in this file. @@ -230,7 +230,7 @@ here is incomplete &smbmdash; you are warned. Windows 200x GPOs are feature-rich. They are not stored in the NETLOGON share, but 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 + 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). @@ -238,7 +238,7 @@ here is incomplete &smbmdash; you are warned. With NT4 clients, the policy file is read and executed only as each user logs onto the network. MS Windows 200x policies are much more complex &smbmdash; GPOs are processed and applied at client machine - startup (machine specific part) and when the user logs onto the network, the user-specific part + 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 @@ -249,9 +249,9 @@ here is incomplete &smbmdash; you are warned. Administration of Windows 200x/XP Policies -GPOs -System Policy Editor - Instead of using the tool called The System Policy Editor, commonly called Poledit (from the + GPOs + System Policy Editor + 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: @@ -281,8 +281,8 @@ here is incomplete &smbmdash; you are warned. templates. These files have an .adm extension, both in NT4 as well as in Windows 200x/XP. Beware, however, the .adm files are not interchangeable across NT4 and Windows 200x. The latter 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 + well beyond the scope of this documentation to explain how to program .adm files; for that, + refer to the Microsoft Windows Resource Kit for your particular version of MS Windows. @@ -309,7 +309,7 @@ the policy file. Separate policy files for each user, group, or computer are not NTConfig.POL -If you create a policy that will be automatically downloaded from validating Domain Controllers, +If you create a policy that will be automatically downloaded from validating domain controllers, you should name the file NTConfig.POL. As system administrator, you have the option of renaming the policy file and, by modifying the Windows NT-based workstation, directing the computer to update the policy from a manual path. You can do this by either manually changing the registry or by using @@ -319,22 +319,22 @@ but if a change is necessary to all machines, it must be made individually to ea When a Windows NT4/200x/XP machine logs onto the network, the client looks in the NETLOGON share on -the authenticating domain controller for the presence of the NTConfig.POL file. If one exists it is -downloaded, parsed and then applied to the user's part of the registry. +the authenticating domain controller for the presence of the NTConfig.POL file. If one exists, it is +downloaded, parsed, and then applied to the user's part of the registry. GPOs 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 spoiling effect. +acquire policy settings through GPOs that are defined and stored in Active Directory +itself. The key benefit of using AD GPOs is that they impose no registry spoiling effect. This has considerable advantage compared with the use of NTConfig.POL (NT4) style policy updates. In addition to user access controls that may be imposed or applied via system and/or group policies in a manner that works in conjunction with user profiles, the user management environment under -MS Windows NT4/200x/XP allows per domain as well as per user account restrictions to be applied. +MS Windows NT4/200x/XP allows per-domain as well as per-user account restrictions to be applied. Common restrictions that are frequently used include: @@ -363,17 +363,17 @@ parameter can be set using the NT4 Domain User Manager or in the NTCon Anyone who wishes to create or manage Group Policies will need to be familiar with a number of tools. -The following sections describe a few key tools that will help you to create a low maintenance user +The following sections describe a few key tools that will help you to create a low-maintenance user environment. - Samba Editreg Tool-set + Samba Editreg Toolset -editreg -NTUser.DAT -NTConfig.POL + editreg + NTUser.DAT + NTConfig.POL A new tool called editreg is under development. This tool can be used to edit registry files (called NTUser.DAT) that are stored in user and group profiles. NTConfig.POL files have the same structure as the @@ -390,9 +390,9 @@ environment. Windows NT4/200x - The tools that may be used to configure these types of controls from the MS Windows environment are: + 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, and the Registry Editor (regedt32.exe). - Under MS Windows 200x/XP, this is done using the Microsoft Management Console (MMC) with appropriate + Under MS Windows 200x/XP, this is done using the MMC with appropriate snap-ins, the registry editor, and potentially also the NT4 System and Group Policy Editor. @@ -401,8 +401,8 @@ environment. Samba PDC - With a Samba Domain Controller, the new tools for managing user account and policy information include: - smbpasswd, pdbedit, net, rpcclient. + With a Samba domain controller, the new tools for managing user account and policy information include: + smbpasswd, pdbedit, net, and rpcclient. The administrator should read the man pages for these tools and become familiar with their use. @@ -419,15 +419,15 @@ reboot and as part of the user logon: - Network starts, then Remote Procedure Call System Service (RPCSS) and Multiple Universal Naming - Convention Provider (MUP) start. + Network starts, then Remote Procedure Call System Service (RPCSS) and multiple universal naming + convention provider (MUP) start. - Where Active Directory is involved, an ordered list of Group Policy Objects (GPOs) is downloaded + Where Active Directory is involved, an ordered list of GPOs is downloaded and applied. The list may include GPOs that: - Apply to the location of machines in a Directory. + Apply to the location of machines in a directory. Apply only when settings have changed. Depend on configuration of the scope of applicability: local, site, domain, organizational unit, and so on. @@ -436,7 +436,7 @@ reboot and as part of the user logon: - Execution of start-up scripts (hidden and synchronous by default). + Execution of startup scripts (hidden and synchronous by default). @@ -451,26 +451,26 @@ reboot and as part of the user logon: An ordered list of user GPOs is obtained. The list contents depends on what is configured in respect of: - Is the user a Domain Member, thus subject to particular policies? - Loopback enablement, and the state of the loopback policy (Merge or Replace). + Is the user a domain member, thus subject to particular policies? + Loopback enablement, and the state of the loopback policy (merge or replace). Location of the Active Directory itself. Has the list of GPOs changed? No processing is needed if not changed. - User Policies are applied from Active Directory. Note: There are several types. + User policies are applied from Active Directory. Note: There are several types. - Logon scripts are run. New to Windows 200x and Active Directory, logon scripts may be obtained based on Group - Policy objects (hidden and executed synchronously). NT4-style logon scripts are then run in a normal + Logon scripts are run. New to Windows 200x and Active Directory, logon scripts may be obtained based on GPOs + (hidden and executed synchronously). NT4-style logon scripts are then run in a normal window. - The User Interface as determined from the GPOs is presented. Note: In a Samba domain (like an NT4 - Domain), machine (system) policies are applied at start-up; user policies are applied at logon. + The user interface as determined from the GPOs is presented. Note: In a Samba domain (like an NT4 + domain), machine (system) policies are applied at startup; user policies are applied at logon. diff --git a/docs/Samba3-HOWTO/TOSHARG-Printing.xml b/docs/Samba3-HOWTO/TOSHARG-Printing.xml index f7911d246c..d9c5270c76 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Printing.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Printing.xml @@ -1,6 +1,6 @@ - + @@ -27,9 +27,9 @@ consisting of Windows workstations. -A Samba print service may be run on a Stand-alone or Domain Member server, +A Samba print service may be run on a standalone or 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 +It can be made as tightly 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 @@ -50,9 +50,9 @@ as the print subsystem underneath the Samba hood. This chapter deals with the foundations of Samba printing as they are implemented by the more traditional UNIX (BSD and System V-style) -printing systems. Many things covered in this chapter apply also to CUPS. +printing systems. Much of the information in this chapter applies also to CUPS. If you use CUPS, you may be tempted -to jump to the next chapter but you will certainly miss a few things if +to jump to the next chapter, but you will certainly miss a few things if you do. It is recommended that you read this chapter as well as CUPS Printing Support. @@ -62,7 +62,7 @@ linkend="CUPS-printing">CUPS Printing Support. Most of the following examples have been verified on Windows XP Professional clients. Where this document describes the responses to commands given, bear in mind that Windows 200x/XP clients are quite -similar, but may differ in minor details. Windows NT is somewhat different +similar but may differ in minor details. Windows NT is somewhat different again. @@ -76,7 +76,7 @@ again. Samba's printing support always relies on the installed print subsystem of the UNIX OS it runs on. Samba is a middleman. It takes print files from Windows (or other SMB) clients and passes them to the real -printing system for further processing, therefore, it needs to communicate with +printing system for further processing; therefore, it needs to communicate with both sides: the Windows print clients and 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 @@ -84,9 +84,9 @@ have different features and are accessed differently. -This deals with the traditional way of UNIX printing. The next chapter -covers in great detail the more modern Common UNIX Printing -System (CUPS). +This chapter deals with the traditional way of UNIX printing. The next chapter +covers in great detail the more modern +CUPS. CUPS users, be warned: do not just jump on to the next @@ -140,13 +140,13 @@ configuration settings. -Printing Related Configuration Parameters +Printing-Related Configuration Parameters There are a number of configuration parameters to control Samba's printing behavior. Please refer to the man page for &smb.conf; for an -overview of these. As with other parameters, there are Global Level -(tagged with a G in the listings) and Service Level +overview of these. As with other parameters, there are global-level +(tagged with a G in the listings) and service-level (S) parameters. @@ -159,11 +159,11 @@ overview of these. As with other parameters, there are Global Level - Service Level Parameters + Service-Level Parameters These may be specified in the section of &smb.conf;. In this case they define the default behavior of all individual - or service level shares (provided they do not have a different + or service-level shares (provided they do not have a different setting defined for the same parameter, thus overriding the global default). @@ -177,17 +177,17 @@ overview of these. As with other parameters, there are Global Level Simple Print Configuration -Following example shows a simple printing configuration. +Example 20.3.1 shows a simple printing configuration. If you compare this with your own, you may find -additional parameters that have been pre-configured by your OS -vendor. Below is a discussion and explanation of the +additional parameters that have been preconfigured by your OS +vendor. Following is a discussion and explanation of the parameters. This example does not use many parameters. However, in many environments these are enough to provide a valid &smb.conf; file that enables all clients to print. -Simple configuration with BSD printing +Simple Configuration with BSD Printing bsd @@ -206,21 +206,21 @@ This is only an example configuration. Samba assigns default values to all configuration parameters. The defaults are conservative and sensible. When a parameter is specified in the &smb.conf; file, this overwrites the default value. The testparm utility when -run as root is capable of reporting all setting, both default as well as +run as root is capable of reporting all settings, both default as well as &smb.conf; file settings. Testparm gives warnings for all -mis-configured settings. The complete output is easily 340 lines and more, +misconfigured settings. The complete output is easily 340 lines and more, so you may want to pipe it through a pager program. The syntax for the configuration file is easy to grasp. You should know that is not very picky about its syntax. As has been explained -elsewhere in this document, Samba tolerates some spelling errors (such +elsewhere in this book, Samba tolerates some spelling errors (such as instead of -), and spelling is +), and spelling is case-insensitive. It is permissible to use Yes/No or True/False for Boolean settings. Lists of names -may be separated by commas, spaces or tabs. +may be separated by commas, spaces, or tabs. @@ -229,8 +229,8 @@ may be separated by commas, spaces or tabs. To see all (or at least most) printing-related settings in Samba, including the implicitly used ones, try the command outlined below. This command greps -for all occurrences of lp, print, spool, driver, ports -and [ in testparms output. This provides a convenient +for all occurrences of lp, print, spool, driver, ports, +and [ in testparm's output. This provides a convenient overview of the running smbd print configuration. This command does not show individually created printer shares or the spooling paths they may use. Here is the output of my Samba setup, with settings @@ -282,7 +282,7 @@ be important in your future dealings with Samba. testparm in Samba-3 behaves differently from that in 2.2.x: used -without the -v switch it only shows you the settings actually +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. @@ -333,7 +333,7 @@ would Samba conform with my intentions. So, my strong advice is: -Never rely on commented out parameters. +Never rely on commented-out parameters. Always set parameters explicitly as you intend them to behave. @@ -351,11 +351,11 @@ The following is the most minimal configuration file: -This example should show that you can use testparm to test any Samba +This example should show that you can use testparm to test any Samba configuration file. Actually, we encourage you not to change your working system (unless you know exactly what you are doing). Don't rely on the assumption that changes will only take effect after -you re-start smbd! This is not the case. Samba re-reads it every 60 seconds +you restart smbd! This is not the case. Samba rereads it 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. You will now note a few more interesting things; testparm is useful to @@ -394,7 +394,7 @@ configuration. Here is what you can expect to find: -testparm issued two warnings: +testparm issued two warnings: @@ -403,7 +403,7 @@ testparm issued two warnings: -However, this was not fatal and Samba will default to values that will +However, this was not fatal, and Samba will default to values that will work. Please, do not rely on this and do not use this example. This was included to encourage you to be careful to design and specify your setup to do precisely what you require. The outcome on your system may vary for some @@ -413,7 +413,7 @@ options. Warning: do not put a comment sign 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 versions. But the man page clearly says: Internal whitespace in a parameter value is retained verbatim. -This means that a line consisting of, for example: +This means that a line consisting of, for example, @@ -424,7 +424,7 @@ This means that a line consisting of, for example: will regard the whole of the string after the = sign as the value you want to -define. This is an invalid value that will be ignored and a default +define. This is an invalid value that will be ignored, and a default value will be used in its place. @@ -435,21 +435,21 @@ used in its place. Extended Printing Configuration -Next configuration shows a more verbose example configuration +Example 20.4.1 shows a more verbose configuration for print-related settings in a BSD-style printing environment. What follows is a discussion and explanation of the various parameters. We chose to use BSD-style printing here because it is still the most commonly used system on legacy UNIX/Linux installations. New installations predominantly use CUPS, which is discussed in a separate chapter. The example explicitly names many parameters that do not need to be specified because they are set -by default. You could use a much leaner &smb.conf; file. Alternately, you can use +by default. You could use a much leaner &smb.conf; file, or you can use testparm or SWAT to optimize the &smb.conf; file to remove all parameters that are set at default. - Extended BSD Printing Configuration - +Extended BSD Printing Configuration + bsd yes @@ -485,16 +485,16 @@ file to remove all parameters that are set at default. This is an example configuration. You may not find all the settings that are in the configuration file that was provided by the OS vendor. Samba configuration -parameters, if not explicitly set default to a sensible value. +parameters, if not explicitly set, default to a sensible value. To see all settings, as root use the testparm -utility. testparm gives warnings for mis-configured settings. +utility. testparm gives warnings for misconfigured settings. Detailed Explanation Settings -The following is a discussion of the settings from above shown example. +The following is a discussion of the settings from Example 20.4.1. @@ -502,15 +502,15 @@ The following is a discussion of the settings from above shown example. The section is one of four special -sections (along with [, - -and ...). The - contains all parameters which apply +sections (along with , +, +and ). The + contains all parameters that apply to the server as a whole. It is the place for parameters that have only a -global meaning. It may also contain service level parameters that then define +global meaning. It may also contain service-level parameters that 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 +individual section or share, you may, however, override these globally set share settings and specify other values). @@ -525,7 +525,7 @@ share settings and specify other values). commands). The parameter is - normally a service level parameter. Since it is included here in the + normally a service-level parameter. Since it is included here in the section, it will take effect for all printer shares that are not defined differently. Samba-3 no longer supports the SOFTQ printing system. @@ -551,18 +551,18 @@ share settings and specify other values). share listing (as shown in Network Neighborhood or by the net view command). To disable it, you need to explicitly set it to no (commenting it out - will not suffice). The Add Printer Wizard lets you upload printer - drivers to the share and associate it + will not suffice). The Add Printer Wizard lets you upload a printer + driver to the share and associate it with a printer (if the respective queue exists before the - action), or exchange a printer's driver against any other previously + action), or exchange a printer's driver for any other previously uploaded driver. 100 Sets the upper limit to 100 print jobs being active on the Samba server at any one time. Should a client - submit a job that exceeds this number, a no more space - available on server type of error message will be returned by + submit a job that exceeds this number, a "no more space + available on server" type of error message will be returned by Samba to the client. A setting of zero (the default) means there is no limit at all. @@ -576,13 +576,14 @@ share settings and specify other values). @ntadmin Members of the ntadmin group should be able to add - drivers and set printer properties (ntadmin is only an example name, + 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 - . The @ sign precedes group names in the + . The @ sign precedes group names in the /etc/group. A printer admin can do anything to printers via the remote administration interfaces offered by MS-RPC - (see below). In larger installations, the - parameter is normally a per-share parameter. This permits different groups to administer each printer share. + (see Printing Developments Since Samba-2.2). + In larger installations, the parameter is normally + a per-share parameter. This permits different groups to administer each printer share. 20 @@ -598,7 +599,7 @@ share settings and specify other values). It must not be enabled on print shares (with a yes or true setting) that have valid drivers installed on the Samba server. For more detailed - explanations see the &smb.conf; man page. + explanations, see the &smb.conf; man page. @@ -608,14 +609,14 @@ share settings and specify other values). The [printers] Section -This is the second special section. If a section with this name appears in +The printers section 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 printer name it finds in the printcap file. You could regard -this section as a general convenience shortcut to share all printers with +this section as a convenient shortcut to share all printers with minimal configuration. It is also a container for settings that 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. +apply as default to all printers. (For more details, see the &smb.conf; +man page.) Settings inside this container must be share-level parameters. @@ -623,7 +624,7 @@ man page.) Settings inside this container must be Share Level parameters. The is shown next to the share if a client queries the server, either via Network Neighborhood or with - the net view command to list available shares. + the net view command, to list available shares. @@ -631,7 +632,7 @@ man page.) Settings inside this container must be Share Level parameters. The service must 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 + startup. This parameter allows connected clients to open, write to, and submit spool files into the directory specified with the parameter for this service. It is used by Samba to differentiate printer shares from file shares. @@ -643,7 +644,7 @@ man page.) Settings inside this container must be Share Level parameters. Must point to a directory used by Samba to spool incoming print files. It must not be the same as the spool directory specified in the configuration of your UNIX print subsystem! The path typically points to a directory that is world - writable, with the sticky bit set to it. + writable, with the sticky bit set to it. @@ -653,7 +654,7 @@ man page.) Settings inside this container must be Share Level parameters. yes. It makes the share itself invisible in the list of available shares in a net view command or in the Explorer browse - list. (You will of course see the individual printers). + list. (You will of course see the individual printers.) @@ -662,8 +663,8 @@ man page.) Settings inside this container must be Share Level parameters. If this parameter is set to yes, no password is required to connect to the printer's service. Access will be granted with the privileges of the . On many systems the guest - account will map to a user named nobody. This user will usually be found - in the UNIX passwd file with an empty password, but with no valid UNIX login. (On some + account will map to a user named "nobody." This user will usually be found + in the UNIX passwd file with an empty password, but with no valid UNIX login. 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 su - guest and run a system print command like: @@ -678,9 +679,9 @@ man page.) Settings inside this container must be Share Level parameters. Is a synonym for yes. Since we have yes, it - really does not need to be here. (This leads to the interesting question: What if I - by accident have two contradictory settings for the same share? The answer is the - last one encountered by Samba wins. Testparm does not complain about different settings + really does not need to be here. (This leads to the interesting question, What if I + by accident have two contradictory settings for the same share? The answer is that the + last one encountered by Samba wins. testparm does not 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.) @@ -690,7 +691,7 @@ man page.) Settings inside this container must be Share Level parameters. yes Normally (for other types of shares) prevents users from creating or modifying files - in the service's directory. However, in a printable service, it is + in the service's directory. However, in a printable service, it is always allowed to write to the directory (if user privileges allow the connection), but only via print spooling operations. Normal write operations are not permitted. @@ -708,13 +709,12 @@ man page.) Settings inside this container must be Share Level parameters. Any [my_printer_name] Section -If a section appears in the &smb.conf; file, which when given the parameter -yes causes Samba to configure it -as a printer share. Windows 9x/Me clients may have problems with connecting or loading printer drivers -if the share name has more than eight characters. Do not name a printer share with a name that may conflict -with an existing user or file share name. On Client connection requests, Samba always tries to find file -shares with that name first. If it finds one, it will connect to this and will not connect -to a printer with the same name! +If a [my_printer_name] section appears in the &smb.conf; file, which includes the +parameter yes Samba will configure it as a printer share. +Windows 9x/Me clients may have problems with connecting or loading printer drivers if the share name has more +than eight characters. Do not name a printer share with a name that may conflict with an existing user or file +share name. On client connection requests, Samba always tries to find file shares with that name first. If it +finds one, it will connect to this and will not connect to a printer with the same name! @@ -734,8 +734,7 @@ to a printer with the same name! kurt The printer admin definition is different for this explicitly defined printer share from the general - share. It is not a requirement; we - did it to show that it is possible. + share. It is not a requirement; we did it to show that it is possible. @@ -748,13 +747,13 @@ to a printer with the same name! yes - See The [printers] Section. + See Section 20.4.1.2. no - See The [printers] Section. + See Section 20.4.1.2. @@ -804,14 +803,15 @@ your hard disk may soon suffer from shortage of free space. Default UNIX System Printing Commands -You learned earlier on that Samba, in most cases, uses its built-in settings for many parameters -if it cannot find an explicitly stated one in its configuration file. The same is true for the -. The default print command varies depending -on the parameter setting. In the commands listed -below, you will notice some parameters of the form %X where X is -p, s, J, and so on. These letters stand for printer name, spool-file and job ID, respectively. -They are explained in more detail further below. Next table presents an overview of key -printing options but excludes the special case of CUPS that is discussed in CUPS Printing Support. +You learned earlier that Samba, in most cases, uses its built-in settings for many parameters if it cannot +find an explicitly stated one in its configuration file. The same is true for the . The default print command varies depending on the parameter +setting. In the commands listed in Default Printing Settings , you will +notice some parameters of the form %X where X is p, s, +J, and so on. These letters stand for printer name, spool file, and job ID, respectively. They are +explained in more detail in Default Printing Settings presents an overview +of key printing options but excludes the special case of CUPS, is discussed in CUPS Printing Support.
@@ -891,12 +891,12 @@ printing options but excludes the special case of CUPS that is discussed in -We excluded the special case of CUPS here, because it is discussed in the next chapter. For +For printing = CUPS, if Samba is compiled against libcups, it uses the CUPS API to submit jobs. (It is a good idea also to set cups -in case your cupsd.conf is set to write its auto-generated 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 lp -c -d%p -oraw; rm %s. With printing = cups, +in case your cupsd.conf 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; +that is, it uses lp -c -d%p -oraw; rm %s. With printing = cups, and if Samba is compiled against libcups, any manually set print command will be ignored! @@ -907,10 +907,10 @@ and if Samba is compiled against libcups, any manually set print command will be After a print job has finished spooling to a service, the - will be used by Samba via a system() call to process the + will be used by Samba via a system() 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 may not remove the spool -file on its own. So whatever command you specify, you should ensure that the spool file is deleted after +file on its own, so whatever command you specify, you should ensure that the spool file is deleted after it has been processed. @@ -920,7 +920,7 @@ systems. However, if you do not wish to roll your own, you should be well inform built-in commands that Samba uses for each printing subsystem (see Table 17.1). In all the commands listed in the last paragraphs, you see parameters of the form %X. These are -macros, or shortcuts, used as place-holders for the names of real objects. At the time +macros, or shortcuts, used as placeholders 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: @@ -936,7 +936,7 @@ special relevance: The print command must contain at least one occurrence of %s or -the %f. The %p is optional. If no printer name is supplied, +%f. The %p is optional. If no printer name is supplied, the %p will be silently removed from the print command. In this case, the job is sent to the default printer. @@ -949,7 +949,7 @@ but not processed! Most importantly, print files will not be removed, so they wi -Printing may fail on some UNIX systems when using the nobody account. If this happens, create an +Printing may fail on some UNIX systems when using the nobody account. If this happens, create an alternative guest account and give it the privilege to print. Set up this guest account in the section with the guest account parameter. @@ -982,15 +982,15 @@ parameter. Another example is: - + Printing Developments Since Samba-2.2 Prior to Samba-2.2.x, print server support for Windows clients was limited to LanMan printing calls. This is the same protocol level as Windows 9x/Me 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 MS-RPC (RPC = Remote Procedure Calls -). MS-RPCs use the SPOOLSS named pipe for all printing. +are implemented via MS-RPC (Remote Procedure Calls). +MS-RPCs use the SPOOLSS named pipe for all printing. @@ -1016,7 +1016,7 @@ The additional functionality provided by the new SPOOLSS support includes: - Support for NT Access Control Lists (ACL) on printer objects. + Support for NT Access Control Lists (ACL) on printer objects. @@ -1040,9 +1040,9 @@ printers that are made available, either by default or by specific declaration v Windows NT/200x/XP Professional clients do not have to use the standard SMB printer share; they can print directly to any printer on another Windows NT host using MS-RPC. This, of course, assumes that the client has the necessary privileges on the remote host that serves the printer resource. The -default permissions assigned by Windows NT to a printer gives the Print permissions to the well-known +default permissions assigned by Windows NT to a printer gives the print permissions to the well-known Everyone group. (The older clients of type Windows 9x/Me can only print to shared -printers). +printers.) @@ -1057,7 +1057,7 @@ Windows clients? The answer to this is no, it is not necessary. Windows NT/2000 clients can, of course, also run their APW to install drivers locally (which then connect to a Samba-served print queue). This is the same method used by Windows 9x/Me -clients. (However, a bug existed in Samba 2.2.0 that made Windows NT/2000 clients +clients. (However, a bug existed in Samba 2.2.0 that 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). @@ -1076,7 +1076,7 @@ Samba printer share can be achieved by different means: - Using the Imprints tool-set. + Using the Imprints toolset. @@ -1108,7 +1108,7 @@ system, which is responsible for all further processing, as needed. have a service that provides read-only access (with no password required) to support printer driver downloads. However, Samba's initial implementation allowed for a parameter named printer driver location to - be used on a per share basis. This specified the location of the driver files associated with + be used on a per-share basis. This specified the location of the driver files associated with that printer. Another parameter named printer driver provided a means of defining the printer driver name to be sent to the client. @@ -1116,7 +1116,7 @@ system, which is responsible for all further processing, as needed. These parameters, including the printer driver file parameter, are now removed and cannot be used in installations of Samba-3. The share name - is now used for the location of download-able printer + is now used for the location of downloadable printer drivers. It is taken from the service created by Windows NT PCs when a printer is shared by them. Windows NT print servers always have a service that provides read-write access (in the context @@ -1132,19 +1132,19 @@ system, which is responsible for all further processing, as needed. In order to support the uploading and downloading of printer driver files, you must first configure a file share named . The public name of this share is hard coded -in the MS Windows clients. It cannot be renamed since Windows clients are programmed to search for a +in the MS Windows clients. 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. You should modify the server's file to add the global parameters and create the file share (of course, some of the parameter values, such -as are arbitrary and should be replaced with appropriate values for your -site). See next example. +as , are arbitrary and should be replaced with appropriate values for your +site). See Example 20.5.1. -[print\$] example +[print\$] Example members of the ntadmin group should be able to add drivers and set @@ -1173,7 +1173,7 @@ Of course, you also need to ensure that the directory named by the The is a special section in &smb.conf;. It contains settings relevant to -potential printer driver download and is used by windows clients for local print driver installation. +potential printer driver download and is used by Windows clients for local print driver installation. The following parameters are frequently needed in this share section: @@ -1188,7 +1188,7 @@ The following parameters are frequently needed in this share section: /etc/samba/printers - Is the path to the location of the Windows driver file deposit from the UNIX point of view. + The path to the location of the Windows driver file deposit from the UNIX point of view. @@ -1196,7 +1196,7 @@ The following parameters are frequently needed in this share section: Makes the share invisible to clients from the Network Neighborhood. However, you can still mount it from any client - using the net use g:\\sambaserver\print$ command in a DOS-box or the + using the net use g:\\sambaserver\print$ command in a DOS box or the Connect network drive menu> from Windows Explorer. @@ -1212,7 +1212,7 @@ The following parameters are frequently needed in this share section: 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 user has already been - validated by the Domain Controller in order to logon to the Windows NT session), then guest + validated by the domain controller in order to log on to the Windows NT session), then guest access is not necessary. Of course, in a workgroup environment where you just want to print without worrying about silly accounts and security, then configure the share for guest access. You should consider adding Bad User in the section @@ -1232,9 +1232,9 @@ The following parameters are frequently needed in this share section: The was made read-only by the previous setting so we should create a write list entry also. UNIX - groups (denoted with a leading @ character). Users listed here are allowed + groups are denoted with a leading @ character. 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 + update files on the share. Normally, you will want to name only administrative-level user account 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 @@ -1274,7 +1274,7 @@ to support like this: -Required permissions +Required Permissions In order to add a new driver to your Samba host, one of two conditions must hold true: @@ -1285,7 +1285,7 @@ to support like this: - The account used to connect to the Samba host must be named in the printer adminlist. + The account used to connect to the Samba host must be named in the printer admin list. @@ -1309,9 +1309,9 @@ an initial listing of printers that matches the printer shares defined on your S Installing Drivers into [print$] -Have you successfully created the share in &smb.conf;, and have your forced Samba -to re-read its &smb.conf; file? Good. But you are not yet ready to use the new facility. The client driver -files need to be installed into this share. So far it is still an empty share. Unfortunately, it is +Have you successfully created the share in &smb.conf;, and have you forced Samba +to reread its &smb.conf; file? Good. But you are not yet ready to use the new facility. The client driver +files need to be installed into this share. So far, it is still an empty share. Unfortunately, it is not enough to just copy the driver files over. They need to be correctly installed so that appropriate records for each driver will exist in the Samba internal databases so it can provide the correct @@ -1321,7 +1321,7 @@ now discuss two alternative ways to install the drivers into - Using the Samba command-line utility rpcclient with its various subcommands (here: + Using the Samba command-line utility rpcclient with its various subcommands (here, adddriver and setdriver) from any UNIX workstation. @@ -1339,30 +1339,27 @@ The latter option is probably the easier one (even if the process may seem a lit Add Printer Wizard Driver Installation -The initial listing of printers in the Samba host's Printers folder accessed from a +The printers initially listed in the Samba host's Printers folder accessed from a client's Explorer will have no real printer driver assigned to them. By default this driver name is set to a null string. This must be changed now. The local Add Printer Wizard (APW), run from NT/2000/XP clients, will help us in this task. -Installation of a valid printer driver is not straightforward. You must attempt -to view the printer properties for the printer to which you want the driver assigned. Open the Windows -Explorer, open Network Neighborhood, browse to the Samba host, open Samba's Printers -folder, right-click on the printer icon and select Properties.... You are now trying to -view printer and driver properties for a queue that has this default NULL driver -assigned. This will result in the following error message: +Installation of a valid printer driver is not straightforward. You must attempt to view the printer properties +for the printer to which you want the driver assigned. Open Windows Explorer, open Network +Neighborhood, browse to the Samba host, open Samba's Printers folder, right-click +on the printer icon, and select Properties.... You are now trying to view printer and +driver properties for a queue that has this default NULL driver assigned. This will +result in the following error message: 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? - - 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? - - -Do not click on Yes! Instead, click on No 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 now have the choice of: +Do not click on Yes! Instead, click on No +in the error dialog. Now you will be presented with the printer properties window. From here, the way to +assign a driver to a printer is open. You now have the choice of: @@ -1379,7 +1376,7 @@ to a printer is open to us. You now have the choice of: 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 +your connection is, in fact, set up as a user with privileges (if in doubt, use smbstatus to check for this). 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. @@ -1389,7 +1386,8 @@ you will need to use the Sharing tab of the printer propert Assuming you have connected with an administrative (or root) account (as named by the 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 in Installing Print Drivers Using rpcclient. +device settings, please consider the advice given further in Installing +Print Drivers Using rpcclient. @@ -1403,7 +1401,7 @@ up in a valid way is to do it from the UNIX command line. This involves four dis - Gather info about required driver files and collect the files. + Gather information about required driver files and collect the files. @@ -1412,7 +1410,7 @@ up in a valid way is to do it from the UNIX command line. This involves four dis - Run the rpcclient command line utility once with the adddriver + Run the rpcclient command-line utility once with the adddriver subcommand. @@ -1429,8 +1427,8 @@ We provide detailed hints for each of these steps in the paragraphs that follow. Identifying Driver Files -To find out about the driver files, you have two options. You could check the contents of the driver -CDROM that came with your printer. Study the *.inf files lcoated on the CDROM. This +To find out about the driver files, you have two options. You can check the contents of the driver +CDROM that came with your printer. Study the *.inf files located on the CD-ROM. This may not be possible, since the *.inf file might be missing. Unfortunately, vendors have now started to use their own installation programs. These installations packages are often in some Windows platform archive format. Additionally, the files may be re-named during the installation process. This makes it @@ -1438,8 +1436,8 @@ extremely difficult to identify the driver files required. -Then you only have the second option. Install the driver locally on a Windows client and -investigate which file names and paths it uses after they are installed. (You need to repeat +Then you have the second option. Install the driver locally on a Windows client and +investigate which filenames and paths it uses after they are installed. (You need to repeat this procedure for every client platform you want to support. We show it here for the W32X86 platform only, a name used by Microsoft for all Windows NT/200x/XP clients.) @@ -1450,8 +1448,8 @@ A good method to recognize the driver files is to print the test page from the d Properties dialog (General 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 Driver File, Data File, Config File, -Help File and (optionally) the Dependent Driver Files -(this may vary slightly for Windows NT). You need to take a note of all file names for the next steps. +Help File, and (optionally) Dependent Driver Files +(this may vary slightly for Windows NT). You need to note all filenames for the next steps. @@ -1459,13 +1457,13 @@ Another method to quickly test the driver filenames and related paths is provide rpcclient utility. Run it with enumdrivers or with the getdriver subcommand, each at the 3 info level. In the following example, TURBO_XP is the name of the Windows PC (in this case it was a Windows XP Professional -laptop). I installed the driver locally to TURBO_XP, from a Samba server called KDE-BITSHOP. +laptop). I installed the driver locally to TURBO_XP from a Samba server called KDE-BITSHOP. We could run an interactive rpcclient session; then we would get an rpcclient /> prompt and would type the subcommands at this prompt. This is left as -a good exercise to the reader. For now, we use rpcclient with the -parameter to execute a single subcommand line and exit again. This is the method you would use if you +a good exercise for you. For now, we use rpcclient with the +parameter to execute a single subcommand line and exit again. This is the method you 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: +different quotation marks used to overcome the different spaces between words: @@ -1506,22 +1504,22 @@ You may notice that this driver has quite a large number of Dependent WIN40 architecture installed. This name is used by Microsoft for the Windows 9x/Me platforms. If we want to support these, we need to install the Windows 9x/Me driver files in addition to those for W32X86 (i.e., the Windows NT72000/XP clients) onto a -Windows PC. This PC can also host the Windows 9x/Me drivers, even if it runs on Windows NT, 2000 or XP. +Windows PC. This PC can also host the Windows 9x/Me drivers, even if it runs on Windows NT, 2000, or XP. Since the share is usually accessible through the Network Neighborhood, you can also use the UNC notation from Windows Explorer to poke at it. The Windows 9x/Me driver files will end up in subdirectory 0 of the WIN40 -directory. The full path to access them will be \\WINDOWSHOST\print$\WIN40\0\. +directory. The full path to access them is \\WINDOWSHOST\print$\WIN40\0\. 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 types of drivers install 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 purpose. These types of drivers install into the 3 subdirectory. @@ -1553,17 +1551,16 @@ getting file \W32X86\2\Hddm91c1_de.DLL of size 876544 as Hddm91c1_de.DLL 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 parameter, separated by semi-colons. -This effects that all commands are executed in sequence on the remote Windows server before smbclient -exits again. +that this time we passed several commands to the parameter, separated by semicolons. +This ensures that all commands are executed in sequence on the remote Windows server before +smbclient exits again. -Remember to repeat the procedure for the WIN40 architecture should -you need to support Windows 9x/Me/XP clients. Remember too, the files for these architectures are in the -WIN40/0/ subdirectory. Once this is complete, we can run smbclient ... -put to store the collected files on the Samba server's -share. +Remember to repeat the procedure for the WIN40 architecture should you need to +support Windows 9x/Me/XP clients. Remember too, the files for these architectures are in the +WIN40/0/ subdirectory. Once this is complete, we can run smbclient. . +.put to store the collected files on the Samba server's share. @@ -1571,22 +1568,21 @@ share. Installing Driver Files into [print$] -We are now going to locate the driver files into the -share. Remember, the UNIX path to this share has been defined -previously in your words missing here. You -also have created subdirectories for the different Windows client types you want to -support. Supposing your share maps to the UNIX path -/etc/samba/drivers/, your driver files should now go here: +We are now going to locate the driver files into the share. Remember, the +UNIX path to this share has been defined previously in your &smb.conf; file. You also have created +subdirectories for the different Windows client types you want to support. If, for example, your + share maps to the UNIX path /etc/samba/drivers/, your +driver files should now go here: - For all Windows NT, 2000 and XP clients into /etc/samba/drivers/W32X86/ but + For all Windows NT, 2000, and XP clients, /etc/samba/drivers/W32X86/ but not (yet) into the 2 subdirectory. - For all Windows 95, 98 and ME clients into /etc/samba/drivers/WIN40/ but not + For all Windows 95, 98, and Me clients, /etc/samba/drivers/WIN40/ but not (yet) into the 0 subdirectory. @@ -1631,7 +1627,7 @@ putting file HDNIS01Aux.dll as \W32X86\HDNIS01Aux.dll putting file HDNIS01_de.NTF as \W32X86\HDNIS01_de.NTF -Whew &smbmdash; that was a lot of typing! Most drivers are a lot smaller &smbmdash; many only having three generic +Whew &smbmdash; that was a lot of typing! Most drivers are a lot smaller &smbmdash; many have only three generic PostScript driver files plus one PPD. While we did retrieve the files from the 2 subdirectory of the W32X86 directory from the Windows box, we do not put them (for now) in this same subdirectory of the Samba box. This relocation will automatically be done by the @@ -1690,11 +1686,11 @@ PDFcreator2.PPD A 15746 Sun Apr 20 22:24:07 2003 Notice that there are already driver files present in the 2 subdirectory (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 +steps away from being able to use them on the clients. The only thing you could do now is 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 does not yet know that -these files are something special, namely printer driver files and it does not know +is that Samba does not yet know that +these files are something special, namely printer driver files, and it does not know to which print queue(s) these driver files belong. @@ -1706,7 +1702,7 @@ to which print queue(s) these driver files belong. Next, you must tell Samba about the special category of the files you just uploaded into the share. This is done by the adddriver 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: +following command and its output has been edited for readability: @@ -1733,8 +1729,8 @@ Printer Driver dm9110 successfully installed. 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 an NT_STATUS_UNSUCCESSFUL 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 +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. provides a more detailed description, should you need it. @@ -1798,27 +1794,27 @@ Another verification is that the timestamp of the printing TDB files is now upda Check Samba for Driver Recognition -Now the driver should be registered with Samba. We can easily verify this, and will do so in a +Now the driver should be registered with Samba. We can easily verify this and will do so in a moment. However, this driver is not yet associated with a particular printer. We may check the driver status of the files by at least three methods: - From any Windows client browse Network Neighborhood, find the Samba host and open the Samba + From any Windows client browse Network Neighborhood, find the Samba host, and open the Samba Printers and Faxes folder. Select any printer icon, right-click and select the printer Properties. Click the Advanced tab. Here is a field indicating the driver for that printer. A drop-down menu allows you to change that driver (be careful not to do this unwittingly). You can use this list to view - all drivers known to Samba. Your new one should be among them. (Each type of client will only - see his own architecture's list. If you do not have every driver installed for each platform, + all drivers known to Samba. Your new one should be among them. (Each type of client will + see only its own architecture's list. If you do not have every driver installed for each platform, the list will differ if you look at it from Windows95/98/ME or Windows NT/2000/XP.) From a Windows 200x/XP client (not Windows NT) browse Network Neighborhood, - search for the Samba server and open the server's Printers folder, - right-click on the white background (with no printer highlighted). Select Server + search for the Samba server, open the server's Printers folder, + and right-click on the white background (with no printer highlighted). Select Server Properties. On the Drivers tab you will see the new driver listed. This view enables you to also inspect the list of files belonging to that driver (this does not work on Windows NT, but only on Windows 2000 and Windows XP; Windows NT does not @@ -1832,7 +1828,7 @@ status of the files by at least three methods: - From a UNIX prompt, run this command (or a variant thereof) where + From a UNIX prompt, run this command (or a variant thereof), where SAMBA-CUPS is the name of the Samba host and xxxx represents the actual Samba password assigned to root: @@ -1843,11 +1839,11 @@ status of the files by at least three methods: You will see a listing of all drivers Samba knows about. Your new one should be among them. But it is only listed under the [Windows NT x86] heading, not under , since you didn't install that part. Or did you? - You will see a listing of all drivers Samba knows about. Your new one should be among them. In + In our example it is named dm9110. Note that the third column shows the other installed drivers twice, one time for each supported architecture. Our new driver only shows up for Windows NT 4.0 or 2000. To have it present for Windows - 95, 98 and ME, you'll have to repeat the whole procedure with the WIN40 architecture + 95, 98, and Me, you'll have to repeat the whole procedure with the WIN40 architecture and subdirectory. @@ -1887,7 +1883,7 @@ You will be able to bind that driver to any print queue (however, you are respon you associate drivers to queues that make sense with respect to target printers). You cannot run the rpcclient adddriver command repeatedly. Each run consumes the files you had put into the share by moving them into the -respective subdirectories. So you must execute an smbclient ... put command before +respective subdirectories, so you must execute an smbclient ... put command before each rpcclient ... adddriver command. @@ -1897,7 +1893,7 @@ each rpcclient ... adddriver command. Samba needs to know which printer owns which driver. Create a mapping of the driver to a printer, and -store this info in Samba's memory, the TDB files. The rpcclient setdriver command +store this information in Samba's memory, the TDB files. The rpcclient setdriver command achieves exactly this: @@ -1942,7 +1938,7 @@ or at least send an HUP signal to all running smbd processes to work around this Client Driver Installation Procedure -As Don Quixote said: The proof of the pudding is in the eating. The proof +As Don Quixote said, The proof of the pudding is in the eating. 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. @@ -1952,7 +1948,7 @@ not as straightforward as it may seem. Read on. 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 +separately). Once this is done correctly, all further clients are easy to set up and shouldn't need further attention. What follows is a description for the recommended first procedure. You work now from a client workstation. You should guarantee that your connection is not unwittingly mapped to bad user nobody. In a DOS box type: @@ -1965,8 +1961,8 @@ Replace root, if needed, by another valid the definition. Should you already be connected as a different user, you will get an error message. There is no easy way to get rid of that connection, because Windows does not seem to know a concept of logging off from a share connection (do not confuse this with logging off from the local workstation; that is -a different matter). On Windows NT/2K, you can force a logoff from all smb/cifs connections by restarting the -workstation service. You can try to close all Windows file explorer and Internet Explorer for +a different matter). On Windows NT/200x, you can force a logoff from all smb/cifs connections by restarting the +workstation service. You can try to close all Windows file explorers and Internet Explorer for Windows. As a last resort, you may have to reboot. Make sure there is no automatic reconnection 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 smbstatus command on Samba), @@ -1997,27 +1993,27 @@ do this from the Windows workstation: -A new printer (named printername on Samba-server) should now have -appeared in your local Printer folder (check Start -- -Settings -- Control Panel -- Printers +A new printer (named printername on Samba server) should now have +appeared in your local Printer folder (check Start -> +Settings -> Control Panel -> Printers and Faxes). -Most likely you are now tempted to try to print a test page. After all, you now can open the printer +Most likely you are tempted to try to 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 Unable to print Test Page. 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. +chances are that you get an error message saying "Unable to print Test Page." 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. -You must make sure that a valid Device Mode is set for the +You must make sure that a valid device mode is set for the driver. We now explain what that means. - + Setting Device Modes on New Printers @@ -2026,53 +2022,54 @@ For a printer to be truly usable by a Windows NT/200x/XP client, it must possess - A valid Device Mode generated by the driver for the printer (defining things + A valid device mode generated by the driver for the printer (defining things like paper size, orientation and duplex settings). - A complete set of Printer Driver Data generated by the driver. + A complete set of printer driver data generated by the driver. If either 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 it produces a harvest of -error messages when attempting to print. Samba stores the named values and all printing related information in +worst cases, unreadable garbage or nothing at all comes from the printer, or it produces a harvest of +error messages when attempting to print. Samba stores the named values and all printing-related information in its internal TDB database files (ntprinters.tdb, ntdrivers.tdb, -printing.tdb and ntforms.tdb). +printing.tdb, and ntforms.tdb). -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 (the Samba host) to healthy +The device mode and the set of printer driver data are basically collections +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 (the Samba host) to healthy values so 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 200x/XP) client, as is discussed +This can be achieved by accessing the drivers remotely from an NT (or 200x/XP) client, as discussed in the following paragraphs. -Be aware that a valid Device Mode can only be initiated by a -, or root -(the reason should be obvious). Device Modes can only be correctly -set by executing the printer driver program itself. Since Samba cannot execute this Win32 platform driver +Be aware that a valid device mode can only be initiated by a + or root +(the reason should be obvious). Device modes can be correctly +set only by executing the printer driver program itself. Since Samba cannot 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 automatically generate the Printer Driver Data that is needed when they are uploaded to the +most drivers automatically generate the printer driver data that is needed when they are uploaded to the share with the help of the APW or rpcclient. -The generation and setting of a first valid Device Mode, however, requires some tickling from a client, +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 +effect to happen and feeds back the new device mode to our Samba server. You can use the native Windows NT/200x/XP printer properties page from a Window client for this: +Procedure to Initialize the Printer Driver Settings - Browse the Network Neighborhood. + Browse the Network Neighborhood. @@ -2088,14 +2085,14 @@ NT/200x/XP printer properties page from a Window client for this: - Right-click on the printer (you may already be here, if you followed the last section's description). + Right-click on the printer (you may already be here if you followed the last section's description). At the bottom of the context menu select Properties (if the menu still offers the Connect entry further above, you need to click on that one first to achieve the driver - installation as shown in the last section). + installation, as shown in the last section). @@ -2112,20 +2109,20 @@ NT/200x/XP printer properties page from a Window client for this: While you are at it, you may also want to set the desired printing defaults here, which then apply to all future - client driver installations on the remaining from now on. + client driver installations. -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, +This procedure executes the printer driver program on the client platform and feeds back the correct +device mode to Samba, which now stores it in its TDB files. Once the driver is installed on the client, you can follow the analogous steps by accessing the local Printers folder, too, if you are a Samba printer admin user. From now on, printing should work as expected. -Samba includes a service level parameter name default devmode for generating a default -Device Mode for a printer. Some drivers will function well with Samba's default set of properties. Others +Samba includes a service-level parameter name default devmode for generating a default +device mode for a printer. Some drivers 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. @@ -2135,9 +2132,9 @@ the client generate a valid device mode for the printer and store it on the serv Additional Client Driver Installation -Every additional driver may be installed, along the lines described -above. Browse network, open the -Printers folder on Samba server, right-click on Printer and choose +Every additional driver may be installed in the same way as just described. +Browse Network Neighborhood, open the +Printers folder on Samba server, right-click on Printer, and choose Connect.... 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 Printers and Faxes folder. @@ -2169,14 +2166,14 @@ command... field from the Start menu. After you installed the driver on the Samba server (in its -share, you should always make sure that your first client installation completes correctly. Make it a +share), you should always make sure that your first client installation completes correctly. Make it a habit for yourself to build the very first connection from a client as . This is to make sure that: - A first valid Device Mode is really initialized (see above for more - explanation details). + A first valid device mode is really initialized (see above Setting Device Modes on New Printers) for more explanation details). @@ -2202,16 +2199,16 @@ To connect as root to a Samba printer, try this command from a Windows 200x/XP D -You will be prompted for root's Samba-password; type it, wait a few +You will be prompted for root's Samba password; type it, wait a few seconds, click on Printing Defaults, and proceed to set the job options that should be used as defaults by all -clients. Alternately, instead of root you can name one other member of the from the setting. +clients. Alternatively, instead of root you can name one other member of the from the setting. - Now all the other users downloading and installing the driver the same way (called -Point'n'Print) will have the same defaults set for them. If you miss this step -you'll get a lot of Help Desk calls from your users, but maybe you like to talk to people. + Now all the other users downloading and installing the driver the same way (using +Point'n'Print) will have the same defaults set for them. If you miss this step, +you'll get a lot of help desk calls from your users, but maybe you like to talk to people. @@ -2222,11 +2219,11 @@ you'll get a lot of Help Desk calls from your users, but maybe you like to talk Your driver is installed. It is now ready for Point'n'Print installation by the clients. You may have tried to download and use it -onto your first client machine, but +on your first client machine, but wait. Let's make sure you are acquainted first with a few tips and tricks you may find useful. For example, suppose you did not set the defaults on the printer, as advised in the preceding paragraphs. Your users complain about various issues (such as, We need to set the paper size -for each job from Letter to A4 and it will not store it.) +for each job from Letter to A4 and it will not store it). @@ -2236,10 +2233,10 @@ for each job from Letter to A4 and it will not store it.) The last sentence might be viewed with mixed feelings by some users and Admins. They have struggled for hours and could not arrive at a point where their settings seemed to be saved. It is not their fault. The confusing -thing is that in the multi-tabbed dialog that pops up when you right-click +thing is that in the multitabbed dialog that pops up when you right-click on the printer name and select Properties, you can arrive at two dialogs that appear identical, each claiming that they help -you to set printer options in three different ways. Here is the definite +you to set printer options in three different ways. Here is the definitive answer to the Samba default driver setting FAQ: @@ -2247,7 +2244,7 @@ answer to the Samba default driver setting FAQ: for all users on Windows 200x/XP. Why not? -How are you doing it? I bet the wrong way. (It is not easy to find out, though). There are three different +How are you doing it? I bet the wrong way. (It is not easy to find out, though.) There are three different ways to bring you to a dialog that seems to set everything. All three dialogs look the same, but only one of them does what you intend. You need to be Administrator or Print Administrator to do this for all @@ -2271,7 +2268,7 @@ users. Here is how I reproduce it in an XP Professional: Right-click on the printer (remoteprinter on cupshost) and select in the context menu - Properties + Properties. Click on the General tab. @@ -2285,14 +2282,14 @@ users. Here is how I reproduce it in an XP Professional: - The third and correct way: (should you do this from the beginning, just carry out steps 1 - and 2 from the second method above). + The third and correct way (should you do this from the beginning, just carry out steps 1 + and 2 from the second method above): Click on the Advanced tab. (If everything is grayed out, then you are not logged - in as a user with enough privileges). + in as a user with enough privileges.) Click on the Printing Defaults button. @@ -2303,26 +2300,27 @@ users. Here is how I reproduce it in an XP Professional: A new dialog opens. Compare this one to the other. Are they - identical looking comparing one from - B.5 and one from A.3". + identical when you compare one from + B.5 and one from A.3? -Do you see any difference in the two settings dialogs? I do not either. However, only the last one, which -you arrived at with steps C.1 through 6 will permanently save any settings which will then become the defaults +Do you see any difference in the two settings dialogs? I do not either. However, only the last one, which you +arrived at with steps C.1 through C.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 ( in ) before -a client downloads the driver (the clients can later set their own per-user defaults -by following procedures A or B above). Windows 200x/XP allow per-user 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 Default Print -Values for Printer Foo on Server Bar" (which is the one you need) and the other is called -Print Settings for Printer Foo on Server Bar. The last one is the one you -arrive at when you right-click on the printer and select Print Settings.... This -is the one that you were taught to use back in the days of Windows NT, so it is only natural to try the -same way with Windows 200x/XP. You would not dream that there is now a different path to arrive at an -identically looking, but functionally different, dialog to set defaults for all users. +administrator () before a client downloads the driver (the clients can +later set their own per-user defaults by following procedures A or B above). Windows 200x/XP allow per-user +default settings and the ones the administrator gives them before they set up their own. The parents of the +identical-looking dialogs have a slight difference in their window names; one is called +Default Print Values for Printer Foo on Server Bar (which is the one you +need) and the other is called Print Settings for Printer Foo on Server +Bar. The last one is the one you arrive at when you right-click on the printer and +select Print Settings.... This is the one that you were taught to use back in the +days of Windows NT, so it is only natural to try the same way with Windows 200x/XP. You would not dream that +there is now a different path to arrive at an identical-looking, but functionally different, dialog to set +defaults for all users. Try (on Windows 200x/XP) to run this command (as a user with the right privileges): @@ -2333,7 +2331,7 @@ rundll32 printui.dll,PrintUIEntry /p /t3 /n\\SAMBA-SERVER -To see the tab with the Printing Defaults button (the one you need),also run this command: +To see the tab with the Printing Defaults button (the one you need), also run this command: @@ -2342,8 +2340,8 @@ rundll32 printui.dll,PrintUIEntry /p /t0 /n\\SAMBA-SERVER To see the tab with the Printing Preferences -button (the one which does not set system-wide defaults), you can -start the commands from inside a DOS box" or from Start -> Run. +button (the one that does not set systemwide defaults), you can +start the commands from inside a DOS box or from Start -> Run. @@ -2354,7 +2352,7 @@ start the commands from inside a DOS box" or from Start -> One issue that has arisen during the recent development phase of Samba is the need to support driver -downloads for hundreds of printers. Using Windows NT APW here is somewhat awkward (to say the least). If +downloads for hundreds of printers. Using Windows NT APW for this task is somewhat awkward (to say the least). If you do not want to acquire RSS pains from the printer installation clicking orgy alone, you need to think about a non-interactive script. @@ -2365,7 +2363,7 @@ command can be used to set the driver associated with an installed queue. If the once and registered with the printing TDBs, it can be used by multiple print queues. In this case, you just need to repeat the setprinter subcommand of rpcclient for every queue (without the need to conduct the adddriver -repeatedly). The following is an example of how this could be accomplished: +repeatedly). The following is an example of how this can be accomplished: @@ -2439,8 +2437,8 @@ repeatedly). The following is an example of how this could be accomplished: It may not be easy to recognize that the first call to enumprinters 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 setdriver command -succeeded, all is well. +the two commas in the description field). After the setdriver command +succeeds, all is well. @@ -2508,8 +2506,8 @@ add the printer to the UNIX print system (i.e., to /etc/printcap When using the APW from a client, if the named printer share does not exist, smbd will execute the - and re-parse to the to attempt to locate the new printer -share. If the share is still not defined, an error of Access Denied is returned to + and reparse 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. The is executed under the context of the connected user, not necessarily a root account. A bad user may have connected you unwittingly under the wrong privilege. You should check it by using the smbstatus command. @@ -2522,14 +2520,14 @@ privilege. You should check it by using the smbstatus command 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. +to close all Explorer windows, and perhaps reboot. The net use \\SAMBA-SERVER\sharename /user:root gives you an error message: 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, + several user names are not allowed. Disconnect all previous connections to the server, esp. the shared resource, and try again. @@ -2550,7 +2548,7 @@ reconnect. Same error message, but not a single line in the log. You start to wo 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 &smbmdash; and this times it works! Windows seems to cache connection information somewhere and -does not keep it up-to-date (if you are unlucky you might need to reboot to get rid of the error message). +does not keep it up to date (if you are unlucky, you might need to reboot to get rid of the error message). @@ -2558,7 +2556,7 @@ The easiest way to forcefully terminate all connections from your client to a se &dosprompt; net use * /delete -This will disconnect all mapped drives also and will allow you create fresh connection as required. +This will also disconnect all mapped drives and will allow you create fresh connection as required. @@ -2566,16 +2564,16 @@ This will disconnect all mapped drives also and will allow you create fresh conn Take Care When Assembling Driver Files -You need to be extremely careful when you take notes about the files and belonging to a particular +You need to be extremely careful when you take notes about the files belonging to a particular driver. Don't confuse the files for driver version 0 (for Windows 9x/Me, going into -[print$]/WIN/0/), driver version 2 (Kernel Mode driver for Windows NT, -going into [print$]/W32X86/2/ may be used on Windows 200x/XP also), and -driver version 3 (non-Kernel Mode driver going into [print$]/W32X86/3/ +[print$]/WIN/0/), driver version 2 (kernel mode driver for Windows NT, +going into [print$]/W32X86/2/; may be used on Windows 200x/XP also), and +driver version 3 (non-kernel mode driver going into [print$]/W32X86/3/; cannot be used on Windows NT). Quite often these different driver versions contain files that have the same name but actually are very different. If you look at them from the Windows Explorer (they reside in %WINDOWS%\system32\spool\drivers\W32X86\), 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 +would show mixed or lowercase letters, so it is easy to confuse them. If you install them manually using rpcclient 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 This server has no appropriate driver for the printer. @@ -2707,7 +2705,7 @@ comparison: In my example were even more differences than shown here. Conclusion: you must be careful to select the correct driver files for each driver version. Don't rely on the -names alone and don't interchange files +names alone, and don't interchange files belonging to different driver versions. @@ -2722,57 +2720,59 @@ Windows NT/2000 print servers associate a port with each printer. These normally 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; rather it is a requirement of Windows clients. They insist on being told about an available -port when they request this information, otherwise they throw an error message at you. So Samba fakes the port +port when they request this information; otherwise, they throw an error message at you. So Samba fakes the port information to keep the Windows clients happy. 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. +pooling assigns a logical printer to multiple ports as a form of load balancing or failover. -If you require multiple ports be defined for some reason or another (my users and my boss should not know -that they are working with Samba), configure +If you require multiple ports to be defined for some reason or another (my users and my boss should not know +that they are working with Samba), configure the , which can be used to define an external program that generates a listing of ports on a system. -Avoiding Common Client Driver Mis-configuration +Avoiding Common Client Driver Misconfiguration So now the printing works, but there are still problems. Most jobs print well, some do not print at all. Some jobs have problems with fonts, which do not look good. Some jobs print fast and some are dead-slow. We cannot cover it all, but we want to encourage you to read the brief paragraph about -Avoiding the Wrong PostScript Driver Settings in the CUPS Printing part of this document. +Avoiding the Wrong PostScript Driver Settings in CUPS Printing +Chapter, Avoiding Critical PostScript Driver Settings on the +Client. -The Imprints Tool-set +The Imprints Toolset -The Imprints tool set provides a UNIX equivalent of the Windows NT Add Printer -Wizard. For complete information, please refer to the +The Imprints tool set provides a UNIX equivalent of the Windows NT APW. +For complete information, please refer to the Imprints Web site as well as the documentation -included with the imprints source distribution. This section only provides a brief introduction to +included with the Imprints source distribution. This section provides only a brief introduction to the features of Imprints. -Unfortunately, the Imprints tool-set is no longer maintained. As of December 2000, the project is in +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 Perl coding and an interest in MS-RPC-based -printing used in Samba. If you wish to volunteer, please coordinate -your efforts on the Samba technical -mailing list. The tool-set is still in usable form, but only for a series of older printer models where +printing used in 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. +should have a future. Information regarding the Imprints toolset can be obtained from the Imprints home page. -What is Imprints? +What Is Imprints? Imprints is a collection of tools for supporting these goals: @@ -2798,8 +2798,8 @@ Imprints is a collection of tools for supporting these goals: Creating Printer Driver Packages -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 +The process of creating printer driver packages is beyond the scope of this document (refer to Imprints.txt, +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. @@ -2811,7 +2811,7 @@ installation client. 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 is digitally signed via GnuPG, which can be used to verify that the package downloaded is actually the one referred in the Imprints database. It is strongly recommended that this security check not be disabled. @@ -2828,8 +2828,8 @@ installation client comes in two forms: - A set of command line Perl scripts. - A GTK+ based graphical interface to the command line Perl scripts. + A set of command-line Perl scripts. + A GTK+-based graphical interface to the command-line Perl scripts. @@ -2839,7 +2839,7 @@ remote Samba and Windows NT print servers. -The basic installation process is in four steps and Perl code is wrapped around smbclient and rpcclient. +The basic installation process is in four steps, and Perl code is wrapped around smbclient and rpcclient. @@ -2852,13 +2852,13 @@ The basic installation process is in four steps and Perl code is wrapped around - rpcclient: Issue an AddPrinterEx() MS-RPC to actually create the printer. + rpcclient: Issues an AddPrinterEx() MS-RPC to actually create the printer. -One of the problems encountered when implementing the Imprints tool set was the name space issues between +One of the problems encountered when implementing the Imprints tool set was the namespace 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. +II NTX v51.8, and Windows 95 calls its version of this driver Apple LaserWriter II NTX. @@ -2872,9 +2872,9 @@ quick look in the Windows NT 4.0 system registry at: -will reveal that Windows NT always uses the NT driver name. This is okay as Windows NT always requires +will reveal that Windows NT always uses the NT driver name. This is okay because Windows NT always requires that at least the Windows NT version of the printer driver is present. Samba does not have the -requirement internally, therefore, How can you use the NT driver name if it has not already been installed? +requirement internally; therefore, How can you use the NT driver name if it has not already been installed? @@ -2901,7 +2901,7 @@ Scripts. You can see what options are available by typing in the command prompt A window pops up that shows you all of the command-line switches available. An extensive list of examples -is also provided. This is only for Win 200x/XP, it does not work on +is also provided. This is only for Windows 200x/XP; it does not work on Windows NT. Windows NT probably has 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 200x/XP Windows @@ -2920,19 +2920,19 @@ Here is a list of the used command-line parameters: /dn - deletes a network printer + deletes a network printer. /q - quiet modus + quiet modus. /n - names a printer + names a printer. /in - adds a network printer connection + adds a network printer connection. /y - sets printer as default printer + sets printer as default printer. @@ -2940,7 +2940,7 @@ Here is a list of the used command-line parameters: Line 1 deletes a possibly existing previous network printer infotec2105-IPDS (which had used native Windows drivers with LPRng that were removed from the server that was - converted to CUPS). The /q at the end eliminates Confirm + converted to CUPS). The /q at the end prevents confirm or error dialog boxes from popping up. They should not be presented to the user logging on. @@ -2949,31 +2949,31 @@ Here is a list of the used command-line parameters: infotec2105-PS (which actually is the 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 must 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 - cupsaddsmb). The driver is now auto-downloaded to the client PC where the + the user logging in (e.g., by a procedure as discussed earlier in this chapter or by running + cupsaddsmb). The driver is now autodownloaded to the client PC where the user is about to log in. 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 + 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. The second line only works if the printer infotec2105-PS has an already working -print queue on the cupsserver, and if the +print queue on the cupsserver and if the printer drivers have been successfully uploaded (via the APW, smbclient/rpcclient, or cupsaddsmb) into the driver repository of Samba. Some Samba versions -prior to version 3.0 required a re-start of smbd after the printer install and the driver upload, +prior to version 3.0 required a restart of smbd after the printer install and the driver upload; otherwise the script (or any other client driver download) would fail. -Since there no easy way to test for the existence of an installed network printer from the logon script, -do not bother checking, just allow the de-installation/re-installation to occur every time a user logs in; +Since there is no easy way to test for the existence of an installed network printer from the logon script, +do not bother checking. Just allow the de-installation/re-installation to occur every time a user logs in; it's really quick anyway (1 to 2 seconds). @@ -2987,15 +2987,15 @@ The additional benefits for this are: - It allows for roaming users' login into the domain from different workstations. + It allows for roaming users' login to the domain from different workstations. Since network printers are installed per user, this much simplifies the process of keeping the installation -up-to-date. The few extra 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 from the clients -(you just need to keep the logon scripts up-to-date). +up to date. The few extra 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 from the clients +(you just need to keep the logon scripts up to date). @@ -3007,9 +3007,9 @@ The addprinter command can be configured to be a shell script 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, and so on). 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 lpadmin 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! +way that it can create a new printer (through writing correct printcap entries on legacy systems or +by executing the lpadmin command on more modern systems) and create the associated share, +then the APW will in effect really create a new printer on Samba and the UNIX print subsystem! @@ -3028,7 +3028,7 @@ follow several paths. Here are possible scenarios for migration: You need to study and apply the new Windows NT printer and driver support. Previously used - parameters printer driver file, printer driver + parameters printer driver file, printer driver, and printer driver location are no longer supported. @@ -3040,7 +3040,7 @@ follow several paths. Here are possible scenarios for migration: An existing printers.def file (the one specified in the now removed parameter printer driver file) will no longer work with Samba-3. In 3.0, smbd attempts - to locate a Windows 9x/Me driver files for the printer in + to locate Windows 9x/Me driver files for the printer in and additional settings in the TDB and only there; if it fails, it will not (as 2.2.x used to do) drop down to using a printers.def (and all associated parameters). The make_printerdef tool is removed and there is no backward compatibility for this. @@ -3052,21 +3052,13 @@ follow several paths. Here are possible scenarios for migration: , and some other settings and information go into the printing-related TDBs. - If you want to migrate an existing - printers.def file into the new setup, the - only current - solution is to use the Windows NT APW to install the NT drivers - and the 9x/Me drivers. This can be scripted using smbclient and - rpcclient. See the Imprints installation client at: - - - - http://imprints.sourceforge.net/ - - - - for an example. See also the discussion of rpcclient usage in the - CUPS Printing section. + + If you want to migrate an existing printers.def file into the new setup, the only current + solution is to use the Windows NT APW to install the NT drivers and the 9x/Me drivers. This can be scripted + using smbclient and rpcclient. See the Imprints installation client on the Imprints web site for example. See also the discussion of + rpcclient usage in CUPS Printing. + @@ -3074,8 +3066,9 @@ follow several paths. Here are possible scenarios for migration: Publishing Printer Information in Active Directory or LDAP -This will be addressed in a later update of this document. If you wish to volunteer your services to help -document this, please contact John H Terpstra. +This topic has also been addressed in Remote and Local Management &smbmdash; The +Net Command. If you wish to volunteer your services to help document this further, please contact +John H. Terpstra. @@ -3086,7 +3079,7 @@ document this, please contact John H Terpstra. I Give My Root Password but I Do Not Get Access -Do not confuse the root password which is valid for the UNIX system (and in most cases stored in the +Do not 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 /etc/shadow), with the password used to authenticate against Samba. Samba does not know the UNIX password. Root access to Samba resources requires that a Samba account for root must first be created. This is done with the smbpasswd diff --git a/docs/Samba3-HOWTO/TOSHARG-Problems.xml b/docs/Samba3-HOWTO/TOSHARG-Problems.xml index 71d4422e71..2c840021f8 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Problems.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Problems.xml @@ -91,9 +91,10 @@ Ethereal User Guide.
Starting a capture.ethereal1
-Listen for data on ports 137, 138, 139, and 445. For example, use -the filter port 137, port 138, port 139, or port -445 as seen in Starting a capture snapshot. + +Listen for data on ports 137, 138, 139, and 445. For example, use the filter port 137, port 138, +port 139, or port 445 as seen in Starting a capture snapshot. + A console version of ethereal is available as well and is called tethereal. diff --git a/docs/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml b/docs/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml index 8b137dd4ef..6cdf87b54f 100644 --- a/docs/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml +++ b/docs/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml @@ -12,7 +12,7 @@ Features and Benefits -Roaming profiles are feared by some, hated by a few, loved by many, and a Godsend for +Roaming profiles are feared by some, hated by a few, loved by many, and a godsend for some administrators. @@ -73,33 +73,30 @@ This section documents how to configure Samba for MS Windows client profile supp For example, to support Windows NT4/200x clients, set the following in the [global] section of the &smb.conf; file: - \\profileserver\profileshare\profilepath\%U\moreprofilepath + This is typically implemented like: - -\\%L\Profiles\%u +\\%L\Profiles\%U -where %L translates to the name of the Samba server and %u translates to the user name. +where %L translates to the name of the Samba server and %U translates to the username. -The default for this option is \\%N\%U\profile, namely \\sambaserver\username\profile. +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 a Samba server for the profiles, you must make the share that is specified in the logon path -browseable. Please refer to the man page for &smb.conf; in respect of the different +browseable. Please refer to the man page for &smb.conf; regarding the different semantics of %L and %N, as well as %U and %u. - - + MS Windows NT/200x clients at times do not disconnect a connection to a server between logons. It is recommended -to not use the meta-service name as part of the profile share path. - - +to not use the metaservice name as part of the profile share path. + @@ -138,7 +135,7 @@ specified \\%L\%U for . You can support profiles for Windows 9x and Windows NT clients by setting both the - and parameters. For example: + and parameters. For example, @@ -146,12 +143,17 @@ You can support profiles for Windows 9x and Windows NT clients by setting both t \\%L\profiles\%u + +Windows 9x/Me and NT4 and later profiles should not be stored in the same location because +Windows NT4 and later will experience problems with mixed profile environments. + + Disabling Roaming Profile Support -A question often asked is: How may I enforce use of local profiles? or +The question often asked is, How may I enforce use of local profiles? or How do I disable roaming profiles? @@ -161,10 +163,9 @@ There are three ways of doing this: windows registry settingsroaming profiles - - In &smb.conf; + In &smb.conf;: Affect the following settings and ALL clients will be forced to use a local profile: and @@ -177,9 +178,9 @@ There are three ways of doing this: - MS Windows Registry + MS Windows Registry: - By using the Microsoft Management Console gpedit.msc to instruct your MS Windows XP + Use the Microsoft Management Console (MMC) 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: @@ -197,7 +198,7 @@ Disable: Prevent Roaming Profile Change from Propagating to the Server Change of Profile Type: - From the start menu right-click on My Computer icon, + From the start menu right-click on the My Computer icon, select Properties, click on the User Profiles tab, select the profile you wish to change from Roaming type to Local, and click on @@ -213,26 +214,28 @@ about which registry keys to change to enforce use of only local user profiles. The specifics of how to convert a local profile to a roaming profile, or a roaming profile -to a local one vary according to the version of MS Windows you are running. Consult the Microsoft MS +to a local one, vary according to the version of MS Windows you are running. Consult the Microsoft MS Windows Resource Kit for your version of Windows for specific information. - + + - Windows Client Profile Configuration Information + +Windows Client Profile Configuration Information - Windows 9x/Me Profile Setup + +Windows 9x/Me Profile Setup -When a user first logs in on Windows 9X, the file user.DAT is created, as are folders -Start Menu, Desktop, Programs, and -Nethood. 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 options -yes, -yes and -no -in order to maintain capital letters in shortcuts in any of the profile folders. +When a user first logs in on Windows 9x, the file user.DAT is created, as are folders Start +Menu, Desktop, Programs, and +Nethood. 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 options yes, yes, and no in order to maintain capital letters in shortcuts in any of the +profile folders. @@ -257,43 +260,53 @@ rename their user.DAT file to user.MAN - Under Windows 9x/ME, profiles are downloaded from the Primary Logon. If you have the Primary Logon + +Under Windows 9x/Me, profiles are downloaded from the Primary Logon. If you have the Primary Logon as Client for Novell Networks, then the profiles and logon script will be downloaded from -your Novell Server. If you have the Primary Logon as Windows Logon, then the profiles will -be loaded from the local machine &smbmdash; a bit against the concept of roaming profiles, it would seem! +your Novell server. If you have the Primary Logon as Windows Logon, then the profiles will +be loaded from the local machine &smbmdash; a bit against the concept of roaming profiles, it would seem! + You will now find that the Microsoft Networks Login box contains [user, password, domain] instead of just [user, password]. Type in the Samba server's domain name (or any other domain known to exist, -but bear in mind that the user will be authenticated against this domain and profiles downloaded from it, +but bear in mind that the user will be authenticated against this domain and profiles downloaded from it if that domain logon server supports it), user name and user's password. - 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 Do you -wish to save the user's preferences? Select Yes. + +Once the user has been successfully validated, the Windows 9x/Me machine informs you that +The user has not logged on before and asks Do you +wish to save the user's preferences? Select Yes. + - Once the Windows 9x/Me client comes up with the desktop, you should be able to examine the + +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 on the Samba server and verify that the Desktop, Start Menu, -Programs and Nethood folders have been created. +Programs, and Nethood folders have been created. + - These folders will be cached locally on the client, and updated when the user logs off (if + +These folders will be cached locally on the client and updated when the user logs off (if you haven't made them read-only by then). You will find that if the user creates further folders or -shortcut, that the client will merge the profile contents downloaded with the contents of the profile -directory already on the local client, taking the newest folders and shortcut from each set. +shortcuts, the client will merge the profile contents downloaded with the contents of the profile +directory already on the local client, taking the newest folders and shortcut from each set. + - If you have made the folders/files read-only on the Samba server, then you will get errors from + +If you have made the folders/files read-only on the Samba server, then you will get errors from the Windows 9x/Me machine on logon and logout as it attempts to merge the local and remote profile. Basically, if you have any errors reported by the Windows 9x/Me machine, check the UNIX file permissions -and ownership rights on the profile directory contents, on the Samba server. +and ownership rights on the profile directory contents, on the Samba server. + - If you have problems creating user profiles, you can reset the user's local desktop cache, as -shown below. When this user next logs in, the user will be told that he/she is logging in for - the first time. - + windows registry settingsprofile path - +If you have problems creating user profiles, you can reset the user's local desktop cache, as shown below. +When this user next logs in, the user will be told that he/she is logging in for the first +time. + @@ -310,7 +323,7 @@ shown below. When this user next logs in, the user will be told that he/she is l - You will find an entry for each user of ProfilePath. Note the contents of this key + You will find an entry for each user of ProfilePath. Note the contents of this key (likely to be c:\windows\profiles\username), then delete the key ProfilePath for the required user. @@ -336,8 +349,8 @@ shown below. When this user next logs in, the user will be told that he/she is l Before deleting the contents of the directory listed in the ProfilePath -(this is likely to be c:\windows\profiles\username), ask the owner if they have -any important files stored on their desktop or in their start menu. Delete the contents of the +(this is likely to be c:\windows\profiles\username), ask whether the owner has +any important files stored on his or her desktop or start menu. Delete the contents of the directory ProfilePath (making a backup if any of the files are needed). @@ -362,43 +375,57 @@ provided with Windows NT4/200x server, and see what the differences are with the Windows NT4 Workstation - When a user first logs in to a Windows NT Workstation, the profile NTuser.DAT is created. The profile + +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 parameter. - There is a parameter that is now available for use with NT Profiles: . + +There is a parameter that is now available for use with NT Profiles: . This should be set to H: or any other drive, and should be used in conjunction with -the new parameter. +the new parameter. + - The entry for the NT4 profile is a directory not a file. The NT help on Profiles mentions that a + +The entry for the NT4 profile is a directory, not a file. The NT help on profiles mentions that a directory is also created with a .PDS extension. The user, while logging in, must have write permission to create the full profile path (and the folder with the .PDS extension for those situations where it -might be created.) +might be created). + - In the profile directory, Windows NT4 creates more folders than Windows 9x/Me. It creates + +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 its purpose is currently unknown. +in the .PDS directory, and its purpose is currently unknown. + - You can use the System Control Panel 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 + +You can use the System Control Panel 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 turns a profile into a mandatory one. - The case of the profile is significant. The file must be called NTuser.DAT -or, for a mandatory profile, NTuser.MAN. + +The case of the profile is significant. The file must be called NTuser.DAT +or, for a mandatory profile, NTuser.MAN. + - Windows 2000/XP Professional + - You must first convert the profile from a local profile to a domain profile on the MS Windows + +Windows 2000/XP Professional + + +You must first convert the profile from a local profile to a domain profile on the MS Windows workstation as follows: Log on as the local workstation administrator. - Right-click on the My Computer Icon, select + Right-click on the My Computer icon, and select Properties. Click on the User Profiles tab. @@ -425,13 +452,14 @@ workstation as follows: you nominated. - Done. You now have a profile that can be edited using the Samba profiles tool. + +Done. You now have a profile that can be edited using the Samba profiles tool. Under Windows NT/200x, the use of mandatory profiles forces the use of MS Exchange storage of mail data and keeps it out of the desktop profile. That keeps desktop profiles from becoming unusable. - + Windows XP Service Pack 1 @@ -441,7 +469,7 @@ data and keeps it out of the desktop profile. That keeps desktop profiles from b - Computer Configuration\Administrative Templates\System\User Profiles\Do not check for + Computer Configuration\Administrative Templates\System\User Profiles\Do not check for user ownership of Roaming Profile Foldersi @@ -454,13 +482,12 @@ data and keeps it out of the desktop profile. That keeps desktop profiles from b If you cannot set group policies in Samba, then you may be able to set the policy locally on - each machine. If you want to try this, then do the following (N.B. I do not know for sure that this - will work in the same way as a domain group policy): + each machine. If you want to try this, then do the following: - On the XP workstation, log in with an Administrative account. + On the XP workstation, log in with an administrative account. Click on Start -> Run. Type mmc. @@ -485,12 +512,12 @@ data and keeps it out of the desktop profile. That keeps desktop profiles from b - User Profile Hive Cleanup Service +User Profile Hive Cleanup Service -There certain situations that cause a cached local copy of roaming profile not to be deleted on exit, even if -the policy to force such deletion is set. To deal with that situation special service was created. The application -UPHClean (User Profile Hive Cleanup) can be installed as service on Windows NT4/2000/XP Professional, +There are certain situations that cause a cached local copy of roaming profile not to be deleted on exit, even if +the policy to force such deletion is set. To deal with that situation, a special service was created. The application +UPHClean (User Profile Hive Cleanup) can be installed as a service on Windows NT4/2000/XP Professional and Windows 2003. @@ -501,43 +528,54 @@ The UPHClean software package can be downloaded from and -. + and . + - 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 user.DAT and +NTuser.DAT files in the same profile directory. + Profile Migration from Windows NT4/200x Server to Samba - There is nothing to stop you from specifying any path that you like for the location of users' profiles. -Therefore, you could specify that the profile be stored on a Samba server, or any other SMB server, -as long as that SMB server supports encrypted passwords. + +There is nothing to stop you from specifying any path that you like for the location of users' profiles. +Therefore, you could specify that the profile be stored on a Samba server or any other SMB server, +as long as that SMB server supports encrypted passwords. + - + Windows NT4 Profile Management Tools - Unfortunately, the Resource Kit information is specific to the version of MS Windows NT4/200x. The -correct resource kit is required for each platform. + +Unfortunately, the resource kit information is specific to the version of MS Windows NT4/200x. The +correct resource kit is required for each platform. + Here is a quick guide: - On your NT4 Domain Controller, right click on My Computer, then select the - tab labeled User Profiles. +Profile Migration Procedure + + On your NT4 domain controller, right-click on My Computer, then select + Properties, then the tab labeled User Profiles. Select a user profile you want to migrate and click on it. @@ -548,7 +586,7 @@ correct resource kit is required for each platform. Click on the Copy To button. - In the box labeled Copy Profile to add your new path, e.g., + In the box labeled Copy Profile to add your new path, such as, c:\temp\foobar Click on Change in the Permitted to use box. @@ -559,7 +597,9 @@ correct resource kit is required for each platform. Now click on OK. - Follow the above for every profile you need to migrate. + +Follow these steps for every profile you need to migrate. + @@ -569,15 +609,19 @@ correct resource kit is required for each platform. SID -You should obtain the SID of your NT4 domain. You can use smbpasswd to do this. Read the man -page. +You should obtain the SID of your NT4 domain. You can use the net rpc info to do this. +See The Net Command Chapter, Other Miscellaneous Operations for more information. + - moveuser.exe + +moveuser.exe - The Windows 200x professional resource kit has moveuser.exe. moveuser.exe changes the security of a profile -from one user to another. This allows the account domain to change, and/or the user name to change. + +The Windows 200x professional resource kit has moveuser.exe. moveuser.exe changes the security of a profile +from one user to another. This allows the account domain to change and/or the username to change. + This command is like the Samba profiles tool. @@ -590,41 +634,58 @@ This command is like the Samba profiles tool. SID -You can identify the SID by using GetSID.exe from the Windows NT Server 4.0 Resource Kit. +You can identify the SID by using GetSID.exe from the Windows NT Server 4.0 Resource Kit. + - 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 + +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 + - Under the ProfileList key, there will be subkeys named with the SIDs of the users who have logged + +Under the ProfileList key, there will be subkeys named with the SIDs of the users who have logged on to this computer. (To find the profile information for the user whose locally cached profile you want to move, find the SID for the user with the GetSID.exe utility.) Inside the appropriate user's subkey, -you will see a string value named ProfileImagePath. +you will see a string value named ProfileImagePath. + - + + + - Mandatory Profiles + +Mandatory Profiles mandatory profiles -A Mandatory Profile is a profile that the user does not have the ability to overwrite. During the -user's session, it may be possible to change the desktop environment, however, as the user logs out all changes +A mandatory profile is a profile that the user does not have the ability to overwrite. During the +user's session, it may be possible to change the desktop environment; however, as the user logs out, all changes made will be lost. If it is desired to not allow the user any ability to change the desktop environment, -then this must be done through policy settings. See the previous chapter. +then this must be done through policy settings. See System and Account +Policies. + - Under NO circumstances should the profile directory (or its -contents) be made read-only as this may render the profile un-usable. + + Under NO circumstances should the profile directory (or its +contents) be made read-only because this may render the profile unusable. Where it is essential to make a profile read-only within the UNIX file -system, this can be done but then you absolutely must use the +system, this can be done, but then you absolutely must use the fake-permissions VFS module to instruct MS Windows NT/200x/XP clients that the Profile has write permission for the user. -See fake_perms VFS module. +See fake_perms VFS module. + - For MS Windows NT4/200x/XP, the above method can also be used to create mandatory profiles. To -convert a group profile into a mandatory profile, simply locate the NTUser.DAT file in the copied profile -and rename it to NTUser.MAN. + +For MS Windows NT4/200x/XP, the procedure shown in Profile Migration from Windows +NT4/200x Server to Samba can also be used to create mandatory profiles. To convert a group profile into +a mandatory profile, simply locate the NTUser.DAT file in the copied profile and rename +it to NTUser.MAN. + - For MS Windows 9x/ME, it is the User.DAT file that must be renamed to -User.MAN to effect a mandatory profile. + +For MS Windows 9x/Me, it is the User.DAT file that must be renamed to +User.MAN to effect a mandatory profile. + @@ -633,19 +694,22 @@ and rename it to NTUser.MAN. group profiles -Most organizations are arranged into departments. There is a nice benefit in this fact since usually +Most organizations are arranged into departments. There is a nice benefit in this fact, since usually most users in a department 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 +Windows NT4/200x/XP will allow the use of group profiles. A group profile is a profile that is created first using a template (example) user. Then using the profile migration tool (see above), the profile is -assigned access rights for the user group that needs to be given access to the group profile. +assigned access rights for the user group that needs to be given access to the group profile. + - The next step is rather important. Instead of assigning a group profile to users (Using User Manager) -on a per user basis, the group itself is assigned the now modified profile. + +The next step is rather important. Instead of assigning a group profile to users (Using User Manager) +on a per-user basis, the group itself is assigned the now modified profile. + - - Be careful with Group Profiles. If the user who is a member of a group also has a personal -profile, then the result will be a fusion (merge) of the two. - + +Be careful with group profiles. If the user who is a member of a group also has a personal +profile, then the result will be a fusion (merge) of the two. + @@ -656,80 +720,98 @@ profile, then the result will be a fusion (merge) of the two. default profile MS Windows 9x/Me and NT4/200x/XP will use a default profile for any user for whom a profile does not already exist. Armed with a knowledge of where the default profile is located on the Windows -workstation, and knowing which registry keys effect the path from which the default profile is created, +workstation, and knowing which registry keys affect the path from which the default profile is created, it is possible to modify the default profile to one that has been optimized for the site. This has -significant administrative advantages. +significant administrative advantages. + MS Windows 9x/Me - 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 Windows +98 System Policy Editor or change the registry directly. + - To enable default per user profiles in Windows 9x/ME, launch the System Policy -Editor, then select File -> Open Registry, -next click on the Local Computer icon, click on Windows 98 System, + +To enable default per-user profiles in Windows 9x/Me, launch the System Policy +Editor, then select File -> Open Registry. +Next click on the Local Computer icon, click on Windows 98 System, select User Profiles, and click on the enable box. Remember to save the registry -changes. +changes. + - To modify the registry directly, launch the Registry Editor -(regedit.exe) and select the hive HKEY_LOCAL_MACHINE\Network\Logon. Now -add a DWORD type key with the name User Profiles, to -enable user profiles to set the value -to 1; to disable user profiles set it to 0. + +To modify the registry directly, launch the Registry Editor +(regedit.exe) and select the hive HKEY_LOCAL_MACHINE\Network\Logon. +Now add a DWORD type key with the name User Profiles. To enable user profiles to set the value +to 1; to disable user profiles set it to 0. + User Profile Handling with Windows 9x/Me - When a user logs on to a Windows 9x/Me machine, the local profile path, + +When a user logs on to a Windows 9x/Me machine, the local profile path, HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProfileList, is checked -for an existing entry for that user. +for an existing entry for that user. + - If the user has an entry in this registry location, Windows 9x/Me checks for a locally cached + +If the user has an entry in this registry location, Windows 9x/Me checks for a locally cached version of the user profile. Windows 9x/Me also checks the user's home directory (or other specified -directory if the location has been modified) on the server for the User Profile. If a profile exists -in both locations, the newer of the two is used. If the User Profile exists on the server, but does not -exist on the local machine, the profile on the server is downloaded and used. If the User Profile only -exists on the local machine, that copy is used. +directory if the location has been modified) on the server for the user profile. If a profile exists +in both locations, the newer of the two is used. If the user profile exists on the server but does not +exist on the local machine, the profile on the server is downloaded and used. If the user profile only +exists on the local machine, that copy is used. + - If a User Profile is not found in either location, the Default User Profile from the Windows + +If a user profile is not found in either location, the default user profile from the Windows 9x/Me machine is used and copied to a newly created folder for the logged on user. At log off, any changes that the user made are written to the user's local profile. If the user has a roaming profile, -the changes are written to the user's profile on the server. +the changes are written to the user's profile on the server. + - + + MS Windows NT4 Workstation - On MS Windows NT4, the default user profile is obtained from the location -%SystemRoot%\Profiles which in a default installation will translate to -C:\Windows NT\Profiles. Under this directory on a clean install there will be three -(3) directories: Administrator, All + +On MS Windows NT4, the default user profile is obtained from the location +%SystemRoot%\Profiles, which in a default installation will translate to +C:\Windows NT\Profiles. Under this directory on a clean install, there will be three +directories: Administrator, All Users, and Default -User. +User. + - The All Users directory contains menu settings that are common across all + +The All Users directory contains menu settings that are common across all system users. The Default User directory contains menu entries that are customizable -per user depending on the profile settings chosen/created. +per user depending on the profile settings chosen/created. + - When a new user first logs onto an MS Windows NT4 machine, a new profile is created from: + +When a new user first logs onto an MS Windows NT4 machine, a new profile is created from: + All Users settings. Default User settings (contains the default NTUser.DAT file). - When a user logs onto an MS Windows NT4 machine that is a member of a Microsoft security domain, - the following steps are followed in respect of profile handling: - + NTConfig.POL +When a user logs on to an MS Windows NT4 machine that is a member of a Microsoft security domain, +the following steps are followed for profile handling: - - The users' account information that is obtained during the logon process - contains the location of the users' desktop profile. The profile path may be local to + The user's account information that is obtained during the logon process + contains the location of the user's desktop profile. The profile path may be local to the machine or it may be located on a network share. If there exists a profile at the location of the path from the user account, then this profile is copied to the location %SystemRoot%\Profiles\%USERNAME%. This profile then inherits the settings @@ -742,35 +824,39 @@ per user depending on the profile settings chosen/created. If the NETLOGON share on the authenticating server (logon server) contains a policy file (NTConfig.POL), then its contents are applied to the - NTUser.DAT which is applied to the HKEY_CURRENT_USER + NTUser.DAT, which is applied to the HKEY_CURRENT_USER part of the registry. - When the user logs out, if the profile is set to be a roaming profile it will be + 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 NTuser.DAT file is then - recreated from the contents of the HKEY_CURRENT_USER contents. Thus, + re-created from the contents of the HKEY_CURRENT_USER contents. Thus, should there not exist in the NETLOGON share an NTConfig.POL at the next logon, the effect of the previous NTConfig.POL will still be held in the profile. The effect of this is known as tattooing. - MS Windows NT4 profiles may be local or roaming. A local -profile will stored in the %SystemRoot%\Profiles\%USERNAME% location. A roaming -profile will also remain stored in the same way, unless the following registry key is created as shown: - - HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\ + +MS Windows NT4 profiles may be local or roaming. A local +profile is stored in the %SystemRoot%\Profiles\%USERNAME% location. A roaming +profile will also remain stored in the same way, unless the following registry key is created: + +HKEY_LOCAL_MACHINE\SYSTEM\Software\Microsoft\Windows NT\CurrentVersion\ winlogon\"DeleteRoamingCache"=dword:0000000 - + In this case, the local copy (in %SystemRoot%\Profiles\%USERNAME%) will be deleted -on logout. +on logout. + - Under MS Windows NT4, default locations for common resources like My Documents + +Under MS Windows NT4, default locations for common resources like My Documents may be redirected to a network share by modifying the following registry keys. These changes may be -affected via use of the System Policy Editor. To do so may require that you create your own template -extension for the policy editor to allow this to be done through the GUI. Another way to do this is by -way of first creating a default user profile, then while logged in as that user, run regedt32 to edit -the key settings. +made via use of the System Policy Editor. To do so may require that you create your own template +extension for the Policy Editor to allow this to be done through the GUI. Another way to do this is by +first creating a default user profile, then while logged in as that user, running regedt32 to edit +the key settings. + The Registry Hive key that affects the behavior of folders that are part of the default user @@ -814,12 +900,16 @@ folders. The default entries are shown in the next t
- The registry key that contains the location of the default profile settings is: - - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ -User Shell Folders + The registry key that contains the location of the default profile settings is: + +HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ +User Shell Folders + + - The default entries are shown in the next table. + +The default entries are shown in Defaults of Profile Settings Registry Keys. + Defaults of Profile Settings Registry Keys @@ -837,27 +927,32 @@ User Shell Folders - MS Windows 200x/XP + +MS Windows 200x/XP GPOs -MS Windows XP Home Edition does use default per user profiles, but cannot participate +MS Windows XP Home Edition does use default per-user profiles, but cannot participate in domain security, cannot log onto an NT/ADS-style domain, and thus can obtain the profile only from itself. While there are benefits in doing this, the beauty of those MS Windows clients that -can participate in domain logon processes allows the administrator to create a global default +can participate in domain logon processes is that they allow the administrator to create a global default profile and enforce it through the use of Group Policy Objects (GPOs). - When a new user first logs onto an MS Windows 200x/XP machine, the default profile is obtained from + +When a new user first logs onto an MS Windows 200x/XP machine, the default profile is obtained from C:\Documents and Settings\Default User. The administrator can modify or change the -contents of this location and MS Windows 200x/XP will gladly use it. This is far from the optimum arrangement -since it will involve copying a new default profile to every MS Windows 200x/XP client workstation. +contents of this location, and MS Windows 200x/XP will gladly use it. This is far from the optimum arrangement, +since it will involve copying a new default profile to every MS Windows 200x/XP client workstation. + - When MS Windows 200x/XP participates in a domain security context, and if the default user profile is - not found, then the client will search for a default profile in the NETLOGON share of the authenticating - server. In MS Windows parlance,%LOGONSERVER%\NETLOGON\Default User, and if one -exists there it will copy this to the workstation to the C:\Documents and Settings\ -under the Windows login name of the user. + +When MS Windows 200x/XP participates in a domain security context, and if the default user profile is not +found, then the client will search for a default profile in the NETLOGON share of the authenticating server. +In MS Windows parlance, it is %LOGONSERVER%\NETLOGON\Default User, +and if one exists there, it will copy this to the workstation in the C:\Documents and +Settings\ under the Windows login name of the use. + This path translates, in Samba parlance, to the &smb.conf; share. The directory should be created at the root @@ -867,33 +962,33 @@ of this share and must be called Default User. If a default profile does not exist in this location, then MS Windows 200x/XP will use the local default profile. - On logging out, the users' desktop profile will be stored to the location specified in the registry + On logging out, the user's desktop profile is 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 +during the login process (as Samba does automatically), then the user's profile is written to the local machine only under the path C:\Documents and Settings\%USERNAME%. Those wishing to modify the default behavior can do so through these three methods: Modify the registry keys on the local machine manually and place the new - default profile in the NETLOGON share root. This is not recommended as it is maintenance intensive. + default profile in the NETLOGON share root. This is not recommended because it is maintenance intensive. - Create an NT4-style NTConfig.POL file that specified this behavior and locate + Create an NT4-style NTConfig.POL file that specifies this behavior and locate this file in the root of the NETLOGON share along with the new default profile. Create a GPO that enforces this through Active Directory, and place the new default profile in the NETLOGON share. -The registry hive key that effects the behavior of folders that are part of the default user +The registry hive key that affects the behavior of folders that are part of the default user profile are controlled by entries on Windows 200x/XP is: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\ -The above hive key contains a list of automatically managed folders. The default entries are shown +This hive key contains a list of automatically managed folders. The default entries are shown in the next table windows registry settingsdefault profile locations @@ -931,31 +1026,34 @@ in the next table
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. +of type REG_SZ; all the others are of type REG_EXPAND_SZ.
It makes a huge difference to the speed of handling roaming user profiles if all the folders are stored on a dedicated location on a network server. This means that it will not be necessary to write the Outlook PST file over the network for every login and logout. - To set this to a network location, you could use the following examples: - -%LOGONSERVER%\%USERNAME%\Default Folders - - This would store the folders in the user's home directory under a directory called Default -Folders. You could also use: - -\\SambaServer\FolderShare\%USERNAME% + +To set this to a network location, you could use the following examples: + +%LOGONSERVER%\%USERNAME%\Default Folders + +This stores the folders in the user's home directory under a directory called Default +Folders. You could also use: + +\\SambaServer\FolderShare\%USERNAME% + + -in which case the default folders will be stored in the server named SambaServer +in which case the default folders are stored in the server named SambaServer in the share called FolderShare under a directory that has the name of the MS Windows user as seen by the Linux/UNIX file system. - Please note that once you have created a default profile share, you MUST migrate a user's profile + Please note that once you have created a default profile share, you must migrate a user's profile (default or custom) to it. - MS Windows 200x/XP profiles may be Local or Roaming. - A roaming profile will be cached locally unless the following registry key is created: + MS Windows 200x/XP profiles may be local or roaming. + A roaming profile is cached locally unless the following registry key is created: delete roaming profiles @@ -965,7 +1063,7 @@ MS Windows user as seen by the Linux/UNIX file system. winlogon\"DeleteRoamingCache"=dword:00000001 -In this case, the local cache copy will be deleted on logout. +In this case, the local cache copy is deleted on logout. @@ -973,7 +1071,7 @@ In this case, the local cache copy will be deleted on logout. Common Errors -The following are some typical errors, problems and questions that have been asked on the Samba mailing lists. +The following are some typical errors, problems, and questions that have been asked on the Samba mailing lists. @@ -981,34 +1079,34 @@ The following are some typical errors, problems and questions that have been ask With Samba-2.2.x, the choice you have is to enable or disable roaming profiles support. It is a -global only setting. The default is to have roaming profiles and the default path will locate them in +global-only setting. The default is to have roaming profiles, and the default path will locate them in the user's home directory. If disabled globally, then no one will have roaming profile ability. If enabled and you want it -to apply only to certain machines, then on those machines on which roaming profile support is not wanted -it is then necessary to disable roaming profile handling in the registry of each such machine. +to apply only to certain machines, then on those machines on which roaming profile support is not wanted, +it is necessary to disable roaming profile handling in the registry of each such machine. -With Samba-3, you can have a global profile setting in &smb.conf; and you can override this by -per-user settings using the Domain User Manager (as with MS Windows NT4/ Win 200xx). +With Samba-3, you can have a global profile setting in &smb.conf;, and you can override this by +per-user settings using the Domain User Manager (as with MS Windows NT4/200x).
In any case, you can configure only one profile per user. That profile can be either: A profile unique to that user. A mandatory profile (one the user cannot change). - A group profile (really should be mandatory, that is unchangable). + A group profile (really should be mandatory &smbmdash; that is, unchangable). Cannot Use Roaming Profiles - A user requested the following: I do not want Roaming profiles to be implemented. I want -to give users a local profile alone. Please help me, I am totally lost with this error. For the past + A user requested the following: I do not want roaming profiles to be implemented. I want +to give users a local profile alone. I am totally lost with this error. For the past two days I tried everything, I googled around but found no useful pointers. Please help me. The choices are: @@ -1016,7 +1114,7 @@ two days I tried everything, I googled around but found no useful pointers. Plea Local profiles I know of no registry keys that will allow - auto-deletion of LOCAL profiles on log out. + autodeletion of LOCAL profiles on log out. @@ -1052,13 +1150,13 @@ two days I tried everything, I googled around but found no useful pointers. Plea A Windows NT4/200x/XP profile can vary in size from 130KB to very large. Outlook PST files are -most often part of the profile and can be many GB in size. On average (in a well controlled environment), +most often part of the profile and can be many gigabytes 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 takes an hour to log onto a -workstation but they harvest the fruits of folly (and ignorance). +workstation, but they harvest the fruits of folly (and ignorance).
- 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. + The point of this discussion is to show that roaming profiles and good controls of how they can be +changed as well as good discipline make for a problem-free site. Microsoft's answer to the PST problem is to store all email in an MS Exchange Server backend. This removes the need for a PST file. @@ -1084,12 +1182,12 @@ removes the need for a PST file.
Changing the Default Profile -When the client logs onto the Domain Controller, it searches +When the client logs onto the domain controller, it searches for a profile to download. Where do I put this default profile? default profile -First, the Samba server needs to be configured as a Domain Controller. This can be done by +First, the Samba server needs to be configured as a domain controller. This can be done by setting in &smb.conf;: @@ -1099,16 +1197,16 @@ setting in &smb.conf;: There must be a 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 +a good idea to add a logon script to preset 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). - To invoke auto-deletion of roaming profile from the local workstation cache (disk storage), use + To invoke autodeletion of roaming profile from the local workstation cache (disk storage), use the Group Policy Editor to create a file called NTConfig.POL with the appropriate entries. This file needs to be located in the share root directory. - Windows clients need to be members of the domain. Workgroup machines do not use network logons + Windows clients need to be members of the domain. Workgroup machines do not use network logons, so they do not interoperate with domain profiles. For roaming profiles, add to &smb.conf;: diff --git a/docs/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml b/docs/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml index a8c2811511..3a87fcd64c 100644 --- a/docs/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml +++ b/docs/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml @@ -9,11 +9,11 @@ User Rights and Privileges -The administration of Windows user, group and machine accounts in the Samba -domain controlled network necessitates interfacing between the MS Windows +The administration of Windows user, group, and machine accounts in the Samba +domain-controlled network necessitates interfacing between the MS Windows networking environment and the UNIX operating system environment. The right (permission) to add machines to the Windows security domain can be assigned -(set) to non-administrative users both in Windows NT4 domains as well as in +(set) to non-administrative users both in Windows NT4 domains and Active Directory domains. @@ -25,14 +25,12 @@ user logons. -Machine accounts are analogous to user accounts, and thus in implementing them -on a UNIX machine that is hosting Samba (i.e.: On which Samba is running) it is -necessary to create a special type of user account. Machine accounts differ from -a normal user account in that the account name (login ID) is terminated with a $ -sign. An additional difference is that this type of account should not ever be able -to log into the UNIX environment as a system user and therefore is set to have a -shell of /bin/false and a home directory of -/dev/null. +Machine accounts are analogous to user accounts, and thus in implementing them on a UNIX machine that is +hosting Samba (i.e., on which Samba is running) it is necessary to create a special type of user account. +Machine accounts differ from a normal user account in that the account name (login ID) is terminated with a +$ sign. An additional difference is that this type of account should not ever be able to +log into the UNIX environment as a system user and therefore is set to have a shell of +/bin/false and a home directory of /dev/null. @@ -45,13 +43,13 @@ same UID. Any UNIX user who has a UID=0 is inherently the same as the All versions of Samba call system interface scripts that permit CIFS function -calls that are used to manage users, groups and machine accounts to be affected +calls that are used to manage users, groups, and machine accounts in the UNIX environment. All versions of Samba up to and including version 3.0.10 -required the use of a Windows Administrator account that unambiguously maps to +required the use of a Windows administrator account that unambiguously maps to the UNIX root account to permit the execution of these -interface scripts. The reuqirement to do this has understandably met with some +interface scripts. The requirement to do this has understandably met with some disdain and consternation among Samba administrators, particularly where it became -necessary to permit people who should not posses root level +necessary to permit people who should not possess root-level access to the UNIX host system. @@ -66,7 +64,7 @@ must be defined in the section of the &smb.conf; -Currently, the rights supported in Samba 3 are listed in . +Currently, the rights supported in Samba-3 are listed in . The remainder of this chapter explains how to manage and use these privileges on Samba servers. @@ -112,35 +110,35 @@ The remainder of this chapter explains how to manage and use these privileges on There are two primary means of managing the rights assigned to users and groups on a Samba server. The NT4 User Manager for Domains may be -used from any Windows NT4, 2000 or XP Professional domain member client to +used from any Windows NT4, 2000, or XP Professional domain member client to connect to a Samba domain controller and view/modify the rights assignments. This application, however, appears to have bugs when run on a client running -Windows 2000 or later, therefore Samba provides a command line utility for +Windows 2000 or later; therefore, Samba provides a command-line utility for performing the necessary administrative actions. -The net rpc rights utility in Samba 3.0.11 has 3 new subcommands: +The net rpc rights utility in Samba 3.0.11 has three new subcommands: list [name|accounts] When called with no arguments, net rpc list - will simply list the available rights on the server. When passed + simply lists the available rights on the server. When passed a specific user or group name, the tool lists the privileges currently assigned to the specified account. When invoked using the special string accounts, - net rpc rights list will return a list of all + net rpc rights list returns a list of all privileged accounts on the server and the assigned rights. grant <user> <right [right ...]> - When called with no arguments, This function is used to assign + When called with no arguments, this function is used to assign a list of rights to a specified user or group. For example, - to grant the members of the Domain Admins group on a Samba DC + to grant the members of the Domain Admins group on a Samba domain controller, the capability to add client machines to the domain, one would run: &rootprompt; net -S server -U domadmin rpc rights grant \ @@ -149,13 +147,13 @@ The net rpc rights utility in Samba 3.0.11 has 3 new subcomma More than one privilege can be assigned by specifying a list of rights separated by spaces. The parameter 'Domain\Domain Admins' must be quoted with single ticks or using double-quotes to prevent - the back-slash and the space from being interpreted by the system shell. + the backslash and the space from being interpreted by the system shell. revoke <user> <right [right ...]> - This command is similar in format to net rpc rights grant. It's + This command is similar in format to net rpc rights grant. Its effect is to remove an assigned right (or list of rights) from a user or group. @@ -170,10 +168,10 @@ inherent to the Domain Admins group and is not configurable. By default, no privileges are initially assigned to any -account. The reason for this is that certain actions will +account because certain actions will be performed as root once smbd determines that a user has the necessary rights. For example, when joining a client to -a Windows domain, the 'add machine script' must be executed +a Windows domain, the `add machine script' must be executed with superuser rights in most cases. For this reason, you should be very careful about handing out privileges to accounts. @@ -192,7 +190,7 @@ Access as the root user (UID=0) bypasses all privilege checks. The privileges that have been implemented in Samba-3.0.11 are shown below. It is possible, and likely, that additional privileges may be implemented in later releases of Samba. It is also likely that any privileges currently implemented -but not used may be removed from future releases, thus it is important that +but not used may be removed from future releases, so it is important that the successful as well as unsuccessful use of these facilities should be reported on the Samba mailing lists. @@ -209,7 +207,7 @@ on the Samba mailing lists. SeDiskOperatorPrivilege - Accounts which posses this right will be able to execute + Accounts that possess this right will be able to execute scripts defined by the add/delete/change share command in &smb.conf; file as root. Such users will also be able to modify the ACL associated with file shares @@ -219,8 +217,8 @@ on the Samba mailing lists. SeMachineAccountPrivilege - Controls whether or not the user is able join client - machines to a Samba controlled domain. + Controls whether or not the user can join client + machines to a Samba-controlled domain. @@ -229,7 +227,7 @@ on the Samba mailing lists. This privilege operates identically to the option in the &smb.conf; file (see section 5 man page for &smb.conf;) - except that it is a global right (not on a per printer basis). + except that it is a global right (not on a per-printer basis). Eventually the smb.conf option will be deprecated and administrative rights to printers will be controlled exclusively by this right and the security descriptor associated with the printer object in the @@ -243,7 +241,7 @@ on the Samba mailing lists. the server and for aborting a previously issued shutdown command. Since this is an operation normally limited by the operating system to the root user, an account must possess this - right to be able to execute either of these hooks to have any effect. + right to be able to execute either of these hooks. @@ -257,22 +255,34 @@ on the Samba mailing lists. The Administrator Domain SID -Please note that when configured as a DC, it is now required -that an account in the server's passdb backend be set to the -domain SID of the default Administrator account. To obtain the -domain SID on a Samba DC, run the following command: - +Please note that every Windows NT4 and later server requires a domain Adminsitrator account. Samba version +commencing with 3.0.11 permit the Administrative duties to be performed via assigned rights and privileges +(see User Rights and Privileges). An account in the server's passdb backend can +be set to the domain SID of the default administrator account. To obtain the domain SID on a Samba domain +controller, run the following command: &rootprompt; net getlocalsid SID for domain FOO is: S-1-5-21-4294955119-3368514841-2087710299 -You may assign the Domain Administrator rid to an account using the pdbedit +You may assign the domain administrator RID to an account using the pdbedit command as shown here: &rootprompt; pdbedit -U S-1-5-21-4294955119-3368514841-2087710299-500 -u root -r + +The RID 500 is the well known standard value of the default Administrator account. It is the RID +that confers the rights and privileges that the Administrator account has on a Windows machine +or domain. Under UNIX/Linux the equivalent is UID=0 (the root account). + + + +Commencing with Samba version 3.0.11 it is possible to operate without an Administrator account +providing equivalent rights and privileges have been established for a Windows user or a Windows +group account. + + diff --git a/docs/Samba3-HOWTO/TOSHARG-Securing.xml b/docs/Samba3-HOWTO/TOSHARG-Securing.xml index b8d65c08ae..a35c48e807 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Securing.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Securing.xml @@ -13,7 +13,7 @@ Introduction -This note was attached to the Samba 2.2.8 release notes as it contained an +This note was attached to the Samba 2.2.8 release notes because it contains an important security fix. The information contained here applies to Samba installations in general. @@ -38,9 +38,9 @@ of knowledge with which we may unlock the secrets of the masters. Features and Benefits -There are three levels at which security principals must be observed in order to render a site +There are three levels at which security principles must be observed in order to render a site at least moderately secure. They are the perimeter firewall, the configuration of the host -server that is running Samba and Samba itself. +server that is running Samba, and Samba itself. @@ -50,17 +50,18 @@ the latest protocols to permit more secure MS Windows file and print operations. Samba may be secured from connections that originate from outside the local network. This may be -done using host-based protection (using Samba's implementation of a technology +done using host-based protection, using Samba's implementation of a technology known as tcpwrappers, or it may be done be using interface-based exclusion so &smbd; will bind only to specifically permitted interfaces. It is also -possible to set specific share or resource-based exclusions, for example on the -auto-share. The share is used for browsing purposes as well as to establish +possible to set specific share or resource-based exclusions, for example, on the +autoshare. The share is used for browsing purposes as well as to establish TCP/IP connections. Another method by which Samba may be secured is by setting Access Control Entries (ACEs) in an Access -Control List (ACL) on the shares themselves. This is discussed in File, Directory and Share Access Controls. +Control List (ACL) on the shares themselves. This is discussed in +File, Directory, and Share Access Controls. @@ -69,9 +70,9 @@ Control List (ACL) on the shares themselves. This is discussed in Technical Discussion of Protective Measures and Issues -The key challenge of security is the fact that protective measures suffice at best +The key challenge of security is 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 +because you have followed these few measures, 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. @@ -81,16 +82,16 @@ before someone will find yet another vulnerability. In many installations of Samba, the greatest threat comes from outside - your immediate network. By default, Samba will accept connections from + your immediate network. By default, Samba accepts 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 + a host that is directly connected to the Internet, you can be especially vulnerable. One of the simplest fixes in this case is to use the and - 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: + options in the Samba &smb.conf; configuration file to + allow access to your server only from a specific range of hosts. An example might be: @@ -99,7 +100,7 @@ before someone will find yet another vulnerability. - The above will only allow SMB connections from localhost (your own + The above will allow SMB connections only 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 not listening on called name error. @@ -120,7 +121,7 @@ before someone will find yet another vulnerability. - This restricts all server access to either the user jacko + This restricts all server access either to the user jacko or to members of the system group smbusers. @@ -131,8 +132,8 @@ before someone will find yet another vulnerability. Using Interface Protection - 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 + By default, Samba accepts connections on any network interface that + it finds on your system. That means if you have an ISDN line or a PPP connection to the Internet then Samba will accept connections on those links. This may not be what you want. @@ -148,7 +149,7 @@ before someone will find yet another vulnerability. This tells Samba to only listen for connections on interfaces with a - name starting with eth such as eth0, eth1 plus on the loopback + name starting with eth such as eth0 or 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. @@ -156,15 +157,15 @@ before someone will find yet another vulnerability. If you use the above and someone tries to make an 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 + your host over a PPP interface called ppp0, then he or she will get a TCP + connection refused reply. In that case, no Samba code is run at all because the operating system has been told not to pass connections from that interface to any Samba process. - + Using a Firewall @@ -188,11 +189,18 @@ before someone will find yet another vulnerability. - The last one is important as many older firewall setups may not be + The last one is important because many older firewall setups may not be aware of it, given that this port was only added to the protocol in recent years. + + When configuring a firewall, the high order ports (1024-65535) are often + used for outgoing connections and therefore should be permitted through the + firewall. It is prudent to block incoming packets on the high order ports + except for established connections. + + @@ -202,7 +210,7 @@ before someone will find yet another vulnerability. 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 un-trustworthy + shares while denying access to IPC$ from potentially untrustworthy hosts.
@@ -218,18 +226,18 @@ before someone will find yet another vulnerability. This instructs Samba that IPC$ connections are not allowed from - anywhere except from the two listed network addresses (localhost and the 192.168.115 - subnet). Connections to other shares are still allowed. As the + anywhere except the two listed network addresses (localhost and the 192.168.115 + subnet). Connections to other shares are still allowed. Because the IPC$ share is the only share that is always accessible anonymously, - this provides some level of protection against attackers that do not + this provides some level of protection against attackers who do not know a valid username/password for your host. If you use this method, then clients will be given an `access denied' reply when they try to access the IPC$ share. Those clients will not be able to - browse shares, and may also be unable to access some other resources. This is not - recommended unless you cannot use one of the other methods listed above for some reason. + browse shares and may also be unable to access some other resources. This is not + recommended unless for some reason you cannot use one of the other methods just discussed. @@ -249,9 +257,9 @@ before someone will find yet another vulnerability.
- The value 0x00000003 means 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. + The value 0x00000003 means to 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. @@ -264,7 +272,7 @@ before someone will find yet another vulnerability. The value 0x00080000 means permit only NTLMv2 session security. If either NtlmMinClientSec or NtlmMinServerSec is set to 0x00080000, the connection will fail if NTLMv2 - session security is not negotiated. + session security is negotiated. @@ -274,9 +282,9 @@ before someone will find yet another vulnerability. Please check regularly on http://www.samba.org/ for updates and -important announcements. Occasionally security releases are made and +important announcements. Occasionally security releases are made, and it is highly recommended to upgrade Samba when a security vulnerability -is discovered. Check with your OS vendor for OS specific upgrades. +is discovered. Check with your OS vendor for OS-specific upgrades. @@ -285,9 +293,9 @@ is discovered. Check with your OS vendor for OS specific upgrades. Common Errors -If all of Samba and host platform configuration were really as intuitive as one might like them to be, this +If all of Samba and host platform configurations were really as intuitive as one might like them to be, 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 the reason that most administrators who post what turns +because of the complexity of the problem, but because most administrators who post what turns out to be a security problem request are totally convinced that the problem is with Samba. @@ -302,7 +310,8 @@ out to be a security problem request are totally convinced that the problem is w The solution is either to remove the firewall (stop it) or modify the firewall script to - allow SMB networking traffic through. See section above in this chapter. + allow SMB networking traffic through. See the Using a + firewall section. @@ -320,7 +329,7 @@ out to be a security problem request are totally convinced that the problem is w - User xyzzy can map his home directory. Once mapped user xyzzy can also map + User xyzzy can map his home directory. Once mapped, user xyzzy can also map anyone else's home directory. @@ -333,12 +342,12 @@ out to be a security problem request are totally convinced that the problem is w If your UNIX home directories are set up so that one user can happily cd - into another users directory and execute ls, the UNIX security solution is to change file - permissions on the user's home directories such that the cd and ls are denied. + into another user's directory and execute ls, the UNIX security solution is to change file + permissions on the user's home directories so that the cd and ls are denied. - Samba tries very hard not to second guess the UNIX administrators security policies, and + Samba tries very hard not to second guess the UNIX administrator's security policies and trusts the UNIX admin to set the policies and permissions he or she desires. @@ -349,11 +358,11 @@ out to be a security problem request are totally convinced that the problem is w The works in conjunction with the list, - so to get the behavior you require, add the line : + so to get the behavior you require, add the line: %S - this is equivalent to adding + This is equivalent to adding %S diff --git a/docs/Samba3-HOWTO/TOSHARG-ServerType.xml b/docs/Samba3-HOWTO/TOSHARG-ServerType.xml index cd7f578cc0..877f2d6f80 100644 --- a/docs/Samba3-HOWTO/TOSHARG-ServerType.xml +++ b/docs/Samba3-HOWTO/TOSHARG-ServerType.xml @@ -12,7 +12,7 @@ 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 -use Samba will want to know the meaning, within a Samba context, of terms familiar to MS Windows +use Samba will want to know the meaning, within a Samba context, of terms familiar to an MS Windows administrator. 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. @@ -26,7 +26,7 @@ and how they relate to MS Windows servers and clients. A question often asked is, Why would I want to use Samba? Most chapters contain a section that highlights features and benefits. We hope that the information provided will help to answer this question. Be warned though, we want to be fair and reasonable, so not all -features are positive towards Samba. The benefit may be on the side of our competition. +features are positive toward Samba. The benefit may be on the side of our competition. @@ -49,8 +49,8 @@ a source of discomfort. 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 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 tell of both. +features and functionality fit for large-scale deployment. It also has some warts. In sections +like this one, we tell of both. @@ -59,7 +59,7 @@ So, what are the benefits of features mentioned in this chapter? - Samba-3 can replace an MS Windows NT4 Domain Controller. + Samba-3 can replace an MS Windows NT4 domain controller. @@ -68,12 +68,12 @@ So, what are the benefits of features mentioned in this chapter? - Samba-3 permits full NT4-style Interdomain Trusts. + Samba-3 permits full NT4-style interdomain trusts. Samba has security modes that permit more flexible - authentication than is possible with MS Windows NT4 Domain Controllers. + authentication than is possible with MS Windows NT4 domain controllers. @@ -103,8 +103,8 @@ different type of servers: Domain Controller - Primary Domain Controller - Backup Domain Controller + Primary Domain Controller (PDC) + Backup Domain Controller (BDC) ADS Domain Controller @@ -114,13 +114,15 @@ different type of servers: NT4 Style Domain Domain Server - Stand-alone Server + Standalone Server -The chapters covering Domain Control, Backup Domain Control and Domain Membership provide +The chapters covering domain control (Domain Control), +backup domain control (Backup Domain Control), and +domain membership (Domain Membership) provide pertinent information regarding Samba configuration for each of these server roles. -The reader is strongly encouraged to become intimately familiar with the information +You are strongly encouraged to become intimately familiar with the information presented. @@ -140,20 +142,19 @@ reduce user complaints and administrator heartache.
-In the SMB/CIFS networking world, there are only two types of security: User Level -and Share Level. We refer to these collectively as security levels. -In implementing these two security levels, Samba provides flexibilities -that are not available with Microsoft Windows NT4/200x servers. In actual fact, Samba implements -Share Level security only one way, but has four ways of implementing -User Level security. Collectively, we call the Samba implementations -Security Modes. They are known as: SHARE, USER, -DOMAIN, ADS, and SERVER modes. -They are documented in this chapter. +In the SMB/CIFS networking world, there are only two types of security: user level and +share level. We refer to these collectively as security levels. In +implementing these two security levels, Samba provides flexibilities that are not available with MS Windows +NT4/200x servers. In actual fact, Samba implements share-level security only one way, but +has four ways of implementing user-level security. Collectively, we call the Samba +implementations security modes. They are known as share, +user, domain, ADS, and +server modes. They are documented in this chapter. An SMB server tells the client at startup what security level it is running. There are two options: -Share Level and User Level. Which of these two the client receives affects the way the client then +share level and user level. Which of these two the client receives affects the way the client then tries to authenticate itself. It does not directly affect (to any great extent) the way the Samba server does security. This may sound strange, but it fits in with the client/server approach of SMB. In SMB everything is initiated and controlled by the client, and the server can only tell the client @@ -164,8 +165,8 @@ what is available and whether an action is allowed. User Level Security -We will describe User Level Security first, as its simpler. -In User Level Security, the client will send a +We describe user-level security first because its simpler. +In user-level security, the client sends a session setup request directly following protocol negotiation. This request provides a username and password. The server can either accept or reject that username/password combination. At this stage the server has no idea what @@ -179,7 +180,7 @@ share the client will eventually try to connect to, so it can't base the -If the server accepts the username/password then the client expects to be able to +If the server accepts the username/password, then the client expects to be able to mount shares (using a tree connection) without specifying a password. It expects that all access rights will be as the username/password specified in the session setup. @@ -196,7 +197,7 @@ authentication contexts in this way (WinDD is an example of an application that Example Configuration -The &smb.conf; parameter that sets user level security is: +The &smb.conf; parameter that sets user-level security is: @@ -211,33 +212,33 @@ This is the default setting since Samba-2.2.x. -Share Level Security +Share-Level Security -In Share Level security, the client authenticates +In share-level security, the client authenticates itself separately for each share. It sends a password along with each tree connection (share mount). It does not explicitly send a 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. -To understand the MS Windows networking parallels, one should think -in terms of MS Windows 9x/Me where one can create a shared folder that provides read-only +To understand the MS Windows networking parallels, think +in terms of MS Windows 9x/Me where you can create a shared folder that provides read-only or full access, with or without a password. -Many clients send a session setup even if the server is in Share Level security. They +Many clients send a session setup even if the server is in share-level security. They normally send a valid username but no password. Samba records this username in a list -of possible usernames. When the client then does a tree connection it also adds to this list the name +of possible usernames. When the client then does a tree connection, it also adds to this list the name of the share they try to connect to (useful for home directories) and any users listed in the parameter in the &smb.conf; file. -The password is then checked in turn against these possible usernames. If a match is found +The password is then checked in turn against these possible usernames. If a match is found, then the client is authenticated as that user. @@ -245,7 +246,7 @@ then the client is authenticated as that user. Example Configuration -The &smb.conf; parameter that sets Share Level security is: +The &smb.conf; parameter that sets share-level security is: @@ -256,14 +257,14 @@ The &smb.conf; parameter that sets Share Level security is: -Domain Security Mode (User Level Security) +Domain Security Mode (User-Level Security) Domain Member When Samba is operating in domain mode, the Samba server has a domain security trust account (a machine account) and causes -all authentication requests to be passed through to the Domain Controllers. -In other words, this configuration makes the Samba server a Domain Member server. +all authentication requests to be passed through to the domain controllers. +In other words, this configuration makes the Samba server a domain member server. @@ -292,7 +293,7 @@ security domain. This is done as follows: - On the MS Windows NT Domain Controller, using + On the MS Windows NT domain controller, using the Server Manager, add a machine account for the Samba server. @@ -303,7 +304,7 @@ security domain. This is done as follows: -Samba-2.2.4 and later can auto-join a Windows NT4-style Domain just by executing: +Samba-2.2.4 and later can autojoin a Windows NT4-style domain just by executing: &rootprompt;smbpasswd -j DOMAIN_NAME -r PDC_NAME \ -U Administrator%password @@ -314,38 +315,38 @@ Samba-3 can do the same by executing: &rootprompt;net rpc join -U Administrator%password 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. +PDC_NAME, as it figures this out from the &smb.conf; file settings. -Use of this mode of authentication does require there to be a standard UNIX account +Use of this mode of authentication requires there to be a standard UNIX account 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 +the remote Windows domain controller. This account can be blocked to prevent logons by clients other than MS Windows through means such as setting an invalid shell in the /etc/passwd entry. An alternative to assigning UIDs to Windows users on a Samba member server is -presented in Winbind: Use of Domain Accounts. +presented in Winbind, Winbind: Use of Domain Accounts. -For more information regarding Domain Membership, see Domain Membership. +For more information regarding domain membership, Domain Membership. -ADS Security Mode (User Level Security) +ADS Security Mode (User-Level Security) Both Samba-2.2, and Samba-3 can join an Active Directory domain. This is possible if the domain is run in native mode. Active Directory in -native mode perfectly allows NT4-style Domain Members. This is contrary to +native mode perfectly allows NT4-style domain members. This is contrary to popular belief. Active Directory in native mode prohibits only the use of -Backup Domain Controllers running MS Windows NT4. +BDCs running MS Windows NT4. @@ -353,8 +354,8 @@ If you are using Active Directory, starting with Samba-3 you can join as a native AD member. Why would you want to do that? Your security policy might prohibit the use of NT-compatible authentication protocols. All your machines are running Windows 2000 -and above and all use Kerberos. In this case Samba as an NT4-style -domain would still require NT-compatible authentication data. Samba in +and above and all use Kerberos. In this case Samba, as an NT4-style +domain, would still require NT-compatible authentication data. Samba in AD-member mode can accept Kerberos tickets. @@ -375,7 +376,7 @@ The following parameter may be required: -Please refer to Domain Membership and Samba ADS Domain Membership +Please refer to Domain Membership, and Samba ADS Domain Membership for more information regarding this configuration option. @@ -386,32 +387,32 @@ for more information regarding this configuration option. Server Security (User Level Security) -Server Security Mode is 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 +Server security mode is 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 drawbacks that include: - Potential Account Lockout on MS Windows NT4/200x password servers. + Potential account lockout on MS Windows NT4/200x password servers. Lack of assurance that the password server is the one specified. Does not work with Winbind, which is particularly needed when storing profiles remotely. - This mode may open connections to the password server, and keep them open for extended periods. + This mode may open connections to the password server and keep them open for extended periods. Security on the Samba server breaks badly when the remote password server suddenly shuts down. With this mode there is NO security account in the domain that the password server belongs to for the Samba server. -In Server Security Mode 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 session setup as described earlier. The Samba server takes the username/password that the client sends and attempts to login to the 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, +it got from the client. If that server is in user-level security and accepts the password, then Samba accepts the client's connection. This allows the Samba server to use another SMB server as the . -You should also note that at the start of all this where the server tells the client +You should also note that at the start of all this, when the server tells the client what security level it is in, it also tells the client if it supports encryption. If it does, it supplies the client with a random cryptkey. The client will then send all passwords in encrypted form. Samba supports this type of encryption by default. @@ -420,19 +421,19 @@ passwords in encrypted form. Samba supports this type of encryption by default. The parameter server means that Samba reports to clients that it is running in user mode but actually passes off all authentication -requests to another user mode server. This requires an additional +requests to another user mode server. This requires an additional parameter that points to the real authentication server. The real authentication server can be another Samba server, or it can be a Windows NT server, the latter being natively capable of encrypted password support. -When Samba is running in Server Security Mode it is essential that +When Samba is running in server security mode, it is essential that the parameter password server is set to the precise NetBIOS machine name of the target authentication server. Samba cannot determine this from NetBIOS name lookups because the choice of the target authentication server is arbitrary and cannot be determined from a domain name. In essence, a Samba server that is in -Server Security Mode is operating in what used to be known as +server security mode is operating in what used to be known as workgroup mode. @@ -460,11 +461,11 @@ process, the other uses just an error code. -The downside of this mode of configuration is the fact that for security reasons Samba -will send the password server a bogus username and a bogus password and if the remote -server fails to reject the username and password pair then an alternative mode of -identification of validation is used. Where a site uses password lock out after a -certain number of failed authentication attempts this will result in user lockouts. +The downside of this mode of configuration is that for security reasons Samba +will send the password server a bogus username and a bogus password, and if the remote +server fails to reject the username and password pair, then an alternative mode of +identification or validation is used. Where a site uses password lockout, after a +certain number of failed authentication attempts, this will result in user lockouts. @@ -484,7 +485,7 @@ This account can be blocked to prevent logons by non-SMB/CIFS clients. 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, -the password is passed over the network either in plain-text or encrypted, but +the password is passed over the network either in plaintext or encrypted, but not both in the same authentication request. @@ -498,19 +499,18 @@ is encrypted in two ways: string. This is known as the NT hash. - The password is converted to upper case, + The password is converted to uppercase, 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. + form two 56-bit DES keys to encrypt a "magic" 8-byte value. The resulting 16 bytes form the LanMan hash. -MS Windows 95 pre-service pack 1, MS Windows NT versions 3.x and version 4.0 +MS Windows 95 pre-service pack 1 and MS Windows NT versions 3.x and version 4.0 pre-service pack 3 will use either mode of password authentication. All -versions of MS Windows that follow these versions no longer support plain -text passwords by default. +versions of MS Windows that follow these versions no longer support plain-text passwords by default. @@ -522,16 +522,16 @@ a cached copy of the password. When Microsoft changed the default password mode, support was dropped for caching -of the plain-text password. This means that when the registry parameter is changed -to re-enable use of plain-text passwords it appears to work, but when a dropped +of the plaintext password. This means that when the registry parameter is changed +to re-enable use of plaintext passwords, it appears to work, but when a dropped service connection mapping attempts to revalidate, this will fail if the remote authentication server does not support encrypted passwords. It is definitely not -a good idea to re-enable plain-text password support in such clients. +a good idea to re-enable plaintext password support in such clients. The following parameters can be used to work around the issue of Windows 9x/Me clients -upper-casing usernames and passwords before transmitting them to the SMB server +uppercasing usernames and passwords before transmitting them to the SMB server when using clear-text authentication: @@ -541,9 +541,9 @@ when using clear-text authentication: -By default Samba will convert to lower case the username before attempting to lookup the user +By default Samba will convert to lowercase the username before attempting to lookup the user in the database of local system accounts. Because UNIX usernames conventionally -only contain lower-case characters, the parameter +only contain lowercase characters, the parameter is rarely needed. @@ -551,17 +551,16 @@ is rarely needed. However, passwords on UNIX systems often make use of mixed-case characters. This means that in order for a user on a Windows 9x/Me client to connect to a Samba server using clear-text authentication, the -must be set to the maximum number of upper case letters that could -appear in a password. Note that if the server OS uses the traditional DES version -of crypt(), a 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 +must be set to the maximum number of uppercase letters that could +appear in a password. Note that if the Server OS uses the traditional DES version +of crypt(), a of 8 will result in case-insensitive passwords as seen from Windows users. This will also result in longer +login times because Samba has to compute the permutations of the password string and try them one by one until a match is located (or all combinations fail). 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 +Samba is used. Most attempts to apply the registry change to re-enable plaintext passwords will eventually lead to user complaints and unhappiness. @@ -572,15 +571,15 @@ passwords will eventually lead to user complaints and unhappiness. We all make mistakes. It is okay to make mistakes, as long as they are made in the right places -and at the right time. A mistake that causes lost productivity is seldom tolerated, however a mistake +and at the right time. A mistake that causes lost productivity is seldom tolerated; however, a mistake made in a developmental test lab is expected. 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 your homework before attempting -a Samba implementation. Some are the result of a misunderstanding of the English language. The -English language, which has many phrases that are potentially vague and may be highly confusing +a Samba implementation. Some are the result of a misunderstanding of the English language, +which has many phrases that are potentially vague and may be highly confusing to those for whom English is not their native tongue. @@ -588,7 +587,7 @@ to those for whom English is not their native tongue. What Makes Samba a Server? -To some the nature of the Samba security mode is obvious, but entirely +To some the nature of the Samba security mode is obvious, but entirely wrong all the same. It is assumed that server means that Samba will act as a server. Not so! This setting means that Samba will try to use another SMB server as its source for user authentication alone. @@ -601,7 +600,7 @@ to use another SMB server as its source for user authentication alone. The &smb.conf; parameter domain does not really make Samba behave -as a Domain Controller. This setting means we want Samba to be a Domain Member. See Samba as a PDC for more information. +as a domain controller. This setting means we want Samba to be a domain member. See Samba as a PDC for more information. @@ -611,8 +610,8 @@ as a Domain Controller. This setting means we want Samba to be a Domain Member. Guess! So many others do. But whatever you do, do not think that user -makes Samba act as a Domain Member. Read the manufacturer's manual before the warranty expires. See -Domain Membership for more information. +makes Samba act as a domain member. Read the manufacturer's manual before the warranty expires. See +Domain Membership, for more information. diff --git a/docs/Samba3-HOWTO/TOSHARG-StandAloneServer.xml b/docs/Samba3-HOWTO/TOSHARG-StandAloneServer.xml index c1874d0e49..d2c981c427 100644 --- a/docs/Samba3-HOWTO/TOSHARG-StandAloneServer.xml +++ b/docs/Samba3-HOWTO/TOSHARG-StandAloneServer.xml @@ -4,12 +4,12 @@ &author.jht; -Stand-alone Servers +Standalone Servers -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 +Standalone servers are independent of domain controllers on the network. +They are not domain members and function more like workgroup servers. In many +cases a standalone server is configured with a minimum of security control with the intent that all data served will be readily accessible to all users. @@ -17,25 +17,25 @@ with the intent that all data served will be readily accessible to all users. Features and Benefits -Stand-alone Servers can be as secure or as insecure as needs dictate. They can +Standalone servers can be as secure or as insecure as needs dictate. They can have simple or complex configurations. Above all, despite the hoopla about -Domain Security they remain a common installation. +domain security, they remain a common installation. If all that is needed is a server for read-only files, or for printers alone, it may not make sense to effect a complex installation. -For example: A drafting office needs to store old drawings and reference -standards. No-one can write files to the server as it is legislatively -important that all documents remain unaltered. A share mode read-only Stand-alone -Server is an ideal solution. +For example, a drafting office needs to store old drawings and reference +standards. Noone can write files to the server because it is legislatively +important that all documents remain unaltered. A share-mode read-only standalone +server is an ideal solution. Another situation that warrants simplicity is an office that has many printers that are queued off a single central server. Everyone needs to be able to print -to the printers, there is no need to effect any access controls and no files will -be served from the print server. Again, a share mode Stand-alone Server makes +to the printers, there is no need to effect any access controls, and no files will +be served from the print server. Again, a share-mode standalone server makes a great solution. @@ -44,34 +44,34 @@ a great solution. Background -The term Stand-alone Server means that it +The term standalone server means that it will provide local authentication and access control for all resources that are available from it. In general this means that there will be a local user database. In more technical terms, it means resources -on the machine will be made available in either SHARE mode or in -USER mode. +on the machine will be made available in either share mode or in +user mode. -No special action is needed other than to create user accounts. Stand-alone +No special action is needed other than to create user accounts. Standalone servers do not provide network logon services. This means that machines that 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 the logon name they use will -be translated (mapped) locally on the Stand-alone Server to a locally known +necessary to accommodate any network user so the logon name he or she uses will +be translated (mapped) locally on the standalone server to a locally known user name. There are several ways this can be done. -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 +Samba tends to blur the distinction a little in defining +a standalone server. This is because the authentication database may be local or on a remote server, even if from the SMB protocol perspective the Samba server is not a member of a domain security context. -Through the use of Pluggable Authentication Modules (PAM) and the name service switcher (NSSWITCH), -which maintains the UNIX-user database) the source of authentication may reside on +Through the use of Pluggable Authentication Modules (PAM) and the name service switcher (NSSWITCH, +which maintains the UNIX-user database), 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 @@ -85,8 +85,7 @@ for authentication. Example Configuration -The examples, Reference Documentation Server, and -Central Print Serving, +Examples 7.3.1 and 7.3.2 are designed to inspire simplicity. It is too easy to attempt a high level of creativity and to introduce too much complexity in server and network design. @@ -96,7 +95,7 @@ and to introduce too much complexity in server and network design. Configuration of a read-only data server that everyone can access is very simple. -Following example is the &smb.conf; file that will do this. Assume that all the reference documents +The following example (7.3.1) is the &smb.conf; file that will do this. Assume that all the reference documents are stored in the directory /export, and the documents are owned by a user other than nobody. No home directories are shared, and there are no users in the /etc/passwd UNIX system database. This is a simple system to administer. @@ -120,10 +119,10 @@ UNIX system database. This is a simple system to administer. -In the example above, the machine name is set to &example.server.samba;, the workgroup is set to the name +In this example, the machine name is set to &example.server.samba;, and the workgroup is set to the name of the local workgroup (&example.workgroup;) so the machine will appear together with systems with which users are familiar. The only password backend required is the guest backend to allow default -unprivileged account names to be used. As there is a WINS server on this network, we of obviously make use of it. +unprivileged account names to be used. As there is a WINS server on this network, we of course make use of it. @@ -137,14 +136,14 @@ on your system. - Assumptions: + Assumptions The print server must require no administration. The print spooling and processing system on our print server will be CUPS. - (Please refer to CUPS Printing Support for more information). + (Please refer to CUPS Printing Support, for more information). @@ -153,7 +152,7 @@ on your system. - All workstations will use only postscript drivers. The printer driver + All workstations will use only PostScript drivers. The printer driver of choice is the one shipped with the Windows OS for the Apple Color LaserWriter. @@ -162,7 +161,7 @@ on your system. In this example our print server will spool all incoming print jobs to /var/spool/samba 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: +the anonymous (guest) user, two things will be required to enable anonymous printing. @@ -192,7 +191,7 @@ the anonymous (guest) user, two things will be required: -The contents of the &smb.conf; file is shown in the next example. +The contents of the &smb.conf; file is shown in Example 7.3.2. @@ -226,8 +225,8 @@ On CUPS-enabled systems there is a facility to pass raw data directly to the pri intermediate processing via CUPS print filters. Where use of this mode of operation is desired, it is necessary to configure a raw printing device. It is also necessary to enable the raw mime handler in the /etc/mime.conv and /etc/mime.types -files. Refer to Explicitly Enable raw Printing for -application/octet-stream. +files. Refer to CUPS Printing Support, Explicitly Enable raw Printing for +application/octet-stream. diff --git a/docs/Samba3-HOWTO/TOSHARG-TheNetCommand.xml b/docs/Samba3-HOWTO/TOSHARG-TheNetCommand.xml index 0e70374256..2b73a06392 100644 --- a/docs/Samba3-HOWTO/TOSHARG-TheNetCommand.xml +++ b/docs/Samba3-HOWTO/TOSHARG-TheNetCommand.xml @@ -9,46 +9,46 @@ May 9, 2005 -Remote and Local Management &smbmdash; The Net Command +Remote and Local Management: The Net Command The net command is one of the new features of Samba-3 and is an attempt to provide a useful -tool into which the majority of remote management operations necessary for common tasks. The -net tool is flexible by design and is intended for command line use as well as for scripted +tool for the majority of remote management operations necessary for common tasks. The +net tool is flexible by design and is intended for command-line use as well as for scripted control application. Originally introduced with the intent to mimic the Microsoft Windows command that has the same name, the net command has morphed into a very powerful instrument that has become an essential part -of the Samba network administrator's toolbox. The Samba Team have introduced tools, such as -smbgroupedit, rpcclient from which really useful have been integrated into the -net. The smbgroupedit command was absorbed entirely into the -net, while only some features of the rpcclient command have been -ported to it. Anyone who finds older references to these utilities and to the functionality they provided -should look at the net command before searching elsewhere. +of the Samba network administrator's toolbox. The Samba Team has introduced tools, such as +smbgroupedit and rpcclient, from which really useful capabilities have +been integrated into the net. The smbgroupedit command was absorbed +entirely into the net, while only some features of the rpcclient command +have been ported to it. Anyone who finds older references to these utilities and to the functionality they +provided should look at the net command before searching elsewhere. -A Samba-3 administrator can not afford to gloss over this chapter because to do so will almost certainly cause -the infliction of self induced pain, agony and desperation. Be warned, this is an important chapter. +A Samba-3 administrator cannot afford to gloss over this chapter because to do so will almost certainly cause +the infliction of self-induced pain, agony, and desperation. Be warned: this is an important chapter. Overview - The tasks that follow the installation of a Samba-3 server, whether Stand-Alone, Domain Member, of a - Domain Controller (PDC or BDC) begins with the need to create administrative rights. Of course, the - creation of user and group accounts is essential for both a Stand-Alone server as well as for a PDC. - In the case of a BDC or a Domain Member server (DMS) Domain user and group accounts are obtained from + The tasks that follow the installation of a Samba-3 server, whether standalone or domain member, of a + domain controller (PDC or BDC) begins with the need to create administrative rights. Of course, the + creation of user and group accounts is essential for both a standalone server and a PDC. + In the case of a BDC or a Domain Member server (DMS), domain user and group accounts are obtained from the central domain authentication backend. Regardless of the type of server being installed, local UNIX groups must be mapped to the Windows - networking domain global group accounts. Do you ask, why? Because Samba always limits its access to - the resources of the host server by way of traditional UNIX UID/GID controls. This means that local + networking domain global group accounts. Do you ask why? Because Samba always limits its access to + the resources of the host server by way of traditional UNIX UID and GID controls. This means that local groups must be mapped to domain global groups so that domain users who are members of the domain global groups can be given access rights based on UIDs and GIDs local to the server that is hosting Samba. Such mappings are implemented using the net command. @@ -61,32 +61,32 @@ the infliction of self induced pain, agony and desperation. Be warned, this is a - The establishment of inter-domain trusts is achieved using the net command also, as - may a plethora of typical administrative duties such as: user management, group management, share and + The establishment of interdomain trusts is achieved using the net command also, as + may a plethora of typical administrative duties such as user management, group management, share and printer management, file and printer migration, security identifier management, and so on. - The over-all picture should be clear now, the net command plays a central role + The overall picture should be clear now: the net command plays a central role on the Samba-3 stage. This role will continue to be developed. The inclusion of this chapter is evidence of its importance, one that has grown in complexity to the point that it is no longer considered - prudent to cover its use fully in the on-line UNIX man pages. + prudent to cover its use fully in the online UNIX man pages. - Administrative Tasks And Methods + Administrative Tasks and Methods The basic operations of the net command are documented here. This documentation is not - exhaustive, and thus it is incomplete. Since the primary focus is on migration from Windows servers to - a Samba server the emphasis is on the use of the DCE RPC mode of operation. When used against a server - that is a member of an Active Directory domain it is preferable (and often necessary) to use ADS mode - operations. The net command supports both, but not for every operation. For most - operations, if the mode is not specified net will automatically fall back via - the ads, rpc, rap modes. Please refer to the man page for a more comprehensive - overview of the capabilities of this utility. + exhaustive, and thus it is incomplete. Since the primary focus is on migration from Windows servers to a Samba + server, the emphasis is on the use of the DCE RPC mode of operation. When used against a server that is a + member of an Active Directory domain, it is preferable (and often necessary) to use ADS mode operations. The + net command supports both, but not for every operation. For most operations, if the mode is + not specified, net will automatically fall back via the ads, + rpc, and rap modes. Please refer to the man page for a more + comprehensive overview of the capabilities of this utility. @@ -95,15 +95,15 @@ the infliction of self induced pain, agony and desperation. Be warned, this is a UNIX and Windows Group Management - In repetition of what has been said, the focus in most of this chapter is on use of the net + As stated, the focus in most of this chapter is on use of the net rpc family of operations that are supported by Samba. Most of them are supported by the - net ads mode when used in connection with MS Active Directory. The net + net ads mode when used in connection with Active Directory. The net rap operating mode is also supported for some of these operations. RAP protocols are used by IBM OS/2 and by several earlier SMB servers. - Sambas' net tool implements sufficient capability to permit all common administrative + Samba's net tool implements sufficient capability to permit all common administrative tasks to be completed from the command line. In this section each of the essential user and group management facilities are explored. @@ -126,7 +126,7 @@ the infliction of self induced pain, agony and desperation. Be warned, this is a Adding or Creating a New Group - Before attempting to add a Windows group account the currently available groups can be listed as shown + Before attempting to add a Windows group account, the currently available groups can be listed as shown here: &rootprompt; net rpc group list -Uroot%not24get @@ -145,7 +145,7 @@ command: &rootprompt; net rpc group add "SupportEngrs" -Uroot%not24get - The addition will result in immediate availability of the new group account as validated by executing the + The addition will result in immediate availability of the new group account as validated by executing this command: &rootprompt; net rpc group list -Uroot%not24get @@ -209,14 +209,14 @@ SupportEngrs (S-1-5-21-72630-4128915-11681869-3007) -> SupportEngrs All file system (file and directory) access controls, within the file system of a UNIX/Linux server that is - hosting a Samba server, is implemented using a UID/GID identity tuple. Samba does not in any way over-ride + hosting a Samba server, are implemented using a UID/GID identity tuple. Samba does not in any way override or replace UNIX file system semantics. Thus it is necessary that all Windows networking operations that - access the file system must provide a mechanism that maps a Windows user to a particular UNIX/Linux group + access the file system provide a mechanism that maps a Windows user to a particular UNIX/Linux group account. The user account must also map to a locally known UID. - Samba depends on default mappings for the Domain Admins, Domain Users and + Samba depends on default mappings for the Domain Admins, Domain Users, and Domain Guests global groups. Additional groups may be added as shown in the examples just given. There are times when it is necessary to map an existing UNIX group account to a Windows group. This operation, in effect, creates a Windows group account as a consequence @@ -224,7 +224,7 @@ SupportEngrs (S-1-5-21-72630-4128915-11681869-3007) -> SupportEngrs - The operations that are permitted includes: add, modify, delete. An example + The operations that are permitted include: add, modify, and delete. An example of each operation is shown here. @@ -246,8 +246,8 @@ SupportEngrs (S-1-5-21-72630-4128915-11681869-3007) -> SupportEngrs - Two types of Windows groups can be created: domain (global), and local. - In the above examples the Windows groups created were of type domain, or global. The + Two types of Windows groups can be created: domain (global) and local. + In the previous examples the Windows groups created were of type domain or global. The following command will create a Windows group of type local. &rootprompt; net groupmap add ntgroup=Pixies unixgroup=pixies type=l @@ -277,13 +277,13 @@ SupportEngrs (S-1-5-21-72630-4128915-11681869-3007) -> SupportEngrs Rename Group Accounts - This command is not documented in the man pages, it is implemented in the source code, but it does not + This command is not documented in the man pages; it is implemented in the source code, but it does not work. The example given documents (from the source code) how it should work. Watch the release notes - of a future release to see when this may have been be fixed. + of a future release to see when this may have been fixed. - Sometimes it is necessary to rename a group account. Good administrators know how painful some managers + Sometimes it is necessary to rename a group account. Good administrators know how painful some managers' demands can be if this simple request is ignored. The following command demonstrates how the Windows group SupportEngrs can be renamed to CustomerSupport: @@ -300,13 +300,13 @@ SupportEngrs (S-1-5-21-72630-4128915-11681869-3007) -> SupportEngrs Manipulating Group Memberships - Three operations can be performed in respect of group membership. It is possible to (1) add Windows users - to Windows group, to (2) delete Windows users from Windows groups, and to (3) list the Windows users that are + Three operations can be performed regarding group membership. It is possible to (1) add Windows users + to a Windows group, to (2) delete Windows users from Windows groups, and to (3) list the Windows users that are members of a Windows group. - So as to avoid confusion, it makes sense to check group membership before attempting to make and changes. + To avoid confusion, it makes sense to check group membership before attempting to make any changes. The getent group will list UNIX/Linux group membership. UNIX/Linux group members are seen also as members of a Windows group that has been mapped using the net groupmap command (see ). The following list of UNIX/Linux group membership shows @@ -338,7 +338,7 @@ Engineers (S-1-5-21-72630-412605-116429-3001) -> Engineers - Given that the user ajt is already a member of the UNIX/Linux group, and via the + Given that the user ajt is already a member of the UNIX/Linux group and, via the group mapping, a member of the Windows group, an attempt to add this account again should fail. This is demonstrated here: @@ -350,8 +350,8 @@ Could not add ajt to MIDEARTH\Engineers: NT_STATUS_MEMBER_IN_GROUP - To permit the user ajt to be added using the net rpc group utility - this account must first be removed. The removal, and confirmation of its effect is shown here: + To permit the user ajt to be added using the net rpc group utility, + this account must first be removed. The removal and confirmation of its effect is shown here: &rootprompt; net rpc group delmem "MIDEARTH\Engineers" ajt -Uroot%not24get &rootprompt; getent group Engineers @@ -376,9 +376,9 @@ MIDEARTH\ajt - In this example the members of the Windows Domain Users account is validated using - the net rpc group utility. Note that this contents of the UNIX/Linux group was shown - 4 paragraphs earlier. The Windows (domain) group membership is shown here: + In this example the members of the Windows Domain Users account are validated using + the net rpc group utility. Note the this contents of the UNIX/Linux group was shown + four paragraphs earlier. The Windows (domain) group membership is shown here: &rootprompt; net rpc group members "Domain Users" -Uroot%not24get MIDEARTH\jht @@ -387,8 +387,8 @@ MIDEARTH\ajt MIDEARTH\met MIDEARTH\vlendecke - The example shown here is an express example that Windows group names are treated by Samba (as with - MS Windows) in a case insensitive manner: + This express example shows that Windows group names are treated by Samba (as with + MS Windows) in a case-insensitive manner: &rootprompt; net rpc group members "DomAiN USerS" -Uroot%not24get MIDEARTH\jht @@ -413,8 +413,8 @@ MIDEARTH\vlendecke Nested Group Support - It is possible in Windows (and now in Samba also) to great a local group that has members (contains) - domain users and domain global groups. Creation of the local group demo is + It is possible in Windows (and now in Samba also) to create a local group that has members (contains), + domain users, and domain global groups. Creation of the local group demo is achieved by executing: &rootprompt; net rpc group add demo -L -S MORDON -Uroot%not24get @@ -472,7 +472,7 @@ DOM\jht Every Windows network user account must be translated to a UNIX/Linux user account. In actual fact, the only account information the UNIX/Linux Samba server needs is a UID. The UID is available either - from a system (POSIX) account, or from a pool (range) of UID numbers that is set aside for the purpose + from a system (POSIX) account or from a pool (range) of UID numbers that is set aside for the purpose of being allocated for use by Windows user accounts. In the case of the UID pool, the UID for a particular user will be allocated by winbindd. @@ -481,7 +481,7 @@ DOM\jht Although this is not the appropriate place to discuss the facility, this interface is an important method of mapping a Windows user account to a UNIX account that has a different name. Refer to the man page for the &smb.conf; file for more information regarding this - facility. User name mappings can not be managed using the net utility. + facility. User name mappings cannot be managed using the net utility. @@ -537,7 +537,7 @@ Deleted user account Managing User Accounts - Two basic user account operations are routinely used, change of password and querying which groups a user + Two basic user account operations are routinely used: change of password and querying which groups a user is a member of. The change of password operation is shown in . @@ -562,7 +562,7 @@ Emergency Services User Mapping - In some situations it is unavoidable that a users' Windows logon name will differ from the login ID + In some situations it is unavoidable that a user's Windows logon name will differ from the login ID that user has on the Samba server. It is possible to create a special file on the Samba server that will permit the Windows user name to be mapped to a different UNIX/Linux user name. The &smb.conf; file must also be amended so that the [global] stanza contains the parameter: @@ -587,21 +587,21 @@ marygee: geeringm Administering User Rights and Privileges - With all versions of Samba earlier than 3.0.11 the only account on a Samba server that had the ability - to manage users, groups, shares, printers, etc. is the root account. This caused - immense problems for some users and was a frequent source of scorn over the necessity to hand out the - credentials for the most security sensitive account on a UNIX/Linux system. + With all versions of Samba earlier than 3.0.11 the only account on a Samba server that could + manage users, groups, shares, printers, and such was the root account. This caused + problems for some users and was a frequent source of scorn over the necessity to hand out the + credentials for the most security-sensitive account on a UNIX/Linux system. New to Samba version 3.0.11 is the ability to delegate administrative privileges as necessary to either - a normal user, or to groups of users. The significance of the administrative privileges is documented + a normal user or to groups of users. The significance of the administrative privileges is documented in . Examples of use of the net for user rights and privilege management is appropriate to this chapter. - When user rights and privileges are correctly set there is no longer a need for there to be a Windows + When user rights and privileges are correctly set, there is no longer a need for a Windows network account for the root user (nor for any synonym of it) with a UNIX UID=0. Initial user rights and privileges can be assigned by any account that is a member of the Domain Admins group. Rights can be assigned to user as well as group accounts. @@ -659,7 +659,7 @@ No privileges assigned SeDiskOperatorPrivilege -U root%not24get Successfully granted rights. - Next, the domain user jht is given the privileges needed for day to day + Next, the domain user jht is given the privileges needed for day-to-day administration: &rootprompt; net rpc rights grant "MIDEARTH\jht" \ @@ -713,10 +713,10 @@ SeDiskOperatorPrivilege Managing Trust Relationships - There are essentially two types of trust relationships. The first between domain controllers and domain - member machines (network clients), the second trusts between domains (called inter-domain trusts). All + There are essentially two types of trust relationships: the first is between domain controllers and domain + member machines (network clients), the second is between domains (called interdomain trusts). All Samba servers that participate in domain security require a domain membership trust account, as do like - Windows NT/2KX/XPP workstations. + Windows NT/200x/XP workstations. @@ -728,7 +728,7 @@ SeDiskOperatorPrivilege &rootprompt; net rpc testjoin Join to 'MIDEARTH' is OK - Where there is no domain membership account, or when the account credentials are not valid the following + Where there is no domain membership account, or when the account credentials are not valid, the following results will be observed: net rpc testjoin -S DOLPHIN @@ -773,7 +773,7 @@ merlin$:1009:9B4489D6B90461FD6A3EC3AB96147E16:\ Joined domain MIDEARTH. Note that the command-line parameter member makes this join specific. By default - the type is deduced from the &smb.conf; file configuration. To specifically join as a PDC or BDC the + the type is deduced from the &smb.conf; file configuration. To specifically join as a PDC or BDC, the command-line parameter will be [PDC | BDC]. For example: &rootprompt; net rpc join bdc -S FRODO -Uroot%not24get @@ -792,15 +792,15 @@ Joined 'FRANDIMITZ' to realm 'GDANSK.ABMAS.BIZ' - There is no specific option to remove a machine account from ain NT4 domain. When a domain member that is a - Windows machine is withdrawn from the domain the domain membership account is not automatically removed + There is no specific option to remove a machine account from an NT4 domain. When a domain member that is a + Windows machine is withdrawn from the domain, the domain membership account is not automatically removed either. Inactive domain member accounts can be removed using any convenient tool. If necessary, the machine account can be removed using the following net command: &rootprompt; net rpc user delete HERRING\$ -Uroot%not24get Deleted user account. - The removal is made possible because machine account are just like user accounts with a trailing $ + The removal is made possible because machine accounts are just like user accounts with a trailing $ character. The account management operations treat user and machine accounts in like manner. @@ -819,22 +819,22 @@ Deleted user account. &rootprompt; net ads status The volume of information is extensive. Please refer to the book Samba-3 by Example, -Chapter 7 for more information regarding its use. This book may be obtained either in print, or on line from +Chapter 7 for more information regarding its use. This book may be obtained either in print or online from the Samba-Guide. - Inter-Domain Trusts + Interdomain Trusts - Inter-domain trust relationships form the primary mechanism by which users from one domain can be granted + Interdomain trust relationships form the primary mechanism by which users from one domain can be granted access rights and privileges in another domain. - To discover what trust relationships are in effect execute this command: + To discover what trust relationships are in effect, execute this command: &rootprompt; net rpc trustdom list -Uroot%not24get Trusted domains list: @@ -845,7 +845,7 @@ Trusting domains list: none - There are no inter-domain trusts at this time, the following steps will create them. + There are no interdomain trusts at this time; the following steps will create them. @@ -865,7 +865,7 @@ damnation$:1016:9AC1F121DF897688AAD3B435B51404EE: \ - If the trusting domain is not capable of being reached the following command will fail + If the trusting domain is not capable of being reached, the following command will fail: &rootprompt; net rpc trustdom list -Uroot%not24get Trusted domains list: @@ -892,7 +892,7 @@ DAMNATION domain controller is not responding Where a trust account has been created on a foreign domain, Samba is able to establish the trust (connect with) the foreign account. In the process it creates a one-way trust to the resources on the remote domain. This - command achieves the objective of enjoining the trust relationship: + command achieves the objective of joining the trust relationship: &rootprompt; net rpc trustdom establish damnation Password: xxxxxxx == f00db4r @@ -913,7 +913,7 @@ DAMNATION S-1-5-21-1385457007-882775198-1210191635 - Sometimes it is necessary to remove the ability for local uses to access a foreign domain. The trusting + Sometimes it is necessary to remove the ability for local users to access a foreign domain. The trusting connection can be revoked as shown here: &rootprompt; net rpc trustdom revoke damnation -Uroot%not24get @@ -934,21 +934,21 @@ DAMNATION S-1-5-21-1385457007-882775198-1210191635 Managing Security Identifiers (SIDS) - The basic security identifier that is used b y all Windows networking operations is the Windows security + The basic security identifier that is used by all Windows networking operations is the Windows security identifier (SID). All Windows network machines (servers and workstations), users, and groups are identified by their respective SID. All desktop profiles are also encoded with user and group SIDs that are specific to the SID of the domain to which the user belongs. - It is truly prudent to store the machine and/or domain SID in a file for safe-keeping. Why? Because + It is truly prudent to store the machine and/or domain SID in a file for safekeeping. Why? Because a change in hostname or in the domain (workgroup) name may result in a change in the SID. When you - have the SID on hand it is a simple matter to restore it. The alternative is to suffer the pain of - having to recover user desktop profiles and perhaps re-join all member machines to the domain. + have the SID on hand, it is a simple matter to restore it. The alternative is to suffer the pain of + having to recover user desktop profiles and perhaps rejoin all member machines to the domain. - First, do not forget to store the local sid in a file. It is a good idea to put this in the directory + First, do not forget to store the local SID in a file. It is a good idea to put this in the directory in which the &smb.conf; file is also stored. Here is a simple action to achieve this: &rootprompt; net getlocalsid > /etc/samba/my-sid @@ -968,18 +968,18 @@ SID for domain MERLIN is: S-1-5-21-726309263-4128913605-1168186429 If ever it becomes necessary to restore the SID that has been stored in the my-sid file, simply copy the SID (the string of characters that begins with S-1-5-21) to - the command-line shown here: + the command line shown here: &rootprompt; net setlocalsid S-1-5-21-1385457007-882775198-1210191635 - Restoration of a machine SID is a simple operation, but the absence of a back-up copy can be very + Restoration of a machine SID is a simple operation, but the absence of a backup copy can be very problematic. The following operation is useful only for machines that are being configured as a PDC or a BDC. - Domain member servers (DMS) and workstation clients should have their own machine SID to avoid - any potential name-space collision. Here is the way that the BDC SID can be synchronized to that + DMS and workstation clients should have their own machine SID to avoid + any potential namespace collision. Here is the way that the BDC SID can be synchronized to that of the PDC (this is the default NT4 domain practice also): &rootprompt; net rpc getsid -S FRODO -Uroot%not24get @@ -1007,7 +1007,7 @@ Storing SID S-1-5-21-726309263-4128913605-1168186429 \ - Each of these are dealt with here in so far as they involve the use of the net + Each of these are dealt with here insofar as they involve the use of the net command. Operations outside of this command are covered elsewhere in this document. @@ -1018,7 +1018,7 @@ Storing SID S-1-5-21-726309263-4128913605-1168186429 \ A share can be added using the net rpc share command capabilities. The target machine may be local or remote and is specified by the -S option. It must be noted that the addition and deletion of shares using this tool depends on the availability of a suitable - interface script. The interface scripts Sambas smbd uses are called: + interface script. The interface scripts Sambas smbd uses are called and . A set of example scripts are provided in the Samba source code tarball in the directory ~samba/examples/scripts. @@ -1026,14 +1026,14 @@ Storing SID S-1-5-21-726309263-4128913605-1168186429 \ The following steps demonstrate the use of the share management capabilities of the net - utility. In the first step a share called Bulge is added. The share-point within the + utility. In the first step a share called Bulge is added. The sharepoint within the file system is the directory /data. The command that can be executed to perform the addition of this share is shown here: &rootprompt; net rpc share add Bulge=/data -S MERLIN -Uroot%not24get Validation is an important process, and by executing the command net rpc share - with no other operators a listing of available shares is shown here: + with no other operators it is possible to obtain a listing of available shares, as shown here: &rootprompt; net rpc share -S MERLIN -Uroot%not24get profdata @@ -1074,23 +1074,23 @@ kyocera Creating and Changing Share ACLs - At this time the net tool can not be used to manage ACLs on Samba shares. In MS Windows - language this is called: Share Permissions. + At this time the net tool cannot be used to manage ACLs on Samba shares. In MS Windows + language this is called Share Permissions. - It is possible to set ACLs on Samba shares using either the SRVTOOLS NT4 Domain Server Manager, - of using the Computer Management MMC snap-in. Neither will be covered here as this subject is - covered in . + It is possible to set ACLs on Samba shares using either the SRVTOOLS NT4 Domain Server Manager + or using the Computer Management MMC snap-in. Neither is covered here, + but see . - Share, Directory and File Migration + Share, Directory, and File Migration - Shares and files can be migrated in the same manner as user, machine and group accounts. + Shares and files can be migrated in the same manner as user, machine, and group accounts. It is possible to preserve access control settings (ACLs) as well as security settings throughout the migration process. The net rpc vampire facility is used to migrate accounts from a Windows NT4 (or later) domain to a Samba server. This process @@ -1099,26 +1099,26 @@ kyocera - The net rpc share command may be used to migrate shares, directories + The net rpc share command may be used to migrate shares, directories, files, printers, and all relevant data from a Windows server to a Samba server. A set of command-line switches permit the creation of almost direct clones of Windows file - servers. For example, when migrating a file-server, file ACLs and DOS file attributes from - the Windows server can be included in the migration process and will reappear, almost identically + servers. For example, when migrating a fileserver, file ACLs and DOS file attributes from + the Windows server can be included in the migration process and will reappear, almost identically, on the Samba server when the migration has been completed. The migration process can be completed only with the Samba server already being fully operational. - This means that the user and group accounts must be migrated before attempting to migrate data + The user and group accounts must be migrated before attempting to migrate data share, files, and printers. The migration of files and printer configurations involves the use of both SMB and MS DCE RPC services. The benefit of the manner in which the migration process has - been implemented, the possibility now exists to use a Samba server as a man-in-middle migration + been implemented is that the possibility now exists to use a Samba server as a man-in-middle migration service that affects a transfer of data from one server to another. For example, if the Samba server is called MESSER, the source Windows NT4 server is called PEPPY, and the target Samba - server is called GONZALES, the machine MESSER can be used to affect the migration of all data + server is called GONZALES, the machine MESSER can be used to effect the migration of all data (files and shares) from PEPPY to GONZALES. If the target machine is not specified, the local server is assumed by default. @@ -1134,12 +1134,12 @@ kyocera - The net command requires that the user credentials provided exist both - on the migration source and the migration target. + The net command requires that the user credentials provided exist on both + the migration source and the migration target. - Printer settings may not be fully or incorrectly migrated. This might in particular happen + Printer settings may not be fully or may be incorrectly migrated. This might in particular happen when migrating a Windows 2003 print server to Samba. @@ -1157,7 +1157,7 @@ kyocera - The shares are created on-the-fly as part of the migration process. The smbd + The shares are created on the fly as part of the migration process. The smbd application does this by calling on the operating system to execute the script specified by the &smb.conf; parameter add share command. @@ -1167,7 +1167,7 @@ kyocera $SAMBA_SOURCES/examples/scripts directory. It should be noted that the account that is used to drive the migration must, of necessity, have appropriate file system access privileges and have the right to create shares and to set ACLs on them. Such rights are - conferred by these rights: SeAddUsersPrivilege, SeDiskOperatorPrivilege. + conferred by these rights: SeAddUsersPrivilege and SeDiskOperatorPrivilege. For more information regarding rights and privileges please refer to . @@ -1187,7 +1187,7 @@ net rpc share MIGRATE SHARES <share-name> -S <source> This will migrate the share myshare from the server win2k to the Samba Server using the permissions that are tied to the account administrator with the password secret. The account that is used must be the same on both the - migration source server, as well as on the target Samba server. The use of the net rpc + migration source server and the target Samba server. The use of the net rpc vampire, prior to attempting the migration of shares, will ensure that accounts will be identical on both systems. One precaution worth taking before commencement of migration of shares is to validate that the migrated accounts (on the Samba server) have the needed rights and privileges. @@ -1195,7 +1195,7 @@ net rpc share MIGRATE SHARES <share-name> -S <source> &rootprompt; net rpc right list accounts -Uroot%not24get - The steps taken so far performs only the migration of shares. Directories and directory contents + The steps taken so far perform only the migration of shares. Directories and directory contents are not migrated by the steps covered up to this point. @@ -1207,20 +1207,20 @@ net rpc share MIGRATE SHARES <share-name> -S <source> Everything covered to this point has been done in preparation for the migration of file and directory data. For many people preparation is potentially boring and the real excitement only begins when file - data can be used. The next steps demonstrates the techniques that can be used to transfer (migrate) + data can be used. The next steps demonstrate the techniques that can be used to transfer (migrate) data files using the net command. - Transfer of files from one server to another has always been a challenge for Microsoft Windows + Transfer of files from one server to another has always been a challenge for MS Windows administrators because Windows NT and 200X servers do not include the tools needed. The - xcopy is not capable of preserving file and directory ACLs. Microsoft do provide a + xcopy is not capable of preserving file and directory ACLs. Microsoft does provide a utility that can copy ACLs (security settings) called scopy, but it is provided only as part of the Windows NT or 200X Server Resource Kit. - There are several tools, both commercial and freeware, that can be used from Windows server to copy files + There are several tools, both commercial and freeware, that can be used from a Windows server to copy files and directories with full preservation of security settings. One of the best known of the free tools is called robocopy. @@ -1228,9 +1228,9 @@ net rpc share MIGRATE SHARES <share-name> -S <source> The net utility can be used to copy files and directories with full preservation of ACLs as well as DOS file attributes. Note that including ACLs makes sense only where the destination - system will operate within the same security context as the source system. This applies to both a domain - member server (DMS) as well as for domain controllers (DCs) that result from a vampired domain. - Before file and directory migration all shares must already exist. + system will operate within the same security context as the source system. This applies both to a + DMS and to domain controllers that result from a vampired domain. + Before file and directory migration, all shares must already exist. @@ -1247,20 +1247,20 @@ net rpc share MIGRATE FILES <share-name> -S <source> Where it is necessary to preserve all file ACLs, the --acls switch should be added - to the above command line. Original file time stamps can be preserved by specifying the - --timestamps switch, and the DOS file attributes (i.e.: hidden, archive, etc.) cab + to the above command line. Original file timestamps can be preserved by specifying the + --timestamps switch, and the DOS file attributes (i.e., hidden, archive, etc.) can be preserved by specifying the --attrs switch. - The ability to preserve ACLs depends on appropriate support for ACLs, as well as the general file system + The ability to preserve ACLs depends on appropriate support for ACLs as well as the general file system semantics of the host operating system on the target server. A migration from one Windows file server to another will perfectly preserve all file attributes. Because of the difficulty of mapping Windows ACLs - onto a POSIX ACLs supporting system, there can be no perfect migration of Windows ACLs to a Samba server. + onto a POSIX ACLs-supporting system, there can be no perfect migration of Windows ACLs to a Samba server. - The ACLs that result on a Samba server will most probably not match the originating ACLs. Windows support + The ACLs that result on a Samba server will most probably not match the originating ACLs. Windows supports the possibility of files that are owned only by a group. Group-alone file ownership is not possible under UNIX/Linux. Errors in migrating group-owned files can be avoided by using the &smb.conf; file yes parameter. This facility will @@ -1277,7 +1277,7 @@ net rpc share MIGRATE FILES <share-name> -S <source> - The above command will migrate all files and directories from all file shares on the Windows server called + This command will migrate all files and directories from all file shares on the Windows server called nt4box to the Samba server from which migration is initiated. Files that are group-owned will be owned by the user account administrator. @@ -1288,8 +1288,8 @@ net rpc share MIGRATE FILES <share-name> -S <source> Simultaneous Share and File Migration - This operating mode shown here is just a combination of the two above. It first migrates - share-definitions and then all shared files and directories afterwards: + The operating mode shown here is just a combination of the previous two. It first migrates + share definitions and then all shared files and directories: net rpc share MIGRATE ALL <share-name> -S <source> [--exclude=share1, share2] [--acls] [--attrs] [--timestamps] [-v] @@ -1312,23 +1312,23 @@ net rpc share MIGRATE ALL <share-name> -S <source> Printer Migration - The installation of a new server, as with the migration to a new network environment, often has similarity - to the building of a house; progress is very rapid from the laying of foundations up to the stage at which - the the house can be locked-up, but the finishing off appears to take longer and longer as building + The installation of a new server, as with the migration to a new network environment, often is similar to + building a house; progress is very rapid from the laying of foundations up to the stage at which + the the house can be locked up, but the finishing off appears to take longer and longer as building approaches completion. - Printing needs vary greatly depending on the network environment, and may be very simple or complex. If - the need is very simple the best solution to the implementation of printing support may well be to + Printing needs vary greatly depending on the network environment and may be very simple or complex. If + the need is very simple, the best solution to the implementation of printing support may well be to re-install everything from a clean slate instead of migrating older configurations. On the other hand, a complex network that is integrated with many international offices and a multiplexity of local branch offices, each of which form an inter-twined maze of printing possibilities, the ability to migrate all printer configurations is decidedly beneficial. To manually re-establish a complex printing network - will take much time and frustration. Often-times it will not be possible to find driver files that are - currently in use thus necessitating the installation of newer drivers. Newer drivers often implement + will take much time and frustration. Often it will not be possible to find driver files that are + currently in use, necessitating the installation of newer drivers. Newer drivers often implement printing features that will necessitate a change in the printer usage. Additionally, with very complex - printer configurations it becomes almost impossible to re-create the same environment - not matter + printer configurations it becomes almost impossible to re-create the same environment &smbmdash; no matter how extensively it has been documented. @@ -1351,7 +1351,7 @@ net rpc share MIGRATE ALL <share-name> -S <source> The Samba net utility permits printer migration from one Windows print server to another. When this tool is used to migrate printers to a Samba server smbd, - the application the receives the network requests to create the necessary services, must call-out + the application that receives the network requests to create the necessary services must call out to the operating system in order to create the underlying printers. The call-out is implemented by way of an interface script that can be specified by the &smb.conf; file parameter . This script is essential to the migration process. @@ -1363,18 +1363,18 @@ net rpc share MIGRATE ALL <share-name> -S <source> Each of the components listed above can be completed separately, or they can be completed as part of an automated operation. Many network administrators prefer to deal with migration issues in a manner that - gives them the most control, particularly when things go wrong. The syntax for each operation will now - be briefly described. + gives them the most control, particularly when things go wrong. The syntax for each operation is now + briefly described. - Printer migration from a Windows print server (NT4 or 200X) is shown. This instruction causes the + Printer migration from a Windows print server (NT4 or 200x) is shown. This instruction causes the printer share to be created together with the underlying print queue: net rpc printer MIGRATE PRINTERS [printer] [misc. options] [targets] Printer drivers can be migrated from the Windows print server to the Samba server using this - command line instruction: + command-line instruction: net rpc printer MIGRATE DRIVERS [printer] [misc. options] [targets] @@ -1386,7 +1386,7 @@ net rpc printer MIGRATE FORMS [printer] [misc. options] [targets] net rpc printer MIGRATE SECURITY [printer] [misc. options] [targets] - Printer configuration settings include factors such as paper size, default paper orientation, etc. + Printer configuration settings include factors such as paper size and default paper orientation. These can be migrated from the Windows print server to the Samba server with this command: net rpc printer MIGRATE SETTINGS [printer] [misc. options] [targets] @@ -1394,7 +1394,7 @@ net rpc printer MIGRATE SETTINGS [printer] [misc. options] [targets] - Migration of printers including all the above mentioned sets of information may be completed + Migration of printers including the above-mentioned sets of information may be completed with a single command using this syntax: net rpc printer MIGRATE ALL [printer] [misc. options] [targets] @@ -1409,7 +1409,7 @@ net rpc printer MIGRATE ALL [printer] [misc. options] [targets] Controlling Open Files - The man page documents the net file function suite. These ability is provided to + The man page documents the net file function suite, which provides the tools to close open files using either RAP or RPC function calls. Please refer to the man page for specific usage information. @@ -1446,8 +1446,8 @@ Computer User name Client Type Opens Idle time Printers and ADS - When Samba-3 is used within as MS Windows ADS environment printers shared via Samba will not be browseable - until they have been published to the ADS domain. Information regarding published printers my be obtained + When Samba-3 is used within an MS Windows ADS environment, printers shared via Samba will not be browseable + until they have been published to the ADS domain. Information regarding published printers may be obtained from the ADS server by executing the net ads print info command following this syntax: net ads printer info <printer_name> <server_name> -Uadministrator%secret @@ -1457,7 +1457,7 @@ net ads printer info <printer_name> <server_name> -Uadministrator%se - To publish (make available) a printer to ADS execute the following command: + To publish (make available) a printer to ADS, execute the following command: net ads printer publish <printer_name> -Uadministrator%secret @@ -1484,17 +1484,17 @@ net ads printer search <printer_name> -Uadministrator%secret Manipulating the Samba Cache - Please refer to the net command man page for information regarding cache management. + Please refer to the net command man page for information regarding cache management. - + - + Other Miscellaneous Operations The following command is useful for obtaining basic statistics regarding a Samba domain. This command does - not work against current Windows XP Professional clients. + not work with current Windows XP Professional clients. &rootprompt; net rpc info Domain Name: RAPIDFLY @@ -1514,7 +1514,7 @@ Num local groups: 6 Tue May 17 00:50:43 2005 In the event that it is the intent to pass the time information obtained to the UNIX - /bin/time it is a good idea to obtain the time from the target server in a format + /bin/time, it is a good idea to obtain the time from the target server in a format that is ready to be passed through. This may be done by executing: &rootprompt; net time system -S FRODO @@ -1525,7 +1525,7 @@ Tue May 17 00:50:43 2005 &rootprompt; net time set -S MAGGOT -U Administrator%not24get Tue May 17 00:55:30 MDT 2005 - It is possible to obtain the time-zone a server is in by executing the following command against it: + It is possible to obtain the time zone of a server by executing the following command against it: &rootprompt; net time zone -S SAURON -0600 diff --git a/docs/Samba3-HOWTO/TOSHARG-Unicode.xml b/docs/Samba3-HOWTO/TOSHARG-Unicode.xml index 761116c818..c1d8fc1611 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Unicode.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Unicode.xml @@ -22,8 +22,8 @@ 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 +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. @@ -36,8 +36,8 @@ is deserving of special mention. Samba-2.x supported a single locale through a mechanism called -codepages. Samba-3 is destined to become a truly trans-global -file and printer-sharing platform. +codepages. Samba-3 is destined to become a truly transglobal +file- and printer-sharing platform. @@ -46,7 +46,7 @@ file and printer-sharing platform. What Are Charsets and Unicode? -Computers communicate in numbers. In texts, each number will be +Computers communicate in numbers. In texts, each number is translated to a corresponding letter. The meaning that will be assigned to a certain number depends on the character set (charset) that is used. @@ -58,21 +58,21 @@ letters. Not all computers use the same charset (there are charsets with German umlauts, Japanese characters, and so on). The American Standard Code for Information Interchange (ASCII) encoding system has been the normative character encoding scheme used by computers to date. This employs a charset that contains -256 characters. Using this mode of encoding each character takes exactly one byte. +256 characters. Using this mode of encoding, each character takes exactly one byte. There are also charsets that support extended characters, but those need at least twice as much storage space as does ASCII encoding. Such charsets can contain 256 * 256 = 65536 characters, which is more than all possible -characters one could think of. They are called multi-byte charsets because they use +characters one could think of. They are called multibyte charsets because they use more then one byte to store one character. -One standardized multi-byte charset encoding scheme is known as +One standardized multibyte charset encoding scheme is known as unicode. A big advantage of using a -multi-byte charset is that you only need one. There is no need to make sure two +multibyte charset is that you only need one. There is no need to make sure two computers use the same charset when they are communicating. @@ -80,7 +80,7 @@ computers use the same charset when they are communicating. codepages, by Microsoft. However, there is no support for negotiating the charset to be used in the SMB/CIFS protocol. Thus, you have to make sure you are using the same charset when talking to an older client. -Newer clients (Windows NT, 200x, XP) talk unicode over the wire. +Newer clients (Windows NT, 200x, XP) talk Unicode over the wire. @@ -88,7 +88,7 @@ Newer clients (Windows NT, 200x, XP) talk unicode over the wire. Samba and Charsets -As of Samba-3, Samba can (and will) talk unicode over the wire. Internally, +As of Samba-3, Samba can (and will) talk Unicode over the wire. Internally, Samba knows of three kinds of character sets: @@ -98,15 +98,15 @@ Samba knows of three kinds of character sets: This is the charset used internally by your operating system. The default is UTF-8, which is fine for most - systems, which covers all characters in all languages. The default + systems and covers all characters in all languages. The default in previous Samba releases was to save filenames in the encoding of the - clients, for example cp850 for western european countries. + clients &smbmdash; for example, cp850 for Western European countries. - This is the charset Samba will use to print messages + This is the charset Samba uses to print messages on your screen. It should generally be the same as the unix charset. @@ -114,7 +114,7 @@ Samba knows of three kinds of character sets: This is the charset Samba uses when communicating with - DOS and Windows 9x/Me clients. It will talk unicode to all newer clients. + DOS and Windows 9x/Me clients. It will talk Unicode to all newer clients. The default depends on the charsets you have installed on your system. Run testparm -v | grep "dos charset" to see what the default is on your system. @@ -152,29 +152,29 @@ Setting up Japanese charsets is quite difficult. This is mainly because: Mainly for historical reasons, there are several encoding methods in Japanese, which are not fully compatible with each other. There are - two major encoding methods. One is the Shift_JIS series, it is used in Windows - and some UNIX's. The other is the EUC-JP series, used in most UNIX's + two major encoding methods. One is the Shift_JIS series used in Windows + and some UNIXes. The other is the EUC-JP series used in most UNIXes and Linux. Moreover, Samba previously also offered several unique encoding methods, named CAP and HEX, to keep interoperability with CAP/NetAtalk and - UNIX's which can't use Japanese filenames. Some implementations of the + UNIXes that can't use Japanese filenames. Some implementations of the EUC-JP series can't support the full Windows character set. There are some code conversion tables between Unicode and legacy Japanese character sets. One is compatible with Windows, another one - is based on the reference of the Unicode consortium and others are + is based on the reference of the Unicode consortium, and others are a mixed implementation. The Unicode consortium does not officially define any conversion tables between Unicode and legacy character - sets so there cannot be standard one. + sets, so there cannot be standard one. - The character set and conversion tables available in iconv() depends + The character set and conversion tables available in iconv() depend on the iconv library that is available. Next to that, the Japanese locale names may be different on different systems. This means that the value of the charset parameters depends on the implementation of iconv() you are using. - Though 2 byte fixed UCS-2 encoding is used in Windows internally, + Though 2-byte fixed UCS-2 encoding is used in Windows internally, Shift_JIS series encoding is usually used in Japanese environments as ASCII encoding is in English environments. @@ -183,7 +183,7 @@ Setting up Japanese charsets is quite difficult. This is mainly because: Basic Parameter Setting - and + The and should be set to the locale compatible with the character set and encoding method used on Windows. This is usually CP932 @@ -191,13 +191,13 @@ Setting up Japanese charsets is quite difficult. This is mainly because: - can be either Shift_JIS series, - EUC-JP series and UTF-8. UTF-8 is always available but the availability of other locales - and its name itself depends on the system. + The can be either Shift_JIS series, + EUC-JP series, or UTF-8. UTF-8 is always available, but the availability of other locales + and the name itself depends on the system. - Additionally, you can consider to use the Shift_JIS series as the + Additionally, you can consider using the Shift_JIS series as the value of the parameter by using the vfs_cap module, which does the same thing as setting coding system = CAP in the Samba 2.2 series. @@ -205,40 +205,40 @@ Setting up Japanese charsets is quite difficult. This is mainly because: Where to set - to is a difficult question. Here is a list of details, advantages and + to is a difficult question. Here is a list of details, advantages, and disadvantages of using a certain value. Shift_JIS series - Shift_JIS series means a locale which is equivalent to Shift_JIS, + Shift_JIS series means a locale that is equivalent to Shift_JIS, used as a standard on Japanese Windows. In the case of Shift_JIS, - for example if a Japanese file name consist of 0x8ba4 and 0x974c - (a 4 bytes Japanese character string meaning share) and .txt - is written from Windows on Samba, the file name on UNIX becomes - 0x8ba4, 0x974c, .txt (a 8 bytes BINARY string), same as Windows. + for example, if a Japanese filename consists of 0x8ba4 and 0x974c + (a 4-bytes Japanese character string meaning share) and .txt + is written from Windows on Samba, the filename on UNIX becomes + 0x8ba4, 0x974c, .txt (an 8-byte BINARY string), same as Windows. - Since Shift_JIS series is usually used on some commercial based - UNIX's; hp-ux and AIX as Japanese locale (however, it is also possible - to use the EUC-JP series), To use Shift_JIS series on these platforms, - Japanese file names created from Windows can be referred to also on + Since Shift_JIS series is usually used on some commercial-based + UNIXes; hp-ux and AIX as the Japanese locale (however, it is also possible + to use the EUC-JP locale series). To use Shift_JIS series on these platforms, + Japanese filenames created from Windows can be referred to also on UNIX. If your UNIX is already working with Shift_JIS and there is a user - who needs to use Japanese file names written from Windows, the - Shift_JIS series is the best choice. However, broken file names - may be displayed and some commands which cannot handle non-ASCII - filenames may be aborted during parsing filenames. especially there - may be \ (0x5c) in file names, which need to be handled carefully. - So you had better not touch file names written from Windows on UNIX. + who needs to use Japanese filenames written from Windows, the + Shift_JIS series is the best choice. However, broken filenames + may be displayed, and some commands that cannot handle non-ASCII + filenames may be aborted during parsing filenames. Especially, there + may be \ (0x5c) in filenames, which need to be handled carefully. + It is best to not touch filenames written from Windows on UNIX. Note that most Japanized free software actually works with EUC-JP - only. You had better verify if the Japanized free software can work + only. It is good practice to verify that the Japanized free software can work with Shift_JIS. @@ -246,58 +246,51 @@ Setting up Japanese charsets is quite difficult. This is mainly because: EUC-JP series - EUC-JP series means a locale which is equivalent to the industry + EUC-JP series means a locale that is equivalent to the industry standard called EUC-JP, widely used in Japanese UNIX (although EUC contains specifications for languages other than Japanese, such as - EUC-KR). In the case of EUC-JP series, for example if a Japanese - file name consist of 0x8ba4 and 0x974c and .txt is written from - Windows on Samba, the file name on UNIX becomes 0xb6a6, 0xcdad, - .txt (a 8 bytes BINARY string). + EUC-KR). In the case of EUC-JP series, for example, if a Japanese + filename consists of 0x8ba4 and 0x974c and .txt is written from + Windows on Samba, the filename on UNIX becomes 0xb6a6, 0xcdad, + .txt (an 8-byte BINARY string). - Since EUC-JP is usually used on Open source UNIX, Linux and FreeBSD, - and on commercial based UNIX, Solaris, IRIX and Tru64 UNIX as - Japanese locale (however, it is also possible on Solaris to use - Shift_JIS and UTF-8, on Tru64 UNIX to use Shift_JIS). To use EUC-JP - series, most Japanese file names created from Windows can be - referred to also on UNIX. Also, most Japanized free software work - mainly with EUC-JP only. + Since EUC-JP is usually used on open source UNIX, Linux, and FreeBSD, and on commercial-based UNIX, Solaris, + IRIX, and Tru64 UNIX as Japanese locale (however, it is also possible on Solaris to use Shift_JIS and UTF-8, + and on Tru64 UNIX it is possible to use Shift_JIS). To use EUC-JP series, most Japanese filenames created from + Windows can be referred to also on UNIX. Also, most Japanized free software work mainly with EUC-JP only. - It is recommended to choose EUC-JP series when using Japanese file - names on these UNIX. + It is recommended to choose EUC-JP series when using Japanese filenames on UNIX. - Although there is no character which needs to be carefully treated - like \ (0x5c), broken file names may be displayed and some - commands which cannot handle non-ASCII filenames may be aborted + Although there is no character that needs to be carefully treated + like \ (0x5c), broken filenames may be displayed and some + commands that cannot handle non-ASCII filenames may be aborted during parsing filenames. Moreover, if you built Samba using differently installed libiconv, - eucJP-ms locale included in libiconv and EUC-JP series locale - included in OS may not be compatible. In this case, you may need to - avoid using incompatible characters for file names. + the eucJP-ms locale included in libiconv and EUC-JP series locale + included in the operating system may not be compatible. In this case, you may need to + avoid using incompatible characters for filenames. UTF-8 - UTF-8 means a locale which is equivalent to UTF-8, the international - standard defined by Unicode consortium. In UTF-8, a character is - expressed using 1-3 bytes. In case of Japanese, most characters - are expressed using 3 bytes. Since on Windows Shift_JIS, where a - character is expressed with 1 or 2 bytes, is used to express - Japanese, basically a byte length of a UTF-8 string grows 1.5 times - the length of a original Shift_JIS string. In the case of UTF-8, - for example if a Japanese file name consist of 0x8ba4 and 0x974c and - .txt is written from Windows on Samba, the file name on UNIX - becomes 0xe585, 0xb1e6, 0x9c89, .txt (a 10 bytes BINARY string). + UTF-8 means a locale equivalent to UTF-8, the international standard defined by the Unicode consortium. In + UTF-8, a character is expressed using 1 to 3 bytes. In case of the Japanese language, + most characters are expressed using 3 bytes. Since on Windows Shift_JIS, where a character is expressed with 1 + or 2 bytes is used to express Japanese, basically a byte length of a UTF-8 string the length of the UTF-8 + string is 1.5 times that of the original Shift_JIS string. In the case of UTF-8, for example, if a Japanese + filename consists of 0x8ba4 and 0x974c, and .txt is written from Windows on Samba, the filename + on UNIX becomes 0xe585, 0xb1e6, 0x9c89, .txt (a 10-byte BINARY string). @@ -306,28 +299,29 @@ Setting up Japanese charsets is quite difficult. This is mainly because: - There are no systems that use UTF-8 as default locale for Japanese. + There are no systems that use UTF-8 as the default locale for Japanese. - Some broken file names may be displayed and some commands which + Some broken filenames may be displayed, and some commands that cannot handle non-ASCII filenames may be aborted during parsing - filenames. especially there may be \ (0x5c) in file names, which - need to be handled carefully. So you had better not touch file names + filenames. Especially, there may be \ (0x5c) in filenames, which + must be handled carefully, so you had better not touch filenames written from Windows on UNIX. In addition, although it is not directly concerned with Samba, since - there is a delicate difference between iconv() function, which is - generally used on UNIX and the functions used on other platforms, - such as Windows and Java about the conversion table between - Shift_JIS and Unicode, you should be carefully to handle UTF-8. + there is a delicate difference between the iconv() function, which is + generally used on UNIX, and the functions used on other platforms, + such as Windows and Java, so far is concerens the conversion between + Shift_JIS and Unicode UTF-8 must be done with care and recognition + of the limitations involved in the process. Although Mac OS X uses UTF-8 as its encoding method for filenames, - it uses an extended UTF-8 specification that Samba cannot handle so + it uses an extended UTF-8 specification that Samba cannot handle, so UTF-8 locale is not available for Mac OS X. @@ -335,43 +329,44 @@ Setting up Japanese charsets is quite difficult. This is mainly because: Shift_JIS series + vfs_cap (CAP encoding) - CAP encoding means a specification using in CAP and NetAtalk, file + CAP encoding means a specification used in CAP and NetAtalk, file server software for Macintosh. In the case of CAP encoding, for - example if a Japanese file name consist of 0x8ba4 and 0x974c and - .txt is written from Windows on Samba, the file name on UNIX + example, if a Japanese filename consists of 0x8ba4 and 0x974c, and + .txt is written from Windows on Samba, the filename on UNIX becomes :8b:a4:97L.txt (a 14 bytes ASCII string). - For CAP encoding a byte which cannot be expressed as an ASCII - character (0x80 or above) is encoded as :xx form. You need to take - care of containing a \(0x5c) in a filename but filenames are not - broken in a system which cannot handle non-ASCII filenames. + For CAP encoding, a byte that cannot be expressed as an ASCII + character (0x80 or above) is encoded in an :xx form. You need to take + care of containing a \(0x5c) in a filename, but filenames are not + broken in a system that cannot handle non-ASCII filenames. The greatest merit of CAP encoding is the compatibility of encoding - filenames with CAP or NetAtalk, file server software of Macintosh. - Since they usually write a file name on UNIX with CAP encoding, if a + filenames with CAP or NetAtalk. These are respectively the Columbia Appletalk + Protocol, and the NetAtalk Open Source software project. + Since these software applications write a file name on UNIX with CAP encoding, if a directory is shared with both Samba and NetAtalk, you need to use - CAP encoding to avoid non-ASCII filenames are broken. + CAP encoding to avoid non-ASCII filenames from being broken. - However, recently there are some systems where NetAtalk has been - patched to write filenames with EUC-JP (i.e. Japanese original Vine Linux). - Here you need to choose EUC-JP series instead of CAP encoding. + However, recently, NetAtalk has been + patched on some systems to write filenames with EUC-JP (e.g., Japanese original Vine Linux). + In this case, you need to choose EUC-JP series instead of CAP encoding. - vfs_cap itself is available for non Shift_JIS series locales for - systems which cannot handle non-ASCII characters or systems which - shares files with NetAtalk. + vfs_cap itself is available for non-Shift_JIS series locales for + systems that cannot handle non-ASCII characters or systems that + share files with NetAtalk. To use CAP encoding on Samba-3, you should use the unix charset parameter and VFS - as follows: + as in Example 29.5.1: VFS CAP @@ -387,7 +382,7 @@ Setting up Japanese charsets is quite difficult. This is mainly because: - You should set CP932 if using GNU libiconv for unix charset. Setting this, + You should set CP932 if using GNU libiconv for unix charset. With this setting, filenames in the cap-share share are written with CAP encoding. @@ -426,8 +421,8 @@ display charset = CP932 - Other Japanese locales (for example Shift_JIS and EUC-JP) should not - be used for the lack of the compatibility with Windows. + Other Japanese locales (for example, Shift_JIS and EUC-JP) should not + be used because of the lack of the compatibility with Windows. @@ -449,8 +444,8 @@ display charset = CP932 - Other Japanese locales (for example Shift_JIS and EUC-JP) should not - be used for the lack of the compatibility with Windows. + Other Japanese locales (for example, Shift_JIS and EUC-JP) should not + be used because of the lack of the compatibility with Windows. @@ -462,9 +457,10 @@ display charset = CP932 Migration from Samba-2.2 Series -Prior to Samba-2.2 series coding system parameter is used as - parameter of the Samba-3 series. -Next table shows the mapping table when migrating from the Samba-2.2 series to Samba-3. +Prior to Samba-2.2 series, the coding system parameter was used. The default codepage in Samba +2.x was code page 850. In the Samba-3 series this has been replaced with the parameter. Japanese Character Sets in Samba-2.2 and Samba-3 +shows the mapping table when migrating from the Samba-2.2 series to Samba-3. @@ -501,12 +497,16 @@ Prior to Samba-2.2 series coding system parameter is used as Samba is complaining about a missing CP850.so file. - Answer: CP850 is the default . - The is used to convert data to the codepage used by your dos clients. - If you do not have any dos clients, you can safely ignore this message. + + CP850 is the default . + The is used to convert data to the codepage used by your DOS clients. + If you do not have any DOS clients, you can safely ignore this message. - CP850 should be supported by your local iconv implementation. Make sure you have all the required packages installed. - If you compiled Samba from source, make sure to configure found iconv. + + CP850 should be supported by your local iconv implementation. Make sure you have all the required packages installed. + If you compiled Samba from source, make sure that the configure process found iconv. This can be + confirmed by checking the config.log file that is generated when + configure is executed. diff --git a/docs/Samba3-HOWTO/TOSHARG-Winbind.xml b/docs/Samba3-HOWTO/TOSHARG-Winbind.xml index 9429d51a81..0a8c306dbf 100644 --- a/docs/Samba3-HOWTO/TOSHARG-Winbind.xml +++ b/docs/Samba3-HOWTO/TOSHARG-Winbind.xml @@ -28,7 +28,7 @@ &author.jelmer; &author.jht; - 27 June 2002 + June 15, 2005Winbind: Use of Domain Accounts @@ -52,9 +52,9 @@ winbind is a component of the Samba suite of programs that solves the unified logon problem. Winbind uses a UNIX implementation of Microsoft - RPC calls, Pluggable Authentication Modules, and the Name Service Switch to + RPC calls, Pluggable Authentication Modules (PAMs), and the name service switch (NSS) to allow Windows NT domain users to appear and operate as UNIX users on a UNIX - machine. This chapter describes the Winbind system, explaining the functionality + machine. This chapter describes the Winbind system, the functionality it provides, how it is configured, and how it works internally. @@ -75,11 +75,11 @@ Winbind maintains a database called winbind_idmap.tdb in which it stores - mappings between UNIX UIDs / GIDs and NT SIDs. This mapping is used only - for users and groups that do not have a local UID/GID. It stored the UID/GID + mappings between UNIX UIDs, GIDs, and NT SIDs. This mapping is used only + for users and groups that do not have a local UID/GID. It stores the UID/GID allocated from the idmap uid/gid range that it has mapped to the NT SID. - If idmap backend has been specified as ldap:ldap://hostname[:389] - then instead of using a local mapping Winbind will obtain this information + If idmap backend has been specified as ldap:ldap://hostname[:389], + then instead of using a local mapping, Winbind will obtain this information from the LDAP database. @@ -89,8 +89,8 @@ starting sambawinbindd If winbindd is not running, smbd (which calls winbindd) will fall back to using purely local information from /etc/passwd and /etc/group and no dynamic - mapping will be used. On an operating system that has beeb enabled with the name service switcher (NSS) - the resoltion of user and group information will be accomplished via NSS. + mapping will be used. On an operating system that has beeb enabled with the NSS, + the resolution of user and group information will be accomplished via NSS. @@ -114,8 +114,8 @@ One common solution in use today has been to create identically named user accounts on both the UNIX and Windows systems and use the Samba suite of programs to provide file and print services - between the two. This solution is far from perfect, however, as - adding and deleting users on both sets of machines becomes a chore + between the two. This solution is far from perfect, however, because + adding and deleting users on both sets of machines becomes a chore, and two sets of passwords are required &smbmdash; both of which can lead to synchronization problems between the UNIX and Windows systems and confusion for users. @@ -150,18 +150,18 @@ Winbind unifies UNIX and Windows NT account management by allowing a UNIX box to become a full member of an NT domain. Once - this is done the UNIX box will see NT users and groups as if + this is done, the UNIX box will see NT users and groups as if they were native UNIX users and groups, allowing the NT domain to be used in much the same manner that NIS+ is used within UNIX-only environments.The end result is that whenever a - program on the UNIX machine asks the operating system to lookup + program on the UNIX machine asks the operating system to look up a user or group name, the query will be resolved by asking the - NT Domain Controller for the specified domain to do the lookup. + NT domain controller for the specified domain to do the lookup. Because Winbind hooks into the operating system at a low level (via the NSS name resolution modules in the C library), this - redirection to the NT Domain Controller is completely + redirection to the NT domain controller is completely transparent.Users on the UNIX machine can then use NT user and group @@ -171,16 +171,16 @@ The only obvious indication that Winbind is being used is that user and group names take the form DOMAIN\user and - DOMAIN\group. This is necessary as it allows Winbind to determine - that redirection to a Domain Controller is wanted for a particular + DOMAIN\group. This is necessary because it allows Winbind to determine + that redirection to a domain controller is wanted for a particular lookup and which trusted domain is being referenced. Additionally, Winbind provides an authentication service - that hooks into the Pluggable Authentication Modules (PAM) system + that hooks into the PAM system to provide authentication via an NT domain to any PAM-enabled applications. This capability solves the problem of synchronizing - passwords between systems since all passwords are stored in a single - location (on the Domain Controller). + passwords between systems, since all passwords are stored in a single + location (on the domain controller). Target Uses @@ -216,9 +216,9 @@ - Response: Why? I've used samba with workstations that are not part of my domains - lots of times without using winbind. I though winbind was for using samba as a memberserver - in a domain controlled by another samba/windows PDC. + Response: Why? I've used Samba with workstations that are not part of my domains + lots of times without using winbind. I though winbind was for using Samba as a member server + in a domain controlled by another Samba/Windows PDC. @@ -229,9 +229,9 @@ - Which means that that winbind is eminently useful in cases where one just has a single - Samba PDC on a local network combined of both domain member and non-domain member workstations. - If winbind is not used, the user george on an windows workstation that is not a domain + This means that winbind is eminently useful in cases where a single + Samba PDC on a local network is combined with both domain member and non-domain member workstations. + If winbind is not used, the user george on a Windows workstation that is not a domain member will be able to access the files of a user called george in the account database of the Samba server that is acting as a PDC. When winbind is used, the default condition is that the local user george will be treated as the account DOMAIN\george and the @@ -248,10 +248,10 @@ How Winbind Works The Winbind system is designed around a client/server - architecture. A long running winbindd daemon + architecture. A long-running winbindd daemon listens on a UNIX domain socket waiting for requests to arrive. These requests are generated by the NSS and PAM - clients and is processed sequentially. + clients and are processed sequentially. The technologies used to implement Winbind are described in detail below. @@ -263,7 +263,7 @@ by various Samba Team members to decode various aspects of the Microsoft Remote Procedure Call (MSRPC) system. This system is used for most network-related operations between - Windows NT machines including remote management, user authentication + Windows NT machines, including remote management, user authentication, and print spooling. Although initially this work was done to aid the implementation of Primary Domain Controller (PDC) functionality in Samba, it has also yielded a body of code that @@ -282,9 +282,9 @@ Since late 2001, Samba has gained the ability to - interact with Microsoft Windows 2000 using its Native - Mode protocols, rather than the NT4 RPC services. - Using LDAP and Kerberos, a Domain Member running + interact with Microsoft Windows 2000 using its native + mode protocols rather than the NT4 RPC services. + Using LDAP and Kerberos, a domain member running Winbind can enumerate users and groups in exactly the same way as a Windows 200x client would, and in so doing provide a much more efficient and effective Winbind implementation. @@ -294,32 +294,32 @@ Name Service Switch - The Name Service Switch, or NSS, is a feature that is + The NSS is a feature that is present in many UNIX operating systems. It allows system - information such as hostnames, mail aliases and user information + information such as hostnames, mail aliases, and user information to be resolved from different sources. For example, a standalone UNIX workstation may resolve system information from a series of - flat files stored on the local filesystem. A networked workstation + flat files stored on the local file system. A networked workstation may first attempt to resolve system information from local files, and then consult an NIS database for user information or a DNS server for hostname information. The NSS application programming interface allows Winbind to present itself as a source of system information when - resolving UNIX usernames and groups. Winbind uses this interface, + resolving UNIX usernames and groups. Winbind uses this interface and information obtained from a Windows NT server using MSRPC calls to provide a new source of account enumeration. Using standard - UNIX library calls, one can enumerate the users and groups on + UNIX library calls, you can enumerate the users and groups on a UNIX machine running Winbind and see all users and groups in - a NT domain plus any trusted domain as though they were local + an NT domain plus any trusted domain as though they were local users and groups. The primary control file for NSS is /etc/nsswitch.conf. When a UNIX application makes a request to do a lookup, the C library looks in /etc/nsswitch.conf - for a line that matches the service type being requested, for - example the passwd service type is used when user or group names + for a line that matches the service type being requested; for + example, the passwd service type is used when user or group names are looked up. This config line specifies which implementations of that service should be tried and in what order. If the passwd config line is: @@ -347,22 +347,22 @@ Pluggable Authentication Modules - Pluggable Authentication Modules, also known as PAM, - is a system for abstracting authentication and authorization - technologies. With a PAM module it is possible to specify different + PAMs provide + a system for abstracting authentication and authorization + technologies. With a PAM module, it is possible to specify different authentication methods for different system applications without having to recompile these applications. PAM is also useful for implementing a particular policy for authorization. For example, a system administrator may only allow console logins from users stored in the local password file but only allow users resolved from - a NIS database to log in over the network. + an NIS database to log in over the network. Winbind uses the authentication management and password management PAM interface to integrate Windows NT users into a UNIX system. This allows Windows NT users to log in to a UNIX - machine and be authenticated against a suitable Primary Domain - Controller. These users can also change their passwords and have - this change take effect directly on the Primary Domain Controller. + machine and be authenticated against a suitable PDC. + These users can also change their passwords and have + this change take effect directly on the PDC. PAM is configured by providing control files in the directory @@ -371,22 +371,22 @@ by an application, the PAM code in the C library looks up this control file to determine what modules to load to do the authentication check and in what order. This interface makes adding - a new authentication service for Winbind very easy. All that needs - to be done is that the pam_winbind.so module - is copied to /lib/security/ and the PAM + a new authentication service for Winbind very easy: simply copy + the pam_winbind.so module + to /lib/security/, and the PAM control files for relevant services are updated to allow authentication via Winbind. See the PAM documentation - in PAM-Based Distributed Authentication for more information. + in PAM-Based Distributed Authentication, for more information. User and Group ID Allocation - When a user or group is created under Windows NT/200x + When a user or group is created under Windows NT/200x, it is allocated a numerical relative identifier (RID). This is - slightly different from UNIX which has a range of numbers that are - used to identify users, and the same range in which to identify + slightly different from UNIX, which has a range of numbers that are + used to identify users and the same range used to identify groups. It is Winbind's job to convert RIDs to UNIX ID numbers and vice versa. When Winbind is configured, it is given part of the UNIX user ID space and a part of the UNIX group ID space in which to @@ -397,7 +397,7 @@ to UNIX user IDs and group IDs. The results of this mapping are stored persistently in - an ID mapping database held in a tdb database). This ensures that + an ID mapping database held in a tdb database. This ensures that RIDs are mapped to UNIX IDs in a consistent way. @@ -410,7 +410,7 @@ An active system can generate a lot of user and group name lookups. To reduce the network cost of these lookups, Winbind uses a caching scheme based on the SAM sequence number supplied - by NT Domain Controllers. User or group information returned + by NT domain controllers. User or group information returned by a PDC is cached by Winbind along with a sequence number also returned by the PDC. This sequence number is incremented by Windows NT whenever any user or group information is modified. If @@ -445,7 +445,7 @@ well for Samba services. This allows the Samba administrator to rely on the authentication mechanisms on the Windows NT/200x PDC for the authentication - of Domain Members. Windows NT/200x users no longer need to have separate + of domain members. Windows NT/200x users no longer need to have separate accounts on the Samba server. @@ -477,14 +477,14 @@ contents! If you haven't already made a boot disk, MAKE ONE 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 -/etc/pam.d back to the original state they were in if you get frustrated with the +why you want to be able to boot back into your machine in single-user mode and restore your +/etc/pam.d to the original state it was in if you get frustrated with the way things are going. The latest version of Samba-3 includes a functioning winbindd daemon. Please refer to the main Samba Web page or, better yet, your closest Samba mirror site for +url="http://samba.org/">main Samba Web page, or better yet, your closest Samba mirror site for instructions on downloading the source code. @@ -492,7 +492,7 @@ instructions on downloading the source code. To allow domain users the ability to access Samba shares and files, as well as potentially other services provided by your Samba machine, PAM must be set up properly on your machine. In order to compile the Winbind modules, you should have at least the PAM development libraries installed -on your system. Please refer the PAM web site . +on your system. Please refer the PAM Web site . @@ -503,8 +503,8 @@ on your system. Please refer the PAM web site -in Chapter 18(John, there is no section like this in 18). Loadable Authentication Module Programming -Interface and more information on administering the modules -can be found at System -Management Guide: Operating System and Devices. +identification, but there have been reports of success using the standard Winbind PAM module for +authentication. Use caution configuring loadable authentication modules, since misconfiguration can make +it impossible to log on to the system. Information regarding the AIX authentication module API can +be found in the Kernel Extensions and Device Support Programming Concepts for AIX document that +describes the +Loadable Authentication Module Programming Interface for AIX. Further information on administering the modules +can be found in the System +Management Guide: Operating System and Devices. @@ -616,12 +609,12 @@ Management Guide: Operating System and Devices. Several parameters are needed in the &smb.conf; file to control the behavior of &winbindd;. These are described in more detail in the winbindd 8 man page. My &smb.conf; file, as shown in the next example, was modified to include the necessary entries in the [global] section. +linkend="winbindcfg">Example 23.5.1, was modified to include the necessary entries in the [global] section. - - smb.conf for Winbind set-up - + +smb.conf for Winbind Setup + separate domain and username with '\', like DOMAIN\username \ @@ -653,7 +646,7 @@ the domain. This applies also to the PDC and all BDCs. The process of joining a domain requires the use of the net rpc join command. This process communicates with the domain controller it will register with (usually the PDC) via MS DCE RPC. This means, of course, that the smbd -process must be running on the target DC. This means that it is necessary to temporarily +process must be running on the target domain controller. It is therefore necessary to temporarily start Samba on a PDC so that it can join its own domain. @@ -665,9 +658,9 @@ a domain user who has administrative privileges in the domain. -Before attempting to join a machine to the domain verify that Samba is running -on the target DC (usually PDC) and that it is capable of being reached via ports -137/udp, 135/tcp, 139/tcp, and 445/tcp (if Samba or Windows Server 2Kx. +Before attempting to join a machine to the domain, verify that Samba is running +on the target domain controller (usually PDC) and that it is capable of being reached via ports +137/udp, 135/tcp, 139/tcp, and 445/tcp (if Samba or Windows Server 2Kx). @@ -675,9 +668,9 @@ on the target DC (usually PDC) and that it is capable of being reached via ports -The proper response to the command should be: Joined the domain +The proper response to the command should be Joined the domain DOMAIN where DOMAIN -is your DOMAIN name. +is your domain name. @@ -698,7 +691,7 @@ command as root: -The above assumes that Samba has been installed in the /usr/local/samba +The command to start up Winbind services assumes that Samba has been installed in the /usr/local/samba directory tree. You may need to search for the location of Samba files if this is not the location of winbindd on your system. @@ -707,9 +700,9 @@ location of winbindd on your system. Winbindd can now also run in dual daemon mode. This will make it run as two 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. +update the cache for the query to which the first has just responded. The advantage of this is that responses stay accurate and are faster. -You can enable dual daemon mode by adding to the command-line: +You can enable dual daemon mode by adding to the command line: @@ -724,8 +717,8 @@ I'm always paranoid and like to make sure the daemon is really running. &rootprompt;ps -ae | grep winbindd -This command should produce output like this, if the daemon is running you would expect -to see a report something like this: +This command should produce output like the following if the daemon is running. + 3025 ? 00:00:00 winbindd @@ -786,7 +779,7 @@ lists of both local and PDC users and groups. Try the following command: You should get a list that looks like your /etc/passwd list followed by the domain users with their new UIDs, GIDs, home -directories and default shells. +directories, and default shells. @@ -809,7 +802,7 @@ The same thing can be done for groups with the command: 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 /etc/init.d/smb in Red Hat Linux and they are located in +They are located at /etc/init.d/smb in Red Hat Linux and in /etc/init.d/samba in Debian Linux. Edit your script to add commands to invoke this daemon in the proper sequence. My startup script starts up &smbd;, &nmbd;, and &winbindd; from the @@ -841,7 +834,7 @@ start() { If you would like to run winbindd in dual daemon mode, replace -the line : +the line: daemon /usr/local/samba/sbin/winbindd @@ -886,7 +879,8 @@ stop() { Solaris -Winbind does not work on Solaris 9, see Winbind on Solaris 9 section for details. +Winbind does not work on Solaris 9; see Winbind on Solaris 9 section +for details. @@ -962,7 +956,7 @@ in the script above with: Restarting 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 +should be able to connect to the Samba server as a domain member just as if you were a local user. @@ -1002,7 +996,7 @@ modules reside in /usr/lib/security. -Linux/FreeBSD-specific PAM configuration +Linux/FreeBSD-Specific PAM Configuration The /etc/pam.d/samba file does not need to be changed. I @@ -1029,7 +1023,7 @@ and /etc/xinetd.d/wu-ftp from enable = no -to: +to enable = yes @@ -1037,7 +1031,7 @@ to: 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 +the server or change the home directory template to a general directory for all domain users. These can be easily set using the &smb.conf; global entry . @@ -1055,9 +1049,7 @@ The /etc/pam.d/ftp file can be changed to allow Winbind ftp access in a manner similar to the samba file. My /etc/pam.d/ftp file was changed to look like this: - - - + auth required /lib/security/pam_listfile.so item=user sense=deny \ file=/etc/ftpusers onerr=succeed auth sufficient /lib/security/pam_winbind.so @@ -1069,11 +1061,9 @@ session required /lib/security/pam_stack.so service=system-auth -The /etc/pam.d/login file can be changed nearly the +The /etc/pam.d/login file can be changed in nearly the same way. It now looks like this: - - - + auth required /lib/security/pam_securetty.so auth sufficient /lib/security/pam_winbind.so auth sufficient /lib/security/pam_unix.so use_first_pass @@ -1089,7 +1079,7 @@ session optional /lib/security/pam_console.so In this case, I added the auth sufficient /lib/security/pam_winbind.so lines as before, but also added the required pam_securetty.so -above it, to disallow root logins over the network. I also added a +above it to disallow root logins over the network. I also added a sufficient /lib/security/pam_unix.so use_first_pass line after the winbind.so line to get rid of annoying double prompts for passwords. @@ -1098,11 +1088,11 @@ double prompts for passwords. -Solaris-specific configuration +Solaris-Specific Configuration The /etc/pam.conf needs to be changed. I changed this file so my Domain -users can logon both locally as well as telnet. The following are the changes +users can log on both locally as well as with telnet. The following are the changes that I made. You can customize the pam.conf file as per your requirements, but be sure of those changes because in the worst case it will leave your system nearly impossible to boot. @@ -1191,9 +1181,9 @@ configured in the pam.conf. Conclusion -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 +The Winbind system, through the use of the NSS, +PAMs, 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. @@ -1212,20 +1202,20 @@ cost of running a mixed UNIX and NT network. the Linux, Solaris, AIX, and IRIX operating systems, although ports to other operating systems are certainly possible. For such ports to be feasible, 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 + support the NSS and PAM + systems. This is becoming more common as NSS and PAM gain support among UNIX vendors. The mappings of Windows NT RIDs to UNIX IDs is not made algorithmically and depends on the order in which unmapped users or groups are seen by Winbind. It may be difficult - to recover the mappings of RID to UNIX ID mapping if the file + to recover the mappings of RID to UNIX ID if the file containing this information is corrupted or destroyed. Currently the Winbind PAM module does not take into account possible workstation and logon time restrictions - that may be set for Windows NT users, this is + that may be set for Windows NT users; this is instead up to the PDC to enforce. @@ -1241,7 +1231,7 @@ cost of running a mixed UNIX and NT network. If nscd is running on the UNIX/Linux system, then - even though NSSWITCH is correctly configured it will not be possible to resolve + even though NSSWITCH is correctly configured, it will not be possible to resolve domain users and groups for file and directory controls. @@ -1254,7 +1244,7 @@ cost of running a mixed UNIX and NT network. My &smb.conf; file is correctly configured. I have specified 12000, and 3000-3500 - and winbind is running. When I do the following it all works fine. + and winbind is running. When I do the following, it all works fine. diff --git a/docs/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml b/docs/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml index 3c294406ac..fcd34b578f 100644 --- a/docs/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml +++ b/docs/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml @@ -11,9 +11,9 @@ Features and Benefits -Occasionally network administrators will report difficulty getting Microsoft Windows clients to interoperate -correctly with Samba servers. It would appear that some folks just can not accept the fact that the right way -to configure MS Windows network client is precisely as one would do when using Microsoft Windows NT4 or 200x +Occasionally network administrators report difficulty getting Microsoft Windows clients to interoperate +correctly with Samba servers. It seems that some folks just cannot accept the fact that the right way +to configure MS Windows network client is precisely as one would do when using MS Windows NT4 or 200x servers. Yet there is repetitious need to provide detailed Windows client configuration instructions. @@ -35,13 +35,13 @@ that are in common use today. These are: - Microsoft Windows XP Professional. + Microsoft Windows XP Professional - Windows 2000 Professional. + Windows 2000 Professional - Windows Millennium edition (Me). + Windows Millennium edition (Me) @@ -50,12 +50,12 @@ that are in common use today. These are: The builder of a house must ensure that all construction takes place on a firm foundation. - The same is true of TCP/IP-based networking. Fundamental network configuration problems + The same is true for the builder of a TCP/IP-based networking system. Fundamental network configuration problems will plague all network users until they are resolved. - Microsoft Windows workstations and servers can be configured either with fixed + MS Windows workstations and servers can be configured either with fixed IP addresses or via DHCP. The examples that follow demonstrate the use of DHCP and make only passing reference to those situations where fixed IP configuration settings can be effected. @@ -75,12 +75,12 @@ that are in common use today. These are: - Click Start -> Control Panel -> Network Connections + Click Start -> Control Panel -> Network Connections. - Alternately, click Start ->, and right click My Network Places - then select Properties + Alternately, click Start ->, and right-click My Network Places + then select Properties. @@ -91,7 +91,7 @@ that are in common use today. These are: On some installations the interface will be called Local Area Connection and on others it will be called Network Bridge. On our system it is called Network Bridge. - Right click on Network Bridge -> Properties. See . + Right-click on Network Bridge -> Properties. See .
Network Bridge Configuration.WXPP002
@@ -99,11 +99,11 @@ that are in common use today. These are: The Network Bridge Configuration, or Local Area Connection, panel is used to set TCP/IP protocol settings. In This connection uses the following items: box, - click on Internet Protocol (TCP/IP), then click the on Properties. + click on Internet Protocol (TCP/IP), then click on Properties. - The default setting is DHCP enabled operation. + The default setting is DHCP-enabled operation (i.e., Obtain an IP address automatically). See .
Internet Protocol (TCP/IP) Properties. @@ -114,18 +114,19 @@ that are in common use today. These are: Many network administrators will want to use DHCP to configure all client TCP/IP protocol stack settings. (For information on how to configure the ISC DHCP server - for Microsoft Windows client support see, . + for Windows client support see the DNS and DHCP Configuration Guide, + DHCP Server. - If it is necessary to provide a fixed IP address, click on Use the following IP address and proceed to enter the + If it is necessary to provide a fixed IP address, click on Use the following IP address and enter the IP Address, the subnet mask, and the default gateway address in the boxes provided. Click the Advanced button to proceed with TCP/IP configuration. - This opens a panel in which it is possible to create additional IP Addresses for this interface. - The technical name for the additional addresses is IP Aliases, and additionally this + This opens a panel in which it is possible to create additional IP addresses for this interface. + The technical name for the additional addresses is IP aliases, and additionally this panel permits the setting of more default gateways (routers). In most cases where DHCP is used, it will not be necessary to create additional settings. See to see the appearance of this panel.
Advanced Network SettingsWXPP005
@@ -145,7 +146,7 @@ that are in common use today. These are: Click the WINS tab to add manual WINS server entries. This step demonstrates an example system that uses manually configured WINS settings. - When finished making, changes click the OK to commit + When finished making changes, click OK to commit the settings. See .
WINS ConfigurationWXPP009
@@ -161,11 +162,11 @@ that are in common use today. These are:
- Click Start -> Control Panel -> Network and Dial-up Connections + Click Start -> Control Panel -> Network and Dial-up Connections. - Alternately, click on Start, then right click My Network Places and + Alternatively, click Start, then right-click My Network Places, and select Properties. @@ -175,7 +176,7 @@ that are in common use today. These are: - Right click on Local Area Connection, now click the + Right-click on Local Area Connection, then click Properties. See .
Local Area Connection Properties.w2kp001
@@ -186,7 +187,7 @@ that are in common use today. These are:
- The default setting is DHCP enabled operation. + The default setting is DHCP-enabled operation (i.e., Obtain an IP address automatically). See .
Internet Protocol (TCP/IP) Properties.w2kp002
@@ -194,11 +195,11 @@ that are in common use today. These are: Many network administrators will want to use DHCP to configure all client TCP/IP protocol stack settings. (For information on how to configure the ISC DHCP server - for Microsoft Windows client support, see . + for Windows client support, see, . - If it is necessary to provide a fixed IP address, click on Use the following IP address and proceed to enter the + If it is necessary to provide a fixed IP address, click on Use the following IP address and enter the IP Address, the subnet mask, and the default gateway address in the boxes provided. For this example we are assuming that all network clients will be configured using DHCP.
@@ -216,16 +217,18 @@ that are in common use today. These are: Click the DNS tab to add DNS server settings. The example system uses manually configured DNS settings. When finished making changes, - click on OK to commit the settings. See . + click OK to commit the settings. See .
DNS Configuration.w2kp004
Click the WINS tab to add manual WINS server entries. This step demonstrates an example system that uses manually configured WINS settings. - When finished making changes, click on OK to commit the settings. - See . -
WINS Configuration.w2kp005
+ When finished making changes, click OK to commit the settings. + See . +
+ WINS Configuration.w2kp005 +
@@ -240,11 +243,11 @@ that are in common use today. These are: - Click Start -> Control Panel -> Network Connections + Click Start -> Control Panel -> Network Connections. - Alternately, click on Start ->, and right click on My Network Places + Alternatively, click on Start ->, and right click on My Network Places then select Properties. @@ -255,21 +258,25 @@ that are in common use today. These are: In the box labeled The following network components are installed:, - click on Internet Protocol TCP/IP, now click on the Properties button. See . -
The Windows Me Network Configuration Panel.WME001
+ click on Internet Protocol TCP/IP, then click on the Properties button. + See . +
+ The Windows Me Network Configuration Panel. + WME001 +
Many network administrators will want to use DHCP to configure all client TCP/IP protocol stack settings. (For information on how to configure the ISC DHCP server - for Microsoft Windows client support see, . - The default setting on Microsoft Windows Me workstations is for DHCP enabled operation, - i.e., Obtain IP address automatically is enabled. See . + for Windows client support see the DNS and DHCP Configuration Guide, + DHCP Server. The default setting on Windows Me workstations is for DHCP-enabled operation + (i.e., Obtain IP address automatically is enabled). See .
IP Address.WME002
- If it is necessary to provide a fixed IP address, click on Specify an IP address and proceed to enter the + If it is necessary to provide a fixed IP address, click on Specify an IP address and enter the IP Address and the subnet mask in the boxes provided. For this example we are assuming that all network clients will be configured using DHCP.
@@ -286,8 +293,8 @@ that are in common use today. These are: - The following example uses manually configured WINS settings. See . - When finished making changes, click on OK to commit the settings. + The following example uses manually configured WINS settings. See . + When finished making changes, click OK to commit the settings.
DNS Configuration.WME005
@@ -308,9 +315,9 @@ that are in common use today. These are: Joining a Domain: Windows 2000/XP Professional - Microsoft Windows NT/200x/XP Professional platforms can participate in Domain Security. + Microsoft Windows NT/200x/XP Professional platforms can participate in domain security. This section steps through the process for making a Windows 200x/XP Professional machine a - member of a Domain Security environment. It should be noted that this process is identical + member of a domain security environment. It should be noted that this process is identical when joining a domain that is controlled by Windows NT4/200x as well as a Samba PDC. @@ -320,7 +327,7 @@ that are in common use today. These are:
- Right click My Computer, then select Properties. + Right-click My Computer, then select Properties. @@ -337,7 +344,7 @@ that are in common use today. These are: Clicking the Network ID button will launch the configuration wizard. Do not use this with - Samba-3. If you wish to change the computer name, join or leave the domain, click the Change button. + Samba-3. If you wish to change the computer name or join or leave the domain, click the Change button. See .
The Computer Name Panel.wxpp004
@@ -349,7 +356,7 @@ that are in common use today. These are: - Enter the name MIDEARTH in the field below the Domain radio button. + Enter the name MIDEARTH in the field below the domain radio button. @@ -359,12 +366,12 @@ that are in common use today. These are: Now click the OK button. A dialog box should appear to allow you to provide the credentials (username and password) - of a Domain administrative account that has the rights to add machines to the Domain. + of a domain administrative account that has the rights to add machines to the domain. Enter the name root and the root password from your Samba-3 server. See . -
Computer Name Changes &smbmdash; User name and Password Panel.wxpp008
+
Computer Name Changes &smbmdash; Username and Password Panel.wxpp008
@@ -384,17 +391,17 @@ that are in common use today. These are: Domain Logon Configuration: Windows 9x/Me - We follow the convention used by most in saying that Windows 9x/Me machines can participate in Domain logons. The truth is + We follow the convention used by most in saying that Windows 9x/Me machines can participate in domain logons. The truth is that these platforms can use only the LanManager network logon protocols. - Windows XP Home edition cannot participate in Domain or LanManager network logons. + Windows XP Home edition cannot participate in domain or LanManager network logons. - Right click on the Network Neighborhood icon. + Right-click on the Network Neighborhood icon. @@ -417,7 +424,7 @@ that are in common use today. These are: Enter the Windows NT domain name, check the Log on to Windows NT domain box, - click OK. + and click OK. @@ -430,7 +437,7 @@ that are in common use today. These are: Now click the Access Control button. If you want to be able to assign share access permissions using domain user and group accounts, it is necessary to enable User-level access control as shown in this panel. See . -
Identification Panel.WME014
+
Access Control Panel.WME014
@@ -464,7 +471,7 @@ The most common reasons for which a Windows NT/200x/XP Professional client canno root account is not in password backend database. Attempt to use a user account instead of the root account to join a machine to the domain. Open connections from the workstation to the server. - Firewall or filter configurations in place on either the client or on the Samba server. + Firewall or filter configurations in place on either the client or the Samba server. diff --git a/docs/Samba3-HOWTO/TOSHARG-glossary.xml b/docs/Samba3-HOWTO/TOSHARG-glossary.xml index c83ba05675..3a36e2c553 100644 --- a/docs/Samba3-HOWTO/TOSHARG-glossary.xml +++ b/docs/Samba3-HOWTO/TOSHARG-glossary.xml @@ -233,4 +233,7 @@ The UNC syntax was developed in the early days of MS DOS 3.x and is used internally by the SMB protocol.
+ + + diff --git a/docs/Samba3-HOWTO/TOSHARG-locking.xml b/docs/Samba3-HOWTO/TOSHARG-locking.xml index cb228658e7..4e0c993c56 100644 --- a/docs/Samba3-HOWTO/TOSHARG-locking.xml +++ b/docs/Samba3-HOWTO/TOSHARG-locking.xml @@ -30,7 +30,7 @@ a range of functions that are all categorized under this one term. Opportunistic locking is a desirable feature when it can enhance the perceived performance of applications on a networked client. However, the -opportunistic locking protocol is not robust and, therefore, can +opportunistic locking protocol is not robust and therefore can encounter problems when invoked beyond a simplistic configuration or on extended slow or faulty networks. In these cases, operating system management of opportunistic locking and/or recovering from @@ -46,7 +46,7 @@ settings on the MS Windows client. -Sometimes it is necessary to disable locking control settings on both the Samba +Sometimes it is necessary to disable locking control settings on the Samba server as well as on each MS Windows client! @@ -67,7 +67,7 @@ that are specified when a file is open. 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 cannot be fully correct for several reasons. The simplest is the fact +This cannot be fully correct for several reasons. The simplest is that a Windows client is allowed to lock a byte range up to 2^32 or 2^64, depending on the client OS. The UNIX locking only supports byte ranges up to 2^31. So it is not possible to correctly satisfy a lock request above 2^31. There are @@ -75,16 +75,16 @@ many more differences, too many to be listed here. -Samba 2.2 and above implements record locking completely independent of the -underlying UNIX system. If a byte range lock that the client requests happens -to fall into the range of 0-2^31, Samba hands this request down to the UNIX system. -All other locks cannot be seen by UNIX, anyway. +Samba 2.2 and above implement record locking completely independent of the +underlying UNIX system. If a byte-range lock that the client requests happens +to fall into the range of 0 to 2^31, Samba hands this request down to the UNIX system. +No other locks can be seen by UNIX, anyway. Strictly speaking, an 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. This is almost always unnecessary as clients are supposed to +a file. Unfortunately, with the way fcntl() works, this can be slow and may overstress +the rpc.lockd. This is almost always unnecessary because clients are supposed to independently make locking calls before reads and writes if locking is important to them. By default, Samba only makes locking calls when explicitly asked to by a client, but if you set yes, it @@ -92,10 +92,10 @@ will make lock checking calls on every read and write call. -You can also disable byte range locking completely by using +You can also disable byte-range locking completely by using no. This is useful for those shares that do not support locking or do not need it -(such as CDROMs). In this case, Samba fakes the return codes of locking calls to +(such as CD-ROMs). In this case, Samba fakes the return codes of locking calls to tell clients that everything is okay. @@ -112,11 +112,11 @@ modes called DENY_FCB and DENY_DOS. Opportunistic Locking Overview -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 the client) for the purpose of enhancing network performance when accessing a file residing on a server. Performance is enhanced by caching the file -locally on the client that allows: +locally on the client that allows the following: @@ -147,7 +147,7 @@ other processes.
-Windows defines 4 kinds of Oplocks: +Windows Defines Four Kinds of Oplocks: Level1 Oplock @@ -161,10 +161,10 @@ other processes. If a second process attempts to open the file, the open - is deferred while the redirector breaks the original + is deferred while the redirector "breaks" the original oplock. The oplock break signals the caching client to write the local file back to the server, flush the - local locks and discard read-ahead data. The break is + local locks, and discard read-ahead data. The break is then complete, the deferred open is granted, and the multiple processes can enjoy concurrent file access as dictated by mandatory or byte-range locking options. @@ -209,7 +209,7 @@ preparation for the subsequent open by the second process. Opportunistic locking is actually an improper name for this feature. The true benefit of this feature is client-side data caching, and oplocks is merely a notification mechanism for writing data back to the -networked storage disk. The limitation of opportunistic locking is the +networked storage disk. The limitation of oplocks is the reliability of the mechanism to process an oplock break (notification) between the server and the caching client. If this exchange is faulty (usually due to timing out for any number of reasons), then the @@ -221,29 +221,29 @@ The actual decision that a user or administrator should consider is whether it is sensible to share among multiple users data that will be cached locally on a client. In many cases the answer is no. Deciding when to cache or not cache data is the real question, and thus -opportunistic locking should be treated as a toggle for client-side +oplocks should be treated as a toggle for client-side caching. Turn it on when client-side caching is desirable and reliable. Turn it off when client-side caching is redundant, -unreliable or counter-productive. +unreliable, or counterproductive. -Opportunistic locking is by default set to on by Samba on all +Oplocks is by default set to on by Samba on all configured shares, so careful attention should be given to each case to determine if the potential benefit is worth the potential for delays. The following recommendations will help to characterize the environment -where opportunistic locking may be effectively configured. +where oplocks may be effectively configured. -Windows opportunistic locking is a lightweight performance-enhancing +Windows oplocks is a lightweight performance-enhancing feature. It is not a robust and reliable protocol. Every -implementation of opportunistic locking should be evaluated as a -tradeoff between perceived performance and reliability. Reliability +implementation of oplocks should be evaluated as a +trade-off between perceived performance and reliability. Reliability decreases as each successive rule above is not enforced. Consider a -share with oplocks enabled, over a wide area network, to a client on a +share with oplocks enabled, over a wide-area network, to a client on a South Pacific atoll, on a high-availability server, serving a -mission-critical multi-user corporate database during a tropical +mission-critical multiuser corporate database during a tropical storm. This configuration will likely encounter problems with oplocks. @@ -251,43 +251,43 @@ storm. This configuration will likely encounter problems with oplocks. Oplocks can be beneficial to perceived client performance when treated as a configuration toggle for client-side data caching. If the data caching is likely to be interrupted, then oplock usage should be -reviewed. Samba enables opportunistic locking by default on all +reviewed. Samba enables oplocks by default on all shares. Careful attention should be given to the client usage of -shared data on the server, the server network reliability and the -opportunistic locking configuration of each share. -In mission critical high availability environments, data integrity is +shared data on the server, the server network reliability, and the +oplocks configuration of each share. +In mission-critical, high-availability environments, data integrity is often a priority. Complex and expensive configurations are implemented to ensure that if a client loses connectivity with a file server, a -fail-over replacement will be available immediately to provide +failover replacement will be available immediately to provide continuous data availability. -Windows client fail-over behavior is more at risk of application +Windows client failover behavior is more at risk of application interruption than other platforms because it is dependent upon an established TCP transport connection. If the connection is interrupted -&smbmdash; as in a file server fail-over &smbmdash; a new session must be established. +&smbmdash; as in a file server failover &smbmdash; a new session must be established. It is rare for Windows client applications to be coded to recover -correctly from a transport connection loss, therefore, most applications +correctly from a transport connection loss; therefore, most applications will experience some sort of interruption &smbmdash; at worst, abort and require restarting. If a client session has been caching writes and reads locally due to -opportunistic locking, it is likely that the data will be lost when the +oplocks, it is likely that the data will be lost when the application restarts or recovers from the TCP interrupt. When the TCP connection drops, the client state is lost. When the file server recovers, an oplock break is not sent to the client. In this case, the work from the prior session is lost. Observing this scenario with oplocks disabled and with the client writing data to the file server -real-time, the fail-over will provide the data on disk as it +real-time, the failover will provide the data on disk as it existed at the time of the disconnect. -In mission-critical high-availability environments, careful attention -should be given to opportunistic locking. Ideally, comprehensive +In mission-critical, high-availability environments, careful attention +should be given to oplocks. Ideally, comprehensive testing should be done with all affected applications with oplocks enabled and disabled. @@ -296,16 +296,16 @@ enabled and disabled. Exclusively Accessed Shares -Opportunistic locking is most effective when it is confined to shares +Oplocks is most effective when it is confined to shares that are exclusively accessed by a single user, or by only one user at -a time. Because the true value of opportunistic locking is the local +a time. Because the true value of oplocks is the local client caching of data, any operation that interrupts the caching mechanism will cause a delay. Home directories are the most obvious examples of where the performance -benefit of opportunistic locking can be safely realized. +benefit of oplocks can be safely realized. @@ -314,8 +314,8 @@ benefit of opportunistic locking can be safely realized. Multiple-Accessed Shares or Files -As each additional user accesses a file in a share with opportunistic -locking enabled, the potential for delays and resulting perceived poor +As each additional user accesses a file in a share with oplocks +enabled, the potential for delays and resulting perceived poor performance increases. When multiple users are accessing a file on a share that has oplocks enabled, the management impact of sending and receiving oplock breaks and the resulting latency while other clients @@ -344,8 +344,8 @@ exposes the file to likely data corruption. -If files are shared between Windows clients, and either local UNIX -or NFS users, turn opportunistic locking off. +If files are shared between Windows clients and either local UNIX +or NFS users, turn oplocks off. @@ -354,7 +354,7 @@ or NFS users, turn opportunistic locking off. Slow and/or Unreliable Networks -The biggest potential performance improvement for opportunistic locking +The biggest potential performance improvement for oplocks occurs when the client-side caching of reads and writes delivers the most differential over sending those reads and writes over the wire. This is most likely to occur when the network is extremely slow, @@ -363,28 +363,28 @@ has a high impact on the reliability of the oplock break mechanism, and thus increases the likelihood of encountering oplock problems that more than offset the potential perceived performance gain. Of course, if an oplock break never has to be sent, then this is -the most advantageous scenario to utilize opportunistic locking. +the most advantageous scenario in which to utilize oplocks. If the network is slow, unreliable, or a WAN, then do not configure -opportunistic locking if there is any chance of multiple users +oplocks if there is any chance of multiple users regularly opening the same file. -Multi-User Databases +Multiuser Databases -Multi-user databases clearly pose a risk due to their very nature &smbmdash; +Multiuser databases clearly pose a risk due to their very nature &smbmdash; they are typically heavily accessed by numerous users at random -intervals. Placing a multi-user database on a share with opportunistic -locking enabled will likely result in a locking management bottleneck +intervals. Placing a multi-user database on a share with oplocks +enabled will likely result in a locking management bottleneck on the Samba server. Whether the database application is developed in-house or a commercially available product, ensure that the share -has opportunistic locking disabled. +has oplocks disabled. @@ -393,17 +393,17 @@ has opportunistic locking disabled. PDM Data Shares -Process Data Management (PDM) applications such as IMAN, Enovia and -Clearcase are increasing in usage with Windows client platforms, and -therefore SMB data-stores. PDM applications manage multi-user +Process data management (PDM) applications such as IMAN, Enovia, and +Clearcase are increasing in usage with Windows client platforms and +therefore with SMB datastores. PDM applications manage multiuser environments for critical data security and access. The typical PDM environment is usually associated with sophisticated client design applications that will load data locally as demanded. In addition, the -PDM application will usually monitor the data-state of each client. +PDM application will usually monitor the data state of each client. In this case, client-side data caching is best left to the local application and PDM server to negotiate and maintain. It is appropriate to eliminate the client OS from any caching tasks, and the -server from any oplock management, by disabling opportunistic locking on +server from any oplocks management, by disabling oplocks on the share. @@ -416,7 +416,7 @@ the share. Samba includes an &smb.conf; parameter called 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 +defined by the smb.conf variable. If oplocks is enabled on a share, the change in user access causes an oplock break to be sent to the client, even if the user has not explicitly loaded a file. In cases where the network is slow or unreliable, an oplock break can @@ -435,31 +435,31 @@ Avoid the combination of the following: - Slow or unreliable networks + Slow or unreliable networks. - Opportunistic locking enabled + Oplocks enabled. -Advanced Samba Opportunistic Locking Parameters +Advanced Samba Oplocks Parameters -Samba provides opportunistic locking parameters that allow the +Samba provides oplocks 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: -, +likely cause problems. The parameters are +, and . -For most users, administrators and environments, if these parameters +For most users, administrators, and environments, if these parameters are required, then the better option is to simply turn oplocks off. The Samba SWAT help text for both parameters reads: Do not change this parameter unless you have read and understood the Samba oplock code. @@ -469,43 +469,43 @@ This is good advice. -Mission-Critical High-Availability +Mission-Critical, High-Availability -In mission-critical high-availability environments, data integrity is +In mission-critical, high-availability environments, data integrity is often a priority. Complex and expensive configurations are implemented to ensure that if a client loses connectivity with a file server, a -fail-over replacement will be available immediately to provide +failover replacement will be available immediately to provide continuous data availability. -Windows client fail-over behavior is more at risk of application -interruption than other platforms because it is dependant upon an +Windows client failover behavior is more at risk of application +interruption than other platforms because it is dependent upon an established TCP transport connection. If the connection is interrupted -&smbmdash; as in a file server fail-over &smbmdash; a new session must be established. +&smbmdash; as in a file server failover &smbmdash; a new session must be established. It is rare for Windows client applications to be coded to recover -correctly from a transport connection loss, therefore, most applications +correctly from a transport connection loss; therefore, most applications will experience some sort of interruption &smbmdash; at worst, abort and require restarting. If a client session has been caching writes and reads locally due to -opportunistic locking, it is likely that the data will be lost when the -application restarts, or recovers from the TCP interrupt. When the TCP +oplocks, it is likely that the data will be lost when the +application restarts or recovers from the TCP interrupt. When the TCP connection drops, the client state is lost. When the file server recovers, an oplock break is not sent to the client. In this case, the work from the prior session is lost. Observing this scenario with -oplocks disabled, and the client was writing data to the file server -real-time, then the fail-over will provide the data on disk as it +oplocks disabled, if the client was writing data to the file server +real-time, then the failover will provide the data on disk as it existed at the time of the disconnect. -In mission-critical high-availability environments, careful attention -should be given to opportunistic locking. Ideally, comprehensive -testing should be done with all effected applications with oplocks +In mission-critical, high-availability environments, careful attention +should be given to oplocks. Ideally, comprehensive +testing should be done with all affected applications with oplocks enabled and disabled. @@ -514,30 +514,30 @@ enabled and disabled. -Samba Opportunistic Locking Control +Samba Oplocks Control -Opportunistic locking is a unique Windows file locking feature. It is +Oplocks is a unique Windows file locking feature. It is not really file locking, but is included in most discussions of Windows file locking, so is considered a de facto locking feature. -Opportunistic locking is actually part of the Windows client file +Oplocks is actually part of the Windows client file caching mechanism. It is not a particularly robust or reliable feature when implemented on the variety of customized networks that exist in enterprise computing. -Like Windows, Samba implements opportunistic locking as a server-side +Like Windows, Samba implements oplocks as a server-side component of the client caching mechanism. Because of the lightweight nature of the Windows feature design, effective configuration of -opportunistic locking requires a good understanding of its limitations, +oplocks requires a good understanding of its limitations, and then applying that understanding when configuring data access for each particular customized network and client usage state. -Opportunistic locking essentially means that the client is allowed to download and cache -a file on their hard drive while making changes; if a second client wants to access the +Oplocks essentially means that the client is allowed to download and cache +a file on its hard drive while making changes; if a second client wants to access the file, the first client receives a break and must synchronize the file back to the server. This can give significant performance gains in some cases; some programs insist on synchronizing the contents of the entire file back to the server for a single change. @@ -556,7 +556,7 @@ on files that the client has no initial intention to write to at time of opening Kernel Oplocks are essentially a method that allows the Linux kernel to co-exist with Samba's oplocked files, although this has provided better integration of MS Windows network -file locking with the underlying OS, SGI IRIX and Linux are the only two OSs that are +file locking with the underlying OS. SGI IRIX and Linux are the only two OSs that are oplock-aware at this time. @@ -564,7 +564,7 @@ oplock-aware at this time. Unless your system supports kernel oplocks, you should disable oplocks if you are 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 synchronization of +multiple clients, because any break the first client receives will affect synchronization of 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 quite badly to oplocks. If in doubt, @@ -622,7 +622,7 @@ Alternately, you could disable oplocks on a per-file basis within the share: -If you are experiencing problems with oplocks as apparent from Samba's log entries, +If you are experiencing problems with oplocks, as apparent from Samba's log entries, you may want to play it safe and disable oplocks and Level2 oplocks. @@ -653,21 +653,22 @@ The default is no. -Veto opLocks is an &smb.conf; parameter that identifies specific files for +Veto oplocks is an &smb.conf; parameter that identifies specific files for which oplocks are disabled. When a Windows client opens a file that has been configured for veto oplocks, the client will not be granted the oplock, and all operations will be executed on the original file on disk instead of a client-cached file copy. By explicitly identifying files that are shared with UNIX processes and disabling oplocks for -those files, the server-wide Oplock configuration can be enabled to +those files, the server-wide oplock configuration can be enabled to allow Windows clients to utilize the performance benefit of file -caching without the risk of data corruption. Veto Oplocks can be +caching without the risk of data corruption. Veto oplocks can be enabled on a per-share basis, or globally for the entire server, in the &smb.conf; file as shown in . + -Share with some files oplocked +Share with Some Files Oplocked /filename.htm/*.txt/ @@ -676,12 +677,13 @@ enabled on a per-share basis, or globally for the entire server, in the /*.exe/filename.ext/ + is an &smb.conf; parameter that adjusts the time 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 as shown below. +Oplock break wait time can only be configured globally in the &smb.conf; file as shown: @@ -695,13 +697,14 @@ Oplock break Wait Time can only be configured globally in the &smb.conf; file as response of the Samba server to grant an oplock if the configured number of contending clients reaches the limit specified by the parameter. Samba recommends Do not change this parameter unless you have read and understood the Samba oplock code. -Oplock break Contention Limit can be enable on a per-share basis, or globally for +Oplock break contention limit can be enabled on a per-share basis, or globally for the entire server, in the &smb.conf; file as shown in . + - Configuration with oplock break contention limit - +Configuration with Oplock Break Contention Limit + 2 (default) @@ -709,6 +712,7 @@ the entire server, in the &smb.conf; file as shown in . 2 (default) + @@ -716,13 +720,13 @@ the entire server, in the &smb.conf; file as shown in . -MS Windows Opportunistic Locking and Caching Controls +MS Windows Oplocks and Caching Controls -There is a known issue when running applications (like Norton Anti-Virus) on a Windows 2000/ XP +There is a known issue when running applications (like Norton Antivirus) on a Windows 2000/ XP workstation computer that can affect any application attempting to access shared database files across a network. This is a result of a default setting configured in the Windows 2000/XP -operating system known as opportunistic locking. When a workstation +operating system. When a workstation 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 @@ -733,14 +737,14 @@ properly function, which results in an Access Denied All Windows operating systems in the NT family that act as database servers for data files (meaning that data files are stored there and accessed by other Windows PCs) may need to -have opportunistic locking disabled in order to minimize the risk of data file corruption. +have oplocks disabled in order to minimize the risk of data file corruption. This includes Windows 9x/Me, Windows NT, Windows 200x, and Windows XP. Microsoft has documented this in Knowledge Base article 300216. If you are using a Windows NT family workstation in place of a server, you must also -disable opportunistic locking (oplocks) on that workstation. For example, if you use a +disable oplocks on that workstation. For example, if you use a PC with the Windows NT Workstation operating system instead of Windows NT Server, and you have data files located on it that are accessed from other Windows PCs, you may need to disable oplocks on that system. @@ -759,7 +763,7 @@ to ensure that the new setting goes into effect. -The location of the client registry entry for opportunistic locking has changed in +The location of the client registry entry for oplocks has changed in Windows 2000 from the earlier location in Microsoft Windows NT. @@ -769,7 +773,7 @@ in earlier versions of Windows. -You can also deny the granting of opportunistic locks by changing the following registry entries: +You can also deny the granting of oplocks by changing the following registry entries: @@ -784,7 +788,7 @@ You can also deny the granting of opportunistic locks by changing the following The OplocksDisabled registry value configures Windows clients to either request or not -request opportunistic locks on a remote file. To disable oplocks, the value of +request oplocks on a remote file. To disable oplocks, the value of OplocksDisabled must be set to 1. @@ -803,7 +807,7 @@ request opportunistic locks on a remote file. To disable oplocks, the value of The EnableOplocks value configures Windows-based servers (including Workstations sharing -files) to allow or deny opportunistic locks on local files. +files) to allow or deny oplocks on local files. @@ -811,7 +815,7 @@ To force closure of open oplocks on close or program exit, EnableOpLockForceClos -An illustration of how Level2 oplocks work: +An illustration of how Level2 oplocks work follows: @@ -832,7 +836,7 @@ An illustration of how Level2 oplocks work: Station 1 complies by flushing locally buffered lock information to the server. - Station 1 informs the server that it has Broken to Level2 Oplock (alternately, + Station 1 informs the server that it has broken to level2 Oplock (alternately, station 1 could have closed the file). @@ -863,7 +867,7 @@ An illustration of how Level2 oplocks work: -This indicates whether the redirector should use opportunistic-locking (oplock) performance +This indicates whether the redirector should use oplocks performance enhancement. This parameter should be disabled only to isolate problems. @@ -882,7 +886,7 @@ enhancement. This parameter should be disabled only to isolate problems. This specifies whether the server allows clients to use oplocks on files. Oplocks are a significant performance enhancement, but have the potential to cause lost cached -data on some networks, particularly wide area networks. +data on some networks, particularly WANs. @@ -892,7 +896,7 @@ data on some networks, particularly wide area networks. This specifies the minimum link throughput allowed by the server before it disables -raw and opportunistic locks for this connection. +raw I/O and oplocks for this connection. @@ -902,7 +906,7 @@ raw and opportunistic locks for this connection. This specifies the maximum time allowed for a link delay. If delays exceed this number, -the server disables raw I/O and opportunistic locking for this connection. +the server disables raw I/O and oplocks for this connection. @@ -934,7 +938,7 @@ If you see persistent data corruption even after repeated re-indexing, you may h rebuild the data files in question. This involves creating a new data file with the same definition as the file to be rebuilt and transferring the data from the old file to the new one. There are several known methods for doing this that can be found in -our Knowledge Base. +our knowledge base. @@ -943,9 +947,9 @@ our Knowledge Base. Common Errors -In some sites, locking problems surface as soon as a server is installed; in other sites +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 exception, when a locking -problem does surface it will cause embarrassment and potential data corruption. +problem does surface, it will cause embarrassment and potential data corruption. @@ -956,8 +960,8 @@ so far: - Incorrect configuration of opportunistic locking (incompatible with the application - being used. This is a common problem even where MS Windows NT4 or MS Windows + Incorrect configuration of oplocks (incompatible with the application + being used). This is a common problem even where MS Windows NT4 or MS Windows 200x-based servers were in use. It is imperative that the software application vendors' instructions for configuration of file locking should be followed. If in doubt, disable oplocks on both the server and the client. Disabling of all forms of file @@ -965,21 +969,21 @@ so far: - Defective network cards, cables, or HUBs/Switched. This is generally a more - prevalent factor with low cost networking hardware, although occasionally there + Defective network cards, cables, or hubs/switches. This is generally a more + prevalent factor with low-cost networking hardware, although occasionally there have also been problems with incompatibilities in more up-market hardware. There have been some random reports of Samba log files being written over data - files. This has been reported by very few sites (about five in the past three years) + files. This has been reported by very few sites (about five in the past 3 years) and all attempts to reproduce the problem have failed. The Samba Team has been - unable to catch this happening and thus has not been able to isolate any particular + unable to catch this happening and thus unable to isolate any particular cause. Considering the millions of systems that use Samba, for the sites that have - been affected by this as well as for the Samba Team this is a frustrating and - a vexing challenge. If you see this type of thing happening, please create a bug + been affected by this as well as for the Samba Team, this is a frustrating and + vexing challenge. If you see this type of thing happening, please create a bug report on Samba Bugzilla without delay. - Make sure that you give as much information as you possibly can help isolate the + Make sure that you give as much information as you possibly can to help isolate the cause and to allow replication of the problem (an essential step in problem isolation and correction). @@ -1002,7 +1006,7 @@ tdb(/usr/local/samba_2.2.7/var/locks/locking.tdb): rec_read bad magic - This error indicated a corrupted tdb. Stop all instances of smbd, delete locking.tdb, and restart smbd. + This error indicates a corrupted tdb. Stop all instances of smbd, delete locking.tdb, and restart smbd. @@ -1011,18 +1015,18 @@ tdb(/usr/local/samba_2.2.7/var/locks/locking.tdb): rec_read bad magic Problems Saving Files in MS Office on Windows XP This is a bug in Windows XP. More information can be - found in Microsoft Knowledge Base article 812937. + found in Microsoft Knowledge Base article 812937. - Long Delays Deleting Files Over Network with XP SP1 + Long Delays Deleting Files over Network with XP SP1 It sometimes takes approximately 35 seconds to delete files over the network after XP SP1 has been applied. This is a bug in Windows XP. More information can be found in - Microsoft Knowledge Base article 811492. + Microsoft Knowledge Base article 811492. @@ -1043,24 +1047,24 @@ Section of the Microsoft MSDN Library on opportunistic locking: Opportunistic Locks, Microsoft Developer Network (MSDN), Windows Development > Windows Base Services > Files and I/O > SDK Documentation > File Storage > File Systems -> About File Systems > Opportunistic Locks, Microsoft Corporation. -http://msdn.microsoft.com/library/en-us/fileio/storage_5yk3.asp +> About File Systems > Opportunistic Locks, Microsoft Corporation +http://msdn.microsoft.com/library/en-us/fileio/storage_5yk3.asp. - Microsoft Knowledge Base Article Q224992 Maintaining Transactional Integrity + Microsoft Knowledge Base Article Q224992, Maintaining Transactional Integrity with OPLOCKS, Microsoft Corporation, April 1999, http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224992. -Microsoft Knowledge Base Article Q296264 Configuring Opportunistic Locking in Windows 2000, -Microsoft Corporation, April 2001, http://support.microsoft.com/default.aspx?scid=kb;en-us;Q296264. +Microsoft Knowledge Base Article Q296264, Configuring Opportunistic Locking in Windows 2000, +Microsoft Corporation, April 2001 http://support.microsoft.com/default.aspx?scid=kb;en-us;Q296264. -Microsoft Knowledge Base Article Q129202 PC Ext: Explanation of Opportunistic Locking on Windows NT, -Microsoft Corporation, April 1995, http://support.microsoft.com/default.aspx?scid=kb;en-us;Q129202. +Microsoft Knowledge Base Article Q129202, PC Ext: Explanation of Opportunistic Locking on Windows NT, +Microsoft Corporation, April 1995 http://support.microsoft.com/default.aspx?scid=kb;en-us;Q129202. diff --git a/docs/Samba3-HOWTO/TOSHARG-msdfs.xml b/docs/Samba3-HOWTO/TOSHARG-msdfs.xml index f5d066e681..b9dbb84865 100644 --- a/docs/Samba3-HOWTO/TOSHARG-msdfs.xml +++ b/docs/Samba3-HOWTO/TOSHARG-msdfs.xml @@ -23,7 +23,7 @@ Features and Benefits - The Distributed File System (DFS) provides a means of separating the logical + The distributed file system (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, and so on. @@ -40,7 +40,7 @@ A Samba server can be made a DFS server by setting the global Boolean parameter in the &smb.conf; file. You designate a share as a DFS - root using the Share Level Boolean parameter. A DFS root directory on Samba hosts DFS + root using the share-level Boolean 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 junction->msdfs:storage1\share1 in the share directory acts as the DFS junction. When DFS-aware clients attempt to access the junction link, @@ -49,7 +49,7 @@ DFS trees on Samba work with all DFS-aware clients ranging from Windows 95 to 200x. - Following sample configuration shows how to setup a DFS tree on a Samba server. + The following sample configuration shows how to setup a DFS tree on a Samba server. In the /export/dfsroot directory, you set up your DFS links to other servers on the network. @@ -62,7 +62,7 @@ -smb.conf with DFS configured +smb.conf with DFS Configured &example.server.samba; @@ -76,14 +76,14 @@ You should set up the permissions and ownership of the directory acting as the DFS root so that only designated - users can create, delete or modify the msdfs links. Also note + 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. Users on DFS-aware clients can now browse the DFS tree - on the Samba server at \\samba\dfs. Accessing + 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. @@ -93,7 +93,7 @@ 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 + root, or vice versa. A better way is to introduce a new share and make it the DFS root. @@ -113,20 +113,20 @@ A network administrator sent advice to the Samba mailing list - after a long sessions trying to determine why DFS was not working. + after long sessions trying to determine why DFS was not working. His advice is worth noting. I spent some time trying to figure out why my particular - dfs root wasn't working. I noted in the documentation that + DFS root wasn't working. I noted in the documentation that the symlink should be in all lowercase. It should be amended that the entire path to the symlink should all be in lowercase as well. - For example, I had a share defined as such: + For example, I had a share defined as such: [pub] @@ -134,8 +134,8 @@ msdfs root = yes - and I could not make my Windows 9x/Me (with the dfs client installed) - follow this symlink: + and I could not make my Windows 9x/Me (with the dfs client installed) + follow this symlink: damage1 -> msdfs:damage\test-share @@ -143,15 +143,15 @@ - Running a debug level of 10 reveals: + Running a debug level of 10 reveals: [2003/08/20 11:40:33, 5] msdfs/msdfs.c:is_msdfs_link(176) is_msdfs_link: /export/home/shares/public_share/* does not exist. - Curious. So I changed the directory name from .../Shares/... to - .../shares/... (along with my service definition) and it worked! + Curious. So I changed the directory name from .../Shares/... to + .../shares/... (along with my service definition) and it worked! diff --git a/docs/Samba3-HOWTO/index.xml b/docs/Samba3-HOWTO/index.xml index 35ad34ab61..fff50ef839 100644 --- a/docs/Samba3-HOWTO/index.xml +++ b/docs/Samba3-HOWTO/index.xml @@ -16,7 +16,7 @@ - + @@ -152,6 +152,7 @@ The chapters in this part each cover specific Samba features. + -- cgit