From 2fb5c7c580a3fff3c7d477b65a1c4852af86433b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 1 Oct 2002 17:16:07 +0000 Subject: merge from HEAD (This used to be commit c0ca286e36d49deba6c73690114b0d867cbfd63e) --- docs/htmldocs/Samba-HOWTO-Collection.html | 3593 ++++++++++++++++------------- docs/htmldocs/winbind.html | 320 ++- 2 files changed, 2192 insertions(+), 1721 deletions(-) (limited to 'docs/htmldocs') diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index ffb6939e17..71e27a2e80 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -1,10 +1,12 @@ + SAMBA Project Documentation

SAMBA Project Documentation

SAMBA Project Documentation

SAMBA Team

SAMBA Team

Abstract

Abstract

Last UpdateLast Update : Thu Aug 15 12:48:45 CDT 2002

This book is a collection of HOWTOs added to Samba documentation over the years. @@ -73,34 +68,34 @@ CLASS="TOC" >Table of Contents

1. How to Install and Test SAMBA
1.1. Step 0: Read the man pages
1.2. Step 1: Building the Binaries
1.3. Step 2: The all important step
1.4. Step 3: Create the smb configuration file.
1.5. Step 4: Test your config file with
1.6. Step 5: Starting the smbd and nmbd
1.6.1. Step 5a: Starting from inetd.conf
1.6.2. Step 5b. Alternative: starting it as a daemon
1.7. Step 6: Try listing the shares available on your server
1.8. Step 7: Try connecting with the unix client
1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client
1.10. What If Things Don't Work?
1.10.1. Diagnosing Problems
1.10.2. Scope IDs
1.10.3. Choosing the Protocol Level
1.10.4. Printing from UNIX to a Client PC
1.10.5. Locking
1.10.6. Mapping Usernames
2. Diagnosing your samba server
2.1. Introduction
2.2. Assumptions
2.3. Tests
2.3.1. Test 1
2.3.2. Test 2
2.3.3. Test 3
2.3.4. Test 4
2.3.5. Test 5
2.3.6. Test 6
2.3.7. Test 7
2.3.8. Test 8
2.3.9. Test 9
2.3.10. Test 10
2.3.11. Test 11
2.4. Still having troubles?
3. Integrating MS Windows networks with Samba
3.1. Agenda
3.2. Name Resolution in a pure Unix/Linux world
3.2.1. /etc/hosts
3.2.2. /etc/resolv.conf
3.2.3. /etc/host.conf
3.2.4. /etc/nsswitch.conf
3.3. Name resolution as used within MS Windows networking
3.3.1. The NetBIOS Name Cache
3.3.2. The LMHOSTS file
3.3.3. HOSTS file
3.3.4. DNS Lookup
3.3.5. WINS Lookup
3.4. How browsing functions and how to deploy stable and dependable browsing using Samba
3.5. MS Windows security options and how to configure Samba for seemless integration
3.5.1. Use MS Windows NT as an authentication server
3.5.2. Make Samba a member of an MS Windows NT security domain
3.5.3. Configure Samba as an authentication server
3.5.3.1. Users
3.5.3.2. MS Windows NT Machine Accounts
3.6. Conclusions
4. Configuring PAM for distributed but centrally managed authentication
4.1. Samba and PAM
4.2. Distributed Authentication
4.3. PAM Configuration in smb.conf
5. Hosting a Microsoft Distributed File System tree on Samba
5.1. Instructions
5.1.1. Notes
6. UNIX Permission Bits and Windows NT Access Control Lists
6.1. Viewing and changing UNIX permissions using the NT security dialogs
6.2. How to view file security on a Samba share
6.3. Viewing file ownership
6.4. Viewing file or directory permissions
6.4.1. File Permissions
6.4.2. Directory Permissions
6.5. Modifying file or directory permissions
6.6. Interaction with the standard Samba create mask parameters
6.7. Interaction with the standard Samba file attribute mapping
7. Printing Support in Samba 2.2.x
7.1. Introduction
7.2. Configuration
7.2.1. Creating [print$]
7.2.2. Setting Drivers for Existing Printers
7.2.3. Support a large number of printers
7.2.4. Adding New Printers via the Windows NT APW
7.2.5. Samba and Printer Ports
7.3. The Imprints Toolset
7.3.1. What is Imprints?
7.3.2. Creating Printer Driver Packages
7.3.3. The Imprints server
7.3.4. The Installation Client
7.4.
8. Debugging Printing Problems
8.1. Introduction
8.2. Debugging printer problems
8.3. What printers do I have?
8.4. Setting up printcap and print servers
8.5. Job sent, no output
8.6. Job sent, strange output
8.7. Raw PostScript printed
8.8. Advanced Printing
8.9. Real debugging
9. Security levels
9.1. Introduction
9.2. More complete description of security levels
10. security = domain in Samba 2.x
10.1. Joining an NT Domain with Samba 2.2
10.2. Samba and Windows 2000 Domains
10.3. Why is this better than security = server?
11. Unified Logons between Windows NT and UNIX using Winbind
11.1. Abstract
11.2. Introduction
11.3. What Winbind Provides
11.3.1. Target Uses
11.4. How Winbind Works
11.4.1. Microsoft Remote Procedure Calls
11.4.2. Name Service Switch
11.4.3. Pluggable Authentication Modules
11.4.4. User and Group ID Allocation
11.4.5. Result Caching
11.5. Installation and Configuration
11.5.1. Introduction
11.5.2. Requirements
11.5.3. Testing Things Out
11.5.3.1. Configure and compile SAMBA
11.5.3.2. Configure nsswitch.conf and the -winbind libraries
11.5.3.3. Configure smb.conf
11.5.3.4. Join the SAMBA server to the PDC domain
11.5.3.5. Start up the winbindd daemon and test it!
11.5.3.6. Fix the init.d startup scripts
11.5.3.7. Configure Winbind and PAM
11.6. Limitations
11.7. Conclusion
12. How to Configure Samba 2.2 as a Primary Domain Controller
12.1. Prerequisite Reading
12.2. Background
12.3. Configuring the Samba Domain Controller
12.4. Creating Machine Trust Accounts and Joining Clients to the Domain
12.4.1. Manual Creation of Machine Trust Accounts
12.4.2. "On-the-Fly" Creation of Machine Trust Accounts
12.4.3. Joining the Client to the Domain
12.5. Common Problems and Errors
12.6. System Policies and Profiles
12.7. What other help can I get?
12.8. Domain Control for Windows 9x/ME
12.8.1. Configuration Instructions: Network Logons
12.8.2. Configuration Instructions: Setting up Roaming User Profiles
12.8.2.1. Windows NT Configuration
12.8.2.2. Windows 9X Configuration
12.8.2.3. Win9X and WinNT Configuration
12.8.2.4. Windows 9X Profile Setup
12.8.2.5. Windows NT Workstation 4.0
12.8.2.6. Windows NT Server
12.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0
12.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba
13. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
13.1. Prerequisite Reading
13.2. Background
13.3. What qualifies a Domain Controller on the network?
13.3.1. How does a Workstation find its domain controller?
13.3.2. When is the PDC needed?
13.4. Can Samba be a Backup Domain Controller?
13.5. How do I set up a Samba BDC?
13.5.1. How do I replicate the smbpasswd file?
14. Storing Samba's User/Machine Account information in an LDAP Directory
14.1. Purpose
14.2. Introduction
14.3. Supported LDAP Servers
14.4. Schema and Relationship to the RFC 2307 posixAccount
14.5. Configuring Samba with LDAP
14.5.1. OpenLDAP configuration
14.5.2. Configuring Samba
14.6. Accounts and Groups management
14.7. Security and sambaAccount
14.8. LDAP specials attributes for sambaAccounts
14.9. Example LDIF Entries for a sambaAccount
14.10. Comments
15. Improved browsing in samba
15.1. Overview of browsing
15.2. Browsing support in samba
15.3. Problem resolution
15.4. Browsing across subnets
15.4.1. How does cross subnet browsing work ?
15.5. Setting up a WINS server
15.6. Setting up Browsing in a WORKGROUP
15.7. Setting up Browsing in a DOMAIN
15.8. Forcing samba to be the master
15.9. Making samba the domain master
15.10. Note about broadcast addresses
15.11. Multiple interfaces
16. Samba performance issues
16.1. Comparisons
16.2. Oplocks
16.2.1. Overview
16.2.2. Level2 Oplocks
16.2.3. Old 'fake oplocks' option - deprecated
16.3. Socket options
16.4. Read size
16.5. Max xmit
16.6. Locking
16.7. Share modes
16.8. Log level
16.9. Wide lines
16.10. Read raw
16.11. Write raw
16.12. Read prediction
16.13. Memory mapping
16.14. Slow Clients
16.15. Slow Logins
16.16. Client tuning
16.17. My Results
17. OS2 Client HOWTOSamba and other CIFS clients
17.1. FAQsMacintosh clients?
OS2 Client
17.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?
17.1.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?
17.1.3. Are there any other issues when OS/2 (any version) is used as a client?
17.1.4. How do I get printer driver download working for OS/2 clients?
Windows for Workgroups
Use latest TCP/IP stack from Microsoft
Delete .pwl files after password change
Configure WfW password handling
Case handling of passwords
Windows '95/'98
Windows 2000 Service Pack 2
18. HOWTO Access Samba source code via CVS
18.1. Introduction
18.2. CVS Access to samba.org
18.2.1. Access via CVSweb
18.2.2. Access via cvs
19. Reporting Bugs
19.1. Introduction
19.2. General info
19.3. Debug levels
19.4. Internal errors
19.5. Attaching to a running process
19.6. Patches
IndexGroup mapping HOWTO
Portability
HPUX
SCO Unix
DNIX

Chapter 1. How to Install and Test SAMBA

How to Install and Test SAMBA

1.1. Step 0: Read the man pages

Step 0: Read the man pages

The man pages distributed with SAMBA contain lots of useful info that will help to get you started. @@ -1452,12 +1415,10 @@ TARGET="_top" >



1.2. Step 1: Building the Binaries

Step 1: Building the Binaries

To do this, first run the program



1.3. Step 2: The all important step

Step 2: The all important step

At this stage you must fetch yourself a coffee or other drink you find stimulating. Getting the rest @@ -1568,12 +1527,10 @@ NAME="AEN56" >



1.4. Step 3: Create the smb configuration file.

Step 3: Create the smb configuration file.

There are sample configuration files in the examples subdirectory in the distribution. I suggest you read them @@ -1633,16 +1590,14 @@ CLASS="FILENAME" >



1.6. Step 5: Starting the smbd and nmbd

Step 5: Starting the smbd and nmbd

You must choose to start smbd and nmbd either as daemons or from



1.6.1. Step 5a: Starting from inetd.conf

Step 5a: Starting from inetd.conf

NOTE; The following will be different if you use NIS or NIS+ to distributed services maps.



1.6.2. Step 5b. Alternative: starting it as a daemon

Step 5b. Alternative: starting it as a daemon

To start the server as a daemon you should create a script something like this one, perhaps calling @@ -1876,13 +1825,11 @@ CLASS="FILENAME" >



1.7. Step 6: Try listing the shares available on your - server

Step 6: Try listing the shares available on your + server



1.8. Step 7: Try connecting with the unix client

Step 7: Try connecting with the unix client



1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, - Win2k, OS/2, etc... client

Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, + Win2k, OS/2, etc... client

Try mounting disks. eg:



1.10. What If Things Don't Work?

What If Things Don't Work?

If nothing works and you start to think "who wrote this pile of trash" then I suggest you do step 2 again (and @@ -2052,12 +1993,10 @@ NAME="AEN174" easier.



1.10.1. Diagnosing Problems

Diagnosing Problems

If you have installation problems then go to



1.10.2. Scope IDs

Scope IDs

By default Samba uses a blank scope ID. This means all your windows boxes must also have a blank scope ID. @@ -2084,12 +2021,10 @@ NAME="AEN183" >



1.10.3. Choosing the Protocol Level

Choosing the Protocol Level

The SMB protocol has many dialects. Currently Samba supports 5, called CORE, COREPLUS, LANMAN1, @@ -2125,30 +2060,29 @@ CLASS="FILENAME" >



1.10.4. Printing from UNIX to a Client PC

Printing from UNIX to a Client PC

To use a printer that is available via a smb-based - server from a unix host you will need to compile the + server from a unix host with LPR you will need to compile the smbclient program. You then need to install the script "smbprint". Read the instruction in smbprint for more details.

There is also a SYSV style script that does much the same thing called smbprint.sysv. It contains instructions.

See the CUPS manual for information about setting up + printing from a unix host with CUPS to a smb-based server.



1.10.5. Locking

Locking

One area which sometimes causes trouble is locking.



1.10.6. Mapping Usernames

Mapping Usernames

If you have different usernames on the PCs and the unix server then take a look at the "username map" option. @@ -2220,17 +2152,13 @@ NAME="AEN208" CLASS="CHAPTER" >


Chapter 2. Diagnosing your samba server

Diagnosing your samba server

2.1. Introduction

Introduction

This file contains a list of tests you can perform to validate your Samba server. It also tells you what the likely cause of the problem @@ -2247,12 +2175,10 @@ ignore your email.



2.2. Assumptions

Assumptions

In all of the tests I assume you have a Samba server called BIGSERVER and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the @@ -2297,20 +2223,16 @@ best way to check this is with "testparm smb.conf"



2.3. Tests

Tests

2.3.1. Test 1

Test 1

In the directory in which you store your smb.conf file, run the command "testparm smb.conf". If it reports any errors then your smb.conf @@ -2327,12 +2249,10 @@ CLASS="FILENAME" >



2.3.2. Test 2

Test 2

Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from the unix box. If you don't get a valid response then your TCP/IP @@ -2353,12 +2273,10 @@ this is done via the ipfwadm program.)



2.3.3. Test 3

Test 3

Run the command "smbclient -L BIGSERVER" on the unix box. You should get a list of available shares back.



2.3.4. Test 4

Test 4

Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the IP address of your Samba server back.



2.3.5. Test 5

Test 5

run the command



2.3.6. Test 6

Test 6

Run the command



2.3.7. Test 7

Test 7

Run the command



2.3.8. Test 8

Test 8

On the PC type the command



2.3.9. Test 9

Test 9

Run the command



2.3.10. Test 10

Test 10

Run the command



2.3.11. Test 11

Test 11

From file manager try to browse the server. Your samba server should appear in the browse list of your local workgroup (or the one you @@ -2745,12 +2647,10 @@ for encrypted passwords (refer to the Makefile).



2.4. Still having troubles?

Still having troubles?

Try the mailing list or newsgroup, or use the ethereal utility to sniff the problem. The official samba mailing list can be reached at @@ -2774,17 +2674,13 @@ TARGET="_top" CLASS="CHAPTER" >


Chapter 3. Integrating MS Windows networks with Samba

Integrating MS Windows networks with Samba

3.1. Agenda

Agenda

To identify the key functional mechanisms of MS Windows networking to enable the deployment of Samba as a means of extending and/or @@ -2846,12 +2742,10 @@ TYPE="a" >



3.2. Name Resolution in a pure Unix/Linux world

Name Resolution in a pure Unix/Linux world

The key configuration files covered in this section are:



3.2.1. /etc/hosts

Contains a static list of IP Addresses and names. eg:



3.2.2. /etc/resolv.conf

This file tells the name resolution libraries:



3.2.4. /etc/nsswitch.conf

This file controls the actual name resolution targets. The file typically has resolver object specifications as follows:



3.3. Name resolution as used within MS Windows networking

Name resolution as used within MS Windows networking

MS Windows networking is predicated about the name each machine is given. This name is known variously (and inconsistently) as @@ -3226,12 +3110,10 @@ Since we are primarily concerned with TCP/IP this demonstration is limited to this area.



3.3.1. The NetBIOS Name Cache

The NetBIOS Name Cache

All MS Windows machines employ an in memory buffer in which is stored the NetBIOS names and IP addresses for all external @@ -3253,12 +3135,10 @@ is called "nmblookup".



3.3.2. The LMHOSTS file

The LMHOSTS file

This file is usually located in MS Windows NT 4.0 or 2000 in



3.3.3. HOSTS file

HOSTS file

This file is usually located in MS Windows NT 4.0 or 2000 in



3.3.4. DNS Lookup

DNS Lookup

This capability is configured in the TCP/IP setup area in the network configuration facility. If enabled an elaborate name resolution sequence @@ -3407,12 +3283,10 @@ lookup is used.



3.3.5. WINS Lookup

WINS Lookup

A WINS (Windows Internet Name Server) service is the equivaent of the rfc1001/1002 specified NBNS (NetBIOS Name Server). A WINS server stores @@ -3468,13 +3342,11 @@ of the WINS server.



3.4. How browsing functions and how to deploy stable and -dependable browsing using Samba

How browsing functions and how to deploy stable and +dependable browsing using Samba

As stated above, MS Windows machines register their NetBIOS names (i.e.: the machine name for each service type in operation) on start @@ -3535,13 +3407,11 @@ and so on.



3.5. MS Windows security options and how to configure -Samba for seemless integration

MS Windows security options and how to configure +Samba for seemless integration

MS Windows clients may use encrypted passwords as part of a challenege/response authentication model (a.k.a. NTLMv1) or @@ -3657,8 +3527,9 @@ CLASS="PARAMETER" >password level must be set to the maximum -number of upper case letter which couldcould appear is a password. Note that is the server OS uses the traditional DES version of crypt(), then a



3.5.1. Use MS Windows NT as an authentication server

Use MS Windows NT as an authentication server

This method involves the additions of the following parameters in the smb.conf file:



3.5.2. Make Samba a member of an MS Windows NT security domain

Make Samba a member of an MS Windows NT security domain

This method involves additon of the following paramters in the smb.conf file:



3.5.3. Configure Samba as an authentication server

Configure Samba as an authentication server

This mode of authentication demands that there be on the Unix/Linux system both a Unix style account as well as an @@ -3840,12 +3705,10 @@ to be created for each user, as well as for each MS Windows NT/2000 machine. The following structure is required.



3.5.3.1. Users

Users

A user account that may provide a home directory should be created. The following Linux system commands are typical of @@ -3872,12 +3735,10 @@ CLASS="PROGRAMLISTING" >



3.5.3.2. MS Windows NT Machine Accounts

MS Windows NT Machine Accounts

These are required only when Samba is used as a domain controller. Refer to the Samba-PDC-HOWTO for more details.



3.6. Conclusions

Conclusions

Samba provides a flexible means to operate as...


Chapter 4. Configuring PAM for distributed but centrally -managed authentication

Configuring PAM for distributed but centrally +managed authentication

4.1. Samba and PAM

Samba and PAM

A number of Unix systems (eg: Sun Solaris), as well as the xxxxBSD family and Linux, now utilize the Pluggable Authentication @@ -4187,7 +4042,7 @@ password required /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba. >

Note: PAM allows stacking of authentication mechanisms. It is -also possible to pass information obtained within on PAM module through +also possible to pass information obtained within one PAM module through to the next module in the PAM stack. Please refer to the documentation for your particular system implementation for details regarding the specific capabilities of PAM in this environment. Some Linux implmentations also @@ -4206,12 +4061,10 @@ PAM documentation for further helpful information.



4.2. Distributed Authentication

Distributed Authentication

The astute administrator will realize from this that the combination of



4.3. PAM Configuration in smb.conf

PAM Configuration in smb.conf

There is an option in smb.conf called


Chapter 5. Hosting a Microsoft Distributed File System tree on Samba

Hosting a Microsoft Distributed File System tree on Samba

5.1. Instructions

Instructions

The Distributed File System (or Dfs) provides a means of separating the logical view of files and directories that users @@ -4444,12 +4291,10 @@ CLASS="USERINPUT" takes users directly to the appropriate shares on the network.



5.1.1. Notes

Notes