* merge fixes for SGML syntax errors (does no one ever regenerate the docs?)
[garming/samba-autobuild/.git] / docs / htmldocs / winbind.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Unified Logons between Windows NT and UNIX using Winbind</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="HOME"
11 TITLE="SAMBA Project Documentation"
12 HREF="samba-howto-collection.html"><LINK
13 REL="UP"
14 TITLE="Optional configuration"
15 HREF="optional.html"><LINK
16 REL="PREVIOUS"
17 TITLE="Printing Support"
18 HREF="printing.html"><LINK
19 REL="NEXT"
20 TITLE="Passdb MySQL plugin"
21 HREF="pdb-mysql.html"></HEAD
22 ><BODY
23 CLASS="CHAPTER"
24 BGCOLOR="#FFFFFF"
25 TEXT="#000000"
26 LINK="#0000FF"
27 VLINK="#840084"
28 ALINK="#0000FF"
29 ><DIV
30 CLASS="NAVHEADER"
31 ><TABLE
32 SUMMARY="Header navigation table"
33 WIDTH="100%"
34 BORDER="0"
35 CELLPADDING="0"
36 CELLSPACING="0"
37 ><TR
38 ><TH
39 COLSPAN="3"
40 ALIGN="center"
41 >SAMBA Project Documentation</TH
42 ></TR
43 ><TR
44 ><TD
45 WIDTH="10%"
46 ALIGN="left"
47 VALIGN="bottom"
48 ><A
49 HREF="printing.html"
50 ACCESSKEY="P"
51 >Prev</A
52 ></TD
53 ><TD
54 WIDTH="80%"
55 ALIGN="center"
56 VALIGN="bottom"
57 ></TD
58 ><TD
59 WIDTH="10%"
60 ALIGN="right"
61 VALIGN="bottom"
62 ><A
63 HREF="pdb-mysql.html"
64 ACCESSKEY="N"
65 >Next</A
66 ></TD
67 ></TR
68 ></TABLE
69 ><HR
70 ALIGN="LEFT"
71 WIDTH="100%"></DIV
72 ><DIV
73 CLASS="CHAPTER"
74 ><H1
75 ><A
76 NAME="WINBIND">Chapter 15. Unified Logons between Windows NT and UNIX using Winbind</H1
77 ><DIV
78 CLASS="SECT1"
79 ><H1
80 CLASS="SECT1"
81 ><A
82 NAME="AEN2225">15.1. Abstract</H1
83 ><P
84 >Integration of UNIX and Microsoft Windows NT through 
85         a unified logon has been considered a "holy grail" in heterogeneous 
86         computing environments for a long time. We present 
87         <SPAN
88 CLASS="emphasis"
89 ><I
90 CLASS="EMPHASIS"
91 >winbind</I
92 ></SPAN
93 >, a component of the Samba suite 
94         of programs as a solution to the unified logon problem. Winbind 
95         uses a UNIX implementation 
96         of Microsoft RPC calls, Pluggable Authentication Modules, and the Name 
97         Service Switch to allow Windows NT domain users to appear and operate 
98         as UNIX users on a UNIX machine. This paper describes the winbind 
99         system, explaining the functionality it provides, how it is configured, 
100         and how it works internally.</P
101 ></DIV
102 ><DIV
103 CLASS="SECT1"
104 ><H1
105 CLASS="SECT1"
106 ><A
107 NAME="AEN2229">15.2. Introduction</H1
108 ><P
109 >It is well known that UNIX and Microsoft Windows NT have 
110         different models for representing user and group information and 
111         use different technologies for implementing them. This fact has 
112         made it difficult to integrate the two systems in a satisfactory 
113         manner.</P
114 ><P
115 >One common solution in use today has been to create 
116         identically named user accounts on both the UNIX and Windows systems 
117         and use the Samba suite of programs to provide file and print services 
118         between the two. This solution is far from perfect however, as 
119         adding and deleting users on both sets of machines becomes a chore 
120         and two sets of passwords are required both of which
121         can lead to synchronization problems between the UNIX and Windows 
122         systems and confusion for users.</P
123 ><P
124 >We divide the unified logon problem for UNIX machines into 
125         three smaller problems:</P
126 ><P
127 ></P
128 ><UL
129 ><LI
130 ><P
131 >Obtaining Windows NT user and group information
132                 </P
133 ></LI
134 ><LI
135 ><P
136 >Authenticating Windows NT users
137                 </P
138 ></LI
139 ><LI
140 ><P
141 >Password changing for Windows NT users
142                 </P
143 ></LI
144 ></UL
145 ><P
146 >Ideally, a prospective solution to the unified logon problem 
147         would satisfy all the above components without duplication of 
148         information on the UNIX machines and without creating additional 
149         tasks for the system administrator when maintaining users and 
150         groups on either system. The winbind system provides a simple 
151         and elegant solution to all three components of the unified logon 
152         problem.</P
153 ></DIV
154 ><DIV
155 CLASS="SECT1"
156 ><H1
157 CLASS="SECT1"
158 ><A
159 NAME="AEN2242">15.3. What Winbind Provides</H1
160 ><P
161 >Winbind unifies UNIX and Windows NT account management by 
162         allowing a UNIX box to become a full member of a NT domain. Once 
163         this is done the UNIX box will see NT users and groups as if 
164         they were native UNIX users and groups, allowing the NT domain 
165         to be used in much the same manner that NIS+ is used within 
166         UNIX-only environments.</P
167 ><P
168 >The end result is that whenever any 
169         program on the UNIX machine asks the operating system to lookup 
170         a user or group name, the query will be resolved by asking the 
171         NT domain controller for the specified domain to do the lookup.
172         Because Winbind hooks into the operating system at a low level 
173         (via the NSS name resolution modules in the C library) this 
174         redirection to the NT domain controller is completely 
175         transparent.</P
176 ><P
177 >Users on the UNIX machine can then use NT user and group 
178         names as they would use "native" UNIX names. They can chown files 
179         so that they are owned by NT domain users or even login to the 
180         UNIX machine and run a UNIX X-Window session as a domain user.</P
181 ><P
182 >The only obvious indication that Winbind is being used is 
183         that user and group names take the form DOMAIN\user and 
184         DOMAIN\group. This is necessary as it allows Winbind to determine 
185         that redirection to a domain controller is wanted for a particular 
186         lookup and which trusted domain is being referenced.</P
187 ><P
188 >Additionally, Winbind provides an authentication service 
189         that hooks into the Pluggable Authentication Modules (PAM) system 
190         to provide authentication via a NT domain to any PAM enabled 
191         applications. This capability solves the problem of synchronizing 
192         passwords between systems since all passwords are stored in a single 
193         location (on the domain controller).</P
194 ><DIV
195 CLASS="SECT2"
196 ><H2
197 CLASS="SECT2"
198 ><A
199 NAME="AEN2249">15.3.1. Target Uses</H2
200 ><P
201 >Winbind is targeted at organizations that have an 
202                 existing NT based domain infrastructure into which they wish 
203                 to put UNIX workstations or servers. Winbind will allow these 
204                 organizations to deploy UNIX workstations without having to 
205                 maintain a separate account infrastructure. This greatly 
206                 simplifies the administrative overhead of deploying UNIX 
207                 workstations into a NT based organization.</P
208 ><P
209 >Another interesting way in which we expect Winbind to 
210                 be used is as a central part of UNIX based appliances. Appliances 
211                 that provide file and print services to Microsoft based networks 
212                 will be able to use Winbind to provide seamless integration of 
213                 the appliance into the domain.</P
214 ></DIV
215 ></DIV
216 ><DIV
217 CLASS="SECT1"
218 ><H1
219 CLASS="SECT1"
220 ><A
221 NAME="AEN2253">15.4. How Winbind Works</H1
222 ><P
223 >The winbind system is designed around a client/server 
224         architecture. A long running <B
225 CLASS="COMMAND"
226 >winbindd</B
227 > daemon 
228         listens on a UNIX domain socket waiting for requests
229         to arrive. These requests are generated by the NSS and PAM 
230         clients and processed sequentially.</P
231 ><P
232 >The technologies used to implement winbind are described 
233         in detail below.</P
234 ><DIV
235 CLASS="SECT2"
236 ><H2
237 CLASS="SECT2"
238 ><A
239 NAME="AEN2258">15.4.1. Microsoft Remote Procedure Calls</H2
240 ><P
241 >Over the last two years, efforts have been underway 
242                 by various Samba Team members to decode various aspects of 
243                 the Microsoft Remote Procedure Call (MSRPC) system. This 
244                 system is used for most network related operations between 
245                 Windows NT machines including remote management, user authentication
246                 and print spooling. Although initially this work was done 
247                 to aid the implementation of Primary Domain Controller (PDC) 
248                 functionality in Samba, it has also yielded a body of code which 
249                 can be used for other purposes.</P
250 ><P
251 >Winbind uses various MSRPC calls to enumerate domain users 
252                 and groups and to obtain detailed information about individual 
253                 users or groups. Other MSRPC calls can be used to authenticate 
254                 NT domain users and to change user passwords. By directly querying 
255                 a Windows PDC for user and group information, winbind maps the 
256                 NT account information onto UNIX user and group names.</P
257 ></DIV
258 ><DIV
259 CLASS="SECT2"
260 ><H2
261 CLASS="SECT2"
262 ><A
263 NAME="AEN2262">15.4.2. Name Service Switch</H2
264 ><P
265 >The Name Service Switch, or NSS, is a feature that is 
266                 present in many UNIX operating systems. It allows system 
267                 information such as hostnames, mail aliases and user information 
268                 to be resolved from different sources. For example, a standalone 
269                 UNIX workstation may resolve system information from a series of 
270                 flat files stored on the local filesystem. A networked workstation 
271                 may first attempt to resolve system information from local files, 
272                 and then consult a NIS database for user information or a DNS server 
273                 for hostname information.</P
274 ><P
275 >The NSS application programming interface allows winbind 
276                 to present itself as a source of system information when 
277                 resolving UNIX usernames and groups.  Winbind uses this interface, 
278                 and information obtained from a Windows NT server using MSRPC 
279                 calls to provide a new source of account enumeration.  Using standard 
280                 UNIX library calls, one can enumerate the users and groups on
281                 a UNIX machine running winbind and see all users and groups in 
282                 a NT domain plus any trusted domain as though they were local 
283                 users and groups.</P
284 ><P
285 >The primary control file for NSS is 
286                 <TT
287 CLASS="FILENAME"
288 >/etc/nsswitch.conf</TT
289 >. 
290                 When a UNIX application makes a request to do a lookup 
291                 the C library looks in <TT
292 CLASS="FILENAME"
293 >/etc/nsswitch.conf</TT
294
295                 for a line which matches the service type being requested, for 
296                 example the "passwd" service type is used when user or group names 
297                 are looked up. This     config line species which implementations 
298                 of that service should be tried and in what order. If the passwd 
299                 config line is:</P
300 ><P
301 ><B
302 CLASS="COMMAND"
303 >passwd: files example</B
304 ></P
305 ><P
306 >then the C library will first load a module called 
307                 <TT
308 CLASS="FILENAME"
309 >/lib/libnss_files.so</TT
310 > followed by
311                 the module <TT
312 CLASS="FILENAME"
313 >/lib/libnss_example.so</TT
314 >. The 
315                 C library will dynamically load each of these modules in turn 
316                 and call resolver functions within the modules to try to resolve 
317                 the request. Once the request is resolved the C library returns the
318                 result to the application.</P
319 ><P
320 >This NSS interface provides a very easy way for Winbind 
321                 to hook into the operating system. All that needs to be done 
322                 is to put <TT
323 CLASS="FILENAME"
324 >libnss_winbind.so</TT
325 > in <TT
326 CLASS="FILENAME"
327 >/lib/</TT
328
329                 then add "winbind" into <TT
330 CLASS="FILENAME"
331 >/etc/nsswitch.conf</TT
332 > at 
333                 the appropriate place. The C library will then call Winbind to 
334                 resolve user and group names.</P
335 ></DIV
336 ><DIV
337 CLASS="SECT2"
338 ><H2
339 CLASS="SECT2"
340 ><A
341 NAME="AEN2278">15.4.3. Pluggable Authentication Modules</H2
342 ><P
343 >Pluggable Authentication Modules, also known as PAM, 
344                 is a system for abstracting authentication and authorization 
345                 technologies. With a PAM module it is possible to specify different 
346                 authentication methods for different system applications without 
347                 having to recompile these applications. PAM is also useful
348                 for implementing a particular policy for authorization. For example, 
349                 a system administrator may only allow console logins from users 
350                 stored in the local password file but only allow users resolved from 
351                 a NIS database to log in over the network.</P
352 ><P
353 >Winbind uses the authentication management and password 
354                 management PAM interface to integrate Windows NT users into a 
355                 UNIX system. This allows Windows NT users to log in to a UNIX 
356                 machine and be authenticated against a suitable Primary Domain 
357                 Controller. These users can also change their passwords and have 
358                 this change take effect directly on the Primary Domain Controller.
359                 </P
360 ><P
361 >PAM is configured by providing control files in the directory 
362                 <TT
363 CLASS="FILENAME"
364 >/etc/pam.d/</TT
365 > for each of the services that 
366                 require authentication. When an authentication request is made 
367                 by an application the PAM code in the C library looks up this
368                 control file to determine what modules to load to do the 
369                 authentication check and in what order. This interface makes adding 
370                 a new authentication service for Winbind very easy, all that needs 
371                 to be done is that the <TT
372 CLASS="FILENAME"
373 >pam_winbind.so</TT
374 > module 
375                 is copied to <TT
376 CLASS="FILENAME"
377 >/lib/security/</TT
378 > and the PAM 
379                 control files for relevant services are updated to allow 
380                 authentication via winbind. See the PAM documentation
381                 for more details.</P
382 ></DIV
383 ><DIV
384 CLASS="SECT2"
385 ><H2
386 CLASS="SECT2"
387 ><A
388 NAME="AEN2286">15.4.4. User and Group ID Allocation</H2
389 ><P
390 >When a user or group is created under Windows NT 
391                 is it allocated a numerical relative identifier (RID). This is 
392                 slightly different to UNIX which has a range of numbers that are 
393                 used to identify users, and the same range in which to identify 
394                 groups. It is winbind's job to convert RIDs to UNIX id numbers and
395                 vice versa.  When winbind is configured it is given part of the UNIX 
396                 user id space and a part of the UNIX group id space in which to 
397                 store Windows NT users and groups. If a Windows NT user is 
398                 resolved for the first time, it is allocated the next UNIX id from 
399                 the range. The same process applies for Windows NT groups. Over 
400                 time, winbind will have mapped all Windows NT users and groups
401                 to UNIX user ids and group ids.</P
402 ><P
403 >The results of this mapping are stored persistently in 
404                 an ID mapping database held in a tdb database). This ensures that 
405                 RIDs are mapped to UNIX IDs in a consistent way.</P
406 ></DIV
407 ><DIV
408 CLASS="SECT2"
409 ><H2
410 CLASS="SECT2"
411 ><A
412 NAME="AEN2290">15.4.5. Result Caching</H2
413 ><P
414 >An active system can generate a lot of user and group 
415                 name lookups. To reduce the network cost of these lookups winbind 
416                 uses a caching scheme based on the SAM sequence number supplied 
417                 by NT domain controllers.  User or group information returned 
418                 by a PDC is cached by winbind along with a sequence number also 
419                 returned by the PDC. This sequence number is incremented by 
420                 Windows NT whenever any user or group information is modified. If 
421                 a cached entry has expired, the sequence number is requested from 
422                 the PDC and compared against the sequence number of the cached entry. 
423                 If the sequence numbers do not match, then the cached information 
424                 is discarded and up to date information is requested directly 
425                 from the PDC.</P
426 ></DIV
427 ></DIV
428 ><DIV
429 CLASS="SECT1"
430 ><H1
431 CLASS="SECT1"
432 ><A
433 NAME="AEN2293">15.5. Installation and Configuration</H1
434 ><P
435 >Many thanks to John Trostel <A
436 HREF="mailto:jtrostel@snapserver.com"
437 TARGET="_top"
438 >jtrostel@snapserver.com</A
439 >
440 for providing the HOWTO for this section.</P
441 ><P
442 >This HOWTO describes how to get winbind services up and running 
443 to control access and authenticate users on your Linux box using 
444 the winbind services which come with SAMBA 2.2.2.</P
445 ><P
446 >There is also some Solaris specific information in 
447 <TT
448 CLASS="FILENAME"
449 >docs/textdocs/Solaris-Winbind-HOWTO.txt</TT
450 >.
451 Future revisions of this document will incorporate that
452 information.</P
453 ><DIV
454 CLASS="SECT2"
455 ><H2
456 CLASS="SECT2"
457 ><A
458 NAME="AEN2300">15.5.1. Introduction</H2
459 ><P
460 >This HOWTO describes the procedures used to get winbind up and 
461 running on my RedHat 7.1 system.  Winbind is capable of providing access 
462 and authentication control for Windows Domain users through an NT 
463 or Win2K PDC for 'regular' services, such as telnet a nd ftp, as
464 well for SAMBA services.</P
465 ><P
466 >This HOWTO has been written from a 'RedHat-centric' perspective, so if 
467 you are using another distribution, you may have to modify the instructions 
468 somewhat to fit the way your distribution works.</P
469 ><P
470 ></P
471 ><UL
472 ><LI
473 ><P
474 >       <SPAN
475 CLASS="emphasis"
476 ><I
477 CLASS="EMPHASIS"
478 >Why should I to this?</I
479 ></SPAN
480 >
481         </P
482 ><P
483 >This allows the SAMBA administrator to rely on the 
484         authentication mechanisms on the NT/Win2K PDC for the authentication 
485         of domain members.  NT/Win2K users no longer need to have separate 
486         accounts on the SAMBA server.
487         </P
488 ></LI
489 ><LI
490 ><P
491 >       <SPAN
492 CLASS="emphasis"
493 ><I
494 CLASS="EMPHASIS"
495 >Who should be reading this document?</I
496 ></SPAN
497 >
498         </P
499 ><P
500 >       This HOWTO is designed for system administrators.  If you are 
501         implementing SAMBA on a file server and wish to (fairly easily) 
502         integrate existing NT/Win2K users from your PDC onto the
503         SAMBA server, this HOWTO is for you.  That said, I am no NT or PAM 
504         expert, so you may find a better or easier way to accomplish 
505         these tasks.
506         </P
507 ></LI
508 ></UL
509 ></DIV
510 ><DIV
511 CLASS="SECT2"
512 ><H2
513 CLASS="SECT2"
514 ><A
515 NAME="AEN2313">15.5.2. Requirements</H2
516 ><P
517 >If you have a samba configuration file that you are currently 
518 using... <SPAN
519 CLASS="emphasis"
520 ><I
521 CLASS="EMPHASIS"
522 >BACK IT UP!</I
523 ></SPAN
524 >  If your system already uses PAM, 
525 <SPAN
526 CLASS="emphasis"
527 ><I
528 CLASS="EMPHASIS"
529 >back up the <TT
530 CLASS="FILENAME"
531 >/etc/pam.d</TT
532 > directory 
533 contents!</I
534 ></SPAN
535 > If you haven't already made a boot disk, 
536 <SPAN
537 CLASS="emphasis"
538 ><I
539 CLASS="EMPHASIS"
540 >MAKE ONE NOW!</I
541 ></SPAN
542 ></P
543 ><P
544 >Messing with the pam configuration files can make it nearly impossible 
545 to log in to yourmachine. That's why you want to be able to boot back 
546 into your machine in single user mode and restore your 
547 <TT
548 CLASS="FILENAME"
549 >/etc/pam.d</TT
550 > back to the original state they were in if 
551 you get frustrated with the way things are going.  ;-)</P
552 ><P
553 >The latest version of SAMBA (version 3.0 as of this writing), now 
554 includes a functioning winbindd daemon.  Please refer to the 
555 <A
556 HREF="http://samba.org/"
557 TARGET="_top"
558 >main SAMBA web page</A
559 > or, 
560 better yet, your closest SAMBA mirror site for instructions on 
561 downloading the source code.</P
562 ><P
563 >To allow Domain users the ability to access SAMBA shares and 
564 files, as well as potentially other services provided by your 
565 SAMBA machine, PAM (pluggable authentication modules) must
566 be setup properly on your machine.  In order to compile the 
567 winbind modules, you should have at least the pam libraries resident 
568 on your system.  For recent RedHat systems (7.1, for instance), that 
569 means <TT
570 CLASS="FILENAME"
571 >pam-0.74-22</TT
572 >.  For best results, it is helpful to also
573 install the development packages in <TT
574 CLASS="FILENAME"
575 >pam-devel-0.74-22</TT
576 >.</P
577 ></DIV
578 ><DIV
579 CLASS="SECT2"
580 ><H2
581 CLASS="SECT2"
582 ><A
583 NAME="AEN2327">15.5.3. Testing Things Out</H2
584 ><P
585 >Before starting, it is probably best to kill off all the SAMBA 
586 related daemons running on your server.  Kill off all <B
587 CLASS="COMMAND"
588 >smbd</B
589 >, 
590 <B
591 CLASS="COMMAND"
592 >nmbd</B
593 >, and <B
594 CLASS="COMMAND"
595 >winbindd</B
596 > processes that may 
597 be running.  To use PAM, you will want to make sure that you have the 
598 standard PAM package (for RedHat) which supplies the <TT
599 CLASS="FILENAME"
600 >/etc/pam.d</TT
601
602 directory structure, including the pam modules are used by pam-aware 
603 services, several pam libraries, and the <TT
604 CLASS="FILENAME"
605 >/usr/doc</TT
606
607 and <TT
608 CLASS="FILENAME"
609 >/usr/man</TT
610 > entries for pam.  Winbind built better 
611 in SAMBA if the pam-devel package was also installed.  This package includes 
612 the header files needed to compile pam-aware applications. For instance, 
613 my RedHat system has both <TT
614 CLASS="FILENAME"
615 >pam-0.74-22</TT
616 > and
617 <TT
618 CLASS="FILENAME"
619 >pam-devel-0.74-22</TT
620 > RPMs installed.</P
621 ><DIV
622 CLASS="SECT3"
623 ><H3
624 CLASS="SECT3"
625 ><A
626 NAME="AEN2338">15.5.3.1. Configure and compile SAMBA</H3
627 ><P
628 >The configuration and compilation of SAMBA is pretty straightforward.
629 The first three steps may not be necessary depending upon
630 whether or not you have previously built the Samba binaries.</P
631 ><P
632 ><PRE
633 CLASS="PROGRAMLISTING"
634 ><TT
635 CLASS="PROMPT"
636 >root#</TT
637 > <B
638 CLASS="COMMAND"
639 >autoconf</B
640 >
641 <TT
642 CLASS="PROMPT"
643 >root#</TT
644 > <B
645 CLASS="COMMAND"
646 >make clean</B
647 >
648 <TT
649 CLASS="PROMPT"
650 >root#</TT
651 > <B
652 CLASS="COMMAND"
653 >rm config.cache</B
654 >
655 <TT
656 CLASS="PROMPT"
657 >root#</TT
658 > <B
659 CLASS="COMMAND"
660 >./configure --with-winbind</B
661 >
662 <TT
663 CLASS="PROMPT"
664 >root#</TT
665 > <B
666 CLASS="COMMAND"
667 >make</B
668 >
669 <TT
670 CLASS="PROMPT"
671 >root#</TT
672 > <B
673 CLASS="COMMAND"
674 >make install</B
675 ></PRE
676 ></P
677 ><P
678 >This will, by default, install SAMBA in <TT
679 CLASS="FILENAME"
680 >/usr/local/samba</TT
681 >.
682 See the main SAMBA documentation if you want to install SAMBA somewhere else.
683 It will also build the winbindd executable and libraries. </P
684 ></DIV
685 ><DIV
686 CLASS="SECT3"
687 ><H3
688 CLASS="SECT3"
689 ><A
690 NAME="AEN2357">15.5.3.2. Configure <TT
691 CLASS="FILENAME"
692 >nsswitch.conf</TT
693 > and the 
694 winbind libraries</H3
695 ><P
696 >The libraries needed to run the <B
697 CLASS="COMMAND"
698 >winbindd</B
699 > daemon 
700 through nsswitch need to be copied to their proper locations, so</P
701 ><P
702 ><TT
703 CLASS="PROMPT"
704 >root#</TT
705 > <B
706 CLASS="COMMAND"
707 >cp ../samba/source/nsswitch/libnss_winbind.so /lib</B
708 ></P
709 ><P
710 >I also found it necessary to make the following symbolic link:</P
711 ><P
712 ><TT
713 CLASS="PROMPT"
714 >root#</TT
715 > <B
716 CLASS="COMMAND"
717 >ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</B
718 ></P
719 ><P
720 >And, in the case of Sun solaris:</P
721 ><P
722 ><TT
723 CLASS="PROMPT"
724 >root#</TT
725 > <B
726 CLASS="COMMAND"
727 >ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</B
728 >
729 <TT
730 CLASS="PROMPT"
731 >root#</TT
732 > <B
733 CLASS="COMMAND"
734 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</B
735 >
736 <TT
737 CLASS="PROMPT"
738 >root#</TT
739 > <B
740 CLASS="COMMAND"
741 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</B
742 ></P
743 ><P
744 >Now, as root you need to edit <TT
745 CLASS="FILENAME"
746 >/etc/nsswitch.conf</TT
747 > to 
748 allow user and group entries to be visible from the <B
749 CLASS="COMMAND"
750 >winbindd</B
751
752 daemon.  My <TT
753 CLASS="FILENAME"
754 >/etc/nsswitch.conf</TT
755 > file look like 
756 this after editing:</P
757 ><P
758 ><PRE
759 CLASS="PROGRAMLISTING"
760 >       passwd:     files winbind
761         shadow:     files 
762         group:      files winbind</PRE
763 ></P
764 ><P
765 >       
766 The libraries needed by the winbind daemon will be automatically 
767 entered into the <B
768 CLASS="COMMAND"
769 >ldconfig</B
770 > cache the next time 
771 your system reboots, but it 
772 is faster (and you don't need to reboot) if you do it manually:</P
773 ><P
774 ><TT
775 CLASS="PROMPT"
776 >root#</TT
777 > <B
778 CLASS="COMMAND"
779 >/sbin/ldconfig -v | grep winbind</B
780 ></P
781 ><P
782 >This makes <TT
783 CLASS="FILENAME"
784 >libnss_winbind</TT
785 > available to winbindd 
786 and echos back a check to you.</P
787 ></DIV
788 ><DIV
789 CLASS="SECT3"
790 ><H3
791 CLASS="SECT3"
792 ><A
793 NAME="AEN2390">15.5.3.3. Configure smb.conf</H3
794 ><P
795 >Several parameters are needed in the smb.conf file to control 
796 the behavior of <B
797 CLASS="COMMAND"
798 >winbindd</B
799 >. Configure 
800 <TT
801 CLASS="FILENAME"
802 >smb.conf</TT
803 > These are described in more detail in 
804 the <A
805 HREF="winbindd.8.html"
806 TARGET="_top"
807 >winbindd(8)</A
808 > man page.  My 
809 <TT
810 CLASS="FILENAME"
811 >smb.conf</TT
812 > file was modified to
813 include the following entries in the [global] section:</P
814 ><P
815 ><PRE
816 CLASS="PROGRAMLISTING"
817 >[global]
818      &#60;...&#62;
819      # separate domain and username with '+', like DOMAIN+username
820      <A
821 HREF="winbindd.8.html#WINBINDSEPARATOR"
822 TARGET="_top"
823 >winbind separator</A
824 > = +
825      # use uids from 10000 to 20000 for domain users
826      <A
827 HREF="winbindd.8.html#WINBINDUID"
828 TARGET="_top"
829 >winbind uid</A
830 > = 10000-20000
831      # use gids from 10000 to 20000 for domain groups
832      <A
833 HREF="winbindd.8.html#WINBINDGID"
834 TARGET="_top"
835 >winbind gid</A
836 > = 10000-20000
837      # allow enumeration of winbind users and groups
838      <A
839 HREF="winbindd.8.html#WINBINDENUMUSERS"
840 TARGET="_top"
841 >winbind enum users</A
842 > = yes
843      <A
844 HREF="winbindd.8.html#WINBINDENUMGROUP"
845 TARGET="_top"
846 >winbind enum groups</A
847 > = yes
848      # give winbind users a real shell (only needed if they have telnet access)
849      <A
850 HREF="winbindd.8.html#TEMPLATEHOMEDIR"
851 TARGET="_top"
852 >template homedir</A
853 > = /home/winnt/%D/%U
854      <A
855 HREF="winbindd.8.html#TEMPLATESHELL"
856 TARGET="_top"
857 >template shell</A
858 > = /bin/bash</PRE
859 ></P
860 ></DIV
861 ><DIV
862 CLASS="SECT3"
863 ><H3
864 CLASS="SECT3"
865 ><A
866 NAME="AEN2406">15.5.3.4. Join the SAMBA server to the PDC domain</H3
867 ><P
868 >Enter the following command to make the SAMBA server join the 
869 PDC domain, where <TT
870 CLASS="REPLACEABLE"
871 ><I
872 >DOMAIN</I
873 ></TT
874 > is the name of 
875 your Windows domain and <TT
876 CLASS="REPLACEABLE"
877 ><I
878 >Administrator</I
879 ></TT
880 > is 
881 a domain user who has administrative privileges in the domain.</P
882 ><P
883 ><TT
884 CLASS="PROMPT"
885 >root#</TT
886 > <B
887 CLASS="COMMAND"
888 >/usr/local/samba/bin/net rpc join -S PDC -U Administrator</B
889 ></P
890 ><P
891 >The proper response to the command should be: "Joined the domain 
892 <TT
893 CLASS="REPLACEABLE"
894 ><I
895 >DOMAIN</I
896 ></TT
897 >" where <TT
898 CLASS="REPLACEABLE"
899 ><I
900 >DOMAIN</I
901 ></TT
902
903 is your DOMAIN name.</P
904 ></DIV
905 ><DIV
906 CLASS="SECT3"
907 ><H3
908 CLASS="SECT3"
909 ><A
910 NAME="AEN2417">15.5.3.5. Start up the winbindd daemon and test it!</H3
911 ><P
912 >Eventually, you will want to modify your smb startup script to 
913 automatically invoke the winbindd daemon when the other parts of 
914 SAMBA start, but it is possible to test out just the winbind
915 portion first.  To start up winbind services, enter the following 
916 command as root:</P
917 ><P
918 ><TT
919 CLASS="PROMPT"
920 >root#</TT
921 > <B
922 CLASS="COMMAND"
923 >/usr/local/samba/bin/winbindd</B
924 ></P
925 ><P
926 >I'm always paranoid and like to make sure the daemon 
927 is really running...</P
928 ><P
929 ><TT
930 CLASS="PROMPT"
931 >root#</TT
932 > <B
933 CLASS="COMMAND"
934 >ps -ae | grep winbindd</B
935 ></P
936 ><P
937 >This command should produce output like this, if the daemon is running</P
938 ><P
939 >3025 ?        00:00:00 winbindd</P
940 ><P
941 >Now... for the real test, try to get some information about the 
942 users on your PDC</P
943 ><P
944 ><TT
945 CLASS="PROMPT"
946 >root#</TT
947 > <B
948 CLASS="COMMAND"
949 >/usr/local/samba/bin/wbinfo -u</B
950 ></P
951 ><P
952 >       
953 This should echo back a list of users on your Windows users on 
954 your PDC.  For example, I get the following response:</P
955 ><P
956 ><PRE
957 CLASS="PROGRAMLISTING"
958 >CEO+Administrator
959 CEO+burdell
960 CEO+Guest
961 CEO+jt-ad
962 CEO+krbtgt
963 CEO+TsInternetUser</PRE
964 ></P
965 ><P
966 >Obviously, I have named my domain 'CEO' and my <TT
967 CLASS="PARAMETER"
968 ><I
969 >winbind
970 separator</I
971 ></TT
972 > is '+'.</P
973 ><P
974 >You can do the same sort of thing to get group information from 
975 the PDC:</P
976 ><P
977 ><PRE
978 CLASS="PROGRAMLISTING"
979 ><TT
980 CLASS="PROMPT"
981 >root#</TT
982 > <B
983 CLASS="COMMAND"
984 >/usr/local/samba/bin/wbinfo -g</B
985 >
986 CEO+Domain Admins
987 CEO+Domain Users
988 CEO+Domain Guests
989 CEO+Domain Computers
990 CEO+Domain Controllers
991 CEO+Cert Publishers
992 CEO+Schema Admins
993 CEO+Enterprise Admins
994 CEO+Group Policy Creator Owners</PRE
995 ></P
996 ><P
997 >The function 'getent' can now be used to get unified 
998 lists of both local and PDC users and groups.
999 Try the following command:</P
1000 ><P
1001 ><TT
1002 CLASS="PROMPT"
1003 >root#</TT
1004 > <B
1005 CLASS="COMMAND"
1006 >getent passwd</B
1007 ></P
1008 ><P
1009 >You should get a list that looks like your <TT
1010 CLASS="FILENAME"
1011 >/etc/passwd</TT
1012
1013 list followed by the domain users with their new uids, gids, home 
1014 directories and default shells.</P
1015 ><P
1016 >The same thing can be done for groups with the command</P
1017 ><P
1018 ><TT
1019 CLASS="PROMPT"
1020 >root#</TT
1021 > <B
1022 CLASS="COMMAND"
1023 >getent group</B
1024 ></P
1025 ></DIV
1026 ><DIV
1027 CLASS="SECT3"
1028 ><H3
1029 CLASS="SECT3"
1030 ><A
1031 NAME="AEN2453">15.5.3.6. Fix the init.d startup scripts</H3
1032 ><DIV
1033 CLASS="SECT4"
1034 ><H4
1035 CLASS="SECT4"
1036 ><A
1037 NAME="AEN2455">15.5.3.6.1. Linux</H4
1038 ><P
1039 >The <B
1040 CLASS="COMMAND"
1041 >winbindd</B
1042 > daemon needs to start up after the 
1043 <B
1044 CLASS="COMMAND"
1045 >smbd</B
1046 > and <B
1047 CLASS="COMMAND"
1048 >nmbd</B
1049 > daemons are running.  
1050 To accomplish this task, you need to modify the startup scripts of your system. They are located at <TT
1051 CLASS="FILENAME"
1052 >/etc/init.d/smb</TT
1053 > in RedHat and 
1054 <TT
1055 CLASS="FILENAME"
1056 >/etc/init.d/samba</TT
1057 > in Debian.
1058 script to add commands to invoke this daemon in the proper sequence.  My 
1059 startup script starts up <B
1060 CLASS="COMMAND"
1061 >smbd</B
1062 >, 
1063 <B
1064 CLASS="COMMAND"
1065 >nmbd</B
1066 >, and <B
1067 CLASS="COMMAND"
1068 >winbindd</B
1069 > from the 
1070 <TT
1071 CLASS="FILENAME"
1072 >/usr/local/samba/bin</TT
1073 > directory directly.  The 'start' 
1074 function in the script looks like this:</P
1075 ><P
1076 ><PRE
1077 CLASS="PROGRAMLISTING"
1078 >start() {
1079         KIND="SMB"
1080         echo -n $"Starting $KIND services: "
1081         daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
1082         RETVAL=$?
1083         echo
1084         KIND="NMB"
1085         echo -n $"Starting $KIND services: "
1086         daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
1087         RETVAL2=$?
1088         echo
1089         KIND="Winbind"
1090         echo -n $"Starting $KIND services: "
1091         daemon /usr/local/samba/bin/winbindd
1092         RETVAL3=$?
1093         echo
1094         [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] &#38;&#38; touch /var/lock/subsys/smb || \
1095            RETVAL=1
1096         return $RETVAL
1097 }</PRE
1098 ></P
1099 ><P
1100 >The 'stop' function has a corresponding entry to shut down the 
1101 services and look s like this:</P
1102 ><P
1103 ><PRE
1104 CLASS="PROGRAMLISTING"
1105 >stop() {
1106         KIND="SMB"
1107         echo -n $"Shutting down $KIND services: "
1108         killproc smbd
1109         RETVAL=$?
1110         echo
1111         KIND="NMB"
1112         echo -n $"Shutting down $KIND services: "
1113         killproc nmbd
1114         RETVAL2=$?
1115         echo
1116         KIND="Winbind"
1117         echo -n $"Shutting down $KIND services: "
1118         killproc winbindd
1119         RETVAL3=$?
1120         [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] &#38;&#38; rm -f /var/lock/subsys/smb
1121         echo ""
1122         return $RETVAL
1123 }</PRE
1124 ></P
1125 ></DIV
1126 ><DIV
1127 CLASS="SECT4"
1128 ><H4
1129 CLASS="SECT4"
1130 ><A
1131 NAME="AEN2472">15.5.3.6.2. Solaris</H4
1132 ><P
1133 >On solaris, you need to modify the 
1134 <TT
1135 CLASS="FILENAME"
1136 >/etc/init.d/samba.server</TT
1137 > startup script. It usually 
1138 only starts smbd and nmbd but should now start winbindd too. If you 
1139 have samba installed in <TT
1140 CLASS="FILENAME"
1141 >/usr/local/samba/bin</TT
1142 >, 
1143 the file could contains something like this:</P
1144 ><P
1145 ><PRE
1146 CLASS="PROGRAMLISTING"
1147 >##
1148 ## samba.server
1149 ##
1150
1151 if [ ! -d /usr/bin ]
1152 then                    # /usr not mounted
1153         exit
1154 fi
1155
1156 killproc() {            # kill the named process(es)
1157         pid=`/usr/bin/ps -e |
1158              /usr/bin/grep -w $1 |
1159              /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
1160         [ "$pid" != "" ] &#38;&#38; kill $pid
1161 }
1162  
1163 # Start/stop processes required for samba server
1164
1165 case "$1" in
1166
1167 'start')
1168 #
1169 # Edit these lines to suit your installation (paths, workgroup, host)
1170 #
1171 echo Starting SMBD
1172    /usr/local/samba/bin/smbd -D -s \
1173         /usr/local/samba/smb.conf
1174
1175 echo Starting NMBD
1176    /usr/local/samba/bin/nmbd -D -l \
1177         /usr/local/samba/var/log -s /usr/local/samba/smb.conf
1178
1179 echo Starting Winbind Daemon
1180    /usr/local/samba/bin/winbindd
1181    ;;
1182
1183 'stop')
1184    killproc nmbd
1185    killproc smbd
1186    killproc winbindd
1187    ;;
1188
1189 *)
1190    echo "Usage: /etc/init.d/samba.server { start | stop }"
1191    ;;
1192 esac</PRE
1193 ></P
1194 ></DIV
1195 ><DIV
1196 CLASS="SECT4"
1197 ><H4
1198 CLASS="SECT4"
1199 ><A
1200 NAME="AEN2479">15.5.3.6.3. Restarting</H4
1201 ><P
1202 >If you restart the <B
1203 CLASS="COMMAND"
1204 >smbd</B
1205 >, <B
1206 CLASS="COMMAND"
1207 >nmbd</B
1208 >, 
1209 and <B
1210 CLASS="COMMAND"
1211 >winbindd</B
1212 > daemons at this point, you
1213 should be able to connect to the samba server as a domain member just as
1214 if you were a local user.</P
1215 ></DIV
1216 ></DIV
1217 ><DIV
1218 CLASS="SECT3"
1219 ><H3
1220 CLASS="SECT3"
1221 ><A
1222 NAME="AEN2485">15.5.3.7. Configure Winbind and PAM</H3
1223 ><P
1224 >If you have made it this far, you know that winbindd and samba are working
1225 together.  If you want to use winbind to provide authentication for other 
1226 services, keep reading.  The pam configuration files need to be altered in
1227 this step.  (Did you remember to make backups of your original 
1228 <TT
1229 CLASS="FILENAME"
1230 >/etc/pam.d</TT
1231 > files? If not, do it now.)</P
1232 ><P
1233 >You will need a pam module to use winbindd with these other services.  This 
1234 module will be compiled in the <TT
1235 CLASS="FILENAME"
1236 >../source/nsswitch</TT
1237 > directory
1238 by invoking the command</P
1239 ><P
1240 ><TT
1241 CLASS="PROMPT"
1242 >root#</TT
1243 > <B
1244 CLASS="COMMAND"
1245 >make nsswitch/pam_winbind.so</B
1246 ></P
1247 ><P
1248 >from the <TT
1249 CLASS="FILENAME"
1250 >../source</TT
1251 > directory.  The
1252 <TT
1253 CLASS="FILENAME"
1254 >pam_winbind.so</TT
1255 > file should be copied to the location of
1256 your other pam security modules.  On my RedHat system, this was the
1257 <TT
1258 CLASS="FILENAME"
1259 >/lib/security</TT
1260 > directory. On Solaris, the pam security 
1261 modules reside in <TT
1262 CLASS="FILENAME"
1263 >/usr/lib/security</TT
1264 >.</P
1265 ><P
1266 ><TT
1267 CLASS="PROMPT"
1268 >root#</TT
1269 > <B
1270 CLASS="COMMAND"
1271 >cp ../samba/source/nsswitch/pam_winbind.so /lib/security</B
1272 ></P
1273 ><DIV
1274 CLASS="SECT4"
1275 ><H4
1276 CLASS="SECT4"
1277 ><A
1278 NAME="AEN2502">15.5.3.7.1. Linux/FreeBSD-specific PAM configuration</H4
1279 ><P
1280 >The <TT
1281 CLASS="FILENAME"
1282 >/etc/pam.d/samba</TT
1283 > file does not need to be changed. I 
1284 just left this fileas it was:</P
1285 ><P
1286 ><PRE
1287 CLASS="PROGRAMLISTING"
1288 >auth    required        /lib/security/pam_stack.so service=system-auth
1289 account required        /lib/security/pam_stack.so service=system-auth</PRE
1290 ></P
1291 ><P
1292 >The other services that I modified to allow the use of winbind 
1293 as an authentication service were the normal login on the console (or a terminal 
1294 session), telnet logins, and ftp service.  In order to enable these 
1295 services, you may first need to change the entries in 
1296 <TT
1297 CLASS="FILENAME"
1298 >/etc/xinetd.d</TT
1299 > (or <TT
1300 CLASS="FILENAME"
1301 >/etc/inetd.conf</TT
1302 >).  
1303 RedHat 7.1 uses the new xinetd.d structure, in this case you need 
1304 to change the lines in <TT
1305 CLASS="FILENAME"
1306 >/etc/xinetd.d/telnet</TT
1307
1308 and <TT
1309 CLASS="FILENAME"
1310 >/etc/xinetd.d/wu-ftp</TT
1311 > from </P
1312 ><P
1313 ><PRE
1314 CLASS="PROGRAMLISTING"
1315 >enable = no</PRE
1316 ></P
1317 ><P
1318 >to</P
1319 ><P
1320 ><PRE
1321 CLASS="PROGRAMLISTING"
1322 >enable = yes</PRE
1323 ></P
1324 ><P
1325 >       
1326 For ftp services to work properly, you will also need to either 
1327 have individual directories for the domain users already present on 
1328 the server, or change the home directory template to a general
1329 directory for all domain users.  These can be easily set using 
1330 the <TT
1331 CLASS="FILENAME"
1332 >smb.conf</TT
1333 > global entry 
1334 <B
1335 CLASS="COMMAND"
1336 >template homedir</B
1337 >.</P
1338 ><P
1339 >The <TT
1340 CLASS="FILENAME"
1341 >/etc/pam.d/ftp</TT
1342 > file can be changed 
1343 to allow winbind ftp access in a manner similar to the
1344 samba file.  My <TT
1345 CLASS="FILENAME"
1346 >/etc/pam.d/ftp</TT
1347 > file was 
1348 changed to look like this:</P
1349 ><P
1350 ><PRE
1351 CLASS="PROGRAMLISTING"
1352 >auth       required     /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
1353 auth       sufficient   /lib/security/pam_winbind.so
1354 auth       required     /lib/security/pam_stack.so service=system-auth
1355 auth       required     /lib/security/pam_shells.so
1356 account    sufficient   /lib/security/pam_winbind.so
1357 account    required     /lib/security/pam_stack.so service=system-auth
1358 session    required     /lib/security/pam_stack.so service=system-auth</PRE
1359 ></P
1360 ><P
1361 >The <TT
1362 CLASS="FILENAME"
1363 >/etc/pam.d/login</TT
1364 > file can be changed nearly the 
1365 same way.  It now looks like this:</P
1366 ><P
1367 ><PRE
1368 CLASS="PROGRAMLISTING"
1369 >auth       required     /lib/security/pam_securetty.so
1370 auth       sufficient   /lib/security/pam_winbind.so
1371 auth       sufficient   /lib/security/pam_unix.so use_first_pass
1372 auth       required     /lib/security/pam_stack.so service=system-auth
1373 auth       required     /lib/security/pam_nologin.so
1374 account    sufficient   /lib/security/pam_winbind.so
1375 account    required     /lib/security/pam_stack.so service=system-auth
1376 password   required     /lib/security/pam_stack.so service=system-auth
1377 session    required     /lib/security/pam_stack.so service=system-auth
1378 session    optional     /lib/security/pam_console.so</PRE
1379 ></P
1380 ><P
1381 >In this case, I added the <B
1382 CLASS="COMMAND"
1383 >auth sufficient /lib/security/pam_winbind.so</B
1384
1385 lines as before, but also added the <B
1386 CLASS="COMMAND"
1387 >required pam_securetty.so</B
1388
1389 above it, to disallow root logins over the network.  I also added a 
1390 <B
1391 CLASS="COMMAND"
1392 >sufficient /lib/security/pam_unix.so use_first_pass</B
1393 >
1394 line after the <B
1395 CLASS="COMMAND"
1396 >winbind.so</B
1397 > line to get rid of annoying 
1398 double prompts for passwords.</P
1399 ></DIV
1400 ><DIV
1401 CLASS="SECT4"
1402 ><H4
1403 CLASS="SECT4"
1404 ><A
1405 NAME="AEN2535">15.5.3.7.2. Solaris-specific configuration</H4
1406 ><P
1407 >The /etc/pam.conf needs to be changed. I changed this file so that my Domain
1408 users can logon both locally as well as telnet.The following are the changes
1409 that I made.You can customize the pam.conf file as per your requirements,but
1410 be sure of those changes because in the worst case it will leave your system
1411 nearly impossible to boot.</P
1412 ><P
1413 ><PRE
1414 CLASS="PROGRAMLISTING"
1415 >#
1416 #ident  "@(#)pam.conf   1.14    99/09/16 SMI"
1417 #
1418 # Copyright (c) 1996-1999, Sun Microsystems, Inc.
1419 # All Rights Reserved.
1420 #
1421 # PAM configuration
1422 #
1423 # Authentication management
1424 #
1425 login   auth required   /usr/lib/security/pam_winbind.so
1426 login   auth required   /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass 
1427 login   auth required   /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass 
1428 #
1429 rlogin  auth sufficient /usr/lib/security/pam_winbind.so
1430 rlogin  auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1431 rlogin  auth required   /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1432 #
1433 dtlogin auth sufficient /usr/lib/security/pam_winbind.so
1434 dtlogin auth required   /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1435 #
1436 rsh     auth required   /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1437 other   auth sufficient /usr/lib/security/pam_winbind.so
1438 other   auth required   /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1439 #
1440 # Account management
1441 #
1442 login   account sufficient      /usr/lib/security/pam_winbind.so
1443 login   account requisite       /usr/lib/security/$ISA/pam_roles.so.1 
1444 login   account required        /usr/lib/security/$ISA/pam_unix.so.1 
1445 #
1446 dtlogin account sufficient      /usr/lib/security/pam_winbind.so
1447 dtlogin account requisite       /usr/lib/security/$ISA/pam_roles.so.1 
1448 dtlogin account required        /usr/lib/security/$ISA/pam_unix.so.1 
1449 #
1450 other   account sufficient      /usr/lib/security/pam_winbind.so
1451 other   account requisite       /usr/lib/security/$ISA/pam_roles.so.1 
1452 other   account required        /usr/lib/security/$ISA/pam_unix.so.1 
1453 #
1454 # Session management
1455 #
1456 other   session required        /usr/lib/security/$ISA/pam_unix.so.1 
1457 #
1458 # Password management
1459 #
1460 #other   password sufficient     /usr/lib/security/pam_winbind.so
1461 other   password required       /usr/lib/security/$ISA/pam_unix.so.1 
1462 dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1
1463 #
1464 # Support for Kerberos V5 authentication (uncomment to use Kerberos)
1465 #
1466 #rlogin auth optional   /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1467 #login  auth optional   /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1468 #dtlogin        auth optional   /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1469 #other  auth optional   /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1470 #dtlogin        account optional /usr/lib/security/$ISA/pam_krb5.so.1
1471 #other  account optional /usr/lib/security/$ISA/pam_krb5.so.1
1472 #other  session optional /usr/lib/security/$ISA/pam_krb5.so.1
1473 #other  password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass</PRE
1474 ></P
1475 ><P
1476 >I also added a try_first_pass line after the winbind.so line to get rid of
1477 annoying double prompts for passwords.</P
1478 ><P
1479 >Now restart your Samba &#38; try connecting through your application that you
1480 configured in the pam.conf.</P
1481 ></DIV
1482 ></DIV
1483 ></DIV
1484 ></DIV
1485 ><DIV
1486 CLASS="SECT1"
1487 ><H1
1488 CLASS="SECT1"
1489 ><A
1490 NAME="AEN2542">15.6. Limitations</H1
1491 ><P
1492 >Winbind has a number of limitations in its current 
1493         released version that we hope to overcome in future 
1494         releases:</P
1495 ><P
1496 ></P
1497 ><UL
1498 ><LI
1499 ><P
1500 >Winbind is currently only available for 
1501                 the Linux operating system, although ports to other operating 
1502                 systems are certainly possible. For such ports to be feasible, 
1503                 we require the C library of the target operating system to 
1504                 support the Name Service Switch and Pluggable Authentication
1505                 Modules systems. This is becoming more common as NSS and 
1506                 PAM gain        support among UNIX vendors.</P
1507 ></LI
1508 ><LI
1509 ><P
1510 >The mappings of Windows NT RIDs to UNIX ids 
1511                 is not made algorithmically and depends on the order in which 
1512                 unmapped users or groups are seen by winbind. It may be difficult 
1513                 to recover the mappings of rid to UNIX id mapping if the file 
1514                 containing this information is corrupted or destroyed.</P
1515 ></LI
1516 ><LI
1517 ><P
1518 >Currently the winbind PAM module does not take 
1519                 into account possible workstation and logon time restrictions 
1520                 that may be been set for Windows NT users.</P
1521 ></LI
1522 ></UL
1523 ></DIV
1524 ><DIV
1525 CLASS="SECT1"
1526 ><H1
1527 CLASS="SECT1"
1528 ><A
1529 NAME="AEN2552">15.7. Conclusion</H1
1530 ><P
1531 >The winbind system, through the use of the Name Service 
1532         Switch, Pluggable Authentication Modules, and appropriate 
1533         Microsoft RPC calls have allowed us to provide seamless 
1534         integration of Microsoft Windows NT domain users on a
1535         UNIX system. The result is a great reduction in the administrative 
1536         cost of running a mixed UNIX and NT network.</P
1537 ></DIV
1538 ></DIV
1539 ><DIV
1540 CLASS="NAVFOOTER"
1541 ><HR
1542 ALIGN="LEFT"
1543 WIDTH="100%"><TABLE
1544 SUMMARY="Footer navigation table"
1545 WIDTH="100%"
1546 BORDER="0"
1547 CELLPADDING="0"
1548 CELLSPACING="0"
1549 ><TR
1550 ><TD
1551 WIDTH="33%"
1552 ALIGN="left"
1553 VALIGN="top"
1554 ><A
1555 HREF="printing.html"
1556 ACCESSKEY="P"
1557 >Prev</A
1558 ></TD
1559 ><TD
1560 WIDTH="34%"
1561 ALIGN="center"
1562 VALIGN="top"
1563 ><A
1564 HREF="samba-howto-collection.html"
1565 ACCESSKEY="H"
1566 >Home</A
1567 ></TD
1568 ><TD
1569 WIDTH="33%"
1570 ALIGN="right"
1571 VALIGN="top"
1572 ><A
1573 HREF="pdb-mysql.html"
1574 ACCESSKEY="N"
1575 >Next</A
1576 ></TD
1577 ></TR
1578 ><TR
1579 ><TD
1580 WIDTH="33%"
1581 ALIGN="left"
1582 VALIGN="top"
1583 >Printing Support</TD
1584 ><TD
1585 WIDTH="34%"
1586 ALIGN="center"
1587 VALIGN="top"
1588 ><A
1589 HREF="optional.html"
1590 ACCESSKEY="U"
1591 >Up</A
1592 ></TD
1593 ><TD
1594 WIDTH="33%"
1595 ALIGN="right"
1596 VALIGN="top"
1597 >Passdb MySQL plugin</TD
1598 ></TR
1599 ></TABLE
1600 ></DIV
1601 ></BODY
1602 ></HTML
1603 >