1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
5 <title>Integrating Additional Services</title>
8 <primary>authentication</primary>
9 </indexterm><indexterm>
10 <primary>backends</primary>
11 </indexterm><indexterm>
12 <primary>smbpasswd</primary>
13 </indexterm><indexterm>
14 <primary>ldapsam</primary>
15 </indexterm><indexterm>
16 <primary>Active Directory</primary>
18 You've come a long way now. You have pretty much mastered Samba-3 for
19 most uses it can be put to. Up until now, you have cast Samba-3 in the leading
20 role and where authentication was required, you have used one or another of
21 Samba's many authentication backends (from flat text files with smbpasswd
22 to LDAP directory integration with ldapsam). Now you can design a
23 solution for a new Abmas business. This business is running Windows Server
24 2003 and Active Directory, and these are to stay. It's time to master
25 implementing Samba and Samba-supported services in a domain controlled by
26 the latest Windows authentication technologies. Let's get started &smbmdash; this is
31 <title>Introduction</title>
34 Abmas has continued its miraculous growth; indeed, nothing seems to be able
35 to stop its diversification into multiple (and seemingly unrelated) fields.
36 Its latest acquisition is Abmas Snack Foods, a big player in the snack-food
41 With this acquisition comes new challenges for you and your team. Abmas Snack
42 Foods is a well-developed business with a huge and heterogeneous network. They
43 already have Windows, Netware, and Proprietary UNIX, but as yet no Samba or Linux.
44 The network is mature and well established, and there is no question of their chosen
45 user authentication scheme being changed for now. You need to take a wise new
50 You have decided to set the ball rolling by introducing Samba-3 into the network
51 gradually, taking over key services and easing the way to a full migration and,
52 therefore, integration into Abmas's existing business later.
56 <title>Assignment Tasks</title>
59 <primary>web</primary>
60 <secondary>proxying</secondary>
61 </indexterm><indexterm>
62 <primary>web</primary>
63 <secondary>caching</secondary>
65 You've promised the skeptical Abmas Snack Foods management team
66 that you can show them how Samba can ease itself and other Open Source
67 technologies into their existing infrastructure and deliver sound business
68 advantages. Cost cutting is high on their agenda (a major promise of the
69 acquisition). You have chosen Web proxying and caching as your proving ground.
73 <primary>bandwidth</primary>
74 </indexterm><indexterm>
75 <primary>Microsoft ISA</primary>
77 Abmas Snack Foods has several thousand users housed at their Head Office
78 and multiple regional offices, plants, and warehouses. A high proportion of
79 the business's work is done online, so Internet access for most of these
80 users is essential. All Internet access, including all of their regional offices,
81 is funneled through the head office and is the job of the (now your) networking
82 team. The bandwidth requirements were horrific (comparable to a small ISP), and
83 the team soon discovered proxying and caching. In fact, they became one of
84 the earliest commercial users of Microsoft ISA.
88 <primary>Active Directory</primary>
89 </indexterm><indexterm>
90 <primary>authenticated</primary>
91 </indexterm><indexterm>
92 <primary>proxy</primary>
94 The team is not happy with ISA. Because it never lived up to its marketing promises,
95 it under-performed and had reliability problems. You have pounced on the opportunity
96 to show what Open Source can do. The one thing they do like, however, is ISA's
97 integration with Active Directory. They like that their users, once logged on,
98 are automatically authenticated against the proxy. If your alternative to ISA
99 can operate completely seamlessly in their Active Directory Domain, it will be
104 This is a hands-on exercise. You build software applications so
105 that you obtain the functionality Abmas needs.
112 <title>Dissection and Discussion</title>
115 The key requirements in this business example are straightforward. You are not required
116 to do anything new, just to replicate an existing system, not lose any existing features,
117 and improve performance. The key points are:
122 Internet access for most employees
125 Distributed system to accommodate load and geographical distribution of users
128 Seamless and transparent interoperability with the existing Active Directory domain
134 <title>Technical Issues</title>
137 <primary>browsing</primary>
138 </indexterm><indexterm>
139 <primary>Squid proxy</primary>
140 </indexterm><indexterm>
141 <primary>proxy</primary>
142 </indexterm><indexterm>
143 <primary>authentication</primary>
144 </indexterm><indexterm>
145 <primary>Internet Explorer</primary>
146 </indexterm><indexterm>
147 <primary>winbind</primary>
148 </indexterm><indexterm>
149 <primary>NTLM</primary>
150 </indexterm><indexterm>
151 <primary>NTLM authentication daemon</primary>
152 </indexterm><indexterm>
153 <primary>authentication</primary>
154 </indexterm><indexterm>
155 <primary>daemon</primary>
156 </indexterm><indexterm>
157 <primary>Active Directory</primary>
158 </indexterm><indexterm>
159 <primary>domain</primary>
160 <secondary>Active Directory</secondary>
161 </indexterm><indexterm>
162 <primary>Kerberos</primary>
163 </indexterm><indexterm>
164 <primary>token</primary>
166 Functionally, the user's Internet Explorer requests a browsing session with the
167 Squid proxy, for which it offers its AD authentication token. Squid hands off
168 the authentication request to the Samba-3 authentication helper application
169 called <command>ntlm_auth</command>. This helper is a hook into winbind, the
170 Samba-3 NTLM authentication daemon. Winbind enables UNIX services to authenticate
171 against Microsoft Windows Domains, including Active Directory domains. As Active
172 Directory authentication is a modified Kerberos authentication, winbind is assisted
173 in this by local Kerberos 5 libraries configured to check passwords with the Active
174 Directory server. Once the token has been checked, a browsing session is established.
175 This process is entirely transparent and seamless to the user.
179 Enabling this consists of:
184 Preparing the necessary environment using preconfigured packages
188 Setting up raw Kerberos authentication against the Active Directory domain
192 Configuring, compiling, and then installing the supporting Samba-3 components
196 Tying it all together
204 <title>Political Issues</title>
207 You are a stranger in a strange land and all eyes are upon you. Some would even like to see
208 you fail. For you to gain the trust of your newly acquired IT people, it is essential that your
209 solution does everything the old one did, but does it better in every way. Only then
210 will the entrenched positions consider taking up your new way of doing things on a
219 <title>Implementation</title>
222 <primary>Squid</primary>
224 First, your system needs to be prepared and in a known good state to proceed. This consists
225 of making sure that everything the system depends on is present and that everything that could
226 interfere or conflict with the system is removed. You will be configuring the Squid and Samba-3
227 packages and updating them if necessary. If conflicting packages of these programs are installed,
228 they must be removed.
232 <primary>Red Hat Linux</primary>
234 The following packages should be available on your Red Hat Linux system:
238 <listitem><para><indexterm>
239 <primary>krb5</primary>
240 </indexterm><indexterm>
241 <primary>Kerberos</primary>
264 <primary>SUSE Linux</primary>
266 In the case of SUSE Linux, these packages are called:
278 <listitem><para><indexterm>
279 <primary>Heimdal</primary>
290 If the required packages are not present on your system, you must install
291 them from the vendor's installation media. Follow the administrative guide
292 for your Linux system to ensure that the packages are correctly updated.
295 <note><para><indexterm>
296 <primary>MS Windows Server 2003</primary>
297 </indexterm><indexterm>
298 <primary>Kerberos</primary>
299 </indexterm><indexterm>
300 <primary>MIT</primary>
302 If the requirement is for interoperation with MS Windows Server 2003, it
303 will be necessary to ensure that you are using MIT Kerberos version 1.3.1
304 or later. Red Hat Linux 9 ships with MIT Kerberos 1.2.7 and thus requires
309 <primary>Heimdal</primary>
310 </indexterm><indexterm>
311 <primary>SUSE Enterprise Linux Server</primary>
313 Heimdal 0.6 or later is required in the case of SUSE Linux. SUSE Enterprise
314 Linux Server 8 ships with Heimdal 0.4. SUSE 9 ships with the necessary version.
317 <sect2 id="ch10-one">
318 <title>Removal of Pre-existing Conflicting RPMs</title>
321 <primary>Squid</primary>
323 If Samba and/or Squid rpms are installed, they should be updated. You can
324 build both from source.
328 <primary>rpm</primary>
329 </indexterm><indexterm>
330 <primary>samba</primary>
331 </indexterm><indexterm>
332 <primary>squid</primary>
334 Locating the packages to be uninstalled can be achieved by running:
336 &rootprompt; rpm -qa | grep -i samba
337 &rootprompt; rpm -qa | grep -i squid
339 The identified packages may be removed using:
341 &rootprompt; rpm -e samba-common
346 <title>Kerberos Configuration</title>
349 <primary>Kerberos</primary>
350 </indexterm><indexterm>
351 <primary>Active Directory</primary>
352 <secondary>server</secondary>
353 </indexterm><indexterm>
354 <primary>ADS</primary>
355 </indexterm><indexterm>
356 <primary>KDC</primary>
358 The systems Kerberos installation must be configured to communicate with
359 your primary Active Directory server (ADS KDC).
363 Strictly speaking, MIT Kerberos version 1.3.1 currently gives the best results,
364 although the current default Red Hat MIT version 1.2.7 gives acceptable results
365 unless you are using Windows 2003 servers.
369 <primary>MIT</primary>
370 </indexterm><indexterm>
371 <primary>Heimdal</primary>
372 </indexterm><indexterm>
373 <primary>Kerberos</primary>
374 </indexterm><indexterm>
375 <primary>/etc/krb5.conf</primary>
376 </indexterm><indexterm>
377 <primary>DNS</primary>
378 <secondary>SRV records</secondary>
379 </indexterm><indexterm>
380 <primary>KDC</primary>
381 </indexterm><indexterm>
382 <primary>DNS</primary>
383 <secondary>lookup</secondary>
385 Officially, neither MIT (1.3.1) nor Heimdal (0.6) Kerberos needs an <filename>/etc/krb5.conf</filename>
386 file in order to work correctly. All ADS domains automatically create SRV records in the
387 DNS zone <constant>Kerberos.REALM.NAME</constant> for each KDC in the realm. Since both
388 MIT and Heimdal, KRB5 libraries default to checking for these records, so they
389 automatically find the KDCs. In addition, <filename>krb5.conf</filename> only allows
390 specifying a single KDC, even there if there is more than one. Using the DNS lookup
391 allows the KRB5 libraries to use whichever KDCs are available.
395 <step><para><indexterm>
396 <primary>krb5.conf</primary>
398 If you find the need to manually configure the <filename>krb5.conf</filename>, you should edit it
399 to have the contents shown in <link linkend="ch10-krb5conf"/>. The final fully qualified path for this file
400 should be <filename>/etc/krb5.conf</filename>.
403 <step><para><indexterm>
404 <primary>Kerberos</primary>
405 </indexterm><indexterm>
406 <primary>realm</primary>
407 </indexterm><indexterm>
408 <primary>case-sensitive</primary>
409 </indexterm><indexterm>
410 <primary>KDC</primary>
411 </indexterm><indexterm>
412 <primary>synchronization</primary>
413 </indexterm><indexterm>
414 <primary>initial credentials</primary>
415 </indexterm><indexterm>
416 <primary>Clock skew</primary>
417 </indexterm><indexterm>
418 <primary>NTP</primary>
419 </indexterm><indexterm>
420 <primary>DNS</primary>
421 <secondary>lookup</secondary>
422 </indexterm><indexterm>
423 <primary>reverse DNS</primary>
424 </indexterm><indexterm>
425 <primary>NetBIOS name </primary>
426 </indexterm><indexterm>
427 <primary>/etc/hosts</primary>
428 </indexterm><indexterm>
429 <primary>mapping</primary>
431 The following gotchas often catch people out. Kerberos is case sensitive. Your realm must
432 be in UPPERCASE, or you will get an error: <quote>Cannot find KDC for requested realm while getting
433 initial credentials</quote>. Kerberos is picky about time synchronization. The time
434 according to your participating servers must be within 5 minutes or you get an error
435 <quote>kinit(v5): Clock skew too great while getting initial credentials</quote>.
436 Clock skew limits are, in fact, configurable in the Kerberos protocols (the default is
437 5 minutes). A better solution is to implement NTP throughout your server network.
438 Kerberos needs to be able to do a reverse DNS lookup on the IP address of your KDC.
439 Also, the name that this reverse lookup maps to must either be the NetBIOS name of
440 the KDC (i.e., the hostname with no domain attached), or it can alternately be the
441 NetBIOS name followed by the realm. If all else fails, you can add a
442 <filename>/etc/hosts</filename> entry mapping the IP address of your KDC to its
443 NetBIOS name. If Kerberos cannot do this reverse lookup, you will get a local error
444 when you try to join the realm.
447 <step><para><indexterm>
448 <primary>kinit</primary>
450 You are now ready to test your installation by issuing the command:
452 &rootprompt; kinit [USERNAME@REALM]
454 You are asked for your password, which you should enter. The following
455 is a typical console sequence:
457 &rootprompt; kinit ADMINISTRATOR@LONDON.ABMAS.BIZ
458 Password for ADMINISTRATOR@LONDON.ABMAS.BIZ:
460 Make sure that your password is accepted by the Active Directory KDC.
464 <example id="ch10-krb5conf">
465 <title>Kerberos Configuration &smbmdash; File: <filename>/etc/krb5.conf</filename></title>
468 default_realm = LONDON.ABMAS.BIZ
472 kdc = w2k3s.london.abmas.biz
478 <primary>klist</primary>
482 &rootprompt; klist -e
484 shows the Kerberos tickets cached by the system:
488 <title>Samba Configuration</title>
491 <primary>Active Directory</primary>
493 Samba must be configured to correctly use Active Directory. Samba-3 must be used, as
494 this has the necessary components to interface with Active Directory.
498 <step><para><indexterm>
499 <primary>Red Hat Linux</primary>
500 </indexterm><indexterm>
501 <primary>Samba Tea</primary>
502 </indexterm><indexterm>
503 <primary>Red Hat Fedora Linux</primary>
504 </indexterm><indexterm>
505 <primary>MIT KRB5</primary>
506 </indexterm><indexterm>
507 <primary>ntlm_auth</primary>
509 Download the latest stable Samba-3 for Red Hat Linux from the official Samba Team
510 <ulink url="http://ftp.samba.org">FTP site.</ulink> The official Samba Team
511 RPMs for Red Hat Fedora Linux contain the <command>ntlm_auth</command> tool
512 needed, and are linked against MIT KRB5 version 1.3.1 and, therefore, are ready for use.
516 <primary>SerNet</primary>
517 </indexterm><indexterm>
518 <primary>RPMs</primary>
520 The necessary, validated RPM packages for SUSE Linux may be obtained from
521 the <ulink url="ftp://ftp.sernet.de/pub/samba">SerNet</ulink> FTP site that
522 is located in Germany. All SerNet RPMs are validated, have the necessary
523 <command>ntlm_auth</command> tool, and are statically linked
524 against suitably patched Heimdal 0.6 libraries.
528 Using your favorite editor, change the <filename>/etc/samba/smb.conf</filename>
529 file so it has contents similar to the example shown in <link linkend="ch10-smbconf"/>.
532 <step><para><indexterm>
533 <primary>computer account</primary>
534 </indexterm><indexterm>
535 <primary>Active Directory</primary>
536 </indexterm><indexterm>
537 <primary>net</primary>
538 <secondary>ads</secondary>
539 <tertiary>join</tertiary>
540 </indexterm><indexterm>
541 <primary>Kerberos ticket</primary>
542 </indexterm><indexterm>
543 <primary>ticket</primary>
545 Next you need to create a computer account in the Active Directory.
546 This sets up the trust relationship needed for other clients to
547 authenticate to the Samba server with an Active Directory Kerberos ticket.
548 This is done with the <quote>net ads join -U [Administrator%Password]</quote>
551 &rootprompt; net ads join -U administrator%vulcon
555 <step><para><indexterm>
556 <primary>smbd</primary>
557 </indexterm><indexterm>
558 <primary>nmbd</primary>
559 </indexterm><indexterm>
560 <primary>winbindd</primary>
561 </indexterm><indexterm>
562 <primary>Active Directory</primary>
563 </indexterm><indexterm>
564 <primary>Samba</primary>
566 Your new Samba binaries must be started in the standard manner as is applicable
567 to the platform you are running on. Alternately, start your Active Directory
568 enabled Samba with the following commands:
572 &rootprompt; winbindd -B
576 <step><para><indexterm>
577 <primary>winbind</primary>
578 </indexterm><indexterm>
579 <primary>Active Directory</primary>
580 <secondary>domain</secondary>
581 </indexterm><indexterm>
582 <primary>wbinfo</primary>
583 </indexterm><indexterm>
584 <primary>enumerating</primary>
585 </indexterm><indexterm>
586 <primary>Active Directory</primary>
587 <secondary>tree</secondary>
589 We now need to test that Samba is communicating with the Active
590 Directory domain; most specifically, we want to see whether winbind
591 is enumerating users and groups. Issue the following commands:
593 &rootprompt; wbinfo -t
594 checking the trust secret via RPC calls succeeded
596 This tests whether we are authenticating against Active Directory:
598 &rootprompt; wbinfo -u
601 LONDON+SUPPORT_388945a0
606 This enumerates all the users in your Active Directory tree:
608 &rootprompt; wbinfo -g
609 LONDON+Domain Computers
610 LONDON+Domain Controllers
612 LONDON+Enterprise Admins
616 LONDON+Group Policy Creator Owners
617 LONDON+DnsUpdateProxy
619 This enumerates all the groups in your Active Directory tree.
622 <step><para><indexterm>
623 <primary>Squid</primary>
624 </indexterm><indexterm>
625 <primary>ntlm_auth</primary>
627 Squid uses the <command>ntlm_auth</command> helper build with Samba-3.
628 You may test <command>ntlm_auth</command> with the command:
630 &rootprompt; /usr/bin/ntlm_auth --username=jht
633 You are asked for your password, which you should enter. You are rewarded with:
635 &rootprompt; NT_STATUS_OK: Success (0x0)
639 <step><para><indexterm>
640 <primary>ntlm_auth</primary>
641 </indexterm><indexterm>
642 <primary>authenticate</primary>
643 </indexterm><indexterm>
644 <primary>winbind</primary>
645 </indexterm><indexterm>
646 <primary>privileged pipe</primary>
647 </indexterm><indexterm>
648 <primary>squid</primary>
649 </indexterm><indexterm>
650 <primary>chgrp</primary>
651 </indexterm><indexterm>
652 <primary>chmod</primary>
653 </indexterm><indexterm>
654 <primary>failure</primary>
656 The <command>ntlm_auth</command> helper, when run from a command line as the user
657 <quote>root</quote>, authenticates against your Active Directory domain (with
658 the aid of winbind). It manages this by reading from the winbind privileged pipe.
659 Squid is running with the permissions of user <quote>squid</quote> and group
660 <quote>squid</quote> and is not able to do this unless we make a vital change.
661 Squid cannot read from the winbind privilege pipe unless you change the
662 permissions of its directory. This is the single biggest cause of failure in the
663 whole process. Remember to issue the following command (for Red Hat Linux):
665 &rootprompt; chgrp squid /var/cache/samba/winbindd_privileged
666 &rootprompt; chmod 750 /var/cache/samba/winbindd_privileged
668 For SUSE Linux 9, execute the following:
670 &rootprompt; chgrp squid /var/lib/samba/winbindd_privileged
671 &rootprompt; chmod 750 /var/lib/samba/winbindd_privileged
679 <title>NSS Configuration</title>
682 <primary>NSS</primary>
683 </indexterm><indexterm>
684 <primary>winbind</primary>
685 </indexterm><indexterm>
686 <primary>authentication</primary>
688 For Squid to benefit from Samba-3, NSS must be updated to allow winbind as a valid route to user authentication.
693 Edit your <filename>/etc/nsswitch.conf</filename> file so it has the parameters shown
694 in <link linkend="ch10-etcnsscfg"/>.
698 <smbconfexample id="ch10-smbconf">
699 <title>Samba Configuration &smbmdash; File: <filename>/etc/samba/smb.conf</filename></title>
700 <smbconfsection name="[global]"/>
701 <smbconfoption name="workgroup">LONDON</smbconfoption>
702 <smbconfoption name="netbios name">W2K3S</smbconfoption>
703 <smbconfoption name="realm">LONDON.ABMAS.BIZ</smbconfoption>
704 <smbconfoption name="security">ads</smbconfoption>
705 <smbconfoption name="encrypt passwords">yes</smbconfoption>
706 <smbconfoption name="password server">w2k3s.london.abmas.biz</smbconfoption>
708 <smbconfcomment>separate domain and username with '/', like DOMAIN/username</smbconfcomment>
709 <smbconfoption name="winbind separator">/</smbconfoption>
711 <smbconfcomment>use UIDs from 10000 to 20000 for domain users</smbconfcomment>
712 <smbconfoption name="idmap uid">10000-20000</smbconfoption>
713 # use GIDs from 10000 to 20000 for domain groups
714 <smbconfoption name="idmap gid">10000-20000</smbconfoption>
716 <smbconfcomment>allow enumeration of winbind users and groups</smbconfcomment>
717 <smbconfoption name="winbind enum users">yes</smbconfoption>
718 <smbconfoption name="winbind enum groups">yes</smbconfoption>
719 <smbconfoption name="winbind user default domain">yes</smbconfoption>
722 <example id="ch10-etcnsscfg">
723 <title>NSS Configuration File Extract &smbmdash; File: <filename>/etc/nsswitch.conf</filename></title>
725 passwd: files winbind
734 <title>Squid Configuration</title>
737 <primary>Squid</primary>
738 </indexterm><indexterm>
739 <primary>Active Directory</primary>
740 <secondary>authentication</secondary>
742 Squid must be configured correctly to interact with the Samba-3
743 components that handle Active Directory authentication.
751 <title>Configuration</title></sect2>
754 <step><para><indexterm>
755 <primary>SUSE Linux</primary>
756 </indexterm><indexterm>
757 <primary>Squid</primary>
758 </indexterm><indexterm>
759 <primary>helper agent</primary>
761 If your Linux distribution is SUSE Linux 9, the version of Squid
762 supplied is already enabled to use the winbind helper agent. You
763 can, therefore, omit the steps that would build the Squid binary
767 <step><para><indexterm>
768 <primary>nobody</primary>
769 </indexterm><indexterm>
770 <primary>squid</primary>
771 </indexterm><indexterm>
772 <primary>rpms</primary>
773 </indexterm><indexterm>
774 <primary>/etc/passwd</primary>
775 </indexterm><indexterm>
776 <primary>/etc/group</primary>
778 Squid, by default, runs as the user <constant>nobody</constant>. You need to
779 add a system user <constant>squid</constant> and a system group
780 <constant>squid</constant> if they are not set up already (if the default
781 Red Hat squid rpms were installed, they will be). Set up a
782 <constant>squid</constant> user in <filename>/etc/passwd</filename>
783 and a <constant>squid</constant> group in <filename>/etc/group</filename> if these aren't there already.
786 <step><para><indexterm>
787 <primary>permissions</primary>
788 </indexterm><indexterm>
789 <primary>chown</primary>
791 You now need to change the permissions on Squid's <constant>var</constant>
792 directory. Enter the following command:
794 &rootprompt; chown -R squid /var/cache/squid
798 <step><para><indexterm>
799 <primary>logging</primary>
800 </indexterm><indexterm>
801 <primary>Squid</primary>
803 Squid must also have control over its logging. Enter the following commands:
805 &rootprompt; chown -R chown squid:squid /var/log/squid
806 &rootprompt; chmod 770 /var/log/squid
811 Finally, Squid must be able to write to its disk cache!
812 Enter the following commands:
814 &rootprompt; chown -R chown squid:squid /var/cache/squid
815 &rootprompt; chmod 770 /var/cache/squid
819 <step><para><indexterm>
820 <primary>/etc/squid/squid.conf</primary>
822 The <filename>/etc/squid/squid.conf</filename> file must be edited to include the lines from
823 <link linkend="etcsquidcfg"/> and <link linkend="etcsquid2"/>.
826 <step><para><indexterm>
827 <primary>cache directories</primary>
829 You must create Squid's cache directories before it may be run. Enter the following command:
831 &rootprompt; squid -z
836 Finally, start Squid and enjoy transparent Active Directory authentication.
837 Enter the following command:
844 <example id="etcsquidcfg">
845 <title>Squid Configuration File Extract &smbmdash; <filename>/etc/squid.conf</filename> [ADMINISTRATIVE PARAMETERS Section]</title>
847 cache_effective_user squid
848 cache_effective_group squid
852 <example id="etcsquid2">
853 <title>Squid Configuration File extract &smbmdash; File: <filename>/etc/squid.conf</filename> [AUTHENTICATION PARAMETERS Section]</title>
855 auth_param ntlm program /usr/bin/ntlm_auth \
856 --helper-protocol=squid-2.5-ntlmssp
857 auth_param ntlm children 5
858 auth_param ntlm max_challenge_reuses 0
859 auth_param ntlm max_challenge_lifetime 2 minutes
860 auth_param basic program /usr/bin/ntlm_auth \
861 --helper-protocol=squid-2.5-basic
862 auth_param basic children 5
863 auth_param basic realm Squid proxy-caching web server
864 auth_param basic credentialsttl 2 hours
865 acl AuthorizedUsers proxy_auth REQUIRED
866 http_access allow all AuthorizedUsers
873 <title>Key Points Learned</title>
876 <primary>Web browsers</primary>
877 </indexterm><indexterm>
878 <primary>services</primary>
879 </indexterm><indexterm>
880 <primary>authentication protocols</primary>
881 </indexterm><indexterm>
882 <primary>Web</primary>
883 <secondary>proxy</secondary>
884 <tertiary>access</tertiary>
885 </indexterm><indexterm>
886 <primary>NTLMSSP</primary>
888 Microsoft Windows networking protocols permeate the spectrum of technologies that Microsoft
889 Windows clients use, even when accessing traditional services such as Web browsers. Depending
890 on whom you discuss this with, this is either good or bad. No matter how you might evaluate this,
891 the use of NTLMSSP as the authentication protocol for Web proxy access has some advantages over
892 the cookie-based authentication regime used by all competing browsers. It is Samba's implementation
893 of NTLMSSP that makes it attractive to implement the solution that has been demonstrated in this chapter.
901 <title>Questions and Answers</title>
904 <primary>ntlm_auth</primary>
905 </indexterm><indexterm>
906 <primary>SambaXP conference</primary>
907 </indexterm><indexterm>
908 <primary>Goettingen</primary>
909 </indexterm><indexterm>
910 <primary>Italian</primary>
912 The development of the <command>ntlm_auth</command> module was first discussed in many Open Source circles
913 in 2002. At the SambaXP conference in Goettingen, Germany, Mr. Francesco Chemolli demonstrated the use of
914 <command>ntlm_auth</command> during one of the late developer meetings that took place. Since that time, the
915 adoption of <command>ntlm_auth</command> has spread considerably.
919 The largest report from a site that uses Squid with <command>ntlm_auth</command>-based authentication
920 support uses a dual processor server that has 2 GBytes of memory. It provides Web and FTP proxy services for 10,000
921 users. Approximately 2,000 of these users make heavy use of the proxy services. According to the source, who
922 wishes to remain anonymous, the sustained transaction load on this server hovers around 140 hits/sec. The following
923 comments were made with respect to questions regarding the performance of this installation:
927 [In our] EXTREMELY optimized environment ... [the] performance impact is almost [nothing]. The <quote>almost</quote>
928 part is due to the brain damage of the ntlm-over-http protocol definition. Suffice to say that its worst-case
929 scenario triples the number of hits needed to perform the same transactions versus basic or digest auth[entication].
933 You would be well advised to recognize the fact that all cache-intensive proxying solutions demand a lot of memory.
934 Make certain that your Squid proxy server is equipped with sufficient memory to permit all proxy operations to run
935 out of memory without invoking the overheads involved in the use of memory that has to be swapped to disk.
938 <qandaset defaultlabel="chap10bqa" type="number">
943 What does Samba have to do with Web proxy serving?
950 <secondary>transparent inter-operability</secondary>
951 </indexterm><indexterm>
952 <primary>Windows clients</primary>
953 </indexterm><indexterm>
954 <primary>network</primary>
955 <secondary>services</secondary>
956 </indexterm><indexterm>
957 <primary>authentication</primary>
958 </indexterm><indexterm>
959 <primary>wrapper</primary>
961 To provide transparent interoperability between Windows clients and the network services
962 that are used from them, Samba has had to develop tools and facilities that deliver that. The benefit
963 of Open Source software is that it can readily be reused. The current <command>ntlm_auth</command>
964 module is basically a wrapper around authentication code from the core of the Samba project.
968 <primary>plain-text</primary>
969 </indexterm><indexterm>
970 <primary>authentication</primary>
971 <secondary>plain-text</secondary>
972 </indexterm><indexterm>
973 <primary>Web</primary>
974 <secondary>proxy</secondary>
975 </indexterm><indexterm>
976 <primary>FTP</primary>
977 <secondary>proxy</secondary>
978 </indexterm><indexterm>
979 <primary>NTLMSSP</primary>
980 </indexterm><indexterm>
981 <primary>logon credentials</primary>
982 </indexterm><indexterm>
983 <primary>Windows explorer</primary>
984 </indexterm><indexterm>
985 <primary>Internet Information Server</primary>
986 </indexterm><indexterm>
987 <primary>Apache Web server</primary>
989 The <command>ntlm_auth</command> module supports basic plain-text authentication and NTLMSSP
990 protocols. This module makes it possible for Web and FTP proxy requests to be authenticated without
991 the user being interrupted via his/her Windows logon credentials. This facility is available with
992 MS Windows explorer and is one of the key benefits claimed for Microsoft Internet Information Server.
993 There are a few open source initiatives to provide support for these protocols in the Apache Web server
998 <primary>wrapper</primary>
1000 The short answer is that by adding a wrapper around key authentication components of Samba, other
1001 projects (like Squid) can benefit from the labors expended in meeting user interoperability needs.
1011 What other services does Samba provide?
1018 <primary>winbindd</primary>
1019 </indexterm><indexterm>
1020 <primary>Identity resolver</primary>
1021 </indexterm><indexterm>
1022 <primary>daemon</primary>
1023 </indexterm><indexterm>
1024 <primary>smbd</primary>
1025 </indexterm><indexterm>
1026 <primary>file and print server</primary>
1028 Samba-3 is a file and print server. The core components that provide this functionality are <command>smbd</command>,
1029 <command>nmbd</command>, and the Identity resolver daemon, <command>winbindd</command>.
1033 <primary>SMB/CIFS</primary>
1034 </indexterm><indexterm>
1035 <primary>smbclient</primary>
1037 Samba-3 is an SMB/CIFS client. The core component that provides this is called <command>smbclient</command>.
1041 <primary>modules</primary>
1042 </indexterm><indexterm>
1043 <primary>utilities</primary>
1044 </indexterm><indexterm>
1045 <primary>validation</primary>
1046 </indexterm><indexterm>
1047 <primary>inter-operability</primary>
1048 </indexterm><indexterm>
1049 <primary>authentication</primary>
1051 Samba-3 includes a number of helper tools, plug-in modules, utilities, and test/validation facilities.
1052 Samba-3 includes glue modules that help provide interoperability between MS Windows clients and UNIX/Linux
1053 servers and client. It includes Winbind agents that make it possible to authenticate UNIX/Linux access attempts
1054 as well as logins to an SMB/CIFS authentication server backend. Samba-3 includes name service switcher modules
1055 to permit Identity resolution via SMB/CIFS servers (Windows NT4/200x, Samba, and a host of other commercial
1066 Does use of Samba (<command>ntlm_auth</command>) improve the performance of Squid?
1073 Not really. Samba's <command>ntlm_auth</command> module handles only authentication. It requires that
1074 Squid make an external call to <command>ntlm_auth</command> and, therefore, actually incurs a
1075 little more overhead. Compared with the benefit obtained, that overhead is well worth enduring. Since
1076 Squid is a proxy server, and proxy servers tend to require lots of memory, it is good advice to provide
1077 sufficient memory when using Squid. Just add a little more to accommodate <command>ntlm_auth</command>.