1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Unified Logons between Windows NT and UNIX using Winbind</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"><LINK
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
13 TITLE="Optional configuration"
14 HREF="optional.html"><LINK
16 TITLE="Printing Support"
17 HREF="printing.html"><LINK
19 TITLE="Improved browsing in samba"
20 HREF="improved-browsing.html"></HEAD
31 SUMMARY="Header navigation table"
40 >SAMBA Project Documentation</TH
62 HREF="improved-browsing.html"
77 >Chapter 14. Unified Logons between Windows NT and UNIX using Winbind</H1
87 >Integration of UNIX and Microsoft Windows NT through
88 a unified logon has been considered a "holy grail" in heterogeneous
89 computing environments for a long time. We present
96 >, a component of the Samba suite
97 of programs as a solution to the unified logon problem. Winbind
98 uses a UNIX implementation
99 of Microsoft RPC calls, Pluggable Authentication Modules, and the Name
100 Service Switch to allow Windows NT domain users to appear and operate
101 as UNIX users on a UNIX machine. This paper describes the winbind
102 system, explaining the functionality it provides, how it is configured,
103 and how it works internally.</P
112 >14.2. Introduction</H1
114 >It is well known that UNIX and Microsoft Windows NT have
115 different models for representing user and group information and
116 use different technologies for implementing them. This fact has
117 made it difficult to integrate the two systems in a satisfactory
120 >One common solution in use today has been to create
121 identically named user accounts on both the UNIX and Windows systems
122 and use the Samba suite of programs to provide file and print services
123 between the two. This solution is far from perfect however, as
124 adding and deleting users on both sets of machines becomes a chore
125 and two sets of passwords are required both of which
126 can lead to synchronization problems between the UNIX and Windows
127 systems and confusion for users.</P
129 >We divide the unified logon problem for UNIX machines into
130 three smaller problems:</P
136 >Obtaining Windows NT user and group information
141 >Authenticating Windows NT users
146 >Password changing for Windows NT users
151 >Ideally, a prospective solution to the unified logon problem
152 would satisfy all the above components without duplication of
153 information on the UNIX machines and without creating additional
154 tasks for the system administrator when maintaining users and
155 groups on either system. The winbind system provides a simple
156 and elegant solution to all three components of the unified logon
166 >14.3. What Winbind Provides</H1
168 >Winbind unifies UNIX and Windows NT account management by
169 allowing a UNIX box to become a full member of a NT domain. Once
170 this is done the UNIX box will see NT users and groups as if
171 they were native UNIX users and groups, allowing the NT domain
172 to be used in much the same manner that NIS+ is used within
173 UNIX-only environments.</P
175 >The end result is that whenever any
176 program on the UNIX machine asks the operating system to lookup
177 a user or group name, the query will be resolved by asking the
178 NT domain controller for the specified domain to do the lookup.
179 Because Winbind hooks into the operating system at a low level
180 (via the NSS name resolution modules in the C library) this
181 redirection to the NT domain controller is completely
184 >Users on the UNIX machine can then use NT user and group
185 names as they would use "native" UNIX names. They can chown files
186 so that they are owned by NT domain users or even login to the
187 UNIX machine and run a UNIX X-Window session as a domain user.</P
189 >The only obvious indication that Winbind is being used is
190 that user and group names take the form DOMAIN\user and
191 DOMAIN\group. This is necessary as it allows Winbind to determine
192 that redirection to a domain controller is wanted for a particular
193 lookup and which trusted domain is being referenced.</P
195 >Additionally, Winbind provides an authentication service
196 that hooks into the Pluggable Authentication Modules (PAM) system
197 to provide authentication via a NT domain to any PAM enabled
198 applications. This capability solves the problem of synchronizing
199 passwords between systems since all passwords are stored in a single
200 location (on the domain controller).</P
208 >14.3.1. Target Uses</H2
210 >Winbind is targeted at organizations that have an
211 existing NT based domain infrastructure into which they wish
212 to put UNIX workstations or servers. Winbind will allow these
213 organizations to deploy UNIX workstations without having to
214 maintain a separate account infrastructure. This greatly
215 simplifies the administrative overhead of deploying UNIX
216 workstations into a NT based organization.</P
218 >Another interesting way in which we expect Winbind to
219 be used is as a central part of UNIX based appliances. Appliances
220 that provide file and print services to Microsoft based networks
221 will be able to use Winbind to provide seamless integration of
222 the appliance into the domain.</P
232 >14.4. How Winbind Works</H1
234 >The winbind system is designed around a client/server
235 architecture. A long running <B
239 listens on a UNIX domain socket waiting for requests
240 to arrive. These requests are generated by the NSS and PAM
241 clients and processed sequentially.</P
243 >The technologies used to implement winbind are described
252 >14.4.1. Microsoft Remote Procedure Calls</H2
254 >Over the last few years, efforts have been underway
255 by various Samba Team members to decode various aspects of
256 the Microsoft Remote Procedure Call (MSRPC) system. This
257 system is used for most network related operations between
258 Windows NT machines including remote management, user authentication
259 and print spooling. Although initially this work was done
260 to aid the implementation of Primary Domain Controller (PDC)
261 functionality in Samba, it has also yielded a body of code which
262 can be used for other purposes.</P
264 >Winbind uses various MSRPC calls to enumerate domain users
265 and groups and to obtain detailed information about individual
266 users or groups. Other MSRPC calls can be used to authenticate
267 NT domain users and to change user passwords. By directly querying
268 a Windows PDC for user and group information, winbind maps the
269 NT account information onto UNIX user and group names.</P
278 >14.4.2. Microsoft Active Directory Services</H2
280 > Since late 2001, Samba has gained the ability to
281 interact with Microsoft Windows 2000 using its 'Native
282 Mode' protocols, rather than the NT4 RPC services.
283 Using LDAP and Kerberos, a domain member running
284 winbind can enumerate users and groups in exactly the
285 same way as a Win2k client would, and in so doing
286 provide a much more efficient and
287 effective winbind implementation.
297 >14.4.3. Name Service Switch</H2
299 >The Name Service Switch, or NSS, is a feature that is
300 present in many UNIX operating systems. It allows system
301 information such as hostnames, mail aliases and user information
302 to be resolved from different sources. For example, a standalone
303 UNIX workstation may resolve system information from a series of
304 flat files stored on the local filesystem. A networked workstation
305 may first attempt to resolve system information from local files,
306 and then consult a NIS database for user information or a DNS server
307 for hostname information.</P
309 >The NSS application programming interface allows winbind
310 to present itself as a source of system information when
311 resolving UNIX usernames and groups. Winbind uses this interface,
312 and information obtained from a Windows NT server using MSRPC
313 calls to provide a new source of account enumeration. Using standard
314 UNIX library calls, one can enumerate the users and groups on
315 a UNIX machine running winbind and see all users and groups in
316 a NT domain plus any trusted domain as though they were local
319 >The primary control file for NSS is
322 >/etc/nsswitch.conf</TT
324 When a UNIX application makes a request to do a lookup
325 the C library looks in <TT
327 >/etc/nsswitch.conf</TT
329 for a line which matches the service type being requested, for
330 example the "passwd" service type is used when user or group names
331 are looked up. This config line species which implementations
332 of that service should be tried and in what order. If the passwd
337 >passwd: files example</B
340 >then the C library will first load a module called
343 >/lib/libnss_files.so</TT
347 >/lib/libnss_example.so</TT
349 C library will dynamically load each of these modules in turn
350 and call resolver functions within the modules to try to resolve
351 the request. Once the request is resolved the C library returns the
352 result to the application.</P
354 >This NSS interface provides a very easy way for Winbind
355 to hook into the operating system. All that needs to be done
358 >libnss_winbind.so</TT
363 then add "winbind" into <TT
365 >/etc/nsswitch.conf</TT
367 the appropriate place. The C library will then call Winbind to
368 resolve user and group names.</P
377 >14.4.4. Pluggable Authentication Modules</H2
379 >Pluggable Authentication Modules, also known as PAM,
380 is a system for abstracting authentication and authorization
381 technologies. With a PAM module it is possible to specify different
382 authentication methods for different system applications without
383 having to recompile these applications. PAM is also useful
384 for implementing a particular policy for authorization. For example,
385 a system administrator may only allow console logins from users
386 stored in the local password file but only allow users resolved from
387 a NIS database to log in over the network.</P
389 >Winbind uses the authentication management and password
390 management PAM interface to integrate Windows NT users into a
391 UNIX system. This allows Windows NT users to log in to a UNIX
392 machine and be authenticated against a suitable Primary Domain
393 Controller. These users can also change their passwords and have
394 this change take effect directly on the Primary Domain Controller.
397 >PAM is configured by providing control files in the directory
401 > for each of the services that
402 require authentication. When an authentication request is made
403 by an application the PAM code in the C library looks up this
404 control file to determine what modules to load to do the
405 authentication check and in what order. This interface makes adding
406 a new authentication service for Winbind very easy, all that needs
407 to be done is that the <TT
415 control files for relevant services are updated to allow
416 authentication via winbind. See the PAM documentation
426 >14.4.5. User and Group ID Allocation</H2
428 >When a user or group is created under Windows NT
429 is it allocated a numerical relative identifier (RID). This is
430 slightly different to UNIX which has a range of numbers that are
431 used to identify users, and the same range in which to identify
432 groups. It is winbind's job to convert RIDs to UNIX id numbers and
433 vice versa. When winbind is configured it is given part of the UNIX
434 user id space and a part of the UNIX group id space in which to
435 store Windows NT users and groups. If a Windows NT user is
436 resolved for the first time, it is allocated the next UNIX id from
437 the range. The same process applies for Windows NT groups. Over
438 time, winbind will have mapped all Windows NT users and groups
439 to UNIX user ids and group ids.</P
441 >The results of this mapping are stored persistently in
442 an ID mapping database held in a tdb database). This ensures that
443 RIDs are mapped to UNIX IDs in a consistent way.</P
452 >14.4.6. Result Caching</H2
454 >An active system can generate a lot of user and group
455 name lookups. To reduce the network cost of these lookups winbind
456 uses a caching scheme based on the SAM sequence number supplied
457 by NT domain controllers. User or group information returned
458 by a PDC is cached by winbind along with a sequence number also
459 returned by the PDC. This sequence number is incremented by
460 Windows NT whenever any user or group information is modified. If
461 a cached entry has expired, the sequence number is requested from
462 the PDC and compared against the sequence number of the cached entry.
463 If the sequence numbers do not match, then the cached information
464 is discarded and up to date information is requested directly
475 >14.5. Installation and Configuration</H1
477 >Many thanks to John Trostel <A
478 HREF="mailto:jtrostel@snapserver.com"
480 >jtrostel@snapserver.com</A
482 for providing the HOWTO for this section.</P
484 >This HOWTO describes how to get winbind services up and running
485 to control access and authenticate users on your Linux box using
486 the winbind services which come with SAMBA 2.2.2.</P
488 >There is also some Solaris specific information in
491 >docs/textdocs/Solaris-Winbind-HOWTO.txt</TT
493 Future revisions of this document will incorporate that
502 >14.5.1. Introduction</H2
504 >This HOWTO describes the procedures used to get winbind up and
505 running on my RedHat 7.1 system. Winbind is capable of providing access
506 and authentication control for Windows Domain users through an NT
507 or Win2K PDC for 'regular' services, such as telnet a nd ftp, as
508 well for SAMBA services.</P
510 >This HOWTO has been written from a 'RedHat-centric' perspective, so if
511 you are using another distribution, you may have to modify the instructions
512 somewhat to fit the way your distribution works.</P
522 >Why should I to this?</I
527 >This allows the SAMBA administrator to rely on the
528 authentication mechanisms on the NT/Win2K PDC for the authentication
529 of domain members. NT/Win2K users no longer need to have separate
530 accounts on the SAMBA server.
539 >Who should be reading this document?</I
544 > This HOWTO is designed for system administrators. If you are
545 implementing SAMBA on a file server and wish to (fairly easily)
546 integrate existing NT/Win2K users from your PDC onto the
547 SAMBA server, this HOWTO is for you. That said, I am no NT or PAM
548 expert, so you may find a better or easier way to accomplish
561 >14.5.2. Requirements</H2
563 >If you have a samba configuration file that you are currently
570 > If your system already uses PAM,
581 > If you haven't already made a boot disk,
590 >Messing with the pam configuration files can make it nearly impossible
591 to log in to yourmachine. That's why you want to be able to boot back
592 into your machine in single user mode and restore your
596 > back to the original state they were in if
597 you get frustrated with the way things are going. ;-)</P
599 >The latest version of SAMBA (version 3.0 as of this writing), now
600 includes a functioning winbindd daemon. Please refer to the
602 HREF="http://samba.org/"
604 >main SAMBA web page</A
606 better yet, your closest SAMBA mirror site for instructions on
607 downloading the source code.</P
609 >To allow Domain users the ability to access SAMBA shares and
610 files, as well as potentially other services provided by your
611 SAMBA machine, PAM (pluggable authentication modules) must
612 be setup properly on your machine. In order to compile the
613 winbind modules, you should have at least the pam libraries resident
614 on your system. For recent RedHat systems (7.1, for instance), that
618 >. For best results, it is helpful to also
619 install the development packages in <TT
621 >pam-devel-0.74-22</TT
631 >14.5.3. Testing Things Out</H2
633 >Before starting, it is probably best to kill off all the SAMBA
634 related daemons running on your server. Kill off all <B
645 be running. To use PAM, you will want to make sure that you have the
646 standard PAM package (for RedHat) which supplies the <TT
650 directory structure, including the pam modules are used by pam-aware
651 services, several pam libraries, and the <TT
658 > entries for pam. Winbind built better
659 in SAMBA if the pam-devel package was also installed. This package includes
660 the header files needed to compile pam-aware applications. For instance,
661 my RedHat system has both <TT
667 >pam-devel-0.74-22</TT
676 >14.5.3.1. Configure and compile SAMBA</H3
678 >The configuration and compilation of SAMBA is pretty straightforward.
679 The first three steps may not be necessary depending upon
680 whether or not you have previously built the Samba binaries.</P
683 CLASS="PROGRAMLISTING"
728 >This will, by default, install SAMBA in <TT
730 >/usr/local/samba</TT
732 See the main SAMBA documentation if you want to install SAMBA somewhere else.
733 It will also build the winbindd executable and libraries. </P
742 >14.5.3.2. Configure <TT
746 winbind libraries</H3
748 >The libraries needed to run the <B
752 through nsswitch need to be copied to their proper locations, so</P
759 >cp ../samba/source/nsswitch/libnss_winbind.so /lib</B
762 >I also found it necessary to make the following symbolic link:</P
769 >ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</B
772 >And, in the case of Sun solaris:</P
779 >ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</B
786 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</B
793 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</B
796 >Now, as root you need to edit <TT
798 >/etc/nsswitch.conf</TT
800 allow user and group entries to be visible from the <B
806 >/etc/nsswitch.conf</TT
808 this after editing:</P
811 CLASS="PROGRAMLISTING"
812 > passwd: files winbind
814 group: files winbind</PRE
818 The libraries needed by the winbind daemon will be automatically
822 > cache the next time
823 your system reboots, but it
824 is faster (and you don't need to reboot) if you do it manually:</P
831 >/sbin/ldconfig -v | grep winbind</B
837 > available to winbindd
838 and echos back a check to you.</P
847 >14.5.3.3. Configure smb.conf</H3
849 >Several parameters are needed in the smb.conf file to control
857 > These are described in more detail in
859 HREF="winbindd.8.html"
866 > file was modified to
867 include the following entries in the [global] section:</P
870 CLASS="PROGRAMLISTING"
873 # separate domain and username with '+', like DOMAIN+username
875 HREF="winbindd.8.html#WINBINDSEPARATOR"
877 >winbind separator</A
879 # use uids from 10000 to 20000 for domain users
881 HREF="winbindd.8.html#WINBINDUID"
885 # use gids from 10000 to 20000 for domain groups
887 HREF="winbindd.8.html#WINBINDGID"
891 # allow enumeration of winbind users and groups
893 HREF="winbindd.8.html#WINBINDENUMUSERS"
895 >winbind enum users</A
898 HREF="winbindd.8.html#WINBINDENUMGROUP"
900 >winbind enum groups</A
902 # give winbind users a real shell (only needed if they have telnet access)
904 HREF="winbindd.8.html#TEMPLATEHOMEDIR"
907 > = /home/winnt/%D/%U
909 HREF="winbindd.8.html#TEMPLATESHELL"
922 >14.5.3.4. Join the SAMBA server to the PDC domain</H3
924 >Enter the following command to make the SAMBA server join the
925 PDC domain, where <TT
931 your Windows domain and <TT
937 a domain user who has administrative privileges in the domain.</P
944 >/usr/local/samba/bin/net join -S PDC -U Administrator</B
947 >The proper response to the command should be: "Joined the domain
959 is your DOMAIN name.</P
968 >14.5.3.5. Start up the winbindd daemon and test it!</H3
970 >Eventually, you will want to modify your smb startup script to
971 automatically invoke the winbindd daemon when the other parts of
972 SAMBA start, but it is possible to test out just the winbind
973 portion first. To start up winbind services, enter the following
981 >/usr/local/samba/bin/winbindd</B
984 >I'm always paranoid and like to make sure the daemon
985 is really running...</P
992 >ps -ae | grep winbindd</B
995 >This command should produce output like this, if the daemon is running</P
997 >3025 ? 00:00:00 winbindd</P
999 >Now... for the real test, try to get some information about the
1000 users on your PDC</P
1007 >/usr/local/samba/bin/wbinfo -u</B
1011 This should echo back a list of users on your Windows users on
1012 your PDC. For example, I get the following response:</P
1015 CLASS="PROGRAMLISTING"
1021 CEO+TsInternetUser</PRE
1024 >Obviously, I have named my domain 'CEO' and my <TT
1032 >You can do the same sort of thing to get group information from
1036 CLASS="PROGRAMLISTING"
1042 >/usr/local/samba/bin/wbinfo -g</B
1047 CEO+Domain Computers
1048 CEO+Domain Controllers
1051 CEO+Enterprise Admins
1052 CEO+Group Policy Creator Owners</PRE
1055 >The function 'getent' can now be used to get unified
1056 lists of both local and PDC users and groups.
1057 Try the following command:</P
1067 >You should get a list that looks like your <TT
1071 list followed by the domain users with their new uids, gids, home
1072 directories and default shells.</P
1074 >The same thing can be done for groups with the command</P
1091 >14.5.3.6. Fix the init.d startup scripts</H3
1099 >14.5.3.6.1. Linux</H4
1104 > daemon needs to start up after the
1111 > daemons are running.
1112 To accomplish this task, you need to modify the startup scripts of your system. They are located at <TT
1114 >/etc/init.d/smb</TT
1118 >/etc/init.d/samba</TT
1120 script to add commands to invoke this daemon in the proper sequence. My
1121 startup script starts up <B
1134 >/usr/local/samba/bin</TT
1135 > directory directly. The 'start'
1136 function in the script looks like this:</P
1139 CLASS="PROGRAMLISTING"
1142 echo -n $"Starting $KIND services: "
1143 daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
1147 echo -n $"Starting $KIND services: "
1148 daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
1152 echo -n $"Starting $KIND services: "
1153 daemon /usr/local/samba/bin/winbindd
1156 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && touch /var/lock/subsys/smb || \
1162 >The 'stop' function has a corresponding entry to shut down the
1163 services and look s like this:</P
1166 CLASS="PROGRAMLISTING"
1169 echo -n $"Shutting down $KIND services: "
1174 echo -n $"Shutting down $KIND services: "
1179 echo -n $"Shutting down $KIND services: "
1182 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && rm -f /var/lock/subsys/smb
1195 >14.5.3.6.2. Solaris</H4
1197 >On solaris, you need to modify the
1200 >/etc/init.d/samba.server</TT
1201 > startup script. It usually
1202 only starts smbd and nmbd but should now start winbindd too. If you
1203 have samba installed in <TT
1205 >/usr/local/samba/bin</TT
1207 the file could contains something like this:</P
1210 CLASS="PROGRAMLISTING"
1215 if [ ! -d /usr/bin ]
1216 then # /usr not mounted
1220 killproc() { # kill the named process(es)
1221 pid=`/usr/bin/ps -e |
1222 /usr/bin/grep -w $1 |
1223 /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
1224 [ "$pid" != "" ] && kill $pid
1227 # Start/stop processes required for samba server
1233 # Edit these lines to suit your installation (paths, workgroup, host)
1236 /usr/local/samba/bin/smbd -D -s \
1237 /usr/local/samba/smb.conf
1240 /usr/local/samba/bin/nmbd -D -l \
1241 /usr/local/samba/var/log -s /usr/local/samba/smb.conf
1243 echo Starting Winbind Daemon
1244 /usr/local/samba/bin/winbindd
1254 echo "Usage: /etc/init.d/samba.server { start | stop }"
1266 >14.5.3.6.3. Restarting</H4
1268 >If you restart the <B
1278 > daemons at this point, you
1279 should be able to connect to the samba server as a domain member just as
1280 if you were a local user.</P
1290 >14.5.3.7. Configure Winbind and PAM</H3
1292 >If you have made it this far, you know that winbindd and samba are working
1293 together. If you want to use winbind to provide authentication for other
1294 services, keep reading. The pam configuration files need to be altered in
1295 this step. (Did you remember to make backups of your original
1299 > files? If not, do it now.)</P
1301 >You will need a pam module to use winbindd with these other services. This
1302 module will be compiled in the <TT
1304 >../source/nsswitch</TT
1306 by invoking the command</P
1313 >make nsswitch/pam_winbind.so</B
1323 > file should be copied to the location of
1324 your other pam security modules. On my RedHat system, this was the
1328 > directory. On Solaris, the pam security
1329 modules reside in <TT
1331 >/usr/lib/security</TT
1339 >cp ../samba/source/nsswitch/pam_winbind.so /lib/security</B
1348 >14.5.3.7.1. Linux/FreeBSD-specific PAM configuration</H4
1352 >/etc/pam.d/samba</TT
1353 > file does not need to be changed. I
1354 just left this fileas it was:</P
1357 CLASS="PROGRAMLISTING"
1358 >auth required /lib/security/pam_stack.so service=system-auth
1359 account required /lib/security/pam_stack.so service=system-auth</PRE
1362 >The other services that I modified to allow the use of winbind
1363 as an authentication service were the normal login on the console (or a terminal
1364 session), telnet logins, and ftp service. In order to enable these
1365 services, you may first need to change the entries in
1371 >/etc/inetd.conf</TT
1373 RedHat 7.1 uses the new xinetd.d structure, in this case you need
1374 to change the lines in <TT
1376 >/etc/xinetd.d/telnet</TT
1380 >/etc/xinetd.d/wu-ftp</TT
1384 CLASS="PROGRAMLISTING"
1391 CLASS="PROGRAMLISTING"
1396 For ftp services to work properly, you will also need to either
1397 have individual directories for the domain users already present on
1398 the server, or change the home directory template to a general
1399 directory for all domain users. These can be easily set using
1406 >template homedir</B
1412 > file can be changed
1413 to allow winbind ftp access in a manner similar to the
1418 changed to look like this:</P
1421 CLASS="PROGRAMLISTING"
1422 >auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
1423 auth sufficient /lib/security/pam_winbind.so
1424 auth required /lib/security/pam_stack.so service=system-auth
1425 auth required /lib/security/pam_shells.so
1426 account sufficient /lib/security/pam_winbind.so
1427 account required /lib/security/pam_stack.so service=system-auth
1428 session required /lib/security/pam_stack.so service=system-auth</PRE
1433 >/etc/pam.d/login</TT
1434 > file can be changed nearly the
1435 same way. It now looks like this:</P
1438 CLASS="PROGRAMLISTING"
1439 >auth required /lib/security/pam_securetty.so
1440 auth sufficient /lib/security/pam_winbind.so
1441 auth sufficient /lib/security/pam_unix.so use_first_pass
1442 auth required /lib/security/pam_stack.so service=system-auth
1443 auth required /lib/security/pam_nologin.so
1444 account sufficient /lib/security/pam_winbind.so
1445 account required /lib/security/pam_stack.so service=system-auth
1446 password required /lib/security/pam_stack.so service=system-auth
1447 session required /lib/security/pam_stack.so service=system-auth
1448 session optional /lib/security/pam_console.so</PRE
1451 >In this case, I added the <B
1453 >auth sufficient /lib/security/pam_winbind.so</B
1455 lines as before, but also added the <B
1457 >required pam_securetty.so</B
1459 above it, to disallow root logins over the network. I also added a
1462 >sufficient /lib/security/pam_unix.so use_first_pass</B
1467 > line to get rid of annoying
1468 double prompts for passwords.</P
1477 >14.5.3.7.2. Solaris-specific configuration</H4
1479 >The /etc/pam.conf needs to be changed. I changed this file so that my Domain
1480 users can logon both locally as well as telnet.The following are the changes
1481 that I made.You can customize the pam.conf file as per your requirements,but
1482 be sure of those changes because in the worst case it will leave your system
1483 nearly impossible to boot.</P
1486 CLASS="PROGRAMLISTING"
1488 #ident "@(#)pam.conf 1.14 99/09/16 SMI"
1490 # Copyright (c) 1996-1999, Sun Microsystems, Inc.
1491 # All Rights Reserved.
1495 # Authentication management
1497 login auth required /usr/lib/security/pam_winbind.so
1498 login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1499 login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass
1501 rlogin auth sufficient /usr/lib/security/pam_winbind.so
1502 rlogin auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1503 rlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1505 dtlogin auth sufficient /usr/lib/security/pam_winbind.so
1506 dtlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1508 rsh auth required /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1509 other auth sufficient /usr/lib/security/pam_winbind.so
1510 other auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1512 # Account management
1514 login account sufficient /usr/lib/security/pam_winbind.so
1515 login account requisite /usr/lib/security/$ISA/pam_roles.so.1
1516 login account required /usr/lib/security/$ISA/pam_unix.so.1
1518 dtlogin account sufficient /usr/lib/security/pam_winbind.so
1519 dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1
1520 dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1
1522 other account sufficient /usr/lib/security/pam_winbind.so
1523 other account requisite /usr/lib/security/$ISA/pam_roles.so.1
1524 other account required /usr/lib/security/$ISA/pam_unix.so.1
1526 # Session management
1528 other session required /usr/lib/security/$ISA/pam_unix.so.1
1530 # Password management
1532 #other password sufficient /usr/lib/security/pam_winbind.so
1533 other password required /usr/lib/security/$ISA/pam_unix.so.1
1534 dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1
1536 # Support for Kerberos V5 authentication (uncomment to use Kerberos)
1538 #rlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1539 #login auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1540 #dtlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1541 #other auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1542 #dtlogin account optional /usr/lib/security/$ISA/pam_krb5.so.1
1543 #other account optional /usr/lib/security/$ISA/pam_krb5.so.1
1544 #other session optional /usr/lib/security/$ISA/pam_krb5.so.1
1545 #other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass</PRE
1548 >I also added a try_first_pass line after the winbind.so line to get rid of
1549 annoying double prompts for passwords.</P
1551 >Now restart your Samba and try connecting through your application that you
1552 configured in the pam.conf.</P
1564 >14.6. Limitations</H1
1566 >Winbind has a number of limitations in its current
1567 released version that we hope to overcome in future
1574 >Winbind is currently only available for
1575 the Linux, Solaris and IRIX operating systems, although ports to other operating
1576 systems are certainly possible. For such ports to be feasible,
1577 we require the C library of the target operating system to
1578 support the Name Service Switch and Pluggable Authentication
1579 Modules systems. This is becoming more common as NSS and
1580 PAM gain support among UNIX vendors.</P
1584 >The mappings of Windows NT RIDs to UNIX ids
1585 is not made algorithmically and depends on the order in which
1586 unmapped users or groups are seen by winbind. It may be difficult
1587 to recover the mappings of rid to UNIX id mapping if the file
1588 containing this information is corrupted or destroyed.</P
1592 >Currently the winbind PAM module does not take
1593 into account possible workstation and logon time restrictions
1594 that may be been set for Windows NT users, this is
1595 instead up to the PDC to enforce.</P
1606 >14.7. Conclusion</H1
1608 >The winbind system, through the use of the Name Service
1609 Switch, Pluggable Authentication Modules, and appropriate
1610 Microsoft RPC calls have allowed us to provide seamless
1611 integration of Microsoft Windows NT domain users on a
1612 UNIX system. The result is a great reduction in the administrative
1613 cost of running a mixed UNIX and NT network.</P
1621 SUMMARY="Footer navigation table"
1632 HREF="printing.html"
1641 HREF="samba-howto-collection.html"
1650 HREF="improved-browsing.html"
1660 >Printing Support</TD
1666 HREF="optional.html"
1674 >Improved browsing in samba</TD