From b98ddb91f8c04afde80e86be30c1ea5a5978870f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Oct 2002 21:34:31 +0000 Subject: Convert ADS-HOWTO to SGML and add it to the howto collection Updated generated docs (This used to be commit 3d417179233d0b8e486560c41248888be42bacf9) --- docs/docbook/projdoc/ADS-HOWTO.sgml | 195 ++ docs/docbook/projdoc/samba-doc.sgml | 2 + docs/htmldocs/Samba-HOWTO-Collection.html | 3299 +++++++++++++++-------------- docs/manpages/smb.conf.5 | 77 +- docs/textdocs/ADS-HOWTO.txt | 142 -- 5 files changed, 1940 insertions(+), 1775 deletions(-) create mode 100644 docs/docbook/projdoc/ADS-HOWTO.sgml delete mode 100644 docs/textdocs/ADS-HOWTO.txt (limited to 'docs') diff --git a/docs/docbook/projdoc/ADS-HOWTO.sgml b/docs/docbook/projdoc/ADS-HOWTO.sgml new file mode 100644 index 0000000000..0d2fda5f78 --- /dev/null +++ b/docs/docbook/projdoc/ADS-HOWTO.sgml @@ -0,0 +1,195 @@ + + + + + AndrewTridgell + + 2002 + + +Using samba 3.0 with ActiveDirectory support + + +This is a VERY ROUGH guide to setting up the current (November 2001) +pre-alpha version of Samba 3.0 with kerberos authentication against a +Windows2000 KDC. The procedures listed here are likely to change as +the code develops. + + +Pieces you need before you begin: + +a Windows 2000 server. +samba 3.0 or higher. +the MIT kerberos development libraries (either install from the above sources or use a package). The heimdal libraries will not work. +the OpenLDAP development libraries. + + + + +Installing the required packages for Debian + +On Debian you need to install the following packages: + +libkrb5-dev +krb5-user + + + + + +Installing the required packages for RedHat + +On RedHat this means you should have at least: + +krb5-workstation (for kinit) +krb5-libs (for linking with) +krb5-devel (because you are compiling from source) + + + +in addition to the standard development environment. + +Note that these are not standard on a RedHat install, and you may need +to get them off CD2. + + + + +Compile Samba +If your kerberos libraries are in a non-standard location then + remember to add the configure option --with-krb5=DIR. + +After you run configure make sure that include/config.h contains + lines like this: + + +#define HAVE_KRB5 1 +#define HAVE_LDAP 1 + + +If it doesn't then configure did not find your krb5 libraries or + your ldap libraries. Look in config.log to figure out why and fix + it. + +Then compile and install Samba as usual. You must use at least the + following 3 options in smb.conf: + + + realm = YOUR.KERBEROS.REALM + ads server = your.kerberos.server + security = ADS + encrypt passwords = yes + + +Strictly speaking, you can omit the realm name and you can use an IP + address for the ads server. In that case Samba will auto-detect these. + +You do *not* need a smbpasswd file, although it won't do any harm + and if you have one then Samba will be able to fall back to normal + password security for older clients. I expect that the above + required options will change soon when we get better active + directory integration. + + + +Setup your /etc/krb5.conf + +The minimal configuration for krb5.conf is: + + + [realms] + YOUR.KERBEROS.REALM = { + kdc = your.kerberos.server + } + + +Test your config by doing a "kinit USERNAME@REALM" and making sure that + your password is accepted by the Win2000 KDC. + +NOTE: The realm must be uppercase. + + +You also must ensure that you can do a reverse DNS lookup on the IP +address of your KDC. Also, the name that this reverse lookup maps to +must either be the netbios name of the KDC (ie. the hostname with no +domain attached) or it can alternatively be the netbios name +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 +don't get this right 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 +straight to step 5 now. Step 3 is only needed if you want kerberos +support in smbd. + + + + + +Create the computer account + + +Do a "kinit" as a user that has authority to change arbitrary +passwords on the KDC ("Administrator" is a good choice). Then as a +user that has write permission on the Samba private directory +(usually root) run: +net ads join + + + +Possible errors + + + +"bash: kinit: command not found" +kinit is in the krb5-workstation RPM on RedHat systems, and is in /usr/kerberos/bin, so it won't be in the path until you log in again (or open a new terminal) +"ADS support not compiled in" +Samba must be reconfigured (remove config.cache) and recompiled (make clean all install) after the kerberos libs and headers are installed. + + + + + + + + +Test your server setup + + +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 klist tickets. Did you get a ticket for the +server? Does it have an encoding type of DES-CBC-MD5 ? + + + + + +Testing with smbclient + + +On your Samba server try to login to a Win2000 server or your Samba +server using smbclient and kerberos. Use smbclient as usual, but +specify the -k option to choose kerberos authentication. + + + + + +Notes + +You must change administrator password at least once after DC install, + to create the right encoding types + +w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in + their defaults DNS setup. Maybe fixed in service packs? + + + + diff --git a/docs/docbook/projdoc/samba-doc.sgml b/docs/docbook/projdoc/samba-doc.sgml index 75c5c379d3..6fb77750e7 100644 --- a/docs/docbook/projdoc/samba-doc.sgml +++ b/docs/docbook/projdoc/samba-doc.sgml @@ -21,6 +21,7 @@ + ]> @@ -78,6 +79,7 @@ Cheers, jerry &Samba-PDC-HOWTO; &Samba-BDC-HOWTO; &Samba-LDAP; +&ADS-HOWTO; &BROWSING; &SPEED; &Other-Clients; diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index 71e27a2e80..e5240ba658 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -1,12 +1,11 @@ - + SAMBA Project Documentation

SAMBA Project Documentation

SAMBA Project Documentation

SAMBA Team

SAMBA Team

Abstract

Abstract

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

This book is a collection of HOWTOs added to Samba documentation over the years. @@ -68,34 +78,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.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.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.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. Using samba 3.0 with ActiveDirectory support
15.1. Installing the required packages for Debian
15.2. Installing the required packages for RedHat
15.3. Compile Samba
15.4. Setup your /etc/krb5.conf
15.5. Create the computer account
15.5.1. Possible errors
15.6. Test your server setup
15.7. Testing with smbclient
15.8. Notes
16. Improved browsing in samba
16.1. Overview of browsing
16.2. Browsing support in samba
16.3. Problem resolution
16.4. Browsing across subnets
16.4.1. How does cross subnet browsing work ?
16.5. Setting up a WINS server
16.6. Setting up Browsing in a WORKGROUP
16.7. Setting up Browsing in a DOMAIN
16.8. Forcing samba to be the master
16.9. Making samba the domain master
16.10. Note about broadcast addresses
16.11. Multiple interfaces
17. Samba performance issues
17.1. Comparisons
17.2. Oplocks
17.2.1. Overview
17.2.2. Level2 Oplocks
17.2.3. Old 'fake oplocks' option - deprecated
17.3. Socket options
17.4. Read size
17.5. Max xmit
17.6. Locking
17.7. Share modes
17.8. Log level
17.9. Wide lines
17.10. Read raw
17.11. Write raw
17.12. Read prediction
17.13. Memory mapping
17.14. Slow Clients
17.15. Slow Logins
17.16. Client tuning
17.17. My Results
18. Samba and other CIFS clients
18.1. Macintosh clients?
18.2. OS2 Client
18.2.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?
18.2.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?
18.2.3. Are there any other issues when OS/2 (any version) is used as a client?
18.2.4. How do I get printer driver download working for OS/2 clients?
18.3. Windows for Workgroups
18.3.1. Use latest TCP/IP stack from Microsoft
18.3.2. Delete .pwl files after password change
18.3.3. Configure WfW password handling
18.3.4. Case handling of passwords
18.4. Windows '95/'98
18.5. Windows 2000 Service Pack 2
19. HOWTO Access Samba source code via CVS
19.1. Introduction
19.2. CVS Access to samba.org
19.2.1. Access via CVSweb
19.2.2. Access via cvs
20. Reporting Bugs
20.1. Introduction
20.2. General info
20.3. Debug levels
20.4. Internal errors
20.5. Attaching to a running process
20.6. Patches
21. Group mapping HOWTO
22. Portability
22.1. HPUX
22.2. SCO Unix
22.3. DNIX

How to Install and Test SAMBA

Chapter 1. How to Install and Test SAMBA

Step 0: Read the man pages

1.1. Step 0: Read the man pages

The man pages distributed with SAMBA contain lots of useful info that will help to get you started. @@ -1418,7 +1490,9 @@ CLASS="SECT1" >


Step 1: Building the Binaries

1.2. Step 1: Building the Binaries

To do this, first run the program


Step 2: The all important step

1.3. Step 2: The all important step

At this stage you must fetch yourself a coffee or other drink you find stimulating. Getting the rest @@ -1530,7 +1606,9 @@ CLASS="SECT1" >


Step 3: Create the smb configuration file.

1.4. Step 3: Create the smb configuration file.

There are sample configuration files in the examples subdirectory in the distribution. I suggest you read them @@ -1540,12 +1618,6 @@ NAME="AEN60">Step 3: Create the smb configuration file.The simplest useful configuration file would be something like this:

	[global]
@@ -1555,9 +1627,6 @@ CLASS="PROGRAMLISTING"
 	      guest ok = no
 	      read only = no
 	

which would allow connections by anyone with an @@ -1593,7 +1662,9 @@ CLASS="SECT1" >


Step 4: Test your config file with +NAME="AEN74" +>1.5. Step 4: Test your config file with testparm

Step 5: Starting the smbd and nmbd

1.6. Step 5: Starting the smbd and nmbd

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


Step 5a: Starting from inetd.conf

1.6.1. Step 5a: Starting from inetd.conf

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

and add two lines something like this:

		netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd 
 		netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd 
 		

The exact syntax of


Step 5b. Alternative: starting it as a daemon

1.6.2. 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 @@ -1773,21 +1841,12 @@ CLASS="FILENAME" >startsmb.

		#!/bin/sh
 		/usr/local/samba/bin/smbd -D 
 		/usr/local/samba/bin/nmbd -D 
 		

then make it executable with


Step 6: Try listing the shares available on your +NAME="AEN135" +>1.7. Step 6: Try listing the shares available on your server


Step 7: Try connecting with the unix client

1.8. Step 7: Try connecting with the unix client


Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, +NAME="AEN160" +>1.9. Step 8: Try connecting from a DOS, WfWg, Win9x, WinNT, Win2k, OS/2, etc... client

Try mounting disks. eg:


What If Things Don't Work?

1.10. 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 @@ -1996,7 +2063,9 @@ CLASS="SECT2" >


Diagnosing Problems

1.10.1. Diagnosing Problems

If you have installation problems then go to


Scope IDs

1.10.2. Scope IDs

By default Samba uses a blank scope ID. This means all your windows boxes must also have a blank scope ID. @@ -2024,7 +2095,9 @@ CLASS="SECT2" >


Choosing the Protocol Level

1.10.3. Choosing the Protocol Level

The SMB protocol has many dialects. Currently Samba supports 5, called CORE, COREPLUS, LANMAN1, @@ -2063,7 +2136,9 @@ CLASS="SECT2" >


Printing from UNIX to a Client PC

1.10.4. Printing from UNIX to a Client PC

To use a printer that is available via a smb-based server from a unix host with LPR you will need to compile the @@ -2082,7 +2157,9 @@ CLASS="SECT2" >


Locking

1.10.5. Locking

One area which sometimes causes trouble is locking.


Mapping Usernames

1.10.6. Mapping Usernames

If you have different usernames on the PCs and the unix server then take a look at the "username map" option. @@ -2152,13 +2231,17 @@ NAME="AEN209">Mapping Usernames


Diagnosing your samba server

Chapter 2. Diagnosing your samba server

Introduction

2.1. 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 @@ -2178,7 +2261,9 @@ CLASS="SECT1" >


Assumptions

2.2. 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 @@ -2192,21 +2277,12 @@ microsoft tcp/ip stack. Alternatively, your PC may be running Windows smb.conf. I will assume this share is called "tmp". You can add a "tmp" share like by adding the following to smb.conf:


[tmp]
  comment = temporary files 
  path = /tmp
  read only = yes

THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME @@ -2226,13 +2302,17 @@ CLASS="SECT1" >


Tests

2.3. Tests

Test 1

2.3.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 @@ -2252,7 +2332,9 @@ CLASS="SECT2" >


Test 2

2.3.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 @@ -2276,7 +2358,9 @@ CLASS="SECT2" >


Test 3

2.3.3. Test 3

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

	hosts deny = ALL
 	hosts allow = xxx.xxx.xxx.xxx/yy
 	bind interfaces only = Yes

In the above, no allowance has been made for any session requests that will automatically translate to the loopback adaptor address 127.0.0.1. To solve this problem change these lines to:

	hosts deny = ALL
 	hosts allow = xxx.xxx.xxx.xxx/yy 127.

Do NOT use the "bind interfaces only" parameter where you may wish to @@ -2363,7 +2429,9 @@ CLASS="SECT2" >


Test 4

2.3.4. Test 4

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


Test 5

2.3.5. Test 5

run the command


Test 6

2.3.6. Test 6

Run the command


Test 7

2.3.7. Test 7

Run the command . You should then be prompted for a password. You should use the password of the account you are logged into the unix box with. If you want to test with -another account then add the -U >accountname< option to the end of +another account then add the -U >accountname< option to the end of the command line. eg: etc. Type help >command<help >command< for instructions. You should especially check that the amount of free disk space shown is correct when you type


Test 8

2.3.8. Test 8

On the PC type the command


Test 9

2.3.9. Test 9

Run the command

It might also be the case that your client only sends encrypted passwords +and you have encrypt passwords = no in smb.conf. +Turn it back on to fix.


Test 10

2.3.10. Test 10

Run the command


Test 11

2.3.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 @@ -2650,7 +2742,9 @@ CLASS="SECT1" >


Still having troubles?

2.4. 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 @@ -2674,13 +2768,17 @@ TARGET="_top" CLASS="CHAPTER" >


Integrating MS Windows networks with Samba

Chapter 3. Integrating MS Windows networks with Samba

Agenda

3.1. Agenda

To identify the key functional mechanisms of MS Windows networking to enable the deployment of Samba as a means of extending and/or @@ -2745,7 +2843,9 @@ CLASS="SECT1" >


Name Resolution in a pure Unix/Linux world

3.2. 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:

	127.0.0.1	localhost localhost.localdomain
 	192.168.1.1	bigbox.caldera.com	bigbox	alias4box

The purpose of


3.2.2. /etc/resolv.conf


3.2.3. /etc/host.conf

	order hosts,bind
 	multi on

then both addresses should be returned. Please refer to the @@ -2945,7 +3033,9 @@ CLASS="SECT2" >


3.2.4. /etc/nsswitch.conf

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

	# /etc/nsswitch.conf
@@ -2981,9 +3065,6 @@ CLASS="PROGRAMLISTING"
 	protocols:	nis files
 	rpc:		nis files
 	services:	nis files

Of course, each of these mechanisms requires that the appropriate @@ -3021,7 +3102,9 @@ CLASS="SECT1" >


Name resolution as used within MS Windows networking

3.3. 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 @@ -3038,12 +3121,6 @@ the client/server.

The following are typical NetBIOS name/service type registrations:

	Unique NetBIOS Names:
@@ -3057,9 +3134,6 @@ CLASS="PROGRAMLISTING"
 		WORKGROUP<1c> = Domain Controllers / Netlogon Servers
 		WORKGROUP<1d> = Local Master Browsers
 		WORKGROUP<1e> = Internet Name Resolvers

It should be noted that all NetBIOS machines register their own @@ -3113,7 +3187,9 @@ CLASS="SECT2" >


The NetBIOS Name Cache

3.3.1. 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 @@ -3138,7 +3214,9 @@ CLASS="SECT2" >


The LMHOSTS file

3.3.2. The LMHOSTS file

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

It typically looks like:

	# Copyright (c) 1998 Microsoft Corp.
@@ -3179,8 +3251,8 @@ CLASS="PROGRAMLISTING"
 	# files and offers the following extensions:
 	#
 	#      #PRE
-	#      #DOM:<domain>
-	#      #INCLUDE <filename>
+	#      #DOM:<domain>
+	#      #INCLUDE <filename>
 	#      #BEGIN_ALTERNATE
 	#      #END_ALTERNATE
 	#      \0xnn (non-printing character support)
@@ -3189,16 +3261,16 @@ CLASS="PROGRAMLISTING"
 	# 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 affects how the
+	# Following an entry with the "#DOM:<domain>" tag will associate the
+	# entry with the domain specified by <domain>. This affects how the
 	# browser and logon services behave in TCP/IP environments. To preload
 	# the host name associated with #DOM entry, it is necessary to also add a
-	# #PRE to the line. The <domain> is always preloaded although it will not
+	# #PRE to the line. The <domain> is always preloaded although it will not
 	# be shown when the name cache is viewed.
 	#
-	# Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT)
-	# software to seek the specified <filename> and parse it as if it were
-	# local. <filename> is generally a UNC-based name, allowing a
+	# Specifying "#INCLUDE <filename>" will force the RFC NetBIOS (NBT)
+	# software to seek the specified <filename> and parse it as if it were
+	# local. <filename> is generally a UNC-based name, allowing a
 	# centralized lmhosts file to be maintained on a server.
 	# It is ALWAYS necessary to provide a mapping for the IP address of the
 	# server prior to the #INCLUDE. This mapping must use the #PRE directive.
@@ -3238,9 +3310,6 @@ CLASS="PROGRAMLISTING"
 	# so keeping the number of comments to a minimum will improve performance.
 	# Therefore it is not advisable to simply add lmhosts file entries onto the
 	# end of this file.


HOSTS file

3.3.3. HOSTS file

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


DNS Lookup

3.3.4. DNS Lookup

This capability is configured in the TCP/IP setup area in the network configuration facility. If enabled an elaborate name resolution sequence @@ -3286,7 +3359,9 @@ CLASS="SECT2" >


WINS Lookup

3.3.5. 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 @@ -3299,36 +3374,18 @@ CLASS="FILENAME" >smb.conf file:

	wins support = Yes

To configure Samba to use a WINS server the following parameters are needed in the smb.conf file:

	wins support = No
 	wins server = xxx.xxx.xxx.xxx

where


How browsing functions and how to deploy stable and +NAME="AEN495" +>3.4. How browsing functions and how to deploy stable and dependable browsing using Samba

As stated above, MS Windows machines register their NetBIOS names @@ -3410,7 +3469,9 @@ CLASS="SECT1" >


MS Windows security options and how to configure +NAME="AEN505" +>3.5. MS Windows security options and how to configure Samba for seemless integration

MS Windows clients may use encrypted passwords as part of a @@ -3474,12 +3535,6 @@ issue of Windows 9x client upper casing usernames and password before transmitting them to the SMB server when using clear text authentication.

	integer

By default Samba will lower case the username before attempting @@ -3527,9 +3579,12 @@ CLASS="PARAMETER" >password level must be set to the maximum -number of upper case letter which could appear is a password. Note that is the server OS uses the traditional DES version of crypt(), then a


Use MS Windows NT as an authentication server

3.5.1. Use MS Windows NT as an authentication server

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

	encrypt passwords = Yes
 	security = server
 	password server = "NetBIOS_name_of_PDC"

There are two ways of identifying whether or not a username and @@ -3594,25 +3642,18 @@ CLASS="SECT2" >


Make Samba a member of an MS Windows NT security domain

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

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

	encrypt passwords = Yes
 	security = domain
 	workgroup = "name of NT domain"
 	password server = *

The use of the "*" argument to "password server" will cause samba @@ -3664,7 +3705,9 @@ CLASS="SECT2" >


Configure Samba as an authentication server

3.5.3. 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 @@ -3675,12 +3718,6 @@ used for SMB client authentication.

This method involves addition of the following parameters to the smb.conf file:

## please refer to the Samba PDC HOWTO chapter later in 
@@ -3695,9 +3732,6 @@ CLASS="PROGRAMLISTING"
 [NETLOGON]
 	path = /somewhare/in/file/system
 	read only = yes

in order for this method to work a Unix system account needs @@ -3708,29 +3742,22 @@ CLASS="SECT3" >


Users

3.5.3.1. Users

A user account that may provide a home directory should be created. The following Linux system commands are typical of the procedure for creating an account.

	# useradd -s /bin/bash -d /home/"userid" -m "userid"
 	# passwd "userid"
-	  Enter Password: <pw>
+	  Enter Password: <pw>
 	  
 	# smbpasswd -a "userid"
-	  Enter Password: <pw>


MS Windows NT Machine Accounts

3.5.3.2. 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.

	# useradd -s /bin/false -d /dev/null "machine_name"\$
 	# passwd -l "machine_name"\$
 	# smbpasswd -a -m "machine_name"


Conclusions

3.6. Conclusions

Samba provides a flexible means to operate as...

Conclusions


Configuring PAM for distributed but centrally +NAME="PAM" +>Chapter 4. Configuring PAM for distributed but centrally managed authentication

Samba and PAM

4.1. Samba and PAM

A number of Unix systems (eg: Sun Solaris), as well as the xxxxBSD family and Linux, now utilize the Pluggable Authentication @@ -3855,12 +3881,6 @@ CLASS="FILENAME" >pam_pwdb.so.

#%PAM-1.0
@@ -3877,20 +3897,11 @@ session		required	pam_pwdb.so
 # session 	optional	pam_lastlog.so
 # password   	required   	pam_cracklib.so retry=3
 password	required	pam_pwdb.so shadow md5

PAM allows use of replacable modules. Those available on a sample system include:

$ /bin/ls /lib/security
@@ -3906,9 +3917,6 @@ pam_env.so       pam_ldap.so         pam_motd.so
 pam_radius.so    pam_smbpass.so      pam_unix_acct.so  
 pam_wheel.so     pam_unix_auth.so    pam_unix_passwd.so
 pam_userdb.so    pam_warn.so         pam_unix_session.so

The following example for the login program replaces the use of @@ -3969,12 +3977,6 @@ CLASS="FILENAME" > directory of the Samba source distribution.

#%PAM-1.0
@@ -3984,9 +3986,6 @@ auth		required	pam_smbpass.so nodelay
 account		required	pam_smbpass.so nodelay
 session		required	pam_smbpass.so nodelay
 password	required	pam_smbpass.so nodelay

The following is the PAM configuration file for a particular @@ -3995,12 +3994,6 @@ CLASS="FILENAME" >pam_pwdb.so.

#%PAM-1.0
@@ -4010,9 +4003,6 @@ auth       required     /lib/security/pam_pwdb.so nullok nodelay shadow audit
 account    required     /lib/security/pam_pwdb.so audit nodelay
 session    required     /lib/security/pam_pwdb.so nodelay
 password   required     /lib/security/pam_pwdb.so shadow md5

In the following example the decision has been made to use the @@ -4021,12 +4011,6 @@ decision could also be made for the passwd program and would thus allow the smbpasswd passwords to be changed using the passwd program.

#%PAM-1.0
@@ -4036,9 +4020,6 @@ auth       required     /lib/security/pam_smbpass.so nodelay
 account    required     /lib/security/pam_pwdb.so audit nodelay
 session    required     /lib/security/pam_pwdb.so nodelay
 password   required     /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf

Note: PAM allows stacking of authentication mechanisms. It is @@ -4064,7 +4045,9 @@ CLASS="SECT1" >


Distributed Authentication

4.2. Distributed Authentication

The astute administrator will realize from this that the combination of


PAM Configuration in smb.conf

4.3. PAM Configuration in smb.conf

There is an option in smb.conf called


Hosting a Microsoft Distributed File System tree on Samba

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

Instructions

5.1. Instructions

The Distributed File System (or Dfs) provides a means of separating the logical view of files and directories that users @@ -4190,7 +4179,7 @@ CLASS="PARAMETER" to other servers. For example, a symbolic link junction->msdfs:storage1\share1junction->msdfs:storage1\share1 in the share directory acts as the Dfs junction. When Dfs-aware clients attempt to access the junction link, they are redirected @@ -4202,12 +4191,6 @@ CLASS="FILENAME" >Here's an example of setting up a Dfs tree on a Samba server.

# The smb.conf file:
@@ -4219,9 +4202,6 @@ CLASS="PROGRAMLISTING"
 	path = /export/dfsroot
 	msdfs root = yes
 	

In the /export/dfsroot directory we set up our dfs links to @@ -4294,7 +4274,9 @@ CLASS="SECT2" >


Notes

5.1.1. Notes

    Notes

    UNIX Permission Bits and Windows NT Access Control Lists

    Chapter 6. UNIX Permission Bits and Windows NT Access Control Lists

    Viewing and changing UNIX permissions using the NT +NAME="AEN722" +>6.1. Viewing and changing UNIX permissions using the NT security dialogs

    New in the Samba 2.0.4 release is the ability for Windows @@ -4368,35 +4354,55 @@ CLASS="SECT1" >


    How to view file security on a Samba share

    6.2. How to view file security on a Samba share

    From an NT 4.0 client, single-click with the right mouse button on any file or directory in a Samba mounted drive letter or UNC path. When the menu pops-up, click - on the Properties entry at the bottom of the menu. This brings up the normal file properties dialog box, but with Samba 2.0.4 this will have a new tab along the top - marked Security. Click on this tab and you - will see three buttons, Permissions, - Auditing, and , and Ownership. - The Auditing button will cause either an error message


    Viewing file ownership

    6.3. Viewing file ownership

    Clicking on the root user. As clicking on this button causes NT to attempt to change the ownership of a file to the current user logged into the NT @@ -4492,10 +4503,13 @@ CLASS="EMPHASIS" and allow a user with Administrator privilege connected to a Samba 2.0.4 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, available from the main Samba ftp site.


    Viewing file or directory permissions

    6.4. Viewing file or directory permissions

    The third button is the


    File Permissions

    6.4.1. File Permissions

    The standard UNIX user/group/world triple and the corresponding "read", "write", "execute" permissions @@ -4624,7 +4642,9 @@ CLASS="SECT2" >


    Directory Permissions

    6.4.2. Directory Permissions

    Directories on an NT NTFS file system have two different sets of permissions. The first set of permissions @@ -4654,7 +4674,9 @@ CLASS="SECT1" >


    Modifying file or directory permissions

    6.5. Modifying file or directory permissions

    Modifying file and directory permissions is as simple as changing the displayed permissions in the dialog box, and @@ -4750,7 +4772,9 @@ CLASS="SECT1" >


    Interaction with the standard Samba create mask +NAME="AEN820" +>6.6. Interaction with the standard Samba create mask parameters

    Note that with Samba 2.0.5 there are four new parameters @@ -4810,9 +4834,12 @@ CLASS="PARAMETER" >security mask - mask 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.


    Interaction with the standard Samba file attribute +NAME="AEN884" +>6.7. Interaction with the standard Samba file attribute mapping

    Samba maps some of the DOS attribute bits (such as "read @@ -5067,13 +5096,17 @@ CLASS="COMMAND" CLASS="CHAPTER" >


    Printing Support in Samba 2.2.x

    Chapter 7. Printing Support in Samba 2.2.x

    Introduction

    7.1. Introduction

    Beginning with the 2.2.0 release, Samba supports the native Windows NT printing mechanisms implemented via @@ -5139,10 +5172,13 @@ As a side note, Samba does not use these drivers in any way to process spooled files. They are utilized entirely by the clients.

    The following MS KB article, may be of some help if you are dealing with -Windows 2000 clients: How to Add Printers with No User Interaction in Windows 2000


    Configuration

    7.2. Configuration

    Warning


    Creating [print$]

    7.2.1. Creating [print$]

    In order to support the uploading of printer driver files, you must first configure a file share named [print$]. @@ -5249,12 +5289,6 @@ following file share (of course, some of the parameter values, such as 'path' are arbitrary and should be replaced with appropriate values for your site):

    [global]
    @@ -5274,9 +5308,6 @@ CLASS="PROGRAMLISTING"
         ; is setup to a non-root account, then it should also exist
         ; as a 'printer admin'
         write list = @ntadmin,root

    The NoteNext create the directory tree below the [print$] share for each architecture you wish to support.

    [print$]-----
    @@ -5384,9 +5409,6 @@ CLASS="PROGRAMLISTING"
             |-W32ALPHA         ; "Windows NT Alpha_AXP"
             |-W32MIPS          ; "Windows NT R4000"
             |-W32PPC           ; "Windows NT PowerPC"

    Warning

    Setting Drivers for Existing Printers

    7.2.2. Setting Drivers for Existing Printers

    The initial listing of printers in the Samba host's Printers folder will have no real printer driver assigned to them. By default, in Samba 2.2.0 this driver name was set to -NO PRINTER DRIVER AVAILABLE FOR THIS PRINTER. Later versions changed this to a NULL string to allow the use tof the local Add Printer Wizard on NT/2000 clients. @@ -5488,12 +5515,15 @@ Attempting to view the printer properties for a printer which has this default driver assigned will result in the 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?

    Click "No" in the error dialog and you will be presented with @@ -5545,7 +5575,9 @@ CLASS="SECT2" >


    Support a large number of printers

    7.2.3. Support a large number of printers

    One issue that has arisen during the development phase of Samba 2.2 is the need to support driver downloads for @@ -5563,12 +5595,6 @@ setdriver command

     
    @@ -5604,13 +5630,10 @@ CLASS="PROMPT"
     >rpcclient pogo -U root%secret \
     > >  -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""
     Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
     Successfully set hp-print to driver HP LaserJet 4000 Series PS.


    Adding New Printers via the Windows NT APW

    7.2.4. Adding New Printers via the Windows NT APW

    By default, Samba offers all printer shares defined in /etc/printcap.local (change that to what you need) and returns a line of 'Done' which is needed for the whole process to work.

    #!/bin/sh
    @@ -5785,16 +5804,15 @@ touch /usr/local/samba/lib/smb.conf
     #
     echo "Done"
     exit 0

    Samba and Printer Ports

    7.2.5. Samba and Printer Ports

    Windows NT/2000 print servers associate a port with each printer. These normally take the form of LPT1:, COM1:, FILE:, etc... Samba must also support the @@ -5829,7 +5847,9 @@ CLASS="SECT1" >


    The Imprints Toolset

    7.3. The Imprints Toolset

    The Imprints tool set provides a UNIX equivalent of the Windows NT Add Printer Wizard. For complete information, please @@ -5845,7 +5865,9 @@ CLASS="SECT2" >


    What is Imprints?

    7.3.1. What is Imprints?

    Imprints is a collection of tools for supporting the goals of


    Creating Printer Driver Packages

    7.3.2. Creating Printer Driver Packages

    The process of creating printer driver packages is beyond the scope of this document (refer to Imprints.txt also included @@ -5889,7 +5913,9 @@ CLASS="SECT2" >


    The Imprints server

    7.3.3. The Imprints server

    The Imprints server is really a database server that may be queried via standard HTTP mechanisms. Each printer @@ -5897,9 +5923,12 @@ NAME="AEN1053">The Imprints servernot recommended that this security check be disabled.


    The Installation Client

    7.3.4. The Installation Client

    More information regarding the Imprints installation client is available in the rpcclient.

    	
    @@ -5967,9 +5992,6 @@ foreach (supported architecture for a given driver)
     	
     4.  rpcclient: Issue an AddPrinterEx() MS-RPC to actually
         create the printer

    One of the problems encountered when implementing @@ -6009,7 +6031,9 @@ CLASS="SECT1" >


    7.4. Migration to from Samba 2.0.x to 2.2.x

    Warning

    Debugging Printing Problems

    Chapter 8. Debugging Printing Problems

    Introduction

    8.1. Introduction

    This is a short description of how to debug printing problems with Samba. This describes how to debug problems with printing from a SMB @@ -6199,12 +6227,6 @@ you use is up to you.

          [global]
    @@ -6213,36 +6235,18 @@ CLASS="PROGRAMLISTING"
             lprm command      - remove a job
           [printers]
             path = /var/spool/lpd/samba

    The following are nice to know about:

            queuepause command   - stop a printer or print queue
             queueresume command  - start a printer or print queue

    Example:

            print command = /usr/bin/lpr -r -P%p %s
    @@ -6250,9 +6254,6 @@ CLASS="PROGRAMLISTING"
             lprm command  = /usr/bin/lprm   -P%p %j
             queuepause command = /usr/sbin/lpc -P%p stop
             queuepause command = /usr/sbin/lpc -P%p start

    Samba should set reasonable defaults for these depending on your @@ -6270,7 +6271,7 @@ and it should be periodically cleaned out. Samba used the lpq command to determine the "job number" assigned to your print job by the spooler.

    The %>letter< are "macros" that get dynamically replaced with appropriate +>The %>letter< are "macros" that get dynamically replaced with appropriate values when they are used. The %s gets replaced with the name of the spool file that Samba creates and the %p gets replaced with the name of the printer. The %j gets replaced with the "job number" which comes from @@ -6281,19 +6282,15 @@ CLASS="SECT1" >


    Debugging printer problems

    8.2. Debugging printer problems

    One way to debug printing problems is to start by replacing these command with shell scripts that record the arguments and the contents of the print file. A simple example of this kind of things might be:

    	print command = /tmp/saveprint %p %s
    @@ -6304,21 +6301,12 @@ CLASS="PROGRAMLISTING"
         # we run the command and save the error messages
         # replace the command with the one appropriate for your system
         /usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print

    Then you print a file and try removing it. You may find that the print queue needs to be stopped in order to see the queue status and remove the job:

    
h4: {42} % echo hi >/tmp/hi
    @@ -6336,9 +6324,6 @@ smb: \> cancel 1049
     Job 1049 cancelled
     smb: \> queue
     smb: \> exit

    The 'code 0' indicates that the job was removed. The comment @@ -6354,44 +6339,28 @@ CLASS="SECT1" >


    What printers do I have?

    8.3. What printers do I have?

    You can use the 'testprns' program to check to see if the printer name you are using is recognized by Samba. For example, you can use:

        testprns printer /etc/printcap

    Samba can get its printcap information from a file or from a program. You can try the following to see the format of the extracted information:

        testprns -a printer /etc/printcap
     
         testprns -a printer '|/bin/cat printcap'


    Setting up printcap and print servers

    8.4. Setting up printcap and print servers

    You may need to set up some printcaps for your Samba system to use. It is strongly recommended that you use the facilities provided by @@ -6408,18 +6379,9 @@ the print spooler to set up queues and printcap information.

    Samba requires either a printcap or program to deliver printcap information. This printcap information has the format:

      name|alias1|alias2...:option=value:...

    For almost all printing systems, the printer 'name' must be composed @@ -6490,7 +6452,9 @@ CLASS="SECT1" >


    Job sent, no output

    8.5. Job sent, no output

    This is the most frustrating part of printing. You may have sent the job, verified that the job was forwarded, set up a wrapper around @@ -6501,18 +6465,9 @@ right print queue. If you are using a BSD or LPRng print spooler, you can temporarily stop the printing of jobs. Jobs can still be submitted, but they will not be printed. Use:

      lpc -Pprinter stop

    Now submit a print job and then use 'lpq -Pprinter' to see if the @@ -6526,20 +6481,11 @@ are not in what you would expect to call a printable format. You can use the UNIX 'file' utitily to determine what the job format actually is:

        cd /var/spool/lpd/printer   # spool directory of print jobs
         ls                          # find job files
         file dfA001myhost

    You should make sure that your printer supports this format OR that @@ -6551,7 +6497,9 @@ CLASS="SECT1" >


    Job sent, strange output

    8.6. Job sent, strange output

    Once you have the job printing, you can then start worrying about making it print nicely.

       printer: ... :sh

    If you have this option and are still getting banner pages, there @@ -6589,18 +6528,9 @@ with your job format, or if you are generating PostScript jobs, incorrect setting on your printer driver on the MicroSoft client. For example, under Win95 there is a option:

      Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|

    that allows you to choose if a Ctrl-D is appended to all jobs. @@ -6613,7 +6543,9 @@ CLASS="SECT1" >


    Raw PostScript printed

    8.7. Raw PostScript printed

    This is a problem that is usually caused by either the print spooling system putting information at the start of the print job that makes @@ -6626,7 +6558,9 @@ CLASS="SECT1" >


    Advanced Printing

    8.8. Advanced Printing

    Note that you can do some pretty magic things by using your imagination with the "print command" option and some shell scripts. @@ -6640,7 +6574,9 @@ CLASS="SECT1" >


    Real debugging

    8.9. Real debugging

    If the above debug tips don't help, then maybe you need to bring in the bug guns, system tracing. See Tracing.txt in this directory.


    Security levels

    Chapter 9. Security levels

    Introduction

    9.1. Introduction

    Samba supports the following options to the global smb.conf parameter

    [global]
    @@ -6679,9 +6613,6 @@ CLASS="PARAMETER"
     > = [share|user(default)|domain|ads]

    Please refer to the smb.conf man page for usage information and to the document @@ -6709,7 +6640,9 @@ CLASS="SECT1" >


    More complete description of security levels

    9.2. More complete description of security levels

    A SMB server tells the client at startup what "security level" it is running. There are two options "share level" and "user level". Which @@ -6801,13 +6734,17 @@ schemes by which the two could be kept in sync.


    security = domain in Samba 2.x

    Chapter 10. security = domain in Samba 2.x

    Joining an NT Domain with Samba 2.2

    10.1. Joining an NT Domain with Samba 2.2

    Assume you have a Samba 2.x server with a NetBIOS name of <NT DOMAIN NAME><NT DOMAIN NAME>.<Samba - Server Name><Samba + Server Name>.mac


    Samba and Windows 2000 Domains

    10.2. Samba and Windows 2000 Domains

    Many people have asked regarding the state of Samba's ability to participate in a Windows 2000 Domain. Samba 2.2 is able to act as a member server of a Windows @@ -7059,7 +6998,9 @@ CLASS="SECT1" >


    Why is this better than security = server?

    10.3. Why is this better than security = server?

    Currently, domain security in Samba doesn't free you from having to create local Unix users to represent the users attaching @@ -7123,9 +7064,12 @@ CLASS="COMMAND" user is authenticated, making a Samba server truly plug and play in an NT domain environment. Watch for this code soon.

    NOTE: Much of the text of this document was first published in the Web magazine


    Unified Logons between Windows NT and UNIX using Winbind

    Chapter 11. Unified Logons between Windows NT and UNIX using Winbind

    Abstract

    11.1. Abstract

    Integration of UNIX and Microsoft Windows NT through a unified logon has been considered a "holy grail" in heterogeneous computing environments for a long time. We present - winbind, a component of the Samba suite of programs as a solution to the unified logon problem. Winbind uses a UNIX implementation @@ -7172,7 +7123,9 @@ CLASS="SECT1" >


    Introduction

    11.2. Introduction

    It is well known that UNIX and Microsoft Windows NT have different models for representing user and group information and @@ -7224,7 +7177,9 @@ CLASS="SECT1" >


    What Winbind Provides

    11.3. What Winbind Provides

    Winbind unifies UNIX and Windows NT account management by allowing a UNIX box to become a full member of a NT domain. Once @@ -7264,7 +7219,9 @@ CLASS="SECT2" >


    Target Uses

    11.3.1. Target Uses

    Winbind is targeted at organizations that have an existing NT based domain infrastructure into which they wish @@ -7286,7 +7243,9 @@ CLASS="SECT1" >


    How Winbind Works

    11.4. How Winbind Works

    The winbind system is designed around a client/server architecture. A long running


    Microsoft Remote Procedure Calls

    11.4.1. Microsoft Remote Procedure Calls

    Over the last two years, efforts have been underway by various Samba Team members to decode various aspects of @@ -7328,7 +7289,9 @@ CLASS="SECT2" >


    Name Service Switch

    11.4.2. Name Service Switch

    The Name Service Switch, or NSS, is a feature that is present in many UNIX operating systems. It allows system @@ -7406,7 +7369,9 @@ CLASS="SECT2" >


    Pluggable Authentication Modules

    11.4.3. Pluggable Authentication Modules

    Pluggable Authentication Modules, also known as PAM, is a system for abstracting authentication and authorization @@ -7453,7 +7418,9 @@ CLASS="SECT2" >


    User and Group ID Allocation

    11.4.4. User and Group ID Allocation

    When a user or group is created under Windows NT is it allocated a numerical relative identifier (RID). This is @@ -7477,7 +7444,9 @@ CLASS="SECT2" >


    Result Caching

    11.4.5. Result Caching

    An active system can generate a lot of user and group name lookups. To reduce the network cost of these lookups winbind @@ -7498,7 +7467,9 @@ CLASS="SECT1" >


    Installation and Configuration

    11.5. Installation and Configuration

    Many thanks to John Trostel


    Introduction

    11.5.1. Introduction

    This HOWTO describes the procedures used to get winbind up and running on my RedHat 7.1 system. Winbind is capable of providing access @@ -7539,9 +7512,12 @@ somewhat to fit the way your distribution works.

    • Why should I to this?

    • Who should be reading this document?


      Requirements

      11.5.2. Requirements

      If you have a samba configuration file that you are currently -using... BACK IT UP! If your system already uses PAM, -back up the /etc/pam.d directory contents! If you haven't already made a boot disk, -MAKE ONE NOW!

      Messing with the pam configuration files can make it nearly impossible @@ -7633,7 +7623,9 @@ CLASS="SECT2" >


      Testing Things Out

      11.5.3. Testing Things Out

      Before starting, it is probably best to kill off all the SAMBA related daemons running on your server. Kill off all


      Configure and compile SAMBA

      11.5.3.1. Configure and compile SAMBA

      The configuration and compilation of SAMBA is pretty straightforward. The first three steps may not be necessary depending upon whether or not you have previously built the Samba binaries.

      make install

      This will, by default, install SAMBA in


      Configure 11.5.3.2. Configure nsswitch.conf and the @@ -7817,20 +7804,11 @@ CLASS="FILENAME" > file look like this after editing:

      	passwd:     files winbind
       	shadow:     files 
       	group:      files winbind

      @@ -7861,7 +7839,9 @@ CLASS="SECT3" >


      Configure smb.conf

      11.5.3.3. Configure smb.conf

      Several parameters are needed in the smb.conf file to control the behavior of file was modified to include the following entries in the [global] section:

      [global]
      @@ -7933,9 +7907,6 @@ HREF="winbindd.8.html#TEMPLATESHELL"
       TARGET="_top"
       >template shell = /bin/bash


    Join the SAMBA server to the PDC domain

    11.5.3.4. Join the SAMBA server to the PDC domain

    Enter the following command to make the SAMBA server join the PDC domain, where


    Start up the winbindd daemon and test it!

    11.5.3.5. Start up the winbindd daemon and test it!

    Eventually, you will want to modify your smb startup script to automatically invoke the winbindd daemon when the other parts of @@ -8033,12 +8008,6 @@ CLASS="COMMAND" This should echo back a list of users on your Windows users on your PDC. For example, I get the following response:

    CEO+Administrator
    @@ -8047,9 +8016,6 @@ CEO+Guest
     CEO+jt-ad
     CEO+krbtgt
     CEO+TsInternetUser

    Obviously, I have named my domain 'CEO' and my You can do the same sort of thing to get group information from the PDC:

    The function 'getent' can now be used to get unified @@ -8126,13 +8083,17 @@ CLASS="SECT3" >


    Fix the init.d startup scripts

    11.5.3.6. Fix the init.d startup scripts
    Linux
    11.5.3.6.1. Linux

    The directory directly. The 'start' function in the script looks like this:

    start() {
    @@ -8199,20 +8154,11 @@ CLASS="PROGRAMLISTING"
                RETVAL=1
             return $RETVAL
     }

    The 'stop' function has a corresponding entry to shut down the services and look s like this:

    stop() {
    @@ -8234,9 +8180,6 @@ CLASS="PROGRAMLISTING"
             echo ""
             return $RETVAL
     }


    Solaris
    11.5.3.6.2. Solaris

    On solaris, you need to modify the , the file could contains something like this:

    ##
    @@ -8312,9 +8251,6 @@ echo Starting Winbind Daemon
        echo "Usage: /etc/init.d/samba.server { start | stop }"
        ;;
     esac


    Restarting
    11.5.3.6.3. Restarting

    If you restart the


    Configure Winbind and PAM

    11.5.3.7. Configure Winbind and PAM

    If you have made it this far, you know that winbindd and samba are working together. If you want to use winbind to provide authentication for other @@ -8400,7 +8340,9 @@ CLASS="SECT4" >


    Linux/FreeBSD-specific PAM configuration
    11.5.3.7.1. Linux/FreeBSD-specific PAM configuration

    The file does not need to be changed. I just left this fileas it was:

    auth    required        /lib/security/pam_stack.so service=system-auth
     account required        /lib/security/pam_stack.so service=system-auth

    The other services that I modified to allow the use of winbind @@ -8444,34 +8377,16 @@ CLASS="FILENAME" >/etc/xinetd.d/wu-ftp from

    enable = no

    to

    enable = yes

    @@ -8499,12 +8414,6 @@ CLASS="FILENAME" > file was changed to look like this:

    auth       required     /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
    @@ -8514,9 +8423,6 @@ auth       required     /lib/security/pam_shells.so
     account    sufficient   /lib/security/pam_winbind.so
     account    required     /lib/security/pam_stack.so service=system-auth
     session    required     /lib/security/pam_stack.so service=system-auth

    The file can be changed nearly the same way. It now looks like this:

    auth       required     /lib/security/pam_securetty.so
    @@ -8543,9 +8443,6 @@ account    required     /lib/security/pam_stack.so service=system-auth
     password   required     /lib/security/pam_stack.so service=system-auth
     session    required     /lib/security/pam_stack.so service=system-auth
     session    optional     /lib/security/pam_console.so

    In this case, I added the


    Solaris-specific configuration
    11.5.3.7.2. Solaris-specific configuration

    The /etc/pam.conf needs to be changed. I changed this file so that my Domain users can logon both locally as well as telnet.The following are the changes @@ -8580,12 +8479,6 @@ 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.

    #
    @@ -8647,9 +8540,6 @@ dtsession auth required	/usr/lib/security/$ISA/pam_unix.so.1
     #other	account optional /usr/lib/security/$ISA/pam_krb5.so.1
     #other	session optional /usr/lib/security/$ISA/pam_krb5.so.1
     #other	password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass

    I also added a try_first_pass line after the winbind.so line to get rid of @@ -8666,7 +8556,9 @@ CLASS="SECT1" >


    Limitations

    11.6. Limitations

    Winbind has a number of limitations in its current released version that we hope to overcome in future @@ -8705,7 +8597,9 @@ CLASS="SECT1" >


    Conclusion

    11.7. Conclusion

    The winbind system, through the use of the Name Service Switch, Pluggable Authentication Modules, and appropriate @@ -8719,13 +8613,17 @@ NAME="AEN1721">Conclusion


    How to Configure Samba 2.2 as a Primary Domain Controller

    Chapter 12. How to Configure Samba 2.2 as a Primary Domain Controller

    Prerequisite Reading

    12.1. Prerequisite Reading

    Before you continue reading in this chapter, please make sure that you are comfortable with configuring basic files services @@ -8751,7 +8649,9 @@ CLASS="SECT1" >


    Background

    12.2. Background

    Note

    Author's Note: This document is a combination of David Bannon's "Samba 2.2 PDC HOWTO" and "Samba NT Domain FAQ". Both documents are superseded by this one.


    Configuring the Samba Domain Controller

    12.3. Configuring the Samba Domain Controller

    The first step in creating a working Samba PDC is to understand the parameters necessary in smb.conf. I will not @@ -8916,12 +8821,6 @@ CLASS="FILENAME" >smb.conf for acting as a PDC:

    [global]
    @@ -9063,9 +8962,6 @@ HREF="smb.conf.5.html#DIRECTORYMASK"
     TARGET="_top"
     >directory mask = 0700

    There are a couple of points to emphasize in the above configuration.


    Creating Machine Trust Accounts and Joining Clients to the +NAME="AEN1832" +>12.4. Creating Machine Trust Accounts and Joining Clients to the Domain

    A machine trust account is a Samba account that is used to @@ -9189,7 +9087,9 @@ CLASS="SECT2" >


    Manual Creation of Machine Trust Accounts

    12.4.1. Manual Creation of Machine Trust Accounts

    The first step in manually creating a machine trust account is to manually create the corresponding Unix account in @@ -9247,12 +9147,6 @@ CLASS="FILENAME" >/etc/passwd entry like this:

    doppy$:x:505:501:machine_nickname:/dev/null:/bin/false

    Above, Warning


    "On-the-Fly" Creation of Machine Trust Accounts

    12.4.2. "On-the-Fly" Creation of Machine Trust Accounts

    The second (and recommended) way of creating machine trust accounts is simply to allow the Samba server to create them as needed when the client @@ -9389,20 +9282,11 @@ be created manually.

    Below is an example for a RedHat 6.2 Linux system.

    [global]
        # <...remainder of parameters...>
        add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u 


    Joining the Client to the Domain

    12.4.3. Joining the Client to the Domain

    The procedure for joining a client to the domain varies with the version of Windows.

    • Windows 2000

      When the user elects to join the client to a domain, Windows prompts for @@ -9444,9 +9333,12 @@ CLASS="FILENAME" >

    • Windows NT

      If the machine trust account was created manually, on the @@ -9470,7 +9362,9 @@ CLASS="SECT1" >


      Common Problems and Errors

      12.5. Common Problems and Errors

      Common Problems and Errors

      • I cannot include a '$' in a machine name.

      • I get told "You already have a connection to the Domain...." or "Cannot join domain, the credentials supplied conflict with an existing set.." when creating a machine trust account.

      • The system can not log you on (C000019B)....

      • The machine trust account for this computer either does not exist or is not accessible.

      • When I attempt to login to a Samba Domain from a NT4/W2K workstation, I get a message about my account being disabled.

        file as follows:

        	account required        pam_permit.so
         	

        If you want to remain backward compatibility to samba 2.0.x use @@ -9672,7 +9572,9 @@ CLASS="SECT1" >


        System Policies and Profiles

        12.6. System Policies and Profiles

        Much of the information necessary to implement System Policies and Roving User Profiles in a Samba domain is the same as that for @@ -9690,9 +9592,12 @@ Profiles and Policies in Windows NT 4.0

        • What about Windows NT Policy Editor?

          poledit.exe which - is included with NT Server but not NT Workstation. There is a Policy Editor on a NTws - but it is not suitable for creating Domain Policies. Further, although the Windows 95 Policy Editor can be installed on an NT Workstation/Server, it will not @@ -9752,9 +9663,12 @@ CLASS="COMMAND" >

        • Can Win95 do Policies?

        • How do I get 'User Manager' and 'Server Manager'


          What other help can I get?

          12.7. What other help can I get?

          There are many sources of information available in the form of mailing lists, RFC's and documentation. The docs that come @@ -9843,10 +9762,13 @@ general SMB topics such as browsing.

          • What are some diagnostics tools I can use to debug the domain logon process and where can I find them?

          • How do I install 'Network Monitor' on an NT Workstation or a Windows 9x box?

          • The The Development document on the Samba mirrors might mention your problem. If so, it might mean that the developers are working on it.

            • How do I get help from the mailing lists?

            • You might include You might include partial log files written at a debug level set to as much as 20. Please don't send the entire log but enough to give the context of the @@ -10194,9 +10128,12 @@ CLASS="EMPHASIS" >

            • How do I get off the mailing lists?


              Domain Control for Windows 9x/ME

              12.8. Domain Control for Windows 9x/ME

              Note

              The following section contains much of the original DOMAIN.txt file previously included with Samba. Much of -the material is based on what went into the book Special Edition, Using Samba, by Richard Sharpe.


              Configuration Instructions: Network Logons

              12.8.1. Configuration Instructions: Network Logons

              The main difference between a PDC and a Windows 9x logon server configuration is that

              Warning

              Configuration Instructions: Setting up Roaming User Profiles

              12.8.2. Configuration Instructions: Setting up Roaming User Profiles

              Warning

              NOTE! Roaming profiles support is different for Win9X and WinNT.


              Windows NT Configuration

              12.8.2.1. Windows NT Configuration

              To support WinNT clients, in the [global] section of smb.conf set the following (for example):

              logon path = \\profileserver\profileshare\profilepath\%U\moreprofilepath

              The default for this option is \\%N\%U\profile, namely @@ -10551,7 +10493,7 @@ WIDTH="25" ALIGN="CENTER" VALIGN="TOP" >Note


              Windows 9X Configuration

              12.8.2.2. Windows 9X Configuration

              To support Win9X clients, you must use the "logon home" parameter. Samba has now been fixed so that "net use/home" now works as well, and it, too, relies @@ -10582,18 +10526,9 @@ profiles in the user's home directory. But wait! There is a trick you can use. If you set the following in the [global] section of your smb.conf file:

              logon home = \\%L\%U\.profiles

              then your Win9X clients will dutifully put their clients in a subdirectory @@ -10609,24 +10544,17 @@ CLASS="SECT3" >


              Win9X and WinNT Configuration

              12.8.2.3. Win9X and WinNT Configuration

              You can support profiles for both Win9X and WinNT clients by setting both the "logon home" and "logon path" parameters. For example:

              logon home = \\%L\%U\.profiles
               logon path = \\%L\profiles\%U

              Note

              Windows 9X Profile Setup

              12.8.2.4. Windows 9X 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". @@ -10766,9 +10696,12 @@ TYPE="1" >

            • WARNING - before deleting the contents of the directory listed in the ProfilePath (this is likely to be c:\windows\profiles\username), @@ -10816,7 +10749,9 @@ CLASS="SECT3" >


              Windows NT Workstation 4.0

              12.8.2.5. Windows NT Workstation 4.0

              When a user first logs in to a Windows NT Workstation, the profile NTuser.DAT is created. The profile location can be now specified @@ -10835,7 +10770,7 @@ WIDTH="25" ALIGN="CENTER" VALIGN="TOP" >NoteNote


              Windows NT Server

              12.8.2.6. Windows NT Server

              There is nothing to stop you specifying any path that you like for the location of users' profiles. Therefore, you could specify that the @@ -10940,7 +10877,9 @@ CLASS="SECT3" >


              Sharing Profiles between W95 and NT Workstation 4.0

              12.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0

              WarningNote


              DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba

              12.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba

              Warning

              NOTE : The term "Domain Controller" and those related to it refer to one specific method of authentication that can underly an SMB domain. Domain Controllers @@ -11163,13 +11107,17 @@ within its registry.


              How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain

              Chapter 13. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain

              Prerequisite Reading

              13.1. Prerequisite Reading

              Before you continue reading in this chapter, please make sure that you are comfortable with configuring a Samba PDC @@ -11184,7 +11132,9 @@ CLASS="SECT1" >


              Background

              13.2. Background

              What is a Domain Controller? It is a machine that is able to answer logon requests from workstations in a Windows NT Domain. Whenever a @@ -11211,20 +11161,11 @@ current Windows Clients, including Windows 2000 and XP. This text assumes the domain to be named SAMBA. To be able to act as a PDC, some parameters in the [global]-section of the smb.conf have to be set:

              workgroup = SAMBA
               domain master = yes
               domain logons = yes

              Several other things like a [homes] and a [netlogon] share also may be @@ -11236,7 +11177,9 @@ CLASS="SECT1" >


              What qualifies a Domain Controller on the network?

              13.3. What qualifies a Domain Controller on the network?

              Every machine that is a Domain Controller for the domain SAMBA has to register the NetBIOS group name SAMBA#1c with the WINS server and/or @@ -11251,7 +11194,9 @@ CLASS="SECT2" >


              How does a Workstation find its domain controller?

              13.3.1. How does a Workstation find its domain controller?

              A NT workstation in the domain SAMBA that wants a local user to be authenticated has to find the domain controller for SAMBA. It does @@ -11268,7 +11213,9 @@ CLASS="SECT2" >


              When is the PDC needed?

              13.3.2. When is the PDC needed?

              Whenever a user wants to change his password, this has to be done on the PDC. To find the PDC, the workstation does a NetBIOS name query @@ -11282,7 +11229,9 @@ CLASS="SECT1" >


              Can Samba be a Backup Domain Controller?

              13.4. Can Samba be a Backup Domain Controller?

              With version 2.2, no. The native NT SAM replication protocols have not yet been fully implemented. The Samba Team is working on @@ -11299,7 +11248,9 @@ CLASS="SECT1" >


              How do I set up a Samba BDC?

              13.5. How do I set up a Samba BDC?

              Several things have to be done:

              Finally, the BDC has to be found by the workstations. This can be done by setting

              workgroup = samba
               domain master = no
               domain logons = yes

              in the [global]-section of the smb.conf of the BDC. This makes the BDC @@ -11373,7 +11315,9 @@ CLASS="SECT2" >


              How do I replicate the smbpasswd file?

              13.5.1. How do I replicate the smbpasswd file?

              Replication of the smbpasswd file is sensitive. It has to be done whenever changes to the SAM are made. Every user's password change is @@ -11393,13 +11337,17 @@ password.


              Storing Samba's User/Machine Account information in an LDAP Directory

              Chapter 14. Storing Samba's User/Machine Account information in an LDAP Directory

              Purpose

              14.1. Purpose

              This document describes how to use an LDAP directory for storing Samba user account information traditionally stored in the smbpasswd(5) file. It is @@ -11465,7 +11413,9 @@ CLASS="SECT1" >


              Introduction

              14.2. Introduction

              Traditionally, when configuring


              Supported LDAP Servers

              14.3. Supported LDAP Servers

              The LDAP samdb code in 2.2.3 has been developed and tested using the OpenLDAP 2.0 server and client libraries. The same code should be able to work with @@ -11603,7 +11555,9 @@ CLASS="SECT1" >


              Schema and Relationship to the RFC 2307 posixAccount

              14.4. Schema and Relationship to the RFC 2307 posixAccount

              Samba 2.2.3 includes the necessary schema file for OpenLDAP 2.0 in

              objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
              @@ -11628,9 +11576,6 @@ CLASS="PROGRAMLISTING"
                           logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $
                           displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
                           description $ userWorkstations $ primaryGroupID $ domain ))

              The samba.schema file has been formatted for OpenLDAP 2.0. The OID's are @@ -11669,13 +11614,17 @@ CLASS="SECT1" >


              Configuring Samba with LDAP

              14.5. Configuring Samba with LDAP

              OpenLDAP configuration

              14.5.1. OpenLDAP configuration

              To include support for the sambaAccount object in an OpenLDAP directory server, first copy the samba.schema file to slapd's configuration directory.

              samba.schema
              file.

              ## /etc/openldap/slapd.conf
              @@ -11731,21 +11674,12 @@ include            /etc/openldap/schema/samba.schema
               ## include         /etc/openldap/schema/nis.schema
               
               ....

              It is recommended that you maintain some indices on some of the most usefull attributes, like in the following example, to speed up searches made on sambaAccount objectclasses (and possibly posixAccount and posixGroup as well).

              # Indices to maintain
              @@ -11763,9 +11697,6 @@ index rid           eq
               ##index gidNumber     eq
               ##index cn            eq
               ##index memberUid     eq


              Configuring Samba

              14.5.2. Configuring Samba

              The following parameters are available in smb.conf only with

              ## /usr/local/samba/lib/smb.conf
              @@ -11888,10 +11815,7 @@ CLASS="REPLACEABLE"
                    ldap suffix = "ou=people,dc=samba,dc=org"
               
                    # generally the default ldap search filter is ok
              -     # ldap filter = "(&(uid=%u)(objectclass=sambaAccount))"


              Accounts and Groups management

              14.6. Accounts and Groups management

              As users accounts are managed thru the sambaAccount objectclass, you should modify you existing administration tools to deal with sambaAccount attributes.


              Security and sambaAccount

              14.7. Security and sambaAccount

              There are two important points to remember when discussing the security of sambaAccount entries in the directory.

              • Never retrieve the lmPassword or ntPassword attribute values over an unencrypted LDAP session.

              • Never allow non-admin users to view the lmPassword or ntPassword attribute values.

              • slapd.conf
                :

                ## allow the "ldap admin dn" access, but deny everyone else
                 access to attrs=lmPassword,ntPassword
                      by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write
                      by * none


              LDAP specials attributes for sambaAccounts

              14.8. LDAP specials attributes for sambaAccounts

              The sambaAccount objectclass is composed of the following attributes:


              Example LDIF Entries for a sambaAccount

              14.9. Example LDIF Entries for a sambaAccount

              The following is a working LDIF with the inclusion of the posixAccount objectclass:

              The following is an LDIF entry for using both the sambaAccount and +posixAccount objectclasses:

              dn: uid=gcarter, ou=people,dc=plainjoe,dc=org
              +logonTime: 0
              +displayName: Gerald Carter
              +lmPassword: 552902031BEDE9EFAAD3B435B51404EE
              +primaryGroupID: 1201
              +objectClass: posixAccount
              +objectClass: sambaAccount
              +acctFlags: [UX         ]
              +userPassword: {crypt}BpM2ej8Rkzogo
              +uid: gcarter
              +uidNumber: 9000
              +cn: Gerald Carter
              +loginShell: /bin/bash
              +logoffTime: 2147483647
              +gidNumber: 100
              +kickoffTime: 2147483647
              +pwdLastSet: 1010179230
              +rid: 19000
              +homeDirectory: /home/tashtego/gcarter
              +pwdCanChange: 0
              +pwdMustChange: 2147483647
              +ntPassword: 878D8014606CDA29677A44EFA1353FC7


              14.10. Comments

              Please mail all comments regarding this HOWTO to jerry@samba.org. This documents was +last updated to reflect the Samba 2.2.3 release.


              Chapter 15. Using samba 3.0 with ActiveDirectory support

              This is a VERY ROUGH guide to setting up the current (November 2001) +pre-alpha version of Samba 3.0 with kerberos authentication against a +Windows2000 KDC. The procedures listed here are likely to change as +the code develops.

              Pieces you need before you begin: +

              dn: uid=guest2, ou=people,dc=plainjoe,dc=org
              @@ -12238,75 +12161,357 @@ acctFlags: [UX         ]
               logoffTime: 2147483647
               rid: 19006
               pwdCanChange: 0
              a Windows 2000 server.
              samba 3.0 or higher.
              the MIT kerberos development libraries (either install from the above sources or use a package). The heimdal libraries will not work.
              the OpenLDAP development libraries.


              15.1. Installing the required packages for Debian

              On Debian you need to install the following packages: +

              libkrb5-dev
              krb5-user


              15.2. Installing the required packages for RedHat

              On RedHat this means you should have at least: +

              krb5-workstation (for kinit)
              krb5-libs (for linking with)
              krb5-devel (because you are compiling from source)

              in addition to the standard development environment.

              Note that these are not standard on a RedHat install, and you may need +to get them off CD2.


              15.3. Compile Samba

              If your kerberos libraries are in a non-standard location then + remember to add the configure option --with-krb5=DIR.

              After you run configure make sure that include/config.h contains + lines like this:

              #define HAVE_KRB5 1
              +#define HAVE_LDAP 1

              The following is an LDIF entry for using both the sambaAccount and -posixAccount objectclasses:

              If it doesn't then configure did not find your krb5 libraries or + your ldap libraries. Look in config.log to figure out why and fix + it.

              Then compile and install Samba as usual. You must use at least the + following 3 options in smb.conf:

                realm = YOUR.KERBEROS.REALM
              +  ads server = your.kerberos.server
              +  security = ADS
              +  encrypt passwords = yes

              Strictly speaking, you can omit the realm name and you can use an IP + address for the ads server. In that case Samba will auto-detect these.

              You do *not* need a smbpasswd file, although it won't do any harm + and if you have one then Samba will be able to fall back to normal + password security for older clients. I expect that the above + required options will change soon when we get better active + directory integration.


              15.4. Setup your /etc/krb5.conf

              The minimal configuration for krb5.conf is:

              	[realms]
              +    YOUR.KERBEROS.REALM = {
              +	kdc = your.kerberos.server
              +    }

              Test your config by doing a "kinit USERNAME@REALM" and making sure that + your password is accepted by the Win2000 KDC.

              NOTE: The realm must be uppercase.

              You also must ensure that you can do a reverse DNS lookup on the IP +address of your KDC. Also, the name that this reverse lookup maps to +must either be the netbios name of the KDC (ie. the hostname with no +domain attached) or it can alternatively be the netbios name +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 +don't get this right 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 +straight to step 5 now. Step 3 is only needed if you want kerberos +support in smbd.


              15.5. Create the computer account

              Do a "kinit" as a user that has authority to change arbitrary +passwords on the KDC ("Administrator" is a good choice). Then as a +user that has write permission on the Samba private directory +(usually root) run: +net ads join


              15.5.1. Possible errors

              "bash: kinit: command not found"

              kinit is in the krb5-workstation RPM on RedHat systems, and is in /usr/kerberos/bin, so it won't be in the path until you log in again (or open a new terminal)

              "ADS support not compiled in"

              Samba must be reconfigured (remove config.cache) and recompiled (make clean all install) after the kerberos libs and headers are installed.


              15.6. Test your server setup

              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 klist tickets. Did you get a ticket for the +server? Does it have an encoding type of DES-CBC-MD5 ?


              15.7. Testing with smbclient

              dn: uid=gcarter, ou=people,dc=plainjoe,dc=org
              -logonTime: 0
              -displayName: Gerald Carter
              -lmPassword: 552902031BEDE9EFAAD3B435B51404EE
              -primaryGroupID: 1201
              -objectClass: posixAccount
              -objectClass: sambaAccount
              -acctFlags: [UX         ]
              -userPassword: {crypt}BpM2ej8Rkzogo
              -uid: gcarter
              -uidNumber: 9000
              -cn: Gerald Carter
              -loginShell: /bin/bash
              -logoffTime: 2147483647
              -gidNumber: 100
              -kickoffTime: 2147483647
              -pwdLastSet: 1010179230
              -rid: 19000
              -homeDirectory: /home/tashtego/gcarter
              -pwdCanChange: 0
              -pwdMustChange: 2147483647
              -ntPassword: 878D8014606CDA29677A44EFA1353FC7

              On your Samba server try to login to a Win2000 server or your Samba +server using smbclient and kerberos. Use smbclient as usual, but +specify the -k option to choose kerberos authentication.


              Comments

              15.8. Notes

              Please mail all comments regarding this HOWTO to jerry@samba.org. This documents was -last updated to reflect the Samba 2.2.3 release.

              You must change administrator password at least once after DC install, + to create the right encoding types

              w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in + their defaults DNS setup. Maybe fixed in service packs?


              Improved browsing in samba

              Chapter 16. Improved browsing in samba

              Overview of browsing

              16.1. Overview of browsing

              SMB networking provides a mechanism by which clients can access a list of machines in a network, a so-called "browse list". This list @@ -12328,7 +12533,9 @@ CLASS="SECT1" >


              Browsing support in samba

              16.2. Browsing support in samba

              Samba now fully supports browsing. The browsing is supported by nmbd and is also controlled by options in the smb.conf file (see smb.conf(5)).


              Problem resolution

              16.3. Problem resolution

              If something doesn't work then hopefully the log.nmb file will help you track down the problem. Try a debug level of 2 or 3 for finding @@ -12403,7 +12612,9 @@ CLASS="SECT1" >


              Browsing across subnets

              16.4. Browsing across subnets

              With the release of Samba 1.9.17(alpha1 and above) Samba has been updated to enable it to support the replication of browse lists @@ -12432,7 +12643,9 @@ CLASS="SECT2" >


              How does cross subnet browsing work ?

              16.4.1. How does cross subnet browsing work ?

              Cross subnet browsing is a complicated dance, containing multiple moving parts. It has taken Microsoft several years to get the code @@ -12442,12 +12655,6 @@ browsing when configured correctly.

              Consider a network set up as follows :

                                                 (DMB)
              @@ -12464,9 +12671,6 @@ CLASS="PROGRAMLISTING"
                 |     |     |      |               |        |         |           |
                N2_A  N2_B  N2_C   N2_D           N3_A     N3_B      N3_C        N3_D 
                                   (WINS)

              Consisting of 3 subnets (1, 2, 3) connected by two routers @@ -12510,12 +12714,6 @@ called 'non-authoritative'.

              Subnet           Browse Master   List
              @@ -12525,9 +12723,6 @@ Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E
               Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
               
               Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D

              Note that at this point all the subnets are separate, no @@ -12537,7 +12732,7 @@ machine is seen across any of the subnets.

              Once N2_B knows the address of the Domain master browser it @@ -12550,12 +12745,6 @@ the MasterAnnouncement packet it schedules a synchronization request to the sender of that packet. After both synchronizations are done the browse lists look like :

              Subnet           Browse Master   List
              @@ -12569,9 +12758,6 @@ Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
               Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
               
               Servers with a (*) after them are non-authoritative names.

              At this point users looking in their network neighborhood on @@ -12585,12 +12771,6 @@ 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 look like.

              Subnet           Browse Master   List
              @@ -12607,9 +12787,6 @@ Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
                                                N2_A(*), N2_B(*), N2_C(*), N2_D(*)
               
               Servers with a (*) after them are non-authoritative names.

              At this point users looking in their network neighborhood on @@ -12621,12 +12798,6 @@ with the domain master browser (N1_C) and will recieve the missing server entries. Finally - and as a steady state (if no machines are removed or shut off) the browse lists will look like :

              Subnet           Browse Master   List
              @@ -12644,9 +12815,6 @@ Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
                                                N2_A(*), N2_B(*), N2_C(*), N2_D(*)
               	
               Servers with a (*) after them are non-authoritative names.

              Synchronizations between the domain master browser and local @@ -12687,7 +12855,9 @@ CLASS="SECT1" >


              Setting up a WINS server

              16.5. Setting up a WINS server

              Either a Samba machine or a Windows NT Server machine may be set up as a WINS server. To set a Samba machine to be a WINS server you must @@ -12739,10 +12909,10 @@ all smb.conf files :

              wins server = >name or IP address< wins server = >name or IP address<

              where >name or IP address< is either the DNS name of the WINS server +>where >name or IP address< is either the DNS name of the WINS server machine or its IP address.

              Note that this line MUST NOT BE SET in the smb.conf file of the Samba @@ -12753,7 +12923,7 @@ CLASS="COMMAND" >" option and the "wins server = >name<wins server = >name<" option then nmbd will fail to start.


              Setting up Browsing in a WORKGROUP

              16.6. Setting up Browsing in a WORKGROUP

              To set up cross subnet browsing on a network containing machines in up to be in a WORKGROUP, not an NT Domain you need to set up one @@ -12796,21 +12968,12 @@ CLASS="COMMAND" browser for its own subnet. In order to achieve this set the following options in the [global] section of the smb.conf file :

                      domain master = yes
                       local master = yes
                       preferred master = yes
                       os level = 65

              The domain master browser may be the same machine as the WINS @@ -12824,21 +12987,12 @@ often, so it's not such a good idea to use these). To make a Samba server a local master browser set the following options in the [global] section of the smb.conf file :

                      domain master = no
                       local master = yes
                       preferred master = yes
                       os level = 65

              Do not do this for more than one Samba server on each subnet, @@ -12855,21 +13009,12 @@ be the local master browser then you can disable Samba from becoming a local master browser by setting the following options in the [global] section of the smb.conf file :

                      domain master = no
                       local master = no
                       preferred master = no
                       os level = 0


              Setting up Browsing in a DOMAIN

              16.7. Setting up Browsing in a DOMAIN

              If you are adding Samba servers to a Windows NT Domain then you must not set up a Samba server as a domain master browser. By default, a Windows NT Primary Domain Controller for a Domain name is also the Domain master browser for that name, and many things will break if a Samba server registers the Domain master -browser 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 @@ -12892,21 +13039,12 @@ described. To make a Samba server a local master browser set the following options in the [global] section of the smb.conf file :

                      domain master = no
                       local master = yes
                       preferred master = yes
                       os level = 65

              If you wish to have a Samba server fight the election with machines @@ -12935,7 +13073,9 @@ CLASS="SECT1" >


              Forcing samba to be the master

              16.8. Forcing samba to be the master

              Who becomes the "master browser" is determined by an election process using broadcasts. Each election packet contains a number of parameters @@ -12981,7 +13121,9 @@ CLASS="SECT1" >


              Making samba the domain master

              16.9. Making samba the domain master

              The domain master is responsible for collating the browse lists of multiple subnets so that browsing can occur between subnets. You can @@ -13052,7 +13194,9 @@ CLASS="SECT1" >


              Note about broadcast addresses

              16.10. 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 @@ -13064,7 +13208,9 @@ CLASS="SECT1" >


              Multiple interfaces

              16.11. Multiple interfaces

              Samba now supports machines with multiple network interfaces. If you have multiple interfaces then you will need to use the "interfaces" @@ -13075,13 +13221,17 @@ option in smb.conf to configure them. See smb.conf(5) for details.


              Samba performance issues

              Chapter 17. Samba performance issues

              Comparisons

              17.1. Comparisons

              The Samba server uses TCP to talk to the client. Thus if you are trying to see if it performs well you should really compare it to @@ -13110,13 +13260,17 @@ CLASS="SECT1" >


              Oplocks

              17.2. Oplocks

              Overview

              17.2.1. Overview

              Oplocks are the way that SMB clients get permission from a server to locally cache file operations. If a server grants an oplock @@ -13150,7 +13304,9 @@ CLASS="SECT2" >


              Level2 Oplocks

              17.2.2. Level2 Oplocks

              With Samba 2.0.5 a new capability - level2 (read only) oplocks is supported (although the option is off by default - see the smb.conf @@ -13172,7 +13328,9 @@ CLASS="SECT2" >


              Old 'fake oplocks' option - deprecated

              17.2.3. Old 'fake oplocks' option - deprecated

              Samba can also fake oplocks, by granting a oplock whenever a client asks for one. This is controlled using the smb.conf option "fake @@ -13191,7 +13349,9 @@ CLASS="SECT1" >


              Socket options

              17.3. Socket options

              There are a number of socket options that can greatly affect the performance of a TCP based server like Samba.


              Read size

              17.4. Read size

              The option "read size" affects the overlap of disk reads/writes with network reads/writes. If the amount of data being transferred in @@ -13241,7 +13403,9 @@ CLASS="SECT1" >


              Max xmit

              17.5. Max xmit

              At startup the client and server negotiate a "maximum transmit" size, which limits the size of nearly all SMB commands. You can set the @@ -13262,7 +13426,9 @@ CLASS="SECT1" >


              Locking

              17.6. Locking

              By default Samba does not implement strict locking on each read/write call (although it did in previous versions). If you enable strict @@ -13277,7 +13443,9 @@ CLASS="SECT1" >


              Share modes

              17.7. Share modes

              Some people find that opening files is very slow. This is often because of the "share modes" code needed to fully implement the dos @@ -13305,7 +13473,9 @@ CLASS="SECT1" >


              Log level

              17.8. Log level

              If you set the log level (also known as "debug level") higher than 2 then you may suffer a large drop in performance. This is because the @@ -13317,7 +13487,9 @@ CLASS="SECT1" >


              Wide lines

              17.9. Wide lines

              The "wide links" option is now enabled by default, but if you disable it (for better security) then you may suffer a performance hit in @@ -13329,7 +13501,9 @@ CLASS="SECT1" >


              Read raw

              17.10. Read raw

              The "read raw" operation is designed to be an optimised, low-latency file read operation. A server may choose to not support it, @@ -13349,7 +13523,9 @@ CLASS="SECT1" >


              Write raw

              17.11. Write raw

              The "write raw" operation is designed to be an optimised, low-latency file write operation. A server may choose to not support it, @@ -13364,7 +13540,9 @@ CLASS="SECT1" >


              Read prediction

              17.12. Read prediction

              Samba can do read prediction on some of the SMB commands. Read prediction means that Samba reads some extra data on the last file it @@ -13388,7 +13566,9 @@ CLASS="SECT1" >


              Memory mapping

              17.13. Memory mapping

              Samba supports reading files via memory mapping them. One some machines this can give a large boost to performance, on others it @@ -13407,7 +13587,9 @@ CLASS="SECT1" >


              Slow Clients

              17.14. Slow Clients

              One person has reported that setting the protocol to COREPLUS rather than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).


              Slow Logins

              17.15. Slow Logins

              Slow logins are almost always due to the password checking time. Using the lowest practical "password level" will improve things a lot. You @@ -13433,7 +13617,9 @@ CLASS="SECT1" >


              Client tuning

              17.16. Client tuning

              Often a speed problem can be traced to the client. The client (for example Windows for Workgroups) can often be tuned for better TCP @@ -13535,7 +13721,9 @@ CLASS="SECT1" >


              My Results

              17.17. My Results

              Some people want to see real numbers in a document like this, so here they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b @@ -13562,7 +13750,9 @@ here someday ...


              Samba and other CIFS clients

              Chapter 18. Samba and other CIFS clients

              This chapter contains client-specific information.


              Macintosh clients?

              18.1. Macintosh clients?

              Yes.


              OS2 Client

              18.2. OS2 Client

              How can I configure OS/2 Warp Connect or +NAME="AEN2964" +>18.2.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?

              A more complete answer to this question can be @@ -13677,7 +13873,9 @@ CLASS="SECT2" >


              How can I configure OS/2 Warp 3 (not Connect), +NAME="AEN2979" +>18.2.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?

              You can use the free Microsoft LAN Manager 2.2c Client @@ -13696,21 +13894,12 @@ TARGET="_top" a nutshell, edit the file \OS2VER in the root directory of the OS/2 boot partition and add the lines:

              		20=setup.exe
               		20=netwksta.sys
               		20=netvdd.sys
               		

              before you install the client. Also, don't use the @@ -13728,7 +13917,9 @@ CLASS="SECT2" >


              Are there any other issues when OS/2 (any version) +NAME="AEN2988" +>18.2.3. Are there any other issues when OS/2 (any version) is used as a client?

              When you do a NET VIEW or use the "File and Print @@ -13748,7 +13939,9 @@ CLASS="SECT2" >


              How do I get printer driver download working +NAME="AEN2992" +>18.2.4. How do I get printer driver download working for OS/2 clients?

              First, create a share called [PRINTDRV] that is @@ -13797,13 +13990,17 @@ CLASS="SECT1" >


              Windows for Workgroups

              18.3. Windows for Workgroups

              Use latest TCP/IP stack from Microsoft

              18.3.1. Use latest TCP/IP stack from Microsoft

              Use the latest TCP/IP stack from microsoft if you use Windows for workgroups.


              Delete .pwl files after password change

              18.3.2. Delete .pwl files after password change

              WfWg does a lousy job with passwords. I find that if I change my password on either the unix box or the PC the safest thing to do is to @@ -13841,7 +14040,9 @@ CLASS="SECT2" >


              Configure WfW password handling

              18.3.3. Configure WfW password handling

              There is a program call admincfg.exe on the last disk (disk 8) of the WFW 3.11 disk set. To install it @@ -13858,7 +14059,9 @@ CLASS="SECT2" >


              Case handling of passwords

              18.3.4. Case handling of passwords

              Windows for Workgroups uppercases the password before sending it to the server. Unix passwords can be case-sensitive though. Check the


              Windows '95/'98

              18.4. Windows '95/'98

              When using Windows 95 OEM SR2 the following updates are recommended where Samba is being used. Please NOTE that the above change will affect you once these @@ -13921,7 +14126,9 @@ CLASS="SECT1" >


              Windows 2000 Service Pack 2

              18.5. Windows 2000 Service Pack 2

              There are several annoyances with Windows 2000 SP2. One of which @@ -13957,12 +14164,6 @@ releases prior to Samba 2.2.2.

              The following is a minimal profile share:

              	[profile]
              @@ -13971,9 +14172,6 @@ CLASS="PROGRAMLISTING"
               		directory mask = 0700
               		nt acl support = no
               		read only = no

              The reason for this bug is that the Win2k SP2 client copies @@ -13996,10 +14194,13 @@ CLASS="COMMAND" >DOMAIN\user "Full Control"

              NOTE : This bug does not occur when using winbind to create accounts on the Samba host for Domain users.


              HOWTO Access Samba source code via CVS

              Chapter 19. HOWTO Access Samba source code via CVS

              Introduction

              19.1. Introduction

              Samba is developed in an open environment. Developers use CVS (Concurrent Versioning System) to "checkin" (also known as @@ -14033,7 +14238,9 @@ CLASS="SECT1" >


              CVS Access to samba.org

              19.2. CVS Access to samba.org

              The machine samba.org runs a publicly accessible CVS repository for access to the source code of several packages, @@ -14044,7 +14251,9 @@ CLASS="SECT2" >


              Access via CVSweb

              19.2.1. Access via CVSweb

              You can access the source code via your favourite WWW browser. This allows you to access the contents of @@ -14063,7 +14272,9 @@ CLASS="SECT2" >


              Access via cvs

              19.2.2. Access via cvs

              You can also access the source code via a normal cvs client. This gives you much more control over you can @@ -14169,13 +14380,17 @@ CLASS="COMMAND" CLASS="CHAPTER" >


              Reporting Bugs

              Chapter 20. Reporting Bugs

              Introduction

              20.1. Introduction

              The email address for bug reports is samba@samba.org


              General info

              20.2. General info

              Before submitting a bug report check your config for silly errors. Look in your log files for obvious messages that tell you that @@ -14228,7 +14445,9 @@ CLASS="SECT1" >


              Debug levels

              20.3. Debug levels

              If the bug has anything to do with Samba behaving incorrectly as a server (like refusing to open a file) then the log files will probably @@ -14247,20 +14466,11 @@ CLASS="FILENAME" level higher for just one machine and keep separate logs for each machine. To do this use:

              log level = 10
               log file = /usr/local/samba/lib/log.%m
               include = /usr/local/samba/lib/smb.conf.%m

              then create a file @@ -14305,7 +14515,9 @@ CLASS="SECT1" >


              Internal errors

              20.4. Internal errors

              If you get a "INTERNAL ERROR" message in your log files it means that Samba got an unexpected signal while running. It is probably a @@ -14347,7 +14559,9 @@ CLASS="SECT1" >


              Attaching to a running process

              20.5. Attaching to a running process

              Unfortunately some unixes (in particular some recent linux kernels) refuse to dump a core file if the task has changed uid (which smbd @@ -14362,7 +14576,9 @@ CLASS="SECT1" >


              Patches

              20.6. Patches

              The best sort of bug report is one that includes a fix! If you send us patches please use


              Group mapping HOWTO

              Chapter 21. Group mapping HOWTO

              Starting with Samba 3.0 alpha 2, a new group mapping function is available. The @@ -14437,18 +14655,9 @@ CLASS="FILENAME" >/etc/group will look like:

              domadm:x:502:joe,john,mary


            • Portability

              Chapter 22. Portability

              Samba works on a wide range of platforms but the interface all the platforms provide is not always compatible. This chapter contains @@ -14499,7 +14710,9 @@ CLASS="SECT1" >


              HPUX

              22.1. HPUX

              HP's implementation of supplementary groups is, er, non-standard (for hysterical reasons). There are two group files, /etc/group and @@ -14523,7 +14736,9 @@ CLASS="SECT1" >


              SCO Unix

              22.2. SCO Unix

              If you run an old version of SCO Unix then you may need to get important @@ -14538,7 +14753,9 @@ CLASS="SECT1" >


              DNIX

              22.3. DNIX

              DNIX has a problem with seteuid() and setegid(). These routines are needed for Samba to work correctly, but they were left out of the DNIX @@ -14559,12 +14776,6 @@ CLASS="FILENAME" >setegid.s:

                      .globl  _setegid
              @@ -14579,9 +14790,6 @@ _setegid:
               1$:
                       clrl    d0
                       rts

              put this in the file seteuid.s:

                      .globl  _seteuid
              @@ -14609,9 +14811,6 @@ _seteuid:
               1$:
                       clrl    d0
                       rts

              after creating the above files you then assemble them using

              then you need to add these to the LIBSM line in the DNIX section of the Samba Makefile. Your LIBSM line will then look something like this:

              LIBSM = setegid.o seteuid.o -ln

              You should then remove the line:

              #define NO_EID

              from the DNIX section of .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "01 October 2002" "" "" +.TH "SMB.CONF" "5" "02 oktober 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -604,12 +604,6 @@ each parameter for details. Note that some are synonyms. \fIdns proxy\fR .TP 0.2i \(bu -\fIdomain admin group\fR -.TP 0.2i -\(bu -\fIdomain guest group\fR -.TP 0.2i -\(bu \fIdomain logons\fR .TP 0.2i \(bu @@ -994,9 +988,6 @@ each parameter for details. Note that some are synonyms. \fIuse mmap\fR .TP 0.2i \(bu -\fIuse rhosts\fR -.TP 0.2i -\(bu \fIusername level\fR .TP 0.2i \(bu @@ -1367,9 +1358,6 @@ each parameter for details. Note that some are synonyms. \fIshort preserve case\fR .TP 0.2i \(bu -\fIstatus\fR -.TP 0.2i -\(bu \fIstrict allocate\fR .TP 0.2i \(bu @@ -2484,40 +2472,6 @@ See also the parameter \fI wins support\fR. Default: \fBdns proxy = yes\fR .TP -\fBdomain admin group (G)\fR -This parameter is intended as a temporary solution -to enable users to be a member of the "Domain Admins" group when -a Samba host is acting as a PDC. A complete solution will be provided -by a system for mapping Windows NT/2000 groups onto UNIX groups. -Please note that this parameter has a somewhat confusing name. It -accepts a list of usernames and of group names in standard -\fIsmb.conf\fR notation. - -See also \fIdomain -guest group\fR, \fIdomain -logons\fR - -Default: \fBno domain administrators\fR - -Example: \fBdomain admin group = root @wheel\fR -.TP -\fBdomain guest group (G)\fR -This parameter is intended as a temporary solution -to enable users to be a member of the "Domain Guests" group when -a Samba host is acting as a PDC. A complete solution will be provided -by a system for mapping Windows NT/2000 groups onto UNIX groups. -Please note that this parameter has a somewhat confusing name. It -accepts a list of usernames and of group names in standard -\fIsmb.conf\fR notation. - -See also \fIdomain -admin group\fR, \fIdomain -logons\fR - -Default: \fBno domain guests\fR - -Example: \fBdomain guest group = nobody @guest\fR -.TP \fBdomain logons (G)\fR If set to true, the Samba server will serve Windows 95/98 Domain logons for the \fIworkgroup\fR it is in. Samba 2.2 also @@ -5285,7 +5239,7 @@ Default: \fBpreferred master = auto\fR \fBprefered master (G)\fR Synonym for \fI preferred master\fR for people who cannot spell :-). .TP -\fBpreload\fR +\fBpreload (G)\fR This is a list of services that you want to be automatically added to the browse lists. This is most useful for homes and printers services that would otherwise not be @@ -6419,17 +6373,6 @@ never need to change this parameter. Default: \fBstat cache size = 50\fR .TP -\fBstatus (G)\fR -This enables or disables logging of connections -to a status file that smbstatus(1) -can read. - -With this disabled \fBsmbstatus\fR won't be able -to tell you what connections are active. You should never need to -change this parameter. - -Default: \fBstatus = yes\fR -.TP \fBstrict allocate (S)\fR This is a boolean that controls the handling of disk space allocation in the server. When this is set to yes @@ -6689,20 +6632,6 @@ the tdb internal code. Default: \fBuse mmap = yes\fR .TP -\fBuse rhosts (G)\fR -If this global parameter is true, it specifies -that the UNIX user's \fI.rhosts\fR file in their home directory -will be read to find the names of hosts and users who will be allowed -access without specifying a password. - -\fBNOTE:\fR The use of \fIuse rhosts -\fR can be a major security hole. This is because you are -trusting the PC to supply the correct username. It is very easy to -get a PC to supply a false username. I recommend that the \fI use rhosts\fR option be only used if you really know what -you are doing. - -Default: \fBuse rhosts = no\fR -.TP \fBuser (S)\fR Synonym for \fI username\fR. .TP @@ -7137,7 +7066,7 @@ Example: \fBwinbind uid = 10000-20000\fR .TP \fBwinbind use default domain\fR .TP -\fBwinbind use default domain\fR +\fBwinbind use default domain (G)\fR This parameter specifies whether the winbindd(8) daemon should operate on users without domain component in their username. Users without a domain component are treated as is part of the winbindd server's diff --git a/docs/textdocs/ADS-HOWTO.txt b/docs/textdocs/ADS-HOWTO.txt deleted file mode 100644 index 7a066c69ec..0000000000 --- a/docs/textdocs/ADS-HOWTO.txt +++ /dev/null @@ -1,142 +0,0 @@ -Samba 3.0 prealpha guide to Kerberos authentication ---------------------------------------------------- - -Andrew Tridgell -tridge@samba.org - -This is a VERY ROUGH guide to setting up the current (November 2001) -pre-alpha version of Samba 3.0 with kerberos authentication against a -Windows2000 KDC. The procedures listed here are likely to change as -the code develops. - -Pieces you need before you begin: - -- a Windows 2000 server -- the latest CVS source code for Samba. See http://cvs.samba.org/ for how to - fetch this. -- the MIT kerberos development libraries (either install from the - above sources or use a package). Under debian you need "libkrb5-dev" - and "krb5-user". The heimdal libraries will not work. -- the OpenLDAP development libraries. - -On RedHat this means you should have at least: - -krb5-workstation (for kinit) -krb5-libs (for linking with) -krb5-devel (because you are compiling from source) - -in addition to the standard development environment. - -Note that these are not standard on a RedHat install, and you may need -to get them off CD2. - -Also check that you have the latest copy of this HOWTO. It is -available from http://samba.org/ftp/tridge/kerberos/HOWTO - -Step 1: Compile Samba - - If your kerberos libraries are in a non-standard location then - remember to add the configure option --with-krb5=DIR. - - After you run configure make sure that include/config.h contains - lines like this: - - #define HAVE_KRB5 1 - #define HAVE_LDAP 1 - - If it doesn't then configure did not find your krb5 libraries or - your ldap libraries. Look in config.log to figure out why and fix - it. - - Then compile and install Samba as usual. You must use at least the - following 3 options in smb.conf: - - realm = YOUR.KERBEROS.REALM - ads server = your.kerberos.server - security = ADS - encrypt passwords = yes - - Strictly speaking, you can omit the realm name and you can use an IP - address for the ads server. In that case Samba will auto-detect these. - - You do *not* need a smbpasswd file, although it won't do any harm - and if you have one then Samba will be able to fall back to normal - password security for older clients. I expect that the above - required options will change soon when we get better active - directory integration. - - -Step 2: Setup your /etc/krb5.conf - - The minimal configuration for krb5.conf is: - - [realms] - YOUR.KERBEROS.REALM = { - kdc = your.kerberos.server - } - - - Test your config by doing a "kinit USERNAME@REALM" and making sure that - your password is accepted by the Win2000 KDC. - - NOTE: The realm must be uppercase. - - You also must ensure that you can do a reverse DNS lookup on the IP - address of your KDC. Also, the name that this reverse lookup maps to - must either be the netbios name of the KDC (ie. the hostname with no - domain attached) or it can alternatively be the netbios name - 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 - don't get this right 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 -* straight to step 5 now. Step 3 is only needed if you want kerberos -* support in smbd. - - -Step 3: Create the computer account - - Do a "kinit" as a user that has authority to change arbitrary - passwords on the KDC ("Administrator" is a good choice). Then as a - user that has write permission on the Samba private directory - (usually root) run: - - net ads join - - Possible errors: - - "bash: kinit: command not found": - - kinit is in the krb5-workstation RPM on RedHat systems, and is - in /usr/kerberos/bin, so it won't be in the path until - you log in again (or open a new terminal) - - "ADS support not compiled in" - - Samba must be reconfigured (remove config.cache) and - recompiled (make clean all install) after the kerberos libs - and headers are installed. - - -Step 4: Test your server setup - - 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 "klist tickets". Did you get a ticket for the - server? Does it have an encoding type of DES-CBC-MD5 ? - -Step 5: Testing with smbclient - - On your Samba server try to login to a Win2000 server or your Samba - server using smbclient and kerberos. Use smbclient as usual, but - specify the -k option to choose kerberos authentication. - - --------- - -NOTES: - - must change administrator password at least once after DC install, - to create the right encoding types - - - w2k doesn't seem to create the _kerberos._udp and _ldap._tcp in - their defaults DNS setup. Maybe fixed in service packs? - -- cgit