6 <firstname>Tim</firstname><surname>Potter</surname>
8 <orgname>Samba Team</orgname>
9 <address><email>tpot@linuxcare.com.au</email></address>
13 <firstname>Andrew</firstname><surname>Trigdell</surname>
15 <orgname>Samba Team</orgname>
16 <address><email>tridge@linuxcare.com.au</email></address>
20 <firstname>John</firstname><surname>Trostel</surname>
22 <orgname>Snapserver</orgname>
23 <address><email>jtrostel@snapserver.com</email></address>
28 <pubdate>16 Oct 2000</pubdate>
31 <title>Unified Logons between Windows NT and UNIX using Winbind</title>
34 <title>Abstract</title>
36 <para>Integration of UNIX and Microsoft Windows NT through
37 a unified logon has been considered a "holy grail" in heterogeneous
38 computing environments for a long time. We present
39 <emphasis>winbind</emphasis>, a component of the Samba suite
40 of programs as a solution to the unified logon problem. Winbind
41 uses a UNIX implementation
42 of Microsoft RPC calls, Pluggable Authentication Modules, and the Name
43 Service Switch to allow Windows NT domain users to appear and operate
44 as UNIX users on a UNIX machine. This paper describes the winbind
45 system, explaining the functionality it provides, how it is configured,
46 and how it works internally.</para>
51 <title>Introduction</title>
53 <para>It is well known that UNIX and Microsoft Windows NT have
54 different models for representing user and group information and
55 use different technologies for implementing them. This fact has
56 made it difficult to integrate the two systems in a satisfactory
59 <para>One common solution in use today has been to create
60 identically named user accounts on both the UNIX and Windows systems
61 and use the Samba suite of programs to provide file and print services
62 between the two. This solution is far from perfect however, as
63 adding and deleting users on both sets of machines becomes a chore
64 and two sets of passwords are required both of which
65 can lead to synchronization problems between the UNIX and Windows
66 systems and confusion for users.</para>
68 <para>We divide the unified logon problem for UNIX machines into
69 three smaller problems:</para>
72 <listitem><para>Obtaining Windows NT user and group information
75 <listitem><para>Authenticating Windows NT users
78 <listitem><para>Password changing for Windows NT users
83 <para>Ideally, a prospective solution to the unified logon problem
84 would satisfy all the above components without duplication of
85 information on the UNIX machines and without creating additional
86 tasks for the system administrator when maintaining users and
87 groups on either system. The winbind system provides a simple
88 and elegant solution to all three components of the unified logon
94 <title>What Winbind Provides</title>
96 <para>Winbind unifies UNIX and Windows NT account management by
97 allowing a UNIX box to become a full member of a NT domain. Once
98 this is done the UNIX box will see NT users and groups as if
99 they were native UNIX users and groups, allowing the NT domain
100 to be used in much the same manner that NIS+ is used within
101 UNIX-only environments.</para>
103 <para>The end result is that whenever any
104 program on the UNIX machine asks the operating system to lookup
105 a user or group name, the query will be resolved by asking the
106 NT domain controller for the specified domain to do the lookup.
107 Because Winbind hooks into the operating system at a low level
108 (via the NSS name resolution modules in the C library) this
109 redirection to the NT domain controller is completely
112 <para>Users on the UNIX machine can then use NT user and group
113 names as they would use "native" UNIX names. They can chown files
114 so that they are owned by NT domain users or even login to the
115 UNIX machine and run a UNIX X-Window session as a domain user.</para>
117 <para>The only obvious indication that Winbind is being used is
118 that user and group names take the form DOMAIN\user and
119 DOMAIN\group. This is necessary as it allows Winbind to determine
120 that redirection to a domain controller is wanted for a particular
121 lookup and which trusted domain is being referenced.</para>
123 <para>Additionally, Winbind provides an authentication service
124 that hooks into the Pluggable Authentication Modules (PAM) system
125 to provide authentication via a NT domain to any PAM enabled
126 applications. This capability solves the problem of synchronizing
127 passwords between systems since all passwords are stored in a single
128 location (on the domain controller).</para>
131 <title>Target Uses</title>
133 <para>Winbind is targeted at organizations that have an
134 existing NT based domain infrastructure into which they wish
135 to put UNIX workstations or servers. Winbind will allow these
136 organizations to deploy UNIX workstations without having to
137 maintain a separate account infrastructure. This greatly
138 simplifies the administrative overhead of deploying UNIX
139 workstations into a NT based organization.</para>
141 <para>Another interesting way in which we expect Winbind to
142 be used is as a central part of UNIX based appliances. Appliances
143 that provide file and print services to Microsoft based networks
144 will be able to use Winbind to provide seamless integration of
145 the appliance into the domain.</para>
152 <title>How Winbind Works</title>
154 <para>The winbind system is designed around a client/server
155 architecture. A long running <command>winbindd</command> daemon
156 listens on a UNIX domain socket waiting for requests
157 to arrive. These requests are generated by the NSS and PAM
158 clients and processed sequentially.</para>
160 <para>The technologies used to implement winbind are described
161 in detail below.</para>
164 <title>Microsoft Remote Procedure Calls</title>
166 <para>Over the last two years, efforts have been underway
167 by various Samba Team members to decode various aspects of
168 the Microsoft Remote Procedure Call (MSRPC) system. This
169 system is used for most network related operations between
170 Windows NT machines including remote management, user authentication
171 and print spooling. Although initially this work was done
172 to aid the implementation of Primary Domain Controller (PDC)
173 functionality in Samba, it has also yielded a body of code which
174 can be used for other purposes.</para>
176 <para>Winbind uses various MSRPC calls to enumerate domain users
177 and groups and to obtain detailed information about individual
178 users or groups. Other MSRPC calls can be used to authenticate
179 NT domain users and to change user passwords. By directly querying
180 a Windows PDC for user and group information, winbind maps the
181 NT account information onto UNIX user and group names.</para>
185 <title>Name Service Switch</title>
187 <para>The Name Service Switch, or NSS, is a feature that is
188 present in many UNIX operating systems. It allows system
189 information such as hostnames, mail aliases and user information
190 to be resolved from different sources. For example, a standalone
191 UNIX workstation may resolve system information from a series of
192 flat files stored on the local filesystem. A networked workstation
193 may first attempt to resolve system information from local files,
194 and then consult a NIS database for user information or a DNS server
195 for hostname information.</para>
197 <para>The NSS application programming interface allows winbind
198 to present itself as a source of system information when
199 resolving UNIX usernames and groups. Winbind uses this interface,
200 and information obtained from a Windows NT server using MSRPC
201 calls to provide a new source of account enumeration. Using standard
202 UNIX library calls, one can enumerate the users and groups on
203 a UNIX machine running winbind and see all users and groups in
204 a NT domain plus any trusted domain as though they were local
205 users and groups.</para>
207 <para>The primary control file for NSS is
208 <filename>/etc/nsswitch.conf</filename>.
209 When a UNIX application makes a request to do a lookup
210 the C library looks in <filename>/etc/nsswitch.conf</filename>
211 for a line which matches the service type being requested, for
212 example the "passwd" service type is used when user or group names
213 are looked up. This config line species which implementations
214 of that service should be tried and in what order. If the passwd
215 config line is:</para>
217 <para><command>passwd: files example</command></para>
219 <para>then the C library will first load a module called
220 <filename>/lib/libnss_files.so</filename> followed by
221 the module <filename>/lib/libnss_example.so</filename>. The
222 C library will dynamically load each of these modules in turn
223 and call resolver functions within the modules to try to resolve
224 the request. Once the request is resolved the C library returns the
225 result to the application.</para>
227 <para>This NSS interface provides a very easy way for Winbind
228 to hook into the operating system. All that needs to be done
229 is to put <filename>libnss_winbind.so</filename> in <filename>/lib/</filename>
230 then add "winbind" into <filename>/etc/nsswitch.conf</filename> at
231 the appropriate place. The C library will then call Winbind to
232 resolve user and group names.</para>
236 <title>Pluggable Authentication Modules</title>
238 <para>Pluggable Authentication Modules, also known as PAM,
239 is a system for abstracting authentication and authorization
240 technologies. With a PAM module it is possible to specify different
241 authentication methods for different system applications without
242 having to recompile these applications. PAM is also useful
243 for implementing a particular policy for authorization. For example,
244 a system administrator may only allow console logins from users
245 stored in the local password file but only allow users resolved from
246 a NIS database to log in over the network.</para>
248 <para>Winbind uses the authentication management and password
249 management PAM interface to integrate Windows NT users into a
250 UNIX system. This allows Windows NT users to log in to a UNIX
251 machine and be authenticated against a suitable Primary Domain
252 Controller. These users can also change their passwords and have
253 this change take effect directly on the Primary Domain Controller.
256 <para>PAM is configured by providing control files in the directory
257 <filename>/etc/pam.d/</filename> for each of the services that
258 require authentication. When an authentication request is made
259 by an application the PAM code in the C library looks up this
260 control file to determine what modules to load to do the
261 authentication check and in what order. This interface makes adding
262 a new authentication service for Winbind very easy, all that needs
263 to be done is that the <filename>pam_winbind.so</filename> module
264 is copied to <filename>/lib/security/</filename> and the PAM
265 control files for relevant services are updated to allow
266 authentication via winbind. See the PAM documentation
267 for more details.</para>
272 <title>User and Group ID Allocation</title>
274 <para>When a user or group is created under Windows NT
275 is it allocated a numerical relative identifier (RID). This is
276 slightly different to UNIX which has a range of numbers that are
277 used to identify users, and the same range in which to identify
278 groups. It is winbind's job to convert RIDs to UNIX id numbers and
279 vice versa. When winbind is configured it is given part of the UNIX
280 user id space and a part of the UNIX group id space in which to
281 store Windows NT users and groups. If a Windows NT user is
282 resolved for the first time, it is allocated the next UNIX id from
283 the range. The same process applies for Windows NT groups. Over
284 time, winbind will have mapped all Windows NT users and groups
285 to UNIX user ids and group ids.</para>
287 <para>The results of this mapping are stored persistently in
288 an ID mapping database held in a tdb database). This ensures that
289 RIDs are mapped to UNIX IDs in a consistent way.</para>
294 <title>Result Caching</title>
296 <para>An active system can generate a lot of user and group
297 name lookups. To reduce the network cost of these lookups winbind
298 uses a caching scheme based on the SAM sequence number supplied
299 by NT domain controllers. User or group information returned
300 by a PDC is cached by winbind along with a sequence number also
301 returned by the PDC. This sequence number is incremented by
302 Windows NT whenever any user or group information is modified. If
303 a cached entry has expired, the sequence number is requested from
304 the PDC and compared against the sequence number of the cached entry.
305 If the sequence numbers do not match, then the cached information
306 is discarded and up to date information is requested directly
313 <title>Installation and Configuration</title>
316 Many thanks to John Trostel <ulink
317 url="mailto:jtrostel@snapserver.com">jtrostel@snapserver.com</ulink>
318 for providing the HOWTO for this section.
322 This HOWTO describes how to get winbind services up and running
323 to control access and authenticate users on your Linux box using
324 the winbind services which come with SAMBA 2.2.2.
328 There is also some Solaris specific information in
329 <filename>docs/textdocs/Solaris-Winbind-HOWTO.txt</filename>.
330 Future revisions of this document will incorporate that
337 <title>Introduction</title>
340 This HOWTO describes the procedures used to get winbind up and
341 running on my RedHat 7.1 system. Winbind is capable of providing access
342 and authentication control for Windows Domain users through an NT
343 or Win2K PDC for 'regular' services, such as telnet a nd ftp, as
344 well for SAMBA services.
348 This HOWTO has been written from a 'RedHat-centric' perspective, so if
349 you are using another distribution, you may have to modify the instructions
350 somewhat to fit the way your distribution works.
357 <emphasis>Why should I to this?</emphasis>
360 <para>This allows the SAMBA administrator to rely on the
361 authentication mechanisms on the NT/Win2K PDC for the authentication
362 of domain members. NT/Win2K users no longer need to have separate
363 accounts on the SAMBA server.
369 <emphasis>Who should be reading this document?</emphasis>
373 This HOWTO is designed for system administrators. If you are
374 implementing SAMBA on a file server and wish to (fairly easily)
375 integrate existing NT/Win2K users from your PDC onto the
376 SAMBA server, this HOWTO is for you. That said, I am no NT or PAM
377 expert, so you may find a better or easier way to accomplish
386 <title>Requirements</title>
389 If you have a samba configuration file that you are currently
390 using... <emphasis>BACK IT UP!</emphasis> If your system already uses PAM,
391 <emphasis>back up the <filename>/etc/pam.d</filename> directory
392 contents!</emphasis> If you haven't already made a boot disk,
393 <emphasis>MAKE ONE NOW!</emphasis>
397 Messing with the pam configuration files can make it nearly impossible
398 to log in to yourmachine. That's why you want to be able to boot back
399 into your machine in single user mode and restore your
400 <filename>/etc/pam.d</filename> back to the original state they were in if
401 you get frustrated with the way things are going. ;-)
405 The latest version of SAMBA (version 2.2.2 as of this writing), now
406 includes a functioning winbindd daemon. Please refer to the
407 <ulink url="http://samba.org/">main SAMBA web page</ulink> or,
408 better yet, your closest SAMBA mirror site for instructions on
409 downloading the source code.
413 To allow Domain users the ability to access SAMBA shares and
414 files, as well as potentially other services provided by your
415 SAMBA machine, PAM (pluggable authentication modules) must
416 be setup properly on your machine. In order to compile the
417 winbind modules, you should have at least the pam libraries resident
418 on your system. For recent RedHat systems (7.1, for instance), that
419 means <filename>pam-0.74-22</filename>. For best results, it is helpful to also
420 install the development packages in <filename>pam-devel-0.74-22</filename>.
427 <title>Testing Things Out</title>
430 Before starting, it is probably best to kill off all the SAMBA
431 related daemons running on your server. Kill off all <command>smbd</command>,
432 <command>nmbd</command>, and <command>winbindd</command> processes that may
433 be running. To use PAM, you will want to make sure that you have the
434 standard PAM package (for RedHat) which supplies the <filename>/etc/pam.d</filename>
435 directory structure, including the pam modules are used by pam-aware
436 services, several pam libraries, and the <filename>/usr/doc</filename>
437 and <filename>/usr/man</filename> entries for pam. Winbind built better
438 in SAMBA if the pam-devel package was also installed. This package includes
439 the header files needed to compile pam-aware applications. For instance,
440 my RedHat system has both <filename>pam-0.74-22</filename> and
441 <filename>pam-devel-0.74-22</filename> RPMs installed.
445 <title>Configure and compile SAMBA</title>
448 The configuration and compilation of SAMBA is pretty straightforward.
449 The first three steps may not be necessary depending upon
450 whether or not you have previously built the Samba binaries.
453 <para><programlisting>
454 <prompt>root#</prompt> <command>autoconf</command>
455 <prompt>root#</prompt> <command>make clean</command>
456 <prompt>root#</prompt> <command>rm config.cache</command>
457 <prompt>root#</prompt> <command>./configure --with-winbind</command>
458 <prompt>root#</prompt> <command>make</command>
459 <prompt>root#</prompt> <command>make install</command>
460 </programlisting></para>
464 This will, by default, install SAMBA in <filename>/usr/local/samba</filename>.
465 See the main SAMBA documentation if you want to install SAMBA somewhere else.
466 It will also build the winbindd executable and libraries.
472 <title>Configure <filename>nsswitch.conf</filename> and the
473 winbind libraries</title>
476 The libraries needed to run the <command>winbindd</command> daemon
477 through nsswitch need to be copied to their proper locations, so
481 <prompt>root#</prompt> <command>cp ../samba/source/nsswitch/libnss_winbind.so /lib</command>
485 I also found it necessary to make the following symbolic link:
489 <prompt>root#</prompt> <command>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</command>
493 Now, as root you need to edit <filename>/etc/nsswitch.conf</filename> to
494 allow user and group entries to be visible from the <command>winbindd</command>
495 daemon. My <filename>/etc/nsswitch.conf</filename> file look like
499 <para><programlisting>
500 passwd: files winbind
503 </programlisting></para>
506 The libraries needed by the winbind daemon will be automatically
507 entered into the <command>ldconfig</command> cache the next time
508 your system reboots, but it
509 is faster (and you don't need to reboot) if you do it manually:
513 <prompt>root#</prompt> <command>/sbin/ldconfig -v | grep winbind</command>
517 This makes <filename>libnss_winbind</filename> available to winbindd
518 and echos back a check to you.
525 <title>Configure smb.conf</title>
528 Several parameters are needed in the smb.conf file to control
529 the behavior of <command>winbindd</command>. Configure
530 <filename>smb.conf</filename> These are described in more detail in
531 the <ulink url="winbindd.8.html">winbindd(8)</ulink> man page. My
532 <filename>smb.conf</filename> file was modified to
533 include the following entries in the [global] section:
536 <para><programlisting>
539 # separate domain and username with '+', like DOMAIN+username
540 <ulink url="winbindd.8.html#WINBINDSEPARATOR">winbind separator</ulink> = +
541 # use uids from 10000 to 20000 for domain users
542 <ulink url="winbindd.8.html#WINBINDUID">winbind uid</ulink> = 10000-20000
543 # use gids from 10000 to 20000 for domain groups
544 <ulink url="winbindd.8.html#WINBINDGID">winbind gid</ulink> = 10000-20000
545 # allow enumeration of winbind users and groups
546 <ulink url="winbindd.8.html#WINBINDENUMUSERS">winbind enum users</ulink> = yes
547 <ulink url="winbindd.8.html#WINBINDENUMGROUP">winbind enum groups</ulink> = yes
548 # give winbind users a real shell (only needed if they have telnet access)
549 <ulink url="winbindd.8.html#TEMPLATEHOMEDIR">template homedir</ulink> = /home/winnt/%D/%U
550 <ulink url="winbindd.8.html#TEMPLATESHELL">template shell</ulink> = /bin/bash
551 </programlisting></para>
557 <title>Join the SAMBA server to the PDC domain</title>
560 Enter the following command to make the SAMBA server join the
561 PDC domain, where <replaceable>DOMAIN</replaceable> is the name of
562 your Windows domain and <replaceable>Administrator</replaceable> is
563 a domain user who has administrative privileges in the domain.
568 <prompt>root#</prompt> <command>/usr/local/samba/bin/net rpc join -s PDC -U Administrator</command>
573 The proper response to the command should be: "Joined the domain
574 <replaceable>DOMAIN</replaceable>" where <replaceable>DOMAIN</replaceable>
582 <title>Start up the winbindd daemon and test it!</title>
585 Eventually, you will want to modify your smb startup script to
586 automatically invoke the winbindd daemon when the other parts of
587 SAMBA start, but it is possible to test out just the winbind
588 portion first. To start up winbind services, enter the following
593 <prompt>root#</prompt> <command>/usr/local/samba/bin/winbindd</command>
597 I'm always paranoid and like to make sure the daemon
602 <prompt>root#</prompt> <command>ps -ae | grep winbindd</command>
605 This command should produce output like this, if the daemon is running
608 3025 ? 00:00:00 winbindd
612 Now... for the real test, try to get some information about the
617 <prompt>root#</prompt> <command>/usr/local/samba/bin/wbinfo -u</command>
621 This should echo back a list of users on your Windows users on
622 your PDC. For example, I get the following response:
625 <para><programlisting>
632 </programlisting></para>
635 Obviously, I have named my domain 'CEO' and my <parameter>winbind
636 separator</parameter> is '+'.
640 You can do the same sort of thing to get group information from
644 <para><programlisting>
645 <prompt>root#</prompt> <command>/usr/local/samba/bin/wbinfo -g</command>
650 CEO+Domain Controllers
653 CEO+Enterprise Admins
654 CEO+Group Policy Creator Owners
655 </programlisting></para>
658 The function 'getent' can now be used to get unified
659 lists of both local and PDC users and groups.
660 Try the following command:
664 <prompt>root#</prompt> <command>getent passwd</command>
668 You should get a list that looks like your <filename>/etc/passwd</filename>
669 list followed by the domain users with their new uids, gids, home
670 directories and default shells.
674 The same thing can be done for groups with the command
678 <prompt>root#</prompt> <command>getent group</command>
685 <title>Fix the <filename>/etc/rc.d/init.d/smb</filename> startup files</title>
688 The <command>winbindd</command> daemon needs to start up after the
689 <command>smbd</command> and <command>nmbd</command> daemons are running.
690 To accomplish this task, you need to modify the <filename>/etc/init.d/smb</filename>
691 script to add commands to invoke this daemon in the proper sequence. My
692 <filename>/etc/init.d/smb</filename> file starts up <command>smbd</command>,
693 <command>nmbd</command>, and <command>winbindd</command> from the
694 <filename>/usr/local/samba/bin</filename> directory directly. The 'start'
695 function in the script looks like this:
698 <para><programlisting>
701 echo -n $"Starting $KIND services: "
702 daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
706 echo -n $"Starting $KIND services: "
707 daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
711 echo -n $"Starting $KIND services: "
712 daemon /usr/local/samba/bin/winbindd
715 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && touch /var/lock/subsys/smb || \
719 </programlisting></para>
722 The 'stop' function has a corresponding entry to shut down the
723 services and look s like this:
726 <para><programlisting>
729 echo -n $"Shutting down $KIND services: "
734 echo -n $"Shutting down $KIND services: "
739 echo -n $"Shutting down $KIND services: "
742 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && rm -f /var/lock/subsys/smb
746 </programlisting></para>
749 If you restart the <command>smbd</command>, <command>nmbd</command>,
750 and <command>winbindd</command> daemons at this point, you
751 should be able to connect to the samba server as a domain member just as
752 if you were a local user.
760 <title>Configure Winbind and PAM</title>
763 If you have made it this far, you know that winbindd and samba are working
764 together. If you want to use winbind to provide authentication for other
765 services, keep reading. The pam configuration files need to be altered in
766 this step. (Did you remember to make backups of your original
767 <filename>/etc/pam.d</filename> files? If not, do it now.)
771 You will need a pam module to use winbindd with these other services. This
772 module will be compiled in the <filename>../source/nsswitch</filename> directory
773 by invoking the command
777 <prompt>root#</prompt> <command>make nsswitch/pam_winbind.so</command>
781 from the <filename>../source</filename> directory. The
782 <filename>pam_winbind.so</filename> file should be copied to the location of
783 your other pam security modules. On my RedHat system, this was the
784 <filename>/lib/security</filename> directory.
788 <prompt>root#</prompt> <command>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</command>
792 The <filename>/etc/pam.d/samba</filename> file does not need to be changed. I
793 just left this fileas it was:
797 <para><programlisting>
798 auth required /lib/security/pam_stack.so service=system-auth
799 account required /lib/security/pam_stack.so service=system-auth
800 </programlisting></para>
803 The other services that I modified to allow the use of winbind
804 as an authentication service were the normal login on the console (or a terminal
805 session), telnet logins, and ftp service. In order to enable these
806 services, you may first need to change the entries in
807 <filename>/etc/xinetd.d</filename> (or <filename>/etc/inetd.conf</filename>).
808 RedHat 7.1 uses the new xinetd.d structure, in this case you need
809 to change the lines in <filename>/etc/xinetd.d/telnet</filename>
810 and <filename>/etc/xinetd.d/wu-ftp</filename> from
813 <para><programlisting>
815 </programlisting></para>
821 <para><programlisting>
823 </programlisting></para>
826 For ftp services to work properly, you will also need to either
827 have individual directories for the domain users already present on
828 the server, or change the home directory template to a general
829 directory for all domain users. These can be easily set using
830 the <filename>smb.conf</filename> global entry
831 <command>template homedir</command>.
835 The <filename>/etc/pam.d/ftp</filename> file can be changed
836 to allow winbind ftp access in a manner similar to the
837 samba file. My <filename>/etc/pam.d/ftp</filename> file was
838 changed to look like this:
841 <para><programlisting>
842 auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
843 auth sufficient /lib/security/pam_winbind.so
844 auth required /lib/security/pam_stack.so service=system-auth
845 auth required /lib/security/pam_shells.so
846 account sufficient /lib/security/pam_winbind.so
847 account required /lib/security/pam_stack.so service=system-auth
848 session required /lib/security/pam_stack.so service=system-auth
849 </programlisting></para>
852 The <filename>/etc/pam.d/login</filename> file can be changed nearly the
853 same way. It now looks like this:
856 <para><programlisting>
857 auth required /lib/security/pam_securetty.so
858 auth sufficient /lib/security/pam_winbind.so
859 auth sufficient /lib/security/pam_unix.so use_first_pass
860 auth required /lib/security/pam_stack.so service=system-auth
861 auth required /lib/security/pam_nologin.so
862 account sufficient /lib/security/pam_winbind.so
863 account required /lib/security/pam_stack.so service=system-auth
864 password required /lib/security/pam_stack.so service=system-auth
865 session required /lib/security/pam_stack.so service=system-auth
866 session optional /lib/security/pam_console.so
867 </programlisting></para>
870 In this case, I added the <command>auth sufficient /lib/security/pam_winbind.so</command>
871 lines as before, but also added the <command>required pam_securetty.so</command>
872 above it, to disallow root logins over the network. I also added a
873 <command>sufficient /lib/security/pam_unix.so use_first_pass</command>
874 line after the <command>winbind.so</command> line to get rid of annoying
875 double prompts for passwords.
886 <title>Limitations</title>
888 <para>Winbind has a number of limitations in its current
889 released version that we hope to overcome in future
893 <listitem><para>Winbind is currently only available for
894 the Linux operating system, although ports to other operating
895 systems are certainly possible. For such ports to be feasible,
896 we require the C library of the target operating system to
897 support the Name Service Switch and Pluggable Authentication
898 Modules systems. This is becoming more common as NSS and
899 PAM gain support among UNIX vendors.</para></listitem>
901 <listitem><para>The mappings of Windows NT RIDs to UNIX ids
902 is not made algorithmically and depends on the order in which
903 unmapped users or groups are seen by winbind. It may be difficult
904 to recover the mappings of rid to UNIX id mapping if the file
905 containing this information is corrupted or destroyed.</para>
908 <listitem><para>Currently the winbind PAM module does not take
909 into account possible workstation and logon time restrictions
910 that may be been set for Windows NT users.</para></listitem>
916 <title>Conclusion</title>
918 <para>The winbind system, through the use of the Name Service
919 Switch, Pluggable Authentication Modules, and appropriate
920 Microsoft RPC calls have allowed us to provide seamless
921 integration of Microsoft Windows NT domain users on a
922 UNIX system. The result is a great reduction in the administrative
923 cost of running a mixed UNIX and NT network.</para>