From 8e30c6b0d199d1d78438a87c95cc5bc1d18cbcb0 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 14 Jun 2003 22:18:16 +0000 Subject: Updating html stuff. (This used to be commit ab1f2fe4a840c9603bf5da5c133c137542fe0319) --- docs/htmldocs/winbind.html | 95 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) (limited to 'docs/htmldocs/winbind.html') diff --git a/docs/htmldocs/winbind.html b/docs/htmldocs/winbind.html index 8ba0047742..d8a4813013 100644 --- a/docs/htmldocs/winbind.html +++ b/docs/htmldocs/winbind.html @@ -1,4 +1,5 @@ -Chapter 21. Integrated Logon Support using Winbind

Chapter 21. Integrated Logon Support using Winbind

Tim Potter

Andrew Tridgell

Samba Team

Naag Mummaneni

Jelmer R. Vernooij

The Samba Team

John H. Terpstra

Samba Team

27 June 2002

Features and Benefits

Integration of UNIX and Microsoft Windows NT through + +Chapter 21. Integrated Logon Support using Winbind

Chapter 21. Integrated Logon Support using Winbind

Tim Potter

Andrew Tridgell

Samba Team

Naag Mummaneni

Jelmer R. Vernooij

The Samba Team

John H. Terpstra

Samba Team

27 June 2002

Features and Benefits

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 @@ -8,7 +9,7 @@ Service Switch to allow Windows NT domain users to appear and operate as UNIX users on a UNIX machine. This paper describes the winbind system, explaining the functionality it provides, how it is configured, - and how it works internally.

Introduction

It is well known that UNIX and Microsoft Windows NT have + and how it works internally.

Introduction

It is well known that UNIX and Microsoft Windows NT have different models for representing user and group information and use different technologies for implementing them. This fact has made it difficult to integrate the two systems in a satisfactory @@ -29,7 +30,7 @@ tasks for the system administrator when maintaining users and groups on either system. The winbind system provides a simple and elegant solution to all three components of the unified logon - problem.

What Winbind Provides

Winbind unifies UNIX and Windows NT account management by + problem.

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 this is done the UNIX box will see NT users and groups as if they were native UNIX users and groups, allowing the NT domain @@ -53,7 +54,7 @@ to provide authentication via a NT domain to any PAM enabled applications. This capability solves the problem of synchronizing passwords between systems since all passwords are stored in a single - location (on the domain controller).

Target Uses

Winbind is targeted at organizations that have an + location (on the domain controller).

Target Uses

Winbind is targeted at organizations that have an existing NT based domain infrastructure into which they wish to put UNIX workstations or servers. Winbind will allow these organizations to deploy UNIX workstations without having to @@ -63,12 +64,12 @@ be used is as a central part of UNIX based appliances. Appliances that provide file and print services to Microsoft based networks will be able to use Winbind to provide seamless integration of - the appliance into the domain.

How Winbind Works

The winbind system is designed around a client/server + the appliance into the domain.

How Winbind Works

The winbind system is designed around a client/server architecture. A long running winbindd daemon listens on a UNIX domain socket waiting for requests to arrive. These requests are generated by the NSS and PAM clients and processed sequentially.

The technologies used to implement winbind are described - in detail below.

Microsoft Remote Procedure Calls

Over the last few years, efforts have been underway + in detail below.

Microsoft Remote Procedure Calls

Over the last few years, efforts have been underway by various Samba Team members to decode various aspects of the Microsoft Remote Procedure Call (MSRPC) system. This system is used for most network related operations between @@ -81,7 +82,7 @@ users or groups. Other MSRPC calls can be used to authenticate NT domain users and to change user passwords. By directly querying a Windows PDC for user and group information, winbind maps the - NT account information onto UNIX user and group names.

Microsoft Active Directory Services

+ NT account information onto UNIX user and group names.

Microsoft Active Directory Services

Since late 2001, Samba has gained the ability to interact with Microsoft Windows 2000 using its 'Native Mode' protocols, rather than the NT4 RPC services. @@ -90,7 +91,7 @@ same way as a Win2k client would, and in so doing provide a much more efficient and effective winbind implementation. -

Name Service Switch

The Name Service Switch, or NSS, is a feature that is +

Name Service Switch

The Name Service Switch, or NSS, is a feature that is present in many UNIX operating systems. It allows system information such as hostnames, mail aliases and user information to be resolved from different sources. For example, a standalone @@ -127,7 +128,7 @@ passwd: files example is to put libnss_winbind.so in /lib/ then add "winbind" into /etc/nsswitch.conf at the appropriate place. The C library will then call Winbind to - resolve user and group names.

Pluggable Authentication Modules

Pluggable Authentication Modules, also known as PAM, + resolve user and group names.

Pluggable Authentication Modules

Pluggable Authentication Modules, also known as PAM, is a system for abstracting authentication and authorization technologies. With a PAM module it is possible to specify different authentication methods for different system applications without @@ -152,7 +153,7 @@ passwd: files example is copied to /lib/security/ and the PAM control files for relevant services are updated to allow authentication via winbind. See the PAM documentation - for more details.

User and Group ID Allocation

When a user or group is created under Windows NT + for more details.

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 slightly different to UNIX which has a range of numbers that are used to identify users, and the same range in which to identify @@ -165,7 +166,7 @@ passwd: files example time, winbind will have mapped all Windows NT users and groups to UNIX user ids and group ids.

The results of this mapping are stored persistently in an ID mapping database held in a tdb database). This ensures that - RIDs are mapped to UNIX IDs in a consistent way.

Result Caching

An active system can generate a lot of user and group + RIDs are mapped to UNIX IDs in a consistent way.

Result Caching

An active system can generate a lot of user and group name lookups. To reduce the network cost of these lookups winbind uses a caching scheme based on the SAM sequence number supplied by NT domain controllers. User or group information returned @@ -176,14 +177,14 @@ passwd: files example the PDC and compared against the sequence number of the cached entry. If the sequence numbers do not match, then the cached information is discarded and up to date information is requested directly - from the PDC.

Installation and Configuration

+ from the PDC.

Installation and Configuration

Many thanks to John Trostel jtrostel@snapserver.com for providing the HOWTO for this section.

This HOWTO describes how to get winbind services up and running to control access and authenticate users on your Linux box using the winbind services which come with SAMBA 3.0. -

Introduction

+

Introduction

This section describes the procedures used to get winbind up and running on a RedHat 7.1 system. Winbind is capable of providing access and authentication control for Windows Domain users through an NT @@ -208,7 +209,7 @@ somewhat to fit the way your distribution works. SAMBA server, this HOWTO is for you. That said, I am no NT or PAM expert, so you may find a better or easier way to accomplish these tasks. -

Requirements

+

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 @@ -235,7 +236,7 @@ winbind modules, you should have at least the pam libraries resident on your system. For recent RedHat systems (7.1, for instance), that means pam-0.74-22. For best results, it is helpful to also install the development packages in pam-devel-0.74-22. -

Testing Things Out

+

Testing Things Out

Before starting, it is probably best to kill off all the SAMBA related daemons running on your server. Kill off all smbd, nmbd, and winbindd processes that may @@ -246,7 +247,7 @@ services, several pam libraries, and the /usr/doc and /usr/man entries for pam. Winbind built better in SAMBA if the pam-devel package was also installed. This package includes the header files needed to compile pam-aware applications. -

Configure and compile SAMBA

+

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. @@ -261,15 +262,15 @@ whether or not you have previously built the Samba binaries. This will, by default, install SAMBA in /usr/local/samba. See the main SAMBA documentation if you want to install SAMBA somewhere else. It will also build the winbindd executable and libraries. -

Configure nsswitch.conf and the +

Configure nsswitch.conf and the winbind libraries on Linux and Solaris

The libraries needed to run the winbindd daemon through nsswitch need to be copied to their proper locations, so -

-

+

+
 root# cp ../samba/source/nsswitch/libnss_winbind.so /lib
-

-

+

+

I also found it necessary to make the following symbolic link:

root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2 @@ -296,7 +297,7 @@ is faster (and you don't need to reboot) if you do it manually:

This makes libnss_winbind available to winbindd and echos back a check to you. -

NSS Winbind on AIX

(This section is only for those running AIX)

+

NSS Winbind on AIX

(This section is only for those running AIX)

The winbind AIX identification module gets built as libnss_winbind.so in the nsswitch directory of the samba source. This file can be copied to /usr/lib/security, and the AIX naming convention would indicate that it @@ -316,7 +317,7 @@ Programming Concepts for AIX": "System Management Guide: Operating System and Devices". -

Configure smb.conf

+

Configure smb.conf

Several parameters are needed in the smb.conf file to control the behavior of winbindd. Configure smb.conf These are described in more detail in @@ -338,7 +339,7 @@ include the following entries in the [global] section: # give winbind users a real shell (only needed if they have telnet access) template homedir = /home/winnt/%D/%U template shell = /bin/bash -

Join the SAMBA server to the PDC domain

+

Join the SAMBA server to the PDC domain

Enter the following command to make the SAMBA server join the PDC domain, where DOMAIN is the name of your Windows domain and Administrator is @@ -349,7 +350,7 @@ a domain user who has administrative privileges in the domain. The proper response to the command should be: "Joined the domain DOMAIN" where DOMAIN is your DOMAIN name. -

Start up the winbindd daemon and test it!

+

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 SAMBA start, but it is possible to test out just the winbind @@ -421,7 +422,7 @@ directories and default shells. The same thing can be done for groups with the command

root# getent group -

Fix the init.d startup scripts

Linux

+

Fix the init.d startup scripts

Linux

The winbindd daemon needs to start up after the smbd and nmbd daemons are running. To accomplish this task, you need to modify the startup scripts of your system. @@ -452,18 +453,18 @@ start() { touch /var/lock/subsys/smb || RETVAL=1 return $RETVAL } -

If you would like to run winbindd in dual daemon mode, replace +If you would like to run winbindd in dual daemon mode, replace the line -

+
         daemon /usr/local/samba/bin/winbindd
-

+

in the example above with: -

+
         daemon /usr/local/samba/bin/winbindd -B
-

. -

+

. +

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

@@ -487,7 +488,7 @@ stop() {
         echo ""
         return $RETVAL
 }
-
Solaris

Winbind doesn't work on solaris 9, see the Portability chapter for details.

On solaris, you need to modify the +

Solaris

Winbind doesn't work on solaris 9, see the Portability chapter for details.

On solaris, you need to modify the /etc/init.d/samba.server startup script. It usually only starts smbd and nmbd but should now start winbindd too. If you have samba installed in /usr/local/samba/bin, @@ -539,22 +540,22 @@ the file could contains something like this: echo "Usage: /etc/init.d/samba.server { start | stop }" ;; esac -

+ Again, if you would like to run samba in dual daemon mode, replace -

+
 	/usr/local/samba/bin/winbindd
-

+

in the script above with: -

+
 	/usr/local/samba/bin/winbindd -B
-

-

Restarting

+ +

Restarting

If you restart the smbd, nmbd, and winbindd daemons at this point, you should be able to connect to the samba server as a domain member just as if you were a local user. -

Configure Winbind and PAM

+

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 services, keep reading. The pam configuration files need to be altered in @@ -574,7 +575,7 @@ your other pam security modules. On my RedHat system, this was the modules reside in /usr/lib/security.

root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security -

Linux/FreeBSD-specific PAM configuration

+

Linux/FreeBSD-specific PAM configuration

The /etc/pam.d/samba file does not need to be changed. I just left this fileas it was:

@@ -630,14 +631,14 @@ same way.  It now looks like this:
 	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

auth sufficient /lib/security/pam_winbind.so

-lines as before, but also added the

required pam_securetty.so

+ +In this case, I added the

auth sufficient /lib/security/pam_winbind.so
+lines as before, but also added the
required pam_securetty.so
above it, to disallow root logins over the network. I also added a sufficient /lib/security/pam_unix.so use_first_pass line after the winbind.so line to get rid of annoying double prompts for passwords. -

Solaris-specific configuration

+

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 that I made.You can customize the pam.conf file as per your requirements,but @@ -709,12 +710,12 @@ annoying double prompts for passwords.

Now restart your Samba and try connecting through your application that you configured in the pam.conf. -

Conclusion

The winbind system, through the use of the Name Service +

Conclusion

The winbind system, through the use of the Name Service Switch, Pluggable Authentication Modules, and appropriate Microsoft RPC calls have allowed us to provide seamless integration of Microsoft Windows NT domain users on a UNIX system. The result is a great reduction in the administrative - cost of running a mixed UNIX and NT network.

Common Errors

Winbind has a number of limitations in its current + cost of running a mixed UNIX and NT network.

Common Errors

Winbind has a number of limitations in its current released version that we hope to overcome in future releases:

  • Winbind is currently only available for the Linux, Solaris and IRIX operating systems, although ports to other operating -- cgit