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.7"><LINK
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
13 TITLE="Advanced Configuration"
14 HREF="optional.html"><LINK
16 TITLE="CUPS Printing Support"
17 HREF="cups-printing.html"><LINK
19 TITLE="Integrating MS Windows networks with Samba"
20 HREF="integrate-ms-networks.html"></HEAD
31 SUMMARY="Header navigation table"
40 >SAMBA Project Documentation</TH
48 HREF="cups-printing.html"
62 HREF="integrate-ms-networks.html"
77 >Chapter 16. 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
111 >16.2. Introduction</A
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
165 >16.3. What Winbind Provides</A
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
207 >16.3.1. Target Uses</A
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
231 >16.4. How Winbind Works</A
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
251 >16.4.1. Microsoft Remote Procedure Calls</A
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
277 >16.4.2. Microsoft Active Directory Services</A
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.
296 >16.4.3. Name Service Switch</A
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
376 >16.4.4. Pluggable Authentication Modules</A
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
425 >16.4.5. User and Group ID Allocation</A
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
451 >16.4.6. Result Caching</A
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
474 >16.5. Installation and Configuration</A
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
493 >16.5.1. Introduction</A
496 >This HOWTO describes the procedures used to get winbind up and
497 running on my RedHat 7.1 system. Winbind is capable of providing access
498 and authentication control for Windows Domain users through an NT
499 or Win2K PDC for 'regular' services, such as telnet a nd ftp, as
500 well for SAMBA services.</P
502 >This HOWTO has been written from a 'RedHat-centric' perspective, so if
503 you are using another distribution, you may have to modify the instructions
504 somewhat to fit the way your distribution works.</P
514 >Why should I to this?</I
519 >This allows the SAMBA administrator to rely on the
520 authentication mechanisms on the NT/Win2K PDC for the authentication
521 of domain members. NT/Win2K users no longer need to have separate
522 accounts on the SAMBA server.
531 >Who should be reading this document?</I
536 > This HOWTO is designed for system administrators. If you are
537 implementing SAMBA on a file server and wish to (fairly easily)
538 integrate existing NT/Win2K users from your PDC onto the
539 SAMBA server, this HOWTO is for you. That said, I am no NT or PAM
540 expert, so you may find a better or easier way to accomplish
552 >16.5.2. Requirements</A
555 >If you have a samba configuration file that you are currently
562 > If your system already uses PAM,
573 > If you haven't already made a boot disk,
582 >Messing with the pam configuration files can make it nearly impossible
583 to log in to yourmachine. That's why you want to be able to boot back
584 into your machine in single user mode and restore your
588 > back to the original state they were in if
589 you get frustrated with the way things are going. ;-)</P
591 >The latest version of SAMBA (version 3.0 as of this writing), now
592 includes a functioning winbindd daemon. Please refer to the
594 HREF="http://samba.org/"
596 >main SAMBA web page</A
598 better yet, your closest SAMBA mirror site for instructions on
599 downloading the source code.</P
601 >To allow Domain users the ability to access SAMBA shares and
602 files, as well as potentially other services provided by your
603 SAMBA machine, PAM (pluggable authentication modules) must
604 be setup properly on your machine. In order to compile the
605 winbind modules, you should have at least the pam libraries resident
606 on your system. For recent RedHat systems (7.1, for instance), that
610 >. For best results, it is helpful to also
611 install the development packages in <TT
613 >pam-devel-0.74-22</TT
622 >16.5.3. Testing Things Out</A
625 >Before starting, it is probably best to kill off all the SAMBA
626 related daemons running on your server. Kill off all <B
637 be running. To use PAM, you will want to make sure that you have the
638 standard PAM package (for RedHat) which supplies the <TT
642 directory structure, including the pam modules are used by pam-aware
643 services, several pam libraries, and the <TT
650 > entries for pam. Winbind built better
651 in SAMBA if the pam-devel package was also installed. This package includes
652 the header files needed to compile pam-aware applications. For instance,
653 my RedHat system has both <TT
659 >pam-devel-0.74-22</TT
667 >16.5.3.1. Configure and compile SAMBA</A
670 >The configuration and compilation of SAMBA is pretty straightforward.
671 The first three steps may not be necessary depending upon
672 whether or not you have previously built the Samba binaries.</P
675 CLASS="PROGRAMLISTING"
720 >This will, by default, install SAMBA in <TT
722 >/usr/local/samba</TT
724 See the main SAMBA documentation if you want to install SAMBA somewhere else.
725 It will also build the winbindd executable and libraries. </P
733 >16.5.3.2. Configure <TT
740 >The libraries needed to run the <B
744 through nsswitch need to be copied to their proper locations, so</P
751 >cp ../samba/source/nsswitch/libnss_winbind.so /lib</B
754 >I also found it necessary to make the following symbolic link:</P
761 >ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</B
764 >And, in the case of Sun solaris:</P
771 >ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</B
778 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1</B
785 >ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</B
788 >Now, as root you need to edit <TT
790 >/etc/nsswitch.conf</TT
792 allow user and group entries to be visible from the <B
798 >/etc/nsswitch.conf</TT
800 this after editing:</P
803 CLASS="PROGRAMLISTING"
804 > passwd: files winbind
806 group: files winbind</PRE
810 The libraries needed by the winbind daemon will be automatically
814 > cache the next time
815 your system reboots, but it
816 is faster (and you don't need to reboot) if you do it manually:</P
823 >/sbin/ldconfig -v | grep winbind</B
829 > available to winbindd
830 and echos back a check to you.</P
838 >16.5.3.3. Configure smb.conf</A
841 >Several parameters are needed in the smb.conf file to control
849 > These are described in more detail in
851 HREF="winbindd.8.html"
858 > file was modified to
859 include the following entries in the [global] section:</P
862 CLASS="PROGRAMLISTING"
865 # separate domain and username with '+', like DOMAIN+username
867 HREF="winbindd.8.html#WINBINDSEPARATOR"
869 >winbind separator</A
871 # use uids from 10000 to 20000 for domain users
873 HREF="winbindd.8.html#WINBINDUID"
877 # use gids from 10000 to 20000 for domain groups
879 HREF="winbindd.8.html#WINBINDGID"
883 # allow enumeration of winbind users and groups
885 HREF="winbindd.8.html#WINBINDENUMUSERS"
887 >winbind enum users</A
890 HREF="winbindd.8.html#WINBINDENUMGROUP"
892 >winbind enum groups</A
894 # give winbind users a real shell (only needed if they have telnet access)
896 HREF="winbindd.8.html#TEMPLATEHOMEDIR"
899 > = /home/winnt/%D/%U
901 HREF="winbindd.8.html#TEMPLATESHELL"
913 >16.5.3.4. Join the SAMBA server to the PDC domain</A
916 >Enter the following command to make the SAMBA server join the
917 PDC domain, where <VAR
921 your Windows domain and <VAR
925 a domain user who has administrative privileges in the domain.</P
932 >/usr/local/samba/bin/net join -S PDC -U Administrator</B
935 >The proper response to the command should be: "Joined the domain
943 is your DOMAIN name.</P
951 >16.5.3.5. Start up the winbindd daemon and test it!</A
954 >Eventually, you will want to modify your smb startup script to
955 automatically invoke the winbindd daemon when the other parts of
956 SAMBA start, but it is possible to test out just the winbind
957 portion first. To start up winbind services, enter the following
965 >/usr/local/samba/bin/winbindd</B
968 >Winbindd can now also run in 'dual daemon mode'. This will make it
969 run as 2 processes. The first will answer all requests from the cache,
970 thus making responses to clients faster. The other will
971 update the cache for the query that the first has just responded.
972 Advantage of this is that responses stay accurate and are faster.
973 You can enable dual daemon mode by adding '-B' to the commandline:</P
980 >/usr/local/samba/bin/winbindd -B</B
983 >I'm always paranoid and like to make sure the daemon
984 is really running...</P
991 >ps -ae | grep winbindd</B
994 >This command should produce output like this, if the daemon is running</P
996 >3025 ? 00:00:00 winbindd</P
998 >Now... for the real test, try to get some information about the
1006 >/usr/local/samba/bin/wbinfo -u</B
1010 This should echo back a list of users on your Windows users on
1011 your PDC. For example, I get the following response:</P
1014 CLASS="PROGRAMLISTING"
1020 CEO+TsInternetUser</PRE
1023 >Obviously, I have named my domain 'CEO' and my <VAR
1029 >You can do the same sort of thing to get group information from
1033 CLASS="PROGRAMLISTING"
1039 >/usr/local/samba/bin/wbinfo -g</B
1044 CEO+Domain Computers
1045 CEO+Domain Controllers
1048 CEO+Enterprise Admins
1049 CEO+Group Policy Creator Owners</PRE
1052 >The function 'getent' can now be used to get unified
1053 lists of both local and PDC users and groups.
1054 Try the following command:</P
1064 >You should get a list that looks like your <TT
1068 list followed by the domain users with their new uids, gids, home
1069 directories and default shells.</P
1071 >The same thing can be done for groups with the command</P
1087 >16.5.3.6. Fix the init.d startup scripts</A
1095 >16.5.3.6.1. Linux</A
1101 > daemon needs to start up after the
1108 > daemons are running.
1109 To accomplish this task, you need to modify the startup scripts of your system. They are located at <TT
1111 >/etc/init.d/smb</TT
1115 >/etc/init.d/samba</TT
1117 script to add commands to invoke this daemon in the proper sequence. My
1118 startup script starts up <B
1131 >/usr/local/samba/bin</TT
1132 > directory directly. The 'start'
1133 function in the script looks like this:</P
1136 CLASS="PROGRAMLISTING"
1139 echo -n $"Starting $KIND services: "
1140 daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
1144 echo -n $"Starting $KIND services: "
1145 daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
1149 echo -n $"Starting $KIND services: "
1150 daemon /usr/local/samba/bin/winbindd
1153 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && touch /var/lock/subsys/smb || \
1159 >If you would like to run winbindd in dual daemon mode, replace
1162 CLASS="PROGRAMLISTING"
1163 > daemon /usr/local/samba/bin/winbindd</PRE
1166 in the example above with:
1169 CLASS="PROGRAMLISTING"
1170 > daemon /usr/local/samba/bin/winbindd -B</PRE
1173 >The 'stop' function has a corresponding entry to shut down the
1174 services and looks like this:</P
1177 CLASS="PROGRAMLISTING"
1180 echo -n $"Shutting down $KIND services: "
1185 echo -n $"Shutting down $KIND services: "
1190 echo -n $"Shutting down $KIND services: "
1193 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && rm -f /var/lock/subsys/smb
1205 >16.5.3.6.2. Solaris</A
1208 >On solaris, you need to modify the
1211 >/etc/init.d/samba.server</TT
1212 > startup script. It usually
1213 only starts smbd and nmbd but should now start winbindd too. If you
1214 have samba installed in <TT
1216 >/usr/local/samba/bin</TT
1218 the file could contains something like this:</P
1221 CLASS="PROGRAMLISTING"
1226 if [ ! -d /usr/bin ]
1227 then # /usr not mounted
1231 killproc() { # kill the named process(es)
1232 pid=`/usr/bin/ps -e |
1233 /usr/bin/grep -w $1 |
1234 /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
1235 [ "$pid" != "" ] && kill $pid
1238 # Start/stop processes required for samba server
1244 # Edit these lines to suit your installation (paths, workgroup, host)
1247 /usr/local/samba/bin/smbd -D -s \
1248 /usr/local/samba/smb.conf
1251 /usr/local/samba/bin/nmbd -D -l \
1252 /usr/local/samba/var/log -s /usr/local/samba/smb.conf
1254 echo Starting Winbind Daemon
1255 /usr/local/samba/bin/winbindd
1265 echo "Usage: /etc/init.d/samba.server { start | stop }"
1270 >Again, if you would like to run samba in dual daemon mode, replace
1272 CLASS="PROGRAMLISTING"
1273 > /usr/local/samba/bin/winbindd</PRE
1276 in the script above with:
1279 CLASS="PROGRAMLISTING"
1280 > /usr/local/samba/bin/winbindd -B</PRE
1289 >16.5.3.6.3. Restarting</A
1292 >If you restart the <B
1302 > daemons at this point, you
1303 should be able to connect to the samba server as a domain member just as
1304 if you were a local user.</P
1313 >16.5.3.7. Configure Winbind and PAM</A
1316 >If you have made it this far, you know that winbindd and samba are working
1317 together. If you want to use winbind to provide authentication for other
1318 services, keep reading. The pam configuration files need to be altered in
1319 this step. (Did you remember to make backups of your original
1323 > files? If not, do it now.)</P
1325 >You will need a pam module to use winbindd with these other services. This
1326 module will be compiled in the <TT
1328 >../source/nsswitch</TT
1330 by invoking the command</P
1337 >make nsswitch/pam_winbind.so</B
1347 > file should be copied to the location of
1348 your other pam security modules. On my RedHat system, this was the
1352 > directory. On Solaris, the pam security
1353 modules reside in <TT
1355 >/usr/lib/security</TT
1363 >cp ../samba/source/nsswitch/pam_winbind.so /lib/security</B
1371 >16.5.3.7.1. Linux/FreeBSD-specific PAM configuration</A
1376 >/etc/pam.d/samba</TT
1377 > file does not need to be changed. I
1378 just left this fileas it was:</P
1381 CLASS="PROGRAMLISTING"
1382 >auth required /lib/security/pam_stack.so service=system-auth
1383 account required /lib/security/pam_stack.so service=system-auth</PRE
1386 >The other services that I modified to allow the use of winbind
1387 as an authentication service were the normal login on the console (or a terminal
1388 session), telnet logins, and ftp service. In order to enable these
1389 services, you may first need to change the entries in
1395 >/etc/inetd.conf</TT
1397 RedHat 7.1 uses the new xinetd.d structure, in this case you need
1398 to change the lines in <TT
1400 >/etc/xinetd.d/telnet</TT
1404 >/etc/xinetd.d/wu-ftp</TT
1408 CLASS="PROGRAMLISTING"
1415 CLASS="PROGRAMLISTING"
1420 For ftp services to work properly, you will also need to either
1421 have individual directories for the domain users already present on
1422 the server, or change the home directory template to a general
1423 directory for all domain users. These can be easily set using
1430 >template homedir</B
1436 > file can be changed
1437 to allow winbind ftp access in a manner similar to the
1442 changed to look like this:</P
1445 CLASS="PROGRAMLISTING"
1446 >auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
1447 auth sufficient /lib/security/pam_winbind.so
1448 auth required /lib/security/pam_stack.so service=system-auth
1449 auth required /lib/security/pam_shells.so
1450 account sufficient /lib/security/pam_winbind.so
1451 account required /lib/security/pam_stack.so service=system-auth
1452 session required /lib/security/pam_stack.so service=system-auth</PRE
1457 >/etc/pam.d/login</TT
1458 > file can be changed nearly the
1459 same way. It now looks like this:</P
1462 CLASS="PROGRAMLISTING"
1463 >auth required /lib/security/pam_securetty.so
1464 auth sufficient /lib/security/pam_winbind.so
1465 auth sufficient /lib/security/pam_unix.so use_first_pass
1466 auth required /lib/security/pam_stack.so service=system-auth
1467 auth required /lib/security/pam_nologin.so
1468 account sufficient /lib/security/pam_winbind.so
1469 account required /lib/security/pam_stack.so service=system-auth
1470 password required /lib/security/pam_stack.so service=system-auth
1471 session required /lib/security/pam_stack.so service=system-auth
1472 session optional /lib/security/pam_console.so</PRE
1475 >In this case, I added the <B
1477 >auth sufficient /lib/security/pam_winbind.so</B
1479 lines as before, but also added the <B
1481 >required pam_securetty.so</B
1483 above it, to disallow root logins over the network. I also added a
1486 >sufficient /lib/security/pam_unix.so use_first_pass</B
1491 > line to get rid of annoying
1492 double prompts for passwords.</P
1500 >16.5.3.7.2. Solaris-specific configuration</A
1503 >The /etc/pam.conf needs to be changed. I changed this file so that my Domain
1504 users can logon both locally as well as telnet.The following are the changes
1505 that I made.You can customize the pam.conf file as per your requirements,but
1506 be sure of those changes because in the worst case it will leave your system
1507 nearly impossible to boot.</P
1510 CLASS="PROGRAMLISTING"
1512 #ident "@(#)pam.conf 1.14 99/09/16 SMI"
1514 # Copyright (c) 1996-1999, Sun Microsystems, Inc.
1515 # All Rights Reserved.
1519 # Authentication management
1521 login auth required /usr/lib/security/pam_winbind.so
1522 login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1523 login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass
1525 rlogin auth sufficient /usr/lib/security/pam_winbind.so
1526 rlogin auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1527 rlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1529 dtlogin auth sufficient /usr/lib/security/pam_winbind.so
1530 dtlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1532 rsh auth required /usr/lib/security/$ISA/pam_rhosts_auth.so.1
1533 other auth sufficient /usr/lib/security/pam_winbind.so
1534 other auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
1536 # Account management
1538 login account sufficient /usr/lib/security/pam_winbind.so
1539 login account requisite /usr/lib/security/$ISA/pam_roles.so.1
1540 login account required /usr/lib/security/$ISA/pam_unix.so.1
1542 dtlogin account sufficient /usr/lib/security/pam_winbind.so
1543 dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1
1544 dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1
1546 other account sufficient /usr/lib/security/pam_winbind.so
1547 other account requisite /usr/lib/security/$ISA/pam_roles.so.1
1548 other account required /usr/lib/security/$ISA/pam_unix.so.1
1550 # Session management
1552 other session required /usr/lib/security/$ISA/pam_unix.so.1
1554 # Password management
1556 #other password sufficient /usr/lib/security/pam_winbind.so
1557 other password required /usr/lib/security/$ISA/pam_unix.so.1
1558 dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1
1560 # Support for Kerberos V5 authentication (uncomment to use Kerberos)
1562 #rlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1563 #login auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1564 #dtlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1565 #other auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
1566 #dtlogin account optional /usr/lib/security/$ISA/pam_krb5.so.1
1567 #other account optional /usr/lib/security/$ISA/pam_krb5.so.1
1568 #other session optional /usr/lib/security/$ISA/pam_krb5.so.1
1569 #other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass</PRE
1572 >I also added a try_first_pass line after the winbind.so line to get rid of
1573 annoying double prompts for passwords.</P
1575 >Now restart your Samba and try connecting through your application that you
1576 configured in the pam.conf.</P
1587 >16.6. Limitations</A
1590 >Winbind has a number of limitations in its current
1591 released version that we hope to overcome in future
1598 >Winbind is currently only available for
1599 the Linux, Solaris and IRIX operating systems, although ports to other operating
1600 systems are certainly possible. For such ports to be feasible,
1601 we require the C library of the target operating system to
1602 support the Name Service Switch and Pluggable Authentication
1603 Modules systems. This is becoming more common as NSS and
1604 PAM gain support among UNIX vendors.</P
1608 >The mappings of Windows NT RIDs to UNIX ids
1609 is not made algorithmically and depends on the order in which
1610 unmapped users or groups are seen by winbind. It may be difficult
1611 to recover the mappings of rid to UNIX id mapping if the file
1612 containing this information is corrupted or destroyed.</P
1616 >Currently the winbind PAM module does not take
1617 into account possible workstation and logon time restrictions
1618 that may be been set for Windows NT users, this is
1619 instead up to the PDC to enforce.</P
1629 >16.7. Conclusion</A
1632 >The winbind system, through the use of the Name Service
1633 Switch, Pluggable Authentication Modules, and appropriate
1634 Microsoft RPC calls have allowed us to provide seamless
1635 integration of Microsoft Windows NT domain users on a
1636 UNIX system. The result is a great reduction in the administrative
1637 cost of running a mixed UNIX and NT network.</P
1645 SUMMARY="Footer navigation table"
1656 HREF="cups-printing.html"
1665 HREF="samba-howto-collection.html"
1674 HREF="integrate-ms-networks.html"
1684 >CUPS Printing Support</TD
1690 HREF="optional.html"
1698 >Integrating MS Windows networks with Samba</TD