Advanced Configuration

Valuable Nuts and Bolts Information

Samba has several features that you might want or might not want to use. The chapters in this part each cover specific Samba features.

Table of Contents

10. Samba / MS Windows Network Browsing Guide
Features and Benefits
What is Browsing?
Discussion
NetBIOS over TCP/IP
TCP/IP - without NetBIOS
DNS and Active Directory
How Browsing Functions
Setting up WORKGROUP Browsing
Setting up DOMAIN Browsing
Forcing Samba to be the master
Making Samba the domain master
Note about broadcast addresses
Multiple interfaces
Use of the Remote Announce parameter
Use of the Remote Browse Sync parameter
WINS - The Windows Internetworking Name Server
Setting up a WINS server
WINS Replication
Static WINS Entries
Helpful Hints
Windows Networking Protocols
Name Resolution Order
Technical Overview of browsing
Browsing support in Samba
Problem resolution
Browsing across subnets
Common Errors
How can one flush the Samba NetBIOS name cache without restarting Samba?
My client reports "This server is not configured to list shared resources"
I get an Unable to browse the network error
11. Account Information Databases
Features and Benefits
Backwards Compatibility Backends
New Backends
Technical Information
Important Notes About Security
Mapping User Identifiers between MS Windows and UNIX
Mapping Common UIDs/GIDs on Distributed Machines
Account Management Tools
The smbpasswd Command
The pdbedit Command
Password Backends
Plain Text
smbpasswd - Encrypted Password Database
tdbsam
ldapsam
MySQL
XML
Common Errors
Users can not logon
Users being added to wrong backend database
auth methods does not work
12. Mapping MS Windows and UNIX Groups
Features and Benefits
Discussion
Example Configuration
Configuration Scripts
Sample smb.conf add group script
Script to configure Group Mapping
Common Errors
Adding Groups Fails
Adding MS Windows Groups to MS Windows Groups Fails
Adding Domain Users to the Power Users group
13. File, Directory and Share Access Controls
Features and Benefits
File System Access Controls
MS Windows NTFS Comparison with UNIX File Systems
Managing Directories
File and Directory Access Control
Share Definition Access Controls
User and Group Based Controls
File and Directory Permissions Based Controls
Miscellaneous Controls
Access Controls on Shares
Share Permissions Management
MS Windows Access Control Lists and UNIX Interoperability
Managing UNIX permissions Using NT Security Dialogs
Viewing File Security on a Samba Share
Viewing file ownership
Viewing File or Directory Permissions
Modifying file or directory permissions
Interaction with the standard Samba create mask parameters
Interaction with the standard Samba file attribute mapping
Common Errors
Users can not write to a public share
I have set force user but Samba still makes root the owner of all the files I touch!
MS Word with Samba changes owner of file
14. File and Record Locking
Features and Benefits
Discussion
Opportunistic Locking Overview
Samba Opportunistic Locking Control
Example Configuration
MS Windows Opportunistic Locking and Caching Controls
Workstation Service Entries
Server Service Entries
Persistent Data Corruption
Common Errors
locking.tdb error messages
Problems saving files in MS Office on Windows XP
Long delays deleting files over network with XP SP1
Additional Reading
15. Securing Samba
Introduction
Features and Benefits
Technical Discussion of Protective Measures and Issues
Using host based protection
User based protection
Using interface protection
Using a firewall
Using a IPC$ share deny
NTLMv2 Security
Upgrading Samba
Common Errors
Smbclient works on localhost, but the network is dead
Why can users access home directories of other users?
16. Interdomain Trust Relationships
Features and Benefits
Trust Relationship Background
Native MS Windows NT4 Trusts Configuration
Creating an NT4 Domain Trust
Completing an NT4 Domain Trust
Inter-Domain Trust Facilities
Configuring Samba NT-style Domain Trusts
Samba as the Trusted Domain
Samba as the Trusting Domain
NT4-style Domain Trusts with Windows 2000
Common Errors
17. Hosting a Microsoft Distributed File System tree on Samba
Features and Benefits
Common Errors
18. Classical Printing Support
Features and Benefits
Technical Introduction
What happens if you send a Job from a Client
Printing Related Configuration Parameters
Parameters Recommended for Use
A simple Configuration to Print
Verification of "Settings in Use" with testparm
A little Experiment to warn you
Extended Sample Configuration to Print
Detailed Explanation of the Example's Settings
The [global] Section
The [printers] Section
Any [my_printer_name] Section
Print Commands
Default Print Commands for various UNIX Print Subsystems
Setting up your own Print Commands
Innovations in Samba Printing since 2.2
Client Drivers on Samba Server for Point'n'Print
The [printer$] Section is removed from Samba 3
Creating the [print$] Share
Parameters in the [print$] Section
Subdirectory Structure in [print$]
Installing Drivers into [print$]
Setting Drivers for existing Printers with a Client GUI
Setting Drivers for existing Printers with rpcclient
Client Driver Install Procedure
The first Client Driver Installation
IMPORTANT! Setting Device Modes on new Printers
Further Client Driver Install Procedures
Always make first Client Connection as root or "printer admin"
Other Gotchas
Setting Default Print Options for the Client Drivers
Supporting large Numbers of Printers
Adding new Printers with the Windows NT APW
Weird Error Message Cannot connect under a different Name
Be careful when assembling Driver Files
Samba and Printer Ports
Avoiding the most common Misconfigurations of the Client Driver
The Imprints Toolset
What is Imprints?
Creating Printer Driver Packages
The Imprints Server
The Installation Client
Add Network Printers at Logon without User Interaction
The addprinter command
Migration of "Classical" printing to Samba
Publishing Printer Information in Active Directory or LDAP
Common Errors
I give my root password but I don't get access
My printjobs get spooled into the spooling directory, but then get lost
19. CUPS Printing Support in Samba 3.0
Introduction
Features and Benefits
Overview
Basic Configuration of CUPS support
Linking of smbd with libcups.so
Simple smb.conf Settings for CUPS
More complex smb.conf Settings for CUPS
Advanced Configuration
Central spooling vs. "Peer-to-Peer" printing
CUPS/Samba as a "spooling-only" Print Server; "raw" printing with Vendor Drivers on Windows Clients
Driver Installation Methods on Windows Clients
Explicitly enable "raw" printing for application/octet-stream!
Three familiar Methods for driver upload plus a new one
Using CUPS/Samba in an advanced Way -- intelligent printing with PostScript Driver Download
GDI on Windows -- PostScript on UNIX
Windows Drivers, GDI and EMF
UNIX Printfile Conversion and GUI Basics
PostScript and Ghostscript
Ghostscript -- the Software RIP for non-PostScript Printers
PostScript Printer Description (PPD) Specification
CUPS can use all Windows-formatted Vendor PPDs
CUPS also uses PPDs for non-PostScript Printers
The CUPS Filtering Architecture
MIME types and CUPS Filters
MIME type Conversion Rules
Filter Requirements
Prefilters
pstops
pstoraster
imagetops and imagetoraster
rasterto [printers specific]
CUPS Backends
cupsomatic/Foomatic -- how do they fit into the Picture?
The Complete Picture
mime.convs
"Raw" printing
"application/octet-stream" printing
PostScript Printer Descriptions (PPDs) for non-PS Printers
Difference between cupsomatic/foomatic-rip and native CUPS printing
Examples for filtering Chains
Sources of CUPS drivers / PPDs
Printing with Interface Scripts
Network printing (purely Windows)
From Windows Clients to an NT Print Server
Driver Execution on the Client
Driver Execution on the Server
Network Printing (Windows clients -- UNIX/Samba Print Servers)
From Windows Clients to a CUPS/Samba Print Server
Samba receiving Jobfiles and passing them to CUPS
Network PostScript RIP: CUPS Filters on Server -- clients use PostScript Driver with CUPS-PPDs
PPDs for non-PS Printers on UNIX
PPDs for non-PS Printers on Windows
Windows Terminal Servers (WTS) as CUPS Clients
Printer Drivers running in "Kernel Mode" cause many Problems
Workarounds impose Heavy Limitations
CUPS: a "Magical Stone"?
PostScript Drivers with no major problems -- even in Kernel Mode
Setting up CUPS for driver Download
cupsaddsmb: the unknown Utility
Prepare your smb.conf for cupsaddsmb
CUPS Package of "PostScript Driver for WinNT/2k/XP"
Recognize the different Driver Files
Acquiring the Adobe Driver Files
ESP Print Pro Package of "PostScript Driver for WinNT/2k/XP"
Caveats to be considered
Benefits of using "CUPS PostScript Driver for Windows NT/2k/XP" instead of Adobe Driver
Run "cupsaddsmb" (quiet Mode)
Run "cupsaddsmb" with verbose Output
Understanding cupsaddsmb
How to recognize if cupsaddsmb completed successfully
cupsaddsmb with a Samba PDC
cupsaddsmb Flowchart
Installing the PostScript Driver on a Client
Avoiding critical PostScript Driver Settings on the Client
Installing PostScript Driver Files manually (using rpcclient)
A Check of the rpcclient man Page
Understanding the rpcclient man page
Producing an Example by querying a Windows Box
What is required for adddriver and setdriver to succeed
Manual Driver Installation in 15 Steps
Troubleshooting revisited
The printing *.tdb Files
Trivial DataBase Files
Binary Format
Losing *.tdb Files
Using tdbbackup
CUPS Print Drivers from Linuxprinting.org
foomatic-rip and Foomatic explained
foomatic-rip and Foomatic-PPD Download and Installation
Page Accounting with CUPS
Setting up Quotas
Correct and incorrect Accounting
Adobe and CUPS PostScript Drivers for Windows Clients
The page_log File Syntax
Possible Shortcomings
Future Developments
Other Accounting Tools
Additional Material
Auto-Deletion or Preservation of CUPS Spool Files
CUPS Configuration Settings explained
Pre-conditions
Manual Configuration
In Case of Trouble.....
Printing from CUPS to Windows attached Printers
More CUPS filtering Chains
Common Errors
Win9x client can't install driver
"cupsaddsmb" keeps asking for root password in neverending loop
"cupsaddsmb" gives "No PPD file for printer..." message while PPD file is present
Client can't connect to Samba printer
Can't reconnect to Samba under new account from Win2K/XP
Avoid being connected to the Samba server as the "wrong" user
Upgrading to CUPS drivers from Adobe drivers on NT/2K/XP clients gives problems
Can't use "cupsaddsmb" on Samba server which is a PDC
Deleted Win2K printer driver is still shown
Win2K/XP "Local Security Policies"
WinXP clients: "Administrator can not install printers for all local users"
"Print Change Notify" functions on NT-clients
WinXP-SP1
Print options for all users can't be set on Win2K/XP
Most common blunders in driver settings on Windows clients
cupsaddsmb does not work with newly installed printer
Permissions on /var/spool/samba/ get reset after each reboot
Printer named "lp" intermittently swallows jobs and spits out completely different ones
Location of Adobe PostScript driver files necessary for "cupsaddsmb"
An Overview of the CUPS Printing Processes
20. Stackable VFS modules
Features and Benefits
Discussion
Included modules
audit
extd_audit
fake_perms
recycle
netatalk
VFS modules available elsewhere
DatabaseFS
vscan
21. Winbind: Use of Domain Accounts
Features and Benefits
Introduction
What Winbind Provides
Target Uses
How Winbind Works
Microsoft Remote Procedure Calls
Microsoft Active Directory Services
Name Service Switch
Pluggable Authentication Modules
User and Group ID Allocation
Result Caching
Installation and Configuration
Introduction
Requirements
Testing Things Out
Conclusion
Common Errors
NSCD Problem Warning
22. Advanced Network Management
Features and Benefits
Remote Server Administration
Remote Desktop Management
Remote Management from NoMachines.Com
Network Logon Script Magic
Adding printers without user intervention
Common Errors
23. System and Account Policies
Features and Benefits
Creating and Managing System Policies
Windows 9x/Me Policies
Windows NT4 Style Policy Files
MS Windows 200x / XP Professional Policies
Managing Account/User Policies
Samba Editreg Toolset
Windows NT4/200x
Samba PDC
System Startup and Logon Processing Overview
Common Errors
Policy Does Not Work
24. Desktop Profile Management
Features and Benefits
Roaming Profiles
Samba Configuration for Profile Handling
Windows Client Profile Configuration Information
Sharing Profiles between W9x/Me and NT4/200x/XP workstations
Profile Migration from Windows NT4/200x Server to Samba
Mandatory profiles
Creating/Managing Group Profiles
Default Profile for Windows Users
MS Windows 9x/Me
MS Windows NT4 Workstation
MS Windows 200x/XP
Common Errors
Setting up roaming profiles for just a few user's or group's?
Can NOT use Roaming Profiles
Changing the default profile
25. PAM based Distributed Authentication
Features and Benefits
Technical Discussion
PAM Configuration Syntax
Example System Configurations
smb.conf PAM Configuration
Remote CIFS Authentication using winbindd.so
Password Synchronization using pam_smbpass.so
Common Errors
pam_winbind problem
Winbind is not resolving users and groups
26. Integrating MS Windows networks with Samba
Features and Benefits
Background Information
Name Resolution in a pure UNIX/Linux world
/etc/hosts
/etc/resolv.conf
/etc/host.conf
/etc/nsswitch.conf
Name resolution as used within MS Windows networking
The NetBIOS Name Cache
The LMHOSTS file
HOSTS file
DNS Lookup
WINS Lookup
Common Errors
Pinging works only in one way
Very Slow Network Connections
Samba server name change problem
27. Unicode/Charsets
Features and Benefits
What are charsets and unicode?
Samba and charsets
Conversion from old names
Japanese charsets
Common errors
CP850.so can't be found
28. Samba Backup Techniques
Note
Features and Benefits
29. High Availability Options
Note