Samba

Integrating UNIX and Windows

John D. Blair

Publisher: SSC, 1998, 298 pages

ISBN: 1-57831-006-7

Keywords: Networks, System Administration

Last modified: June 8, 2021, 10:56 a.m.

Samba is the tool of choice for providing Windows file sharing and printer services from UNIX and UNIX-like systems. Freely available under the GNU Public License, Samba allows UNIX machines to be seamlessly integrated into a windows network without installing any additional software on the Windows machines. Used in tandem with Linux or FreeBSD, Samba provides a low-cost alternative to the Windows NT Server.

Samba: Integrating UNIX and Windows, a combination of technical tutorial, reference guide, and how-to manual, contains the depth of knowledge experienced network administrators demand without skipping the information beginners need to get fast results. UNIX administrators new to Windows networking will find the information they need to become Windows networking experts. Those new to UNIX will find the details they need to install and configure Samba correctly and secrely.

Contents include:

  • Windows networking tutorial, covering NetBIOS, SMB, security models and network browsing
  • Downloading and compiling the server
  • Topic-based reference of all configuration options
  • Example configurations for simple to very complex situations
  • Diagnosing problems
  • The Linux SMB filesystem
  1. Introduction
    • What is Samba?
    • Why You Should Be Interested in Samba
    • The GNU Public License
    • The Future of Samba
      • What's New in 1.9.18
        • Support for Real Opportunistic Locking
        • New DES Code
        • New Internationalization Support
        • Very Experimental Primary Domain Controller Support
        • A Prototype Web-Based Configuration Tool
      • Future Roadmap
  2. Windows Networking Protocols
    • NetBIOS
      • NetBIOS Services
        • Name Service
        • Session Service
        • Datagram Service
      • The Three Prominent Flavors of NetBIOS
        • NetBEUI
        • NetBIOS over IPX
        • NetBIOS over TCP/IP
    • SMB
      • What is SMB?
      • An Example SMB Exchange
      • Important Protocol Extension
        • Core
        • Core Plus
        • LAN Manager 1.0
        • LAN Manager 2.0
        • NT LAN Manager 0.12
        • Common Internet File System (CIFS)
    • Functional Units of a Windows Network
      • Workgroup and NT Domains
      • Browsing
        • The Master Browser and Backup Browsers
        • The Browser Election Protocol
      • Cross Subnet Name Resolution
        • Windows Internet Name Service
        • LMHOSTS
      • Cross Subnet Browsing
        • Domain Master Browser
        • An Example of Cross Subnet Browsing
        • Unusual and Frustrating Situations
  3. Downloading and Building Samba
    • Where to Get Samba
    • To Compile or Not to Compile?
    • Compiling libdes
      • Downloading libdes
      • Unpacking libdes
      • Configuring libdes
        • Digital Alpha
        • times()
        • Terminal Options
      • Compiling libdes
    • Building Samba
      • Unpacking the Distribution
      • What's in the Source Distribution?
      • Non-OS Specific Compile-Time Configuration Options
        • Installation Options
        • Default Configuration Options
        • Authentication Options
        • Configuration Options Not Documented in the Makefile
      • OS Specific Compile-Time Configuration Options
      • Compiling Samba
      • Completing the Installation
      • How to Start smbd and nmbd?
        • Starting smbd and nmbd with inetd
        • Starting smbd and nmbd as Stand-alone Daemons
      • Testing the Installation
        • Install a Simple smb.conf file
        • Test NetBIOS Name Lookup
        • Try Connecting with smbclient
  4. Components of the Samba Suite
    • Samba Executables
      • The Samba Core: The Server Programs
      • Samba Utilities
      • SMB Client Tools
    • lib Directory Contents
    • vad Directory Contents
  5. Global Configuration Options
    • Index of Global Configuration Paramaters
    • smb.conf Structure
      • Substitution Macros
        • Macros That Are Always Available
        • Macros Available Only in a Share Context
      • Special Sections
        • The [global] Section
        • The [homes] Section
        • The [printers] Section
    • Configuration File Options
    • Browser Options
      • Naming
        • Setting the NetBIOS Name
        • Setting the Workgroup
        • Setting the Server Comment String
        • Manually Adding Services to the Browse List
        • Setting a Default Service
      • Influencing Browser Elections
        • Influencing Samba's Chance to Become a Master Browser
        • Implementing Cross Subnet Browsing
        • Using Samba as aa WINS Server
        • Using Samba to proxy WINS Requests from Older Clients
        • Changing the Announced Browser Type and Version
    • Network Options
      • Network Interface Configuration
        • Dealing with Multiple Network Interfaces
        • Setting Low Level Socket Options
        • Defining the Maximum SMB Protocol Extension
        • Setting the Maximum SMB Packet Size
      • Improving Network Performance
        • Supporting Raw Reads and Writes
        • Determining when a Client is Not Responding
        • Kicking Off Idle Clients
    • User Authentication
      • The Process of Username/Password Validation
        • Share Level Authentication
        • User Level Authentication
      • User Authentication Techniques
        • Enabling Encrypted Passwords
        • Using Native UNIX User Authentication
        • Dealing with Clients Which Pass Only Single Case Passwords
        • Dealing with Mixed Case UNIX Usernames
        • Using Encrypted Local Password Authentication
        • Using Another SMB Server to Validate Passwords
      • Supporting Windows 95 Network Logins
        • Making the Samba Server the Windows 95 Domain Controller
        • Supporting Windows 95 Roving Profiles
        • Providing a Logon Script to Windows 95 Clients
      • Other Password Related Parameters
        • Allowing Clients to Connect Without Passwords
        • Setting the Local Password Changing Program
    • Setting Logging Behavior
      • Setting the Location of the Log File
      • Setting the Maximum Size of the Log File
      • Setting the Debug Level
      • Logging Messages to Syslog
    • Disk and Filesystem Related Options
      • Global Name Mangling Options
        • Improving the Likelihood of Correct Reverse Name Mangling
        • Working with Alternate Client Character Sets
      • Using NIS to Set a User's Home Directory
      • Improving Disk Access Time
        • Caching getwd() calls
        • Overlapping Network and Disk I/O Operations
        • Reading Ahead to Prepare for the Next SMB Operation
      • Miscellaneous Other Options
        • Setting the Maximum Size of a Disk
        • Supplying a User's Real Name to the Client
        • Setting an Alternative Free Disk Space Command
        • Setting an Alternate Lock File Directory
    • Global Printer Services Options
      • Automatically Configuring Printer Services
      • Specifying the Location of the printcap File
      • Setting the Print Queue Cache Time
      • Setting the Location of the Windows 95 Printer Definition File
    • Miscellaneous Other Options
      • Disabling the Connection Status File
      • Setting a Root Directory other than /
      • Setting the WinPopup Message Handler
      • Setting the Location of the smbrun binary
      • Using Samba as a Time Server
    • Hacker Options
    • Deprecated Options
        • Dealing with Special Characters
  6. Service Configuration Options
    • Index of Service Configuration Parameters
    • Options Common to Filespace and Printer Services
      • Setting the Shared Directory
      • Controlling Appearance in the Network Browser
      • Access Controls
        • Controlling Access by Client IP Address
        • Using a Conditional Configuration File to Implement Host-Based Access
        • Granting Access to Users
        • Granting Guest Access
        • Limiting the Number of Simultaneous Users of a Service
        • Kludging Usernames for Older Clients
        • Forcing Revalidation of Passwords
      • Creating Multiple Services with Similar Options
      • Executing Scripts when a Service is Accessed
    • Filespace Services
      • Sharing the UNIX Filesystem
        • Setting the Volume Name
        • Pruning the Shared Directory Tree
        • Dealing with Symbolic Links
      • Controlling Access to a Service
        • Disabling a Service
        • Controlling Read/Write/Administrative Access
        • Setting the UNIX Effective Userid
        • Controlling File Permissions
      • Translating Between UNIX and DOS
        • Mangling UNIX File Names into DOS File names
        • Name Mangling Reverse Mapping
        • Controlling Letter Case Mangling
        • Mapping Between DOS Attributes and UNIX Permissions
        • File Locking
      • Other Miscellaneous Options
        • Allowing Clients to Execute Scripts on the Samba Server
        • Allowing the Digital Pathworks setdir Command
    • Printer Services
      • Defining a Printer Service
      • Specifying the Print System Type
      • Defining the Local Printer Commands
      • Other Miscellaneous Options
        • Forcing a Printer into PostScript Mode
        • Disabling Printing When Disk Space is Low
  7. Browser Configuration Examples
    • The Minimum Configuration Necessary
    • Small Networks (Single Subnets)
    • Larger Networks (Multiple Subnets)
      • A Cross-Subnet Workgroup
      • A Cross-Subnet Windows NT Domain
        • Samba on a Subnet Without Windows NT Server
        • Samba on a Subnet With Only Windows 95 or Earlier
      • A Single-Subnet Workgroup or NT Domain With Samba on an Isolated Subnet
        • Using remote announce
        • Using a WINS Server
      • Using the LMHOSTS File for NetBIOS Name Resolution
        • Syntax of an LMHOSTS File
        • An Example Configuration
  8. Access Control Configuration Examples
    • Password Validation
      • Conventional UNIX Password Authentication
        • Share Level Authentication
        • User Level Authentication
        • PAM Configuration
      • Encrypted Password Authentication
        • Step-by-Step Directions for Setting up Encrypted Passwords
        • Synchronizing smbpasswd with the Windows NT SAM using pwdump.exe
    • Supporting Windows 95 Network Logons
      • Configuring Network Logons
        • Configuring Logon Scripts and Network Wide System Policies
        • Dynamically Generating Network Logon Scripts
        • Setting up Windows 95 Roving Profiles
    • Storing the NT User Profile on the Samba Server
  9. Service Configuration Examples
    • Filespace Services
      • Sharing Home Directories
      • Sharing a Different Directory for Each Client Machine while Using the Same Service
      • Read Only Shares
      • Providing a Temporary File Space
      • Preserving the Archive, Hidden, and System Bits
      • Access Control Examples
        • Limiting Access to Specific Users
        • Granting Read Access to All and Write Access to Some
        • Granting Read Access to Some and Write Access to Some Others
        • Allowing Users to Modify, But Not Delete, Each Other's Files
        • Simulating the Windows "Change" Permission
        • Allowing Usiers to Create FIles But Not Modify or Delete Files
    • Printer Services
      • A Simple Setup: Sharing All Available Printers
      • Sharing a Subset of Available Printers
      • Explicitly Defining Printer Services
      • Specifying the Windows Printer Driver Name
      • Forcing a Printer to Print in PostScript Mode
      • Setting a Printer Service Name Different From the Printer Spool Name
    • Printer Access Control
  10. Other Tricks and Techniques
    • Using a Windows Tape Drive to Back Up a UNIX Share
      • Configuring the Sahre You Plan to Back Up
      • Preserving Permissions, Ownership, and Symboloc Links
    • Using smbclient and smbtar to Back Up a Windows Share
      • smbtar Example
    • Synchronizing Your PC's Clock with the Samba Server
    • Printing From a UNIX Machine to a Windows Printer Server
      • Create the printcap Stanza
      • Create the Spool Directory
      • Create the smbprint Configuration File
      • Setting the Log FIle Location
      • Logging Printer Usage
      • Using Ghostscript with smbprint
    • Creating Multiple Virtual Servers Running on the Same Host
      • Using Share Level and User Level Security at the Same Time
    • Handling WinPopup Messages
      • Sending WinPopup Messages Using smbclient
      • Sending a WinPopup Messages to All Connected Machines
      • Receiving WinPopup Messages
    • Being Very Cautious (Paranoid?) About Security
      • Don't Use a Samba Version Prior to 1.9.17p2
      • Use Encrypted Passwords
      • Limit Access to Clients From Specific IP Addresses
      • Use root Directory to Limit Access to Your Server
    • Dealing with Older Clients
  11. Diagnosing Problems
    • The Samba Diagnosis Procedure
      • Assumptions
      • The Procedure
        • Test 1: Is smb.con free from errors?
        • Test 2: Is TCP/IP configured properly on both the client and the server?
        • Test 3: Is smbd running and accessible?
        • Test 4: Is nmbd running?
        • Test 5: Can the client's NetBIOS name be resolved?
        • Test 6: Has nmblookup properly determined your broadcast address?
        • Test 7: Is user authentication working properly?
        • Test 8: Is nmbd responding to the PC?
        • Test 9: Can the PC access a share on the Samba Server?
        • Test 10: Can you browse the Samba server?
    • Diagnosing Printer problems
      • Do you have access to the printer?
      • Is /dev/null world writeable?
      • Is lpr working properly?
    • Increasing the Log Level for Specific Machines
    • The Windows nbtstat Command
  12. The Linux SMB Filesystem
    • The SMB Filesystem Compared with the Network Filesystem (NFS)
    • Compilation Notes
    • Mount Management Tools
      • smbmount
      • smbumount
      • Examples
    • Using the Automount Daemon (AMD) with the SMB Filesystem
      • Why Use the Automounter?
      • Configuring AMD
      • An Example

Reviews

Samba

Reviewed by Roland Buresund

Good ******* (7 out of 10)

Last modified: May 21, 2007, 3:23 a.m.

A very practical and down to earth book. Recommended.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required