From 3878085eca35d5c3b08761f61281de0b1b49ce2d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 1 Jul 2003 22:58:52 +0000 Subject: regenerate docs (This used to be commit cc02d3bc170fe5c8c4474156edb6c83720a47aa0) --- docs/htmldocs/winbind.html | 111 ++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 56 deletions(-) (limited to 'docs/htmldocs/winbind.html') diff --git a/docs/htmldocs/winbind.html b/docs/htmldocs/winbind.html index d8a4813013..567e882367 100644 --- a/docs/htmldocs/winbind.html +++ b/docs/htmldocs/winbind.html @@ -1,5 +1,4 @@ - -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 @@ -9,7 +8,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 @@ -30,7 +29,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 @@ -54,7 +53,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 @@ -64,12 +63,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 @@ -82,7 +81,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. @@ -91,7 +90,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 @@ -128,7 +127,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 @@ -153,7 +152,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 @@ -166,7 +165,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 @@ -177,14 +176,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 @@ -209,15 +208,15 @@ 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

-If you have a samba configuration file that you are currently +

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 -to log in to yourmachine. That's why you want to be able to boot back +Messing with the PAM configuration files can make it nearly impossible +to log in to your machine. That's why you want to be able to boot back into your machine in single user mode and restore your /etc/pam.d back to the original state they were in if you get frustrated with the way things are going. ;-) @@ -236,7 +235,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 @@ -247,7 +246,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. @@ -262,19 +261,19 @@ 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 -

And, in the case of Sun solaris:

+

And, in the case of Sun Solaris:

 root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1
 root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1
 root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2
@@ -297,7 +296,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 @@ -317,7 +316,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 @@ -330,16 +329,16 @@ include the following entries in the [global] section: # separate domain and username with '+', like DOMAIN+username winbind separator = + # use uids from 10000 to 20000 for domain users - winbind uid = 10000-20000 + idmap uid = 10000-20000 # use gids from 10000 to 20000 for domain groups - winbind gid = 10000-20000 + idmap gid = 10000-20000 # allow enumeration of winbind users and groups winbind enum users = yes winbind enum groups = yes # 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 @@ -350,7 +349,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 @@ -422,7 +421,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. @@ -453,18 +452,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:

@@ -488,7 +487,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, @@ -540,22 +539,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 @@ -575,9 +574,9 @@ 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: +just left this file as it was:

 	auth    required        /lib/security/pam_stack.so service=system-auth
 	account required        /lib/security/pam_stack.so service=system-auth
@@ -631,14 +630,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 @@ -710,12 +709,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 @@ -730,4 +729,4 @@ configured in the pam.conf. containing this information is corrupted or destroyed.

  • Currently the winbind PAM module does not take into account possible workstation and logon time restrictions that may be been set for Windows NT users, this is - instead up to the PDC to enforce.

+ instead up to the PDC to enforce.

-- cgit