Add description (to make build system happy)
[Samba.git] / docs / Samba-Guide / Chap05-500UserNetwork.xml
blob6835beed79b4643df2ddad20666ecb950701886d
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
9 ]>
11 <chapter id="Big500users">
12   <title>The 500-User Office</title>
14         <para>
15         The Samba-3 networking you explored in the previous chapter covers the finer points of 
16         configuration of peripheral services such as DHCP and DNS, and WINS. You experienced
17         implementation of a simple configuration of the services that are important adjuncts 
18         to successful deployment of Samba. 
19         </para>
21         <para>
22         An analysis of the history of postings to the Samba mailing list easily demonstrates 
23         that the two most prevalent Samba problem areas are:
24         </para>
26         <itemizedlist>
27                 <listitem><para>
28                 Defective resolution of a NetBIOS name to its IP address
29                 </para></listitem>
31                 <listitem><para>
32                 Printing problems
33                 </para></listitem>
35         </itemizedlist>
37         <para>
38         The next chapter deals with more complex printing configurations. The exercises
39         so far in this book have focused on implementation of the simplest printing processes
40         involving  no print job processing intelligence. In this chapter, you maintain 
41         that same approach to printing, but in the following chapter, there is an opportunity 
42         to make printing more complex for the administrator while making it easier for the user.
43         </para>
45     <para><indexterm>
46         <primary>WINS server</primary>
47       </indexterm><indexterm>
48         <primary>tdbsam</primary>
49       </indexterm><indexterm>
50         <primary>passdb backend</primary>
51       </indexterm>
52         The previous chapter demonstrates operation of a DHCP server and a DNS server, 
53         as well as a central WINS server. You validated the operation of these services and
54         saw an effective implementation of a Samba Domain Controller using the 
55         <parameter>tdbsam</parameter> passdb backend.
56         </para>
58         <para>
59         The objective of this chapter is to introduce more complex techniques that can be used to
60         improve manageability of Samba as networking needs grow. In this chapter, you implement
61         a distributed DHCP server environment, a distributed DNS server arrangement, a centralized
62         WINS server, and a centralized Samba Domain Controller.
63         </para>
65         <para>
66         A note of caution is important regarding the Samba configuration that is used in this
67         chapter. The use of a single Domain Controller on a routed, multi-segment network is 
68         a poor design choice that leads to potential network user complaints. As stated 
69         in the paragraph above, the objective in this chapter is to demonstrate some successful 
70         techniques in deployment and configuration management. This should be viewed as a 
71         foundation chapter for complex Samba deployments.
72         </para>
74         <para>
75         As you master the techniques presented here, you may find much better methods to 
76         improve network management and control while reducing human resource overheads.
77         You should take the opportunity to innovate and expand on the methods presented 
78         here and explore them to the fullest.
79         </para>
81 <sect1>
82         <title>Introduction</title>
84         <para>
85         Business continues to go well for Abmas. Mr. Meany is driving your success and the
86         network continues to grow thanks to the hard work Christine has done. You recently
87         hired Stanley Soroka as Manager of Information Systems. Christine recommended Stan
88         to the role. She told you Stan is so good at handling Samba that he can make a cast
89         iron rocking horse that is embedded in concrete kick like a horse at a rodeo. You
90         need skills like his. Christine and Stan get along just fine. Let's see what 
91         you can get out of this pair as they plot the next generation networks.
92         </para>
94         <para>
95         Ten months ago Abmas closed an acquisition of a property insurance business. The
96         founder lost interest in the business and decided to sell it to Mr. Meany.
97         Because they were former university classmates, the purchase was concluded with mutual assent. The
98         acquired business is located at the other end of town in much larger facilities.
99         The old Abmas building has become too small. Located on the same campus as the
100         newly acquired business are two empty buildings that are ideal to provide
101         Abmas with opportunity for growth.
102         </para>
104         <para>
105         Abmas has now completed the purchase of the two empty buildings and you are
106         to install a new network and relocate staff in nicely furnished new facilities.
107         The new network is to be used to fully integrate company operations. You have
108         decided to locate the new network operations control center in the larger building
109         in which the insurance group is located to take advantage of an ideal floor space
110         and to allow Stan and Christine to fully stage the new network and test it before
111         it is rolled out. Your strategy is to complete the new network so that it
112         is ready for operation when the old office moves into the new premises.
113         </para>
115         <sect2>
116                 <title>Assignment Tasks</title>
118                 <para>
119                 The acquired business had 280 network users. The old Abmas building housed
120                 220 network users in unbelievably cramped conditions. The network that
121                 initially served 130 users now handles 220 users quite well.
122                 </para>
124                 <para>
125                 The two businesses will be fully merged to create a single campus company.
126                 The Property Insurance Group (PIG) houses 300 employees, the new Accounting
127                 Services Group (ASG) will be in a small building (BLDG1) that houses 50 
128                 employees, and the Financial Services Group (FSG) will be housed in a large
129                 building that has capacity for growth (BLDG2). Building 2 houses 150 network
130                 users.
131                 </para>
133                 <para>
134                 You have decided to connect the building using fiber optic links between new
135                 routers. As a backup, the buildings are interconnected using line-of-sight
136                 high-speed infrared facilities. The infrared connection provides a
137                 secondary route to be used during periods of high demand for network
138                 bandwidth.
139                 </para>
141                 <para>
142                 The Internet gateway is upgraded to 15 Megabit/sec service. Your ISP
143                 provides on your premises a fully managed Cisco PIX firewall. You no longer need
144                 to worry about firewall facilities on your network.
145                 </para>
147                 <para>
148                 Stanley Soroka and Christine have purchased new server hardware. Christine wants to
149                 roll out a network that has whistles and bells. Stan wants to start off with
150                 a simple to manage, not-too-complex network. He is of the opinion that network
151                 users need to be gradually introduced to new features and capabilities and not
152                 rushed into an environment that may cause disorientation and loss of productivity.
153                 </para>
155                 <para>
156                 Your intrepid network team has decided to implement a network configuration
157                 that closely mirrors the successful system you installed in the old Abmas building.
158                 The new network infrastructure is owned by Abmas, but all desktop systems
159                 are being procured through a new out-source services and leasing company. Under
160                 the terms of a deal with Mr. M. Proper (CEO), DirectPointe Inc., provides
161                 all desktop systems and includes full level-one Help desk support for 
162                 a flat per-machine monthly fee. The deal allows you to add workstations on demand.
163                 This frees Stan and Christine to deal with deeper issues as they emerge and 
164                 permits Stan to work on creating new future value-added services.
165                 </para>
167                 <para>
168                 DirectPointe Inc. receives from you a new standard desktop configuration
169                 every four months. They automatically roll that out to each desktop system.
170                 You must keep DirectPointe informed of all changes.
171                 </para>
173         <para><indexterm>
174             <primary>PDC</primary>
175           </indexterm>
176                 The new network has a single Samba Domain Controller (PDC) located in the
177                 Network Operation Center (NOC). Buildings 1 and 2 each have a local server
178                 for local application servicing. It is a Domain Member. The new system
179                 uses the <parameter>tdbsam</parameter> passdb backend.
180                 </para>
182                 <para>
183                 Printing is based on raw pass-through facilities as it has been used so far.
184                 All printer drivers are installed on the desktop and notebook computers.
185                 </para>
187         </sect2>
188 </sect1>
190 <sect1>
191         <title>Dissection and Discussion</title>
193         <para>
194         <indexterm><primary>network load factors</primary></indexterm>
195         The example you are building in this chapter is an example of a network design that works,
196         but this does not make it a design that is recommended. As a general rule, there should
197         be at least one Backup Domain Controller per 50 Windows network clients. The principle behind
198         this recommendation is the fact that correct operation of MS Windows clients requires rapid
199         network response to all SMB/CIFS requests. The same rule says that if there are more than
200         50 clients per Domain Controller they are too busy to service requests. Let's put such
201         rules aside and recognize that network load affects the integrity of Domain Controller
202         responsiveness. This network will have 500 clients serviced by one central Domain
203         Controller. This is not a good omen for user satisfaction. You, of course, address this
204         very soon (see next chapter).
205         </para>
207         <sect2>
208                 <title>Technical Issues</title>
210                 <para>
211                 Stan has talked you into a horrible compromise, but it is addressed. Just make
212                 certain that the performance of this network is well validated before going live.
213                 </para>
215                 <para>
216                 Design decisions made in this design include:
217                 </para>
219                 <itemizedlist>
220                         <listitem><para>
221                         <indexterm><primary>PDC</primary></indexterm>
222                         <indexterm><primary>LDAP</primary></indexterm>
223                         <indexterm><primary>identity management</primary></indexterm>
224                         A single Primary Domain Controller (PDC) is being implemented. This limitation
225                         is based on the choice not to use LDAP. Many network administrators fear using
226                         LDAP based on the perceived complexity of implementation and management of an
227                         LDAP-based backend for all user identity management as well as to store network 
228                         access credentials.
229                         </para></listitem>
231                         <listitem><para>
232                         <indexterm><primary>BDC</primary></indexterm>
233                         <indexterm><primary>machine secret password</primary></indexterm>
234                         Because of the refusal to use an LDAP (ldapsam) passdb backend at this time,
235                         the only choice that makes sense with 500 users is to use the tdbsam passwd backend.
236                         This type of backend is not receptive to replication to Backup Domain Controllers.
237                         If the tdbsam <filename>passdb.tdb</filename> file is replicated to Backup Domain
238                         Controllers (BDCs) using <command>rsync</command>, there are two potential problems:
239                         1) Data that is in memory but not yet written to disk will not be replicated,
240                         and 2) Domain Member machines periodically change the secret machine password. When
241                         this happens, there is no mechanism to return the changed password to the PDC.
242                         </para></listitem>
244                         <listitem><para>
245                         All Domain user, group, and machine accounts are managed on the PDC. This makes
246                         for a simple mode of operation, but has to be balanced with network performance and
247                         integrity of operations considerations.
248                         </para></listitem>
250                         <listitem><para>
251                         <indexterm><primary>WINS</primary></indexterm>
252                         A single central WINS server is being used. The PDC is also the WINS server.
253                         Any attempt to operate a routed network without a WINS server while using NetBIOS
254                         over TCP/IP protocols does not work unless on each client the name resolution
255                         entries for the PDC are added to the <filename>LMHOSTS</filename>. This file is
256                         normally located on the Windows XP Professional client in the 
257                         <filename>C:\WINDOWS\SYSTEM32\ETC\DRIVERS</filename> directory.
258                         </para></listitem>
260                         <listitem><para>
261                         At this time the Samba WINS database is not capable of being replicated. That is
262                         why a single WINS server is being implemented. This should work without a problem.
263                         </para></listitem>
265                         <listitem><para>
266                         <indexterm><primary>winbindd</primary></indexterm>
267                         Backup Domain Controllers make use of <command>winbindd</command> to provide
268                         access to Domain security credentials for file system access and object storage.
269                         </para></listitem>
271                         <listitem><para>
272                         <indexterm><primary>DHCP</primary><secondary>relay</secondary></indexterm>
273                         <indexterm><primary>DHCP</primary><secondary>requests</secondary></indexterm>
274                         Configuration of Windows XP Professional clients is achieved using DHCP. Each
275                         subnet has its own DHCP server. Backup DHCP serving is provided by one
276                         alternate DHCP server. This necessitates enabling of the DHCP Relay agent on
277                         all routers. The DHCP Relay agent must be programmed to pass DHCP Requests from the
278                         network directed at the backup DHCP server.
279                         </para></listitem>
281                         <listitem><para>
282                         All network users are granted the ability to print to any printer that is network
283                         attached. All printers are available from each server. Print jobs that are spooled
284                         to a printer that is not on the local network segment are automatically routed to
285                         the print spooler that is in control of that printer. The specific details of how this
286                         might be done is demonstrated for one example only.
287                         </para></listitem>
289                         <listitem><para>
290                         The network address and sub-netmask chosen provide 1022 usable IP addresses in
291                         each subnet. If in the future more addresses are required, it would make sense
292                         to add further subnets rather than change addressing.
293                         </para></listitem>
295                 </itemizedlist>
297         </sect2>
300         <sect2>
301                 <title>Political Issues</title>
303                 <para>
304                 This case gets close to the real world. You and I know the right way to implement
305                 Domain Control. Politically, we have to navigate a mine field. In this case, the need is to
306                 get the PDC rolled out in compliance with expectations and also to be ready to save the day
307                 by having the real solution ready before it is needed. That real solution is presented in
308                 the next chapter.
309                 </para>
311         </sect2>
313 </sect1>
315 <sect1>
316         <title>Implementation</title>
318         <para>
319         The following configuration process begins following installation of Red Hat Linux 9.0 on the
320         three servers shown in the network topology diagram in <link linkend="chap05net"/>. You have
321         selected hardware that is appropriate to the task.
322         </para>
324         <image id="chap05net">
325                 <imagedescription>Network Topology &smbmdash; 500 User Network Using tdbsam passdb backend.</imagedescription>
326                 <imagefile scale="80">chap5-net</imagefile>
327         </image>
329         <sect2 id="ch5-dnshcp-setup">
330         <title>Installation of DHCP, DNS, and Samba Control Files</title>
332         <para>
333         Carefully install the configuration files into the correct locations as shown in 
334         <link linkend="ch5-filelocations"/>. You should validate that the full file path is
335         correct as shown.
336         </para>
338         <para>
339         The abbreviation shown in this table as <constant>{VLN}</constant> means
340         the directory location beginning with <filename>/var/lib/named</filename>.
341         </para>
344         <table id="ch5-filelocations"><title>Domain: <constant>MEGANET</constant>, File Locations for Servers</title>
345                 <tgroup cols="5">
346                         <colspec colname='c1' align="left"/>
347                         <colspec colname='c2' align="left"/>
348                         <colspec colname='c3' align="center"/>
349                         <colspec colname='c4' align="center"/>
350                         <colspec colname='c5' align="center"/>
351                         <thead>
352                                 <row>
353                                         <entry align="center" namest='c1' nameend='c2'>File Information</entry>
354                                         <entry align="center" namest="c3" nameend="c5">Server Name</entry>
355                                 </row>
356                                 <row>
357                                         <entry align="center">Source</entry>
358                                         <entry align="center">Target Location</entry>
359                                         <entry align="center">MASSIVE</entry>
360                                         <entry align="center">BLDG1</entry>
361                                         <entry align="center">BLDG2</entry>
362                                 </row>
363                         </thead>
364                         <tbody>
365                                 <row>
366                                         <entry><link linkend="ch5-massivesmb"/></entry>
367                                         <entry><filename>/etc/samba/smb.conf</filename></entry>
368                                         <entry>Yes</entry>
369                                         <entry>No</entry>
370                                         <entry>No</entry>
371                                 </row>
372                                 <row>
373                                         <entry><link linkend="ch5-dc-common"/></entry>
374                                         <entry><filename>/etc/samba/dc-common.conf</filename></entry>
375                                         <entry>Yes</entry>
376                                         <entry>No</entry>
377                                         <entry>No</entry>
378                                 </row>
379                                 <row>
380                                         <entry><link linkend="ch5-commonsmb"/></entry>
381                                         <entry><filename>/etc/samba/common.conf</filename></entry>
382                                         <entry>Yes</entry>
383                                         <entry>Yes</entry>
384                                         <entry>Yes</entry>
385                                 </row>
386                                 <row>
387                                         <entry><link linkend="ch5-bldg1-smb"/></entry>
388                                         <entry><filename>/etc/samba/smb.conf</filename></entry>
389                                         <entry>No</entry>
390                                         <entry>Yes</entry>
391                                         <entry>No</entry>
392                                 </row>
393                                 <row>
394                                         <entry><link linkend="ch5-bldg2-smb"/></entry>
395                                         <entry><filename>/etc/samba/smb.conf</filename></entry>
396                                         <entry>No</entry>
397                                         <entry>No</entry>
398                                         <entry>Yes</entry>
399                                 </row>
400                                 <row>
401                                         <entry><link linkend="ch5-dommem-smb"/></entry>
402                                         <entry><filename>/etc/samba/dommem.conf</filename></entry>
403                                         <entry>No</entry>
404                                         <entry>Yes</entry>
405                                         <entry>Yes</entry>
406                                 </row>
407                                 <row>
408                                         <entry><link linkend="massive-dhcp"/></entry>
409                                         <entry><filename>/etc/dhcpd.conf</filename></entry>
410                                         <entry>Yes</entry>
411                                         <entry>No</entry>
412                                         <entry>No</entry>
413                                 </row>
414                                 <row>
415                                         <entry><link linkend="bldg1dhcp"/></entry>
416                                         <entry><filename>/etc/dhcpd.conf</filename></entry>
417                                         <entry>No</entry>
418                                         <entry>Yes</entry>
419                                         <entry>No</entry>
420                                 </row>
421                                 <row>
422                                         <entry><link linkend="bldg2dhcp"/></entry>
423                                         <entry><filename>/etc/dhcpd.conf</filename></entry>
424                                         <entry>No</entry>
425                                         <entry>No</entry>
426                                         <entry>Yes</entry>
427                                 </row>
428                                 <row>
429                                         <entry><link linkend="massive-nameda"/></entry>
430                                         <entry><filename>/etc/named.conf (part A)</filename></entry>
431                                         <entry>Yes</entry>
432                                         <entry>No</entry>
433                                         <entry>No</entry>
434                                 </row>
435                                 <row>
436                                         <entry><link linkend="massive-namedb"/></entry>
437                                         <entry><filename>/etc/named.conf (part B)</filename></entry>
438                                         <entry>Yes</entry>
439                                         <entry>No</entry>
440                                         <entry>No</entry>
441                                 </row>
442                                 <row>
443                                         <entry><link linkend="massive-namedc"/></entry>
444                                         <entry><filename>/etc/named.conf (part C)</filename></entry>
445                                         <entry>Yes</entry>
446                                         <entry>No</entry>
447                                         <entry>No</entry>
448                                 </row>
449                                 <row>
450                                         <entry><link linkend="abmasbizdns"/></entry>
451                                         <entry><filename>{VLN}/master/abmas.biz.hosts</filename></entry>
452                                         <entry>Yes</entry>
453                                         <entry>No</entry>
454                                         <entry>No</entry>
455                                 </row>
456                                 <row>
457                                         <entry><link linkend="abmasusdns"/></entry>
458                                         <entry><filename>{VLN}/master/abmas.us.hosts</filename></entry>
459                                         <entry>Yes</entry>
460                                         <entry>No</entry>
461                                         <entry>No</entry>
462                                 </row>
463                                 <row>
464                                         <entry><link linkend="bldg12nameda"/></entry>
465                                         <entry><filename>/etc/named.conf (part A)</filename></entry>
466                                         <entry>No</entry>
467                                         <entry>Yes</entry>
468                                         <entry>Yes</entry>
469                                 </row>
470                                 <row>
471                                         <entry><link linkend="bldg12namedb"/></entry>
472                                         <entry><filename>/etc/named.conf (part B)</filename></entry>
473                                         <entry>No</entry>
474                                         <entry>Yes</entry>
475                                         <entry>Yes</entry>
476                                 </row>
477                                 <row>
478                                         <entry><link linkend="loopback"/></entry>
479                                         <entry><filename>{VLN}/localhost.zone</filename></entry>
480                                         <entry>Yes</entry>
481                                         <entry>Yes</entry>
482                                         <entry>Yes</entry>
483                                 </row>
484                                 <row>
485                                         <entry><link linkend="dnsloopy"/></entry>
486                                         <entry><filename>{VLN}/127.0.0.zone</filename></entry>
487                                         <entry>Yes</entry>
488                                         <entry>Yes</entry>
489                                         <entry>Yes</entry>
490                                 </row>
491                                 <row>
492                                         <entry><link linkend="roothint"/></entry>
493                                         <entry><filename>{VLN}/root.hint</filename></entry>
494                                         <entry>Yes</entry>
495                                         <entry>Yes</entry>
496                                         <entry>Yes</entry>
497                                 </row>
498                         </tbody>
499                 </tgroup>
500         </table>
502         </sect2>
504         <sect2>
505         <title>Server Preparation &smbmdash; All Servers</title>
507         <para>
508         The following steps apply to all servers. Follow each step carefully.
509         </para>
511                 <procedure>
512                         <step><para>
513                         Using the UNIX/Linux system tools, set the name of the server as shown in the network
514                         topology diagram in <link linkend="chap05net"/>. For SUSE Linux products, the tool
515                         that permits this is called <command>yast2</command>; for Red Hat Linux products,
516                         you can use the <command>netcfg</command> tool.
517                         Verify that your hostname is correctly set by running:
518 <screen>
519 &rootprompt; uname -n
520 </screen>
521                         An alternate method to verify the hostname is:
522 <screen>
523 &rootprompt; hostname -f
524 </screen>
525                         </para></step>
527                          <step><para>
528               <indexterm><primary>/etc/hosts</primary></indexterm><indexterm>
529                 <primary>named</primary>
530               </indexterm>
531                         Edit your <filename>/etc/hosts</filename> file to include the primary names and addresses
532                         of all network interfaces that are on the host server. This is necessary so that during
533                         startup the system is able to resolve all its own names to the IP address prior to
534                         startup of the DNS server. You should check the startup order of your system. If the 
535                         CUPS print server is started before the DNS server (<command>named</command>), you 
536                         should also include an entry for the printers in the <filename>/etc/hosts</filename> file.
537                         </para></step>
539                         <step><para>
540                         <indexterm><primary>/etc/resolv.conf</primary></indexterm>
541                         All DNS name resolution should be handled locally. To ensure that the server is configured
542                         correctly to handle this, edit <filename>/etc/resolv.conf</filename> so it has the following
543                         content:
544 <screen>
545 search abmas.us abmas.biz
546 nameserver 127.0.0.1
547 </screen>
548                         This instructs the name resolver function (when configured correctly) to ask the DNS server
549                         that is running locally to resolve names to addresses.
550                         </para></step>
553                         <step><para>
554               <indexterm><primary>administrator</primary></indexterm><indexterm>
555                 <primary>smbpasswd</primary>
556               </indexterm>
557                         Add the <constant>root</constant> user to the password backend as follows:
558 <screen>
559 &rootprompt; smbpasswd -a root
560 New SMB password: XXXXXXXX
561 Retype new SMB password: XXXXXXXX
562 &rootprompt;
563 </screen>
564                         The <constant>root</constant> account is the UNIX equivalent of the Windows Domain Administrator.
565                         This account is essential in the regular maintenance of your Samba server. It must never be
566                         deleted. If for any reason the account is deleted, you may not be able to recreate this account
567                         without considerable trouble.
568                         </para></step>
570                         <step><para>
571               <indexterm><primary>username map</primary></indexterm><indexterm>
572                 <primary>/etc/samba/smbusers</primary>
573               </indexterm>
574                         Create the username map file to permit the <constant>root</constant> account to be called
575                         <constant>Administrator</constant> from the Windows network environment. To do this, create
576                         the file <filename>/etc/samba/smbusers</filename> with the following contents:
577 <screen>
578 ####
579 # User mapping file
580 ####
581 # File Format
582 # -----------
583 # Unix_ID = Windows_ID
585 # Examples:
586 # root = Administrator
587 # janes = "Jane Smith"
588 # jimbo = Jim Bones
590 # Note: If the name contains a space it must be double quoted.
591 #       In the example above the name 'jimbo' will be mapped to Windows
592 #       user names 'Jim' and 'Bones' because the space was not quoted.
593 #######################################################################
594 root = Administrator
595 ####
596 # End of File
597 ####
598 </screen>
599                         </para></step>
601                         <step><para>
602                         Configure all network attached printers to have a fixed IP address.
603                         </para></step>
605                         <step><para>
606                         Create an entry in the DNS database on the server <constant>MASSIVE</constant>
607                         in both the forward lookup database for the zone <constant>abmas.biz.hosts</constant>
608                         and in the reverse lookup database for the network segment that the printer is
609                         located in. Example configuration files for similar zones were presented in
610                         <link linkend="abmasbiz"/> and <link linkend="eth2zone"/>.
611                         </para></step>
613                         <step><para>
614                         Follow the instructions in the printer manufacturer's manuals to permit printing 
615                         to port 9100.  Use any other port the manufacturer specifies for direct mode, 
616                         raw printing.  This allows the CUPS spooler to print using raw mode protocols.
617                         <indexterm><primary>CUPS</primary></indexterm>
618                         <indexterm><primary>raw printing</primary></indexterm>
619                         </para></step>
621                         <step><para>
622                         <indexterm><primary>CUPS</primary><secondary>queue</secondary></indexterm>
623                         Only on the server to which the printer is attached configure the CUPS Print 
624                         Queues as follows:
625 <screen>
626 &rootprompt; lpadmin -p <parameter>printque</parameter> -v socket://<parameter>printer-name</parameter>.abmas.biz:9100 -E
627 </screen>
628                         <indexterm><primary>print filter</primary></indexterm>
629                         This step creates the necessary print queue to use no assigned print filter. This
630                         is ideal for raw printing, i.e., printing without use of filters.
631                         The name <parameter>printque</parameter> is the name you have assigned for
632                         the particular printer.
633                         </para></step>
635                         <step><para>
636                         Print queues may not be enabled at creation. Make certain that the queues
637                         you have just created are enabled by executing the following:
638 <screen>
639 &rootprompt; /usr/bin/enable <parameter>printque</parameter>
640 </screen>
641                         </para></step>
643                         <step><para>
644                         Even though your print queue may be enabled, it is still possible that it
645                         does not accept print jobs. A print queue services incoming printing
646                         requests only when configured to do so. Ensure that your print queue is
647                         set to accept incoming jobs by executing the following command:
648 <screen>
649 &rootprompt; /usr/bin/accept <parameter>printque</parameter>
650 </screen>
651                         </para></step>
653                         <step><para>
654                         <indexterm><primary>mime type</primary></indexterm>
655                         <indexterm><primary>/etc/mime.convs</primary></indexterm>
656                         <indexterm><primary>application/octet-stream</primary></indexterm>
657                         Edit the file <filename>/etc/cups/mime.convs</filename> to uncomment the line:
658 <screen>
659 application/octet-stream     application/vnd.cups-raw      0     -
660 </screen>
661                         </para></step>
663                         <step><para>
664                         <indexterm><primary>/etc/mime.types</primary></indexterm>
665                         Edit the file <filename>/etc/cups/mime.types</filename> to uncomment the line:
666 <screen>
667 application/octet-stream
668 </screen>
669                         </para></step>
671                         <step><para>
672                         Refer to the CUPS printing manual for instructions regarding how to configure
673                         CUPS so that print queues that reside on CUPS servers on remote networks
674                         route print jobs to the print server that owns that queue. The default setting
675                         on your CUPS server may automatically discover remotely installed printers and
676                         may permit this functionality without requiring specific configuration.
677                         </para></step>
679                         <step><para>
680                         As part of the rollout program, you need to configure the application's
681                         server shares. This can be done once on the central server and may then be
682                         replicated using a tool such as <command>rsync</command>. Refer to the man
683                         page for <command>rsync</command> for details regarding use. The notes in       
684                         <link linkend="ch4appscfg"/> may help in your decisions to use an application
685                         server facility.
686                         </para></step>
688                 </procedure>
690         <note><para>
691         Logon scripts that are run from a Domain Controller (PDC or BDC) are capable of using semi-intelligent
692         processes to auto-map Windows client drives to an application server that is nearest to the client. This
693         is considerably more difficult when a single PDC is used on a routed network. It can be done, but not
694         as elegantly as you see in the next chapter.
695         </para></note>
697         </sect2>
699         <sect2>
700         <title>Server Specific Preparation</title>
702         <para>
703         There are some steps that apply to particular server functionality only. Each step is critical
704         to correct server operation.
705         </para>
707                 <sect3>
708                 <title>Configuration for Server: <constant>MASSIVE</constant></title>
710                 <procedure>
711                         <step><para>
712                         <indexterm><primary>/etc/rc.d/boot.local</primary></indexterm>
713                         <indexterm><primary>IP forwarding</primary></indexterm>
714                         The host server acts as a router between the two internal network segments as well
715                         as for all Internet access. This necessitates that IP forwarding must be enabled. This can be
716                         achieved by adding to the <filename>/etc/rc.d/boot.local</filename> an entry as follows:
717 <screen>
718 echo 1 > /proc/sys/net/ipv4/ip_forward
719 </screen>
720                         To ensure that your kernel is capable of IP forwarding during configuration, you may wish to execute
721                         that command manually also. This setting permits the Linux system to act as a router.
722                         </para></step>
724                         <step><para>
725                         This server is dual hosted (i.e., has two network interfaces) &smbmdash; one goes to the Internet,
726                         and the other to a local network that has a router that is the gateway to the remote networks.
727                         You must, therefore, configure the server with route table entries so that it can find machines
728                         on the remote networks. You can do this using the appropriate system tools for your Linux
729                         server or using static entries that you place in one of the system startup files. It is best
730                         to always use the tools that the operating system vendor provided. In the case of SUSE Linux, the
731                         best tool to do this is YaST (refer to SUSE Administration Manual); in the case of Red Hat,
732                         this is best done using the graphical system configuration tools (see the Red Hat documentation).
733                         An example of how this may be done manually is as follows:
734 <screen>
735 &rootprompt; route add net 172.16.4.0 netmask 255.255.252.0 gw 172.16.0.128
736 &rootprompt; route add net 172.16.8.0 netmask 255.255.252.0 gw 172.16.0.128
737 </screen>
738                         If you just execute these commands manually, the route table entries you have created are
739                         not persistent across system reboots. You may add these commands directly to the local
740                         startup files as follows: (SUSE) <filename>/etc/rc.d/boot.local</filename>, (Red Hat)
741                         <filename>/etc/rc.d/init.d/rc.local</filename>.
742                         </para></step>
744                         <step><para>
745                         <indexterm><primary>/etc/nsswitch.conf</primary></indexterm>
746                         The final step that must be completed is to edit the <filename>/etc/nsswitch.conf</filename> file.
747                         This file controls the operation of the various resolver libraries that are part of the Linux
748                         Glibc libraries. Edit this file so that it contains the following entries:
749 <screen>
750 hosts:      files dns wins
751 </screen>
752                         </para></step>
754                         <step><para>
755                         <indexterm><primary>initGrps.sh</primary></indexterm>
756                         Create and map Windows Domain Groups to UNIX groups. A sample script is provided in
757                         <link linkend="ch5-initgrps"/>. Create a file containing this script. You called yours
758                         <filename>/etc/samba/initGrps.sh</filename>. Set this file so it can be executed
759                         and then execute the script. An example of the execution of this script as well as its
760                         validation are shown in Chapter 4, Section 4.3.2, Step 5.
761                         </para></step>
763                         <step><para>
764                         <indexterm><primary>/etc/passwd</primary></indexterm>
765                         <indexterm><primary>password</primary><secondary>backend</secondary></indexterm>
766                         <indexterm><primary>smbpasswd</primary></indexterm>
767                         For each user who needs to be given a Windows Domain account, make an entry in the
768                         <filename>/etc/passwd</filename> file, as well as in the Samba password backend.
769                         Use the system tool of your choice to create the UNIX system account and use the Samba
770                         <command>smbpasswd</command> to create a Domain user account.
771                         </para>
773                         <para>
774                         <indexterm><primary>useradd</primary></indexterm>
775                         <indexterm><primary>adduser</primary></indexterm>
776                         <indexterm><primary>user</primary><secondary>management</secondary></indexterm>
777                         There are a number of tools for user management under UNIX. Commonly known ones include:
778                         <command>useradd, adduser</command>. In addition to these, there is a plethora of custom
779                         tools. With the tool of your choice, create a home directory for each user.
780                         </para></step>
782                         <step><para>
783                         Using the preferred tool for your UNIX system, add each user to the UNIX groups created
784                         previously as necessary. File system access control based on UNIX group membership.
785                         </para></step>
787                         <step><para>
788                         Create the directory mount point for the disk sub-system that is to be mounted to provide
789                         data storage for company files. In this case, the mount point indicated in the &smb.conf;
790                         file is <filename>/data</filename>. Format the file system as required and mount the formatted
791                         file system partition using appropriate system tools.
792                         </para></step>
794                         <step><para>
795                 <indexterm><primary>file system</primary>
796                   <secondary>permissions</secondary></indexterm>
797                         Create the top-level file storage directories for data and applications as follows:
798 <screen>
799 &rootprompt; mkdir -p /data/{accounts,finsvcs,pidata}
800 &rootprompt; mkdir -p /apps
801 &rootprompt; chown -R root.root /data
802 &rootprompt; chown -R root.root /apps
803 &rootprompt; chown -R bjordan.accounts /data/accounts
804 &rootprompt; chown -R bjordan.finsvcs /data/finsvcs
805 &rootprompt; chown -R bjordan.finsvcs /data/pidata
806 &rootprompt; chmod -R ug+rwxs,o-rwx /data
807 &rootprompt; chmod -R ug+rwx,o+rx-w /apps
808 </screen>
809                         Each department is responsible for creating its own directory structure within the departmental
810                         share. The directory root of the <command>accounts</command> share is <filename>/data/accounts</filename>.
811                         The directory root of the <command>finsvcs</command> share is <filename>/data/finsvcs</filename>.
812                         The <filename>/apps</filename> directory is the root of the <constant>apps</constant> share
813                         that provides the application server infrastructure.
814                         </para></step>
816                         <step><para>
817                         The &smb.conf; file specifies an infrastructure to support roaming profiles and network
818                         logon services. You can now create the file system infrastructure to provide the
819                         locations on disk that these services require. Adequate planning is essential
820                         since desktop profiles can grow to be quite large. For planning purposes, a minimum of
821                         200 Megabytes of storage should be allowed per user for profile storage. The following
822                         commands create the directory infrastructure needed:
823 <screen>
824 &rootprompt; mkdir -p /var/spool/samba
825 &rootprompt; mkdir -p /var/lib/samba/{netlogon/scripts,profiles}
826 &rootprompt; chown -R root.root /var/spool/samba
827 &rootprompt; chown -R root.root /var/lib/samba
828 &rootprompt; chmod a+rwxt /var/spool/samba
829 </screen>
830                         For each user account that is created on the system, the following commands should be
831                         executed:
832 <screen>
833 &rootprompt; mkdir /var/lib/samba/profiles/'username'
834 &rootprompt; chown 'username'.users /var/lib/samba/profiles/'username'
835 &rootprompt; chmod ug+wrx,o+rx,-w /var/lib/samba/profiles/'username'
836 </screen>
837                         </para></step>
839                         <step><para>
840                         Create a logon script. It is important that each line is correctly terminated with
841                         a carriage return and line-feed combination (i.e., DOS encoding). The following procedure
842                         works if the right tools (<constant>unxi2dos</constant> and <constant>dos2unix</constant>) are installed.
843                         First, create a file called <filename>/var/lib/samba/netlogon/scripts/logon.bat.unix</filename>
844                         with the following contents:
845 <screen>
846 net time \\massive /set /yes
847 net use h: /home
848 </screen>
849                         Convert the UNIX file to a DOS file as follows:
850 <screen>
851 &rootprompt; dos2unix &lt; /var/lib/samba/netlogon/scripts/logon.bat.unix \
852         &gt; /var/lib/samba/netlogon/scripts/logon.bat
853 </screen>
854                         </para></step>
856                         <step><para>
857                         There is one preparatory step without which you cannot have a working Samba network
858                         environment. You must add an account for each network user. You can do this by executing
859                         the following steps for each user:
860 <screen>
861 &rootprompt; useradd -m <parameter>username</parameter>
862 &rootprompt; passwd <parameter>username</parameter>
863 Changing password for <parameter>username</parameter>.
864 New password: XXXXXXXX
865 Re-enter new password: XXXXXXXX
866 Password changed
867 &rootprompt; smbpasswd -a <parameter>username</parameter>
868 New SMB password: XXXXXXXX
869 Retype new SMB password: XXXXXXXX
870 Added user <parameter>username</parameter>.
871 </screen>
872                         You do, of course, use a valid user login ID in place of <parameter>username</parameter>.
873                         </para></step>
875                         <step><para>
876                         Follow the processes shown in <link linkend="ch5-procstart"/> to start all services.
877                         </para></step>
879                         <step><para>
880                         Your server is ready for validation testing. Do not proceed with the steps in
881                         <link linkend="ch5-domsvrspec"/> until after the operation of the server has been
882                         validated following the same methods as outlined in <link linkend="ch4valid"/>.
883                         </para></step>
885                 </procedure>
886                 
887                 </sect3>
889                 <sect3 id="ch5-domsvrspec">
890                 <title>Configuration Specific to Domain Member Servers: <constant>BLDG1, BLDG2</constant></title>
892                 <procedure>
893                         <step><para>
894                         <indexterm><primary>/etc/nsswitch.conf</primary></indexterm>
895                         The final step that must be completed is to edit the <filename>/etc/nsswitch.conf</filename> file.
896                         This file controls the operation of the various resolver libraries that are part of the Linux
897                         Glibc libraries. Edit this file so that it contains the following entries:
898 <screen>
899 passwd:     files winbind
900 group:      files winbind
901 hosts:      files dns wins
902 </screen>
903                         </para></step>
905                         <step><para>
906                         Follow the steps outlined in <link linkend="ch5-procstart"/> to start all services. Do not
907                         start Samba at this time. Samba is controlled by the process called <command>smb</command>.
908                         </para></step>
910             <step><para><indexterm>
911                   <primary>net</primary>
912                   <secondary>rpc</secondary>
913                   <tertiary>join</tertiary>
914                 </indexterm>
915                         At this time, you must now attempt to join the Domain Member servers to the Domain. The following
916                         instructions should be executed to effect this:
917 <screen>
918 &rootprompt; net rpc join 
919 </screen>
920                         </para></step>
922             <step><para><indexterm>
923                   <primary>service</primary>
924                   <secondary>smb</secondary>
925                   <tertiary>start</tertiary>
926                 </indexterm>
927                         You now start the Samba services by executing:
928 <screen>
929 &rootprompt; service smb start
930 </screen>
931                         </para></step>
933                         <step><para>
934                         Your server is ready for validation testing. Do not proceed with the steps in
935                         <link linkend="ch5-domsvrspec"/> until after the operation of the server has been
936                         validated following the same methods as outlined in <link linkend="ch4valid"/>.
937                         </para></step>
939                 </procedure>
941                 </sect3>
943         </sect2>
945 <!-- One -->
946 <smbconfexample id="ch5-massivesmb">
947 <title>Server: MASSIVE (PDC), File: <filename>/etc/samba/smb.conf</filename></title>
948 <smbconfcomment>Global parameters</smbconfcomment>
949 <smbconfsection>[global]</smbconfsection>
950 <smbconfoption><name>workgroup</name><value>MEGANET</value></smbconfoption>
951 <smbconfoption><name>netbios name</name><value>MASSIVE</value></smbconfoption>
952 <smbconfoption><name>interfaces</name><value>eth1, lo</value></smbconfoption>
953 <smbconfoption><name>bind interfaces only</name><value>Yes</value></smbconfoption>
954 <smbconfoption><name>passdb backend</name><value>tdbsam</value></smbconfoption>
955 <smbconfoption><name>add user script</name><value>/usr/sbin/useradd -m %u</value></smbconfoption>
956 <smbconfoption><name>delete user script</name><value>/usr/sbin/userdel -r %u</value></smbconfoption>
957 <smbconfoption><name>add group script</name><value>/usr/sbin/groupadd %g</value></smbconfoption>
958 <smbconfoption><name>delete group script</name><value>/usr/sbin/groupdel %g</value></smbconfoption>
959 <smbconfoption><name>add user to group script</name><value>/usr/sbin/usermod -G %g %u</value></smbconfoption>
960 <smbconfoption><name>add machine script</name><value>/usr/sbin/useradd -s /bin/false -d /dev/null %u</value></smbconfoption>
961 <smbconfoption><name>preferred master</name><value>Yes</value></smbconfoption>
962 <smbconfoption><name>wins support</name><value>Yes</value></smbconfoption>
963 <smbconfoption><name>include</name><value>/etc/samba/dc-common.conf</value></smbconfoption>
965 <smbconfsection>[IPC$]</smbconfsection>
966 <smbconfoption><name>path</name><value>/tmp</value></smbconfoption>
967 <smbconfoption><name>hosts allow</name><value>172.16.0.0/16, 127.0.0.1</value></smbconfoption>
968 <smbconfoption><name>hosts deny</name><value>0.0.0.0/0</value></smbconfoption>
970 <smbconfsection>[accounts]</smbconfsection>
971 <smbconfoption><name>comment</name><value>Accounting Files</value></smbconfoption>
972 <smbconfoption><name>path</name><value>/data/accounts</value></smbconfoption>
973 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
975 <smbconfsection>[service]</smbconfsection>
976 <smbconfoption><name>comment</name><value>Financial Services Files</value></smbconfoption>
977 <smbconfoption><name>path</name><value>/data/service</value></smbconfoption>
978 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
980 <smbconfsection>[pidata]</smbconfsection>
981 <smbconfoption><name>comment</name><value>Property Insurance Files</value></smbconfoption>
982 <smbconfoption><name>path</name><value>/data/pidata</value></smbconfoption>
983 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
984 </smbconfexample>
986 <!-- Two -->
987 <smbconfexample id="ch5-dc-common">
988 <title>Server: MASSIVE (PDC), File: <filename>/etc/samba/dc-common.conf</filename></title>
989 <smbconfcomment>Global parameters</smbconfcomment>
990 <smbconfsection>[global]</smbconfsection>
991 <smbconfoption><name>shutdown script</name><value>/var/lib/samba/scripts/shutdown.sh</value></smbconfoption>
992 <smbconfoption><name>abort shutdown script</name><value>/sbin/shutdown -c</value></smbconfoption>
993 <smbconfoption><name>logon script</name><value>scripts\logon.bat</value></smbconfoption>
994 <smbconfoption><name>logon path</name><value>\%L\profiles\%U</value></smbconfoption>
995 <smbconfoption><name>logon drive</name><value>X:</value></smbconfoption>
996 <smbconfoption><name>logon home</name><value>\%L\%U</value></smbconfoption>
997 <smbconfoption><name>domain logons</name><value>Yes</value></smbconfoption>
998 <smbconfoption><name>preferred master</name><value>Yes</value></smbconfoption>
999 <smbconfoption><name>include</name><value>/etc/samba/common.conf</value></smbconfoption>
1001 <smbconfsection>[homes]</smbconfsection>
1002 <smbconfoption><name>comment</name><value>Home Directories</value></smbconfoption>
1003 <smbconfoption><name>valid users</name><value>%S</value></smbconfoption>
1004 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
1005 <smbconfoption><name>browseable</name><value>No</value></smbconfoption>
1007 <smbconfsection>[netlogon]</smbconfsection>
1008 <smbconfoption><name>comment</name><value>Network Logon Service</value></smbconfoption>
1009 <smbconfoption><name>path</name><value>/var/lib/samba/netlogon</value></smbconfoption>
1010 <smbconfoption><name>guest ok</name><value>Yes</value></smbconfoption>
1011 <smbconfoption><name>locking</name><value>No</value></smbconfoption>
1013 <smbconfsection>[profiles]</smbconfsection>
1014 <smbconfoption><name>comment</name><value>Profile Share</value></smbconfoption>
1015 <smbconfoption><name>path</name><value>/var/lib/samba/profiles</value></smbconfoption>
1016 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
1017 <smbconfoption><name>profile acls</name><value>Yes</value></smbconfoption>
1018 </smbconfexample>
1020 <!-- Three -->
1021 <smbconfexample id="ch5-commonsmb">
1022 <title>Common Samba Configuration File: <filename>/etc/samba/common.conf</filename></title>
1023 <smbconfsection>[global]</smbconfsection>
1024 <smbconfoption><name>username map</name><value>/etc/samba/smbusers</value></smbconfoption>
1025 <smbconfoption><name>log level</name><value>1</value></smbconfoption>
1026 <smbconfoption><name>syslog</name><value>0</value></smbconfoption>
1027 <smbconfoption><name>log file</name><value>/var/log/samba/%m</value></smbconfoption>
1028 <smbconfoption><name>max log size</name><value>50</value></smbconfoption>
1029 <smbconfoption><name>smb ports</name><value>139 445</value></smbconfoption>
1030 <smbconfoption><name>name resolve order</name><value>wins bcast hosts</value></smbconfoption>
1031 <smbconfoption><name>time server</name><value>Yes</value></smbconfoption>
1032 <smbconfoption><name>printcap name</name><value>CUPS</value></smbconfoption>
1033 <smbconfoption><name>show add printer wizard</name><value>No</value></smbconfoption>
1034 <smbconfoption><name>shutdown script</name><value>/var/lib/samba/scripts/shutdown.sh</value></smbconfoption>
1035 <smbconfoption><name>abort shutdown script</name><value>/sbin/shutdown -c</value></smbconfoption>
1036 <smbconfoption><name>utmp</name><value>Yes</value></smbconfoption>
1037 <smbconfoption><name>map acl inherit</name><value>Yes</value></smbconfoption>
1038 <smbconfoption><name>printing</name><value>cups</value></smbconfoption>
1039 <smbconfoption><name>veto files</name><value>/*.eml/*.nws/*.{*}/</value></smbconfoption>
1040 <smbconfoption><name>veto oplock files</name><value>/*.doc/*.xls/*.mdb/</value></smbconfoption>
1041 <smbconfoption><name>include</name><value> </value></smbconfoption>
1043 <smbconfcomment>Share and Service Definitions are common to all servers</smbconfcomment>
1044 <smbconfsection>[printers]</smbconfsection>
1045 <smbconfoption><name>comment</name><value>SMB Print Spool</value></smbconfoption>
1046 <smbconfoption><name>path</name><value>/var/spool/samba</value></smbconfoption>
1047 <smbconfoption><name>guest ok</name><value>Yes</value></smbconfoption>
1048 <smbconfoption><name>printable</name><value>Yes</value></smbconfoption>
1049 <smbconfoption><name>use client driver</name><value>Yes</value></smbconfoption>
1050 <smbconfoption><name>default devmode</name><value>Yes</value></smbconfoption>
1051 <smbconfoption><name>browseable</name><value>No</value></smbconfoption>
1053 <smbconfsection>[apps]</smbconfsection>
1054 <smbconfoption><name>comment</name><value>Application Files</value></smbconfoption>
1055 <smbconfoption><name>path</name><value>/apps</value></smbconfoption>
1056 <smbconfoption><name>admin users</name><value>bjordan</value></smbconfoption>
1057 <smbconfoption><name>read only</name><value>No</value></smbconfoption>
1058 </smbconfexample>
1060 <!-- Four -->
1061 <smbconfexample id="ch5-bldg1-smb">
1062 <title>Server: BLDG1 (Member), File: smb.conf</title>
1063 <smbconfcomment>Global parameters</smbconfcomment>
1064 <smbconfsection>[global]</smbconfsection>
1065 <smbconfoption><name>workgroup</name><value>MEGANET</value></smbconfoption>
1066 <smbconfoption><name>netbios name</name><value>BLDG1</value></smbconfoption>
1067 <smbconfoption><name>include</name><value>/etc/samba/dom-mem.conf</value></smbconfoption>
1068 </smbconfexample>
1070 <!-- Five -->
1071 <smbconfexample id="ch5-bldg2-smb">
1072 <title>Server: BLDG2 (Member), File: smb.conf</title>
1073 <smbconfcomment>Global parameters</smbconfcomment>
1074 <smbconfsection>[global]</smbconfsection>
1075 <smbconfoption><name>workgroup</name><value>MEGANET</value></smbconfoption>
1076 <smbconfoption><name>netbios name</name><value>BLDG2</value></smbconfoption>
1077 <smbconfoption><name>include</name><value>/etc/samba/dom-mem.conf</value></smbconfoption>
1078 </smbconfexample>
1080 <!-- Six -->
1081 <smbconfexample id="ch5-dommem-smb">
1082 <title>Common Domain Member Include File: dom-mem.conf</title>
1083 <smbconfcomment>Global parameters</smbconfcomment>
1084 <smbconfsection>[global]</smbconfsection>
1085 <smbconfoption><name>shutdown script</name><value>/var/lib/samba/scripts/shutdown.sh</value></smbconfoption>
1086 <smbconfoption><name>abort shutdown script</name><value>/sbin/shutdown -c</value></smbconfoption>
1087 <smbconfoption><name>preferred master</name><value>Yes</value></smbconfoption>
1088 <smbconfoption><name>wins server</name><value>172.16.0.1</value></smbconfoption>
1089 <smbconfoption><name>idmap uid</name><value>15000-20000</value></smbconfoption>
1090 <smbconfoption><name>idmap gid</name><value>15000-20000</value></smbconfoption>
1091 <smbconfoption><name>include</name><value>/etc/samba/common.conf</value></smbconfoption>
1092 </smbconfexample>
1094 <!-- Seven -->
1095 <example id="massive-dhcp">
1096 <title>Server: MASSIVE, File: dhcpd.conf</title>
1097 <screen>
1098 # Abmas Accounting Inc. - Chapter 5/MASSIVE
1100 default-lease-time 86400;
1101 max-lease-time 172800;
1102 default-lease-time 86400;
1103 ddns-updates on;
1104 ddns-update-style ad-hoc;
1106 option ntp-servers 172.16.0.1;
1107 option domain-name "abmas.biz";
1108 option domain-name-servers 172.16.0.1, 172.16.4.1;
1109 option netbios-name-servers 172.16.0.1;
1110 option netbios-node-type 8;
1112 subnet 172.16.1.0 netmask 255.255.252.0 {
1113         range dynamic-bootp 172.16.1.0 172.16.2.255;
1114         option subnet-mask 255.255.252.0;
1115         option routers 172.16.0.1, 172.16.0.128;
1116         allow unknown-clients;
1117         }
1118 subnet 172.16.4.0 netmask 255.255.252.0 {
1119         range dynamic-bootp 172.16.7.0 172.16.7.254;
1120         option subnet-mask 255.255.252.0;
1121         option routers 172.16.4.128;
1122         allow unknown-clients;
1123         }
1124 subnet 172.16.8.0 netmask 255.255.252.0 {
1125         range dynamic-bootp 172.16.11.0 172.16.11.254;
1126         option subnet-mask 255.255.252.0;
1127         option routers 172.16.4.128;
1128         allow unknown-clients;
1129         }
1130 subnet 127.0.0.0 netmask 255.0.0.0 {
1131         }
1132 subnet 123.45.67.64 netmask 255.255.255.252 {
1133         }
1134 </screen>
1135 </example>
1137 <!-- Eight -->
1138 <example id="bldg1dhcp">
1139 <title>Server: BLDG1, File: dhcpd.conf</title>
1140 <screen>
1141 # Abmas Accounting Inc. - Chapter 5/BLDG1
1143 default-lease-time 86400;
1144 max-lease-time 172800;
1145 default-lease-time 86400;
1146 ddns-updates on;
1147 ddns-update-style ad-hoc;
1149 option ntp-servers 172.16.0.1;
1150 option domain-name "abmas.biz";
1151 option domain-name-servers 172.16.0.1, 172.16.4.1;
1152 option netbios-name-servers 172.16.0.1;
1153 option netbios-node-type 8;
1155 subnet 172.16.1.0 netmask 255.255.252.0 {
1156         range dynamic-bootp 172.16.3.0 172.16.2.254;
1157         option subnet-mask 255.255.252.0;
1158         option routers 172.16.0.1, 172.16.0.128;
1159         allow unknown-clients;
1160         }
1161 subnet 172.16.4.0 netmask 255.255.252.0 {
1162         range dynamic-bootp 172.16.5.0 172.16.6.255;
1163         option subnet-mask 255.255.252.0;
1164         option routers 172.16.4.128;
1165         allow unknown-clients;
1166         }
1167 subnet 127.0.0.0 netmask 255.0.0.0 {
1168         }
1169 </screen>
1170 </example>
1172 <!-- Nine -->
1173 <example id="bldg2dhcp">
1174 <title>Server: BLDG2, File: dhcpd.conf</title>
1175 <screen>
1176 # Abmas Accounting Inc. - Chapter 5/BLDG1
1178 default-lease-time 86400;
1179 max-lease-time 172800;
1180 default-lease-time 86400;
1181 ddns-updates on;
1182 ddns-update-style ad-hoc;
1184 option ntp-servers 172.16.0.1;
1185 option domain-name "abmas.biz";
1186 option domain-name-servers 172.16.0.1, 172.16.4.1;
1187 option netbios-name-servers 172.16.0.1;
1188 option netbios-node-type 8;
1190 subnet 172.16.8.0 netmask 255.255.252.0 {
1191         range dynamic-bootp 172.16.9.0 172.16.10.255;
1192         option subnet-mask 255.255.252.0;
1193         option routers 172.16.8.128;
1194         allow unknown-clients;
1195         }
1196 subnet 127.0.0.0 netmask 255.0.0.0 {
1197         }
1198 </screen>
1199 </example>
1201 <!-- Ten -->
1202 <example id="massive-nameda">
1203 <title>Server: MASSIVE, File: named.conf, Part: A</title>
1204 <screen>
1206 # Abmas Biz DNS Control File
1208 # Date: November 15, 2003
1210 options {
1211         directory "/var/lib/named";
1212         forwarders {
1213                 123.45.12.23;
1214                 123.45.54.32;
1215                 };
1216         forward first;
1217         listen-on {
1218                 mynet;
1219                 };
1220         auth-nxdomain yes;
1221         multiple-cnames yes;
1222         notify no;
1225 zone "." in {
1226         type hint;
1227         file "root.hint";
1230 zone "localhost" in {
1231         type master;
1232         file "localhost.zone";
1235 zone "0.0.127.in-addr.arpa" in {
1236         type master;
1237         file "127.0.0.zone";
1240 acl mynet {
1241         172.16.0.0/24;
1242         172.16.4.0/24;
1243         172.16.8.0/24;
1244         127.0.0.1;
1247 acl seconddns {
1248         123.45.54.32;
1250 </screen>
1251 </example>
1253 <!-- Eleven -->
1254 <example id="massive-namedb">
1255 <title>Server: MASSIVE, File: named.conf, Part: B</title>
1256 <screen>
1257 zone "abmas.biz" {
1258         type master;
1259         file "/var/lib/named/master/abmas.biz.hosts";
1260         allow-query {
1261                 mynet;
1262         };
1263         allow-transfer {
1264                 mynet;
1265         };
1266         allow-update {
1267                 mynet;
1268         };
1271 zone "abmas.us" {
1272         type master;
1273         file "/var/lib/named/master/abmas.us.hosts";
1274         allow-query {
1275                 all;
1276         };
1277         allow-transfer {
1278                 seconddns;
1279         };
1281 </screen>
1282 </example>
1284 <!-- Twelve -->
1285 <example id="massive-namedc">
1286 <title>Server: MASSIVE, File: named.conf, Part: C</title>
1287 <screen>
1288 zone "0.16.172.in-addr.arpa" {
1289         type master;
1290         file "/var/lib/named/master/172.16.0.0.rev";
1291         allow-query {
1292                 mynet;
1293         };
1294         allow-transfer {
1295                 mynet;
1296         };
1297         allow-update {
1298                 mynet;
1299         };
1302 zone "4.16.172.in-addr.arpa" {
1303         type master;
1304         file "/var/lib/named/master/172.16.4.0.rev";
1305         allow-query {
1306                 mynet;
1307         };
1308         allow-transfer {
1309                 mynet;
1310         };
1311         allow-update {
1312                 mynet;
1313         };
1316 zone "8.16.172.in-addr.arpa" {
1317         type master;
1318         file "/var/lib/named/master/172.16.8.0.rev";
1319         allow-query {
1320                 mynet;
1321         };
1322         allow-transfer {
1323                 mynet;
1324         };
1325         allow-update {
1326                 mynet;
1327         };
1329 </screen>
1330 </example>
1332 <!-- Thirteen -->
1333 <example id="abmasbizdns">
1334 <title>Forward Zone File: abmas.biz.hosts</title>
1335 <screen>
1336 $ORIGIN .
1337 $TTL 38400      ; 10 hours 40 minutes
1338 abmas.biz       IN SOA  massive.abmas.biz. root.abmas.biz. (
1339                                 2003021833 ; serial
1340                                 10800      ; refresh (3 hours)
1341                                 3600       ; retry (1 hour)
1342                                 604800     ; expire (1 week)
1343                                 38400      ; minimum (10 hours 40 minutes)
1344                                 )
1345                         NS      massive.abmas.biz.
1346                         NS      bldg1.abmas.biz.
1347                         NS      bldg2.abmas.biz.
1348                         MX      10 massive.abmas.biz.
1349 $ORIGIN abmas.biz.
1350 massive                 A       172.16.0.1
1351 router0                 A       172.16.0.128
1352 bldg1                   A       172.16.4.1
1353 router4                 A       172.16.4.128
1354 bldg2                   A       172.16.8.1
1355 router8                 A       172.16.8.128
1356 </screen>
1357 </example>
1359 <!-- Forteen -->
1360 <example id="abmasusdns">
1361 <title>Forward Zone File: abmas.biz.hosts</title>
1362 <screen>
1363 $ORIGIN .
1364 $TTL 38400      ; 10 hours 40 minutes
1365 abmas.us        IN SOA  server.abmas.us. root.abmas.us. (
1366                                 2003021833 ; serial
1367                                 10800      ; refresh (3 hours)
1368                                 3600       ; retry (1 hour)
1369                                 604800     ; expire (1 week)
1370                                 38400      ; minimum (10 hours 40 minutes)
1371                                 )
1372                         NS      dns.abmas.us.
1373                         NS      dns2.abmas.us.
1374                         MX      10 mail.abmas.us.
1375 $ORIGIN abmas.us.
1376 server                  A       123.45.67.66
1377 dns2                    A       123.45.54.32
1378 gw                      A       123.45.67.65
1379 www                     CNAME   server
1380 mail                    CNAME   server
1381 dns                     CNAME   server
1382 </screen>
1383 </example>
1385 <!-- Fifteen -->
1386 <example id="bldg12nameda">
1387 <title>Servers: BLDG1/BLDG2, File: named.conf, Part: A</title>
1388 <screen>
1390 # Abmas Biz DNS Control File
1392 # Date: November 15, 2003
1394 options {
1395         directory "/var/lib/named";
1396         forwarders {
1397                 172.16.0.1;
1398                 };
1399         forward first;
1400         listen-on {
1401                 mynet;
1402                 };
1403         auth-nxdomain yes;
1404         multiple-cnames yes;
1405         notify no;
1408 zone "." in {
1409         type hint;
1410         file "root.hint";
1413 zone "localhost" in {
1414         type master;
1415         file "localhost.zone";
1418 zone "0.0.127.in-addr.arpa" in {
1419         type master;
1420         file "127.0.0.zone";
1423 acl mynet {
1424         172.16.0.0/24;
1425         172.16.4.0/24;
1426         172.16.8.0/24;
1427         127.0.0.1;
1430 acl seconddns {
1431         123.45.54.32;
1433 </screen>
1434 </example>
1436 <!-- Sixteen -->
1437 <example id="bldg12namedb">
1438 <title>Servers: BLDG1/BLDG2, File: named.conf, Part: B</title>
1439 <screen>
1440 zone "abmas.biz" {
1441         type slave;
1442         file "/var/lib/named/slave/abmas.biz.hosts";
1443         allow-query {
1444                 mynet;
1445         };
1446         allow-transfer {
1447                 mynet;
1448         };
1451 zone "0.16.172.in-addr.arpa" {
1452         type slave;
1453         file "/var/lib/slave/master/172.16.0.0.rev";
1454         allow-query {
1455                 mynet;
1456         };
1457         allow-transfer {
1458                 mynet;
1459         };
1462 zone "4.16.172.in-addr.arpa" {
1463         type slave;
1464         file "/var/lib/named/slave/172.16.4.0.rev";
1465         allow-query {
1466                 mynet;
1467         };
1468         allow-transfer {
1469                 mynet;
1470         };
1473 zone "8.16.172.in-addr.arpa" {
1474         type slave;
1475         file "/var/lib/named/slave/172.16.8.0.rev";
1476         allow-query {
1477                 mynet;
1478         };
1479         allow-transfer {
1480                 mynet;
1481         };
1483 </screen>
1484 </example>
1487 <!-- Seventeen -->
1488 <example id="ch5-initgrps">
1489 <title>Initialize Groups Script, File: /etc/samba/initGrps.sh</title>
1490 <screen>
1491 #!/bin/bash
1493 # Create UNIX groups
1494 groupadd acctsdep
1495 groupadd finsrvcs
1496 groupadd piops
1498 # Map Windows Domain Groups to UNIX groups
1499 net groupmap modify ntgroup="Domain Admins"  unixgroup=root
1500 net groupmap modify ntgroup="Domain Users"   unixgroup=users
1501 net groupmap modify ntgroup="Domain Guests"  unixgroup=nobody
1503 # Add Functional Domain Groups
1504 net groupmap add ntgroup="Accounts Dept"       unixgroup=acctsdep type=d
1505 net groupmap add ntgroup="Financial Services"  unixgroup=finsrvcs type=d
1506 net groupmap add ntgroup="Insurance Group"     unixgroup=piops type=d
1507 </screen>
1508 </example>
1510 <!-- End of Examples -->
1512         <sect2 id="ch5-procstart">
1513         <title>Process Startup Configuration</title>
1515         <para>
1516           <indexterm><primary>chkconfig</primary></indexterm><indexterm>
1517             <primary>daemon control</primary>
1518           </indexterm>
1519         There are two essential steps to process startup configuration. A process
1520         must be configured so that it is automatically restarted each time the server
1521         is rebooted. This step involves use of the <command>chkconfig</command> tool that
1522         created appropriate symbolic links from the master daemon control file that is
1523         located in the <filename>/etc/rc.d</filename> directory to the <filename>/etc/rc'x'.d</filename>
1524         directories. Links are created so that when the system run-level is changed, the
1525         necessary start or kill script is run.
1526         </para>
1528         <para>
1529         <indexterm><primary>/etc/xinetd.d</primary></indexterm>
1530         In the event that a service is provided not as a daemon but via the inter-networking
1531         super daemon (<command>inetd</command> or <command>xinetd</command>), then the <command>chkconfig</command>
1532         tool makes the necessary entries in the <filename>/etc/xinetd.d</filename> directory
1533         and sends a hang-up (HUP) signal to the super daemon, thus forcing it to
1534         re-read its control files.
1535         </para>
1537         <para>
1538         Last, each service must be started to permit system validation to proceed.
1539         </para>
1541         <procedure>
1542                 <step><para>
1543                 Use the standard system tool to configure each service to restart
1544                 automatically at every system reboot. For example:
1545                 <indexterm><primary>chkconfig</primary></indexterm>
1546 <screen>
1547 &rootprompt; chkconfig dhpc on
1548 &rootprompt; chkconfig named on
1549 &rootprompt; chkconfig cups on
1550 &rootprompt; chkconfig smb on
1551 &rootprompt; chkconfig swat on
1552 </screen>
1553                 </para></step>
1555                 <step><para>
1556                 <indexterm><primary>starting dhcpd</primary></indexterm>
1557                 <indexterm><primary>starting samba</primary></indexterm>
1558                 <indexterm><primary>starting CUPS</primary></indexterm>
1559                 Now start each service to permit the system to be validated.
1560                 Execute each of the following in the sequence shown:
1562 <screen>
1563 &rootprompt; service dhcp restart
1564 &rootprompt; service named restart
1565 &rootprompt; service cups restart
1566 &rootprompt; service smb restart
1567 &rootprompt; service swat restart
1568 </screen>
1569                 </para></step>
1570         </procedure>
1572         </sect2>
1574         <sect2 id="ch5wincfg">
1575         <title>Windows Client Configuration</title>
1577         <para>
1578         The procedure for desktop client configuration for the network in this chapter is similar to
1579         that used for the previous one. There are a few subtle changes that should be noted.
1580         </para>
1582         <procedure>
1583                 <step><para>
1584                 Install MS Windows XP Professional. During installation, configure the client to use DHCP for 
1585                 TCP/IP protocol configuration.
1586                 <indexterm><primary>WINS</primary></indexterm>
1587                 <indexterm><primary>DHCP</primary></indexterm>
1588                 DHCP configures all Windows clients to use the WINS Server address that has been defined
1589                 for the local subnet.
1590                 </para></step>
1592                 <step><para>
1593                 Join the Windows Domain <constant>MEGANET</constant>. Use the Domain Administrator
1594                 user name <constant>root</constant> and the SMB password you assigned to this account.
1595                 A detailed step-by-step procedure for joining a Windows 200x/XP Professional client to
1596                 a Windows Domain is given in <link linkend="domjoin"/>. 
1597                 Reboot the machine as prompted and then logon using the Domain Administrator account
1598                 (<constant>root</constant>).
1599                 </para></step>
1601                 <step><para>
1602                 Verify that the server called <constant>MEGANET</constant> is visible in <guimenu>My Network Places</guimenu>, 
1603                 that it is possible to connect to it and see the shares <guimenuitem>accounts</guimenuitem>,
1604                 <guimenuitem>apps</guimenuitem>, and <guimenuitem>finsvcs</guimenuitem>,
1605                 and that it is possible to open each share to reveal its contents.
1606                 </para></step>
1608                 <step><para>
1609                 Create a drive mapping to the <constant>apps</constant> share on a server. At this time, it does
1610                 not particularly matter which application server is used. It is necessary to manually
1611                 set a persistent drive mapping to the local applications server on each workstation at the time of 
1612                 installation. This step is avoided by the improvements to the design of the network configuration
1613                 in the next chapter.
1614                 </para></step>
1616                 <step><para>
1617                 Perform an administrative installation of each application to be used. Select the options
1618                 that you wish to use. Of course, you choose to run applications over the network, correct?
1619                 </para></step>
1621                 <step><para>
1622                 Now install all applications to be installed locally. Typical tools includes: Adobe Acrobat,
1623                 NTP-based time synchronization software, drivers for specific local devices such as fingerprint
1624                 scanners, and the like. Probably the most significant application to be locally installed
1625                 is anti-virus software.
1626                 </para></step>
1628                 <step><para>
1629                 Now install all four printers onto the staging system. The printers you install
1630                 include the Accounting department HP LaserJet 6 and Minolta QMS Magicolor printers, and you
1631                 also configure use of the identical printers that are located in the financial services department.
1632                 Install printers on each machine using the following steps:
1634                         <procedure>
1635                                 <step><para>
1636                                 Click <menuchoice>
1637                                         <guimenu>Start</guimenu>
1638                                         <guimenuitem>Settings</guimenuitem>
1639                                         <guimenuitem>Printers</guimenuitem>
1640                                         <guiicon>Add Printer</guiicon>
1641                                         <guibutton>Next</guibutton>
1642                                         </menuchoice>. Do not click <guimenuitem>Network printer</guimenuitem>.
1643                                         Ensure that <guimenuitem>Local printer</guimenuitem> is selected.
1644                                 </para></step>
1646                                 <step><para>
1647                                 Click <guibutton>Next</guibutton>. In the panel labeled
1648                                 <guimenuitem>Manufacturer:</guimenuitem>, select <constant>HP</constant>.
1649                                 In the <guimenuitem>Printers:</guimenuitem> panel, select the printer called
1650                                 <constant>HP LaserJet 6</constant>. Click <guibutton>Next</guibutton>.
1651                                 </para></step>
1653                                 <step><para>
1654                                 In the panel labeled <guimenuitem>Available ports:</guimenuitem>, select
1655                                 <constant>FILE:</constant>. Accept the default printer name by clicking
1656                                 <guibutton>Next</guibutton>. When asked, <quote>Would you like to print a
1657                                 test page?</quote>, click <guimenuitem>No</guimenuitem>. Click
1658                                 <guibutton>Finish</guibutton>.
1659                                 </para></step>
1661                                 <step><para>
1662                                 You may be prompted for the name of a file to print to. If so, close the
1663                                 dialog panel. Right-click <menuchoice>
1664                                         <guiicon>HP LaserJet 6</guiicon>
1665                                         <guimenuitem>Properties</guimenuitem>
1666                                         <guimenusub>Details (Tab)</guimenusub>
1667                                         <guimenubutton>Add Port</guimenubutton>
1668                                         </menuchoice>.
1669                                 </para></step>
1671                                 <step><para>
1672                                 In the panel labeled <guimenuitem>Network</guimenuitem>, enter the name of
1673                                 the print queue on the Samba server as follows: <constant>\\BLDG1\hplj6a</constant>.
1674                                 Click <menuchoice> 
1675                                         <guibutton>OK</guibutton>
1676                                         <guibutton>OK</guibutton>
1677                                         </menuchoice> to complete the installation.
1678                                 </para></step>
1680                                 <step><para>
1681                                 Repeat the printer installation steps above for both HP LaserJet 6 printers
1682                                 as well as for both QMS Magicolor laser printers. Remember to install all
1683                                 printers, but to set the destination port for each to the server on the
1684                                 local network. For example, a workstation in the Accounting group should
1685                                 have all printers directed at the server <constant>BLDG1</constant>.
1686                                 You may elect to point all desktop workstation configurations at the
1687                                 server called <constant>MASSIVE</constant> and then in your deployment  
1688                                 procedures, it would be wise to document the need to redirect the printer
1689                                 configuration (as well as the applications server drive mapping) to the
1690                                 server on the network segment on which the workstation is to be located.
1691                                 </para></step>
1692                         </procedure>
1693                 </para></step>
1695                 <step><para>
1696                 When you are satisfied that the staging systems are complete, use the appropriate procedure to
1697                 remove the client from the domain. Reboot the system, and then log on as the local administrator
1698                 and clean out all temporary files stored on the system. Before shutting down, use the disk
1699                 defragmentation tool so that the file system is in an optimal condition before replication.
1700                 </para></step>
1702                 <step><para>
1703                 Boot the workstation using the Norton (Symantec) Ghosting disk (or CD-ROM) and image the
1704                 machine to a network share on the server.
1705                 </para></step>
1707                 <step><para>
1708                 You may now replicate the image using the appropriate Norton Ghost procedure to the target
1709                 machines. Make sure to use the procedure that ensures each machine has a unique
1710                 Windows security identifier (SID). When the installation of the disk image has completed, boot the PC. 
1711                 </para></step>
1713                 <step><para>
1714                 Log onto the machine as the local Administrator (the only option), and join the machine to
1715                 the Domain following the procedure set out in <link linkend="domjoin"/>. You must now set the 
1716                 persistent drive mapping to the applications server that the user is to use. The system is now 
1717                 ready for the user to logon, providing you have created a network logon account for that 
1718                 user, of course.
1719                 </para></step>
1721                 <step><para>
1722                 Instruct all users to log onto the workstation using their assigned user name and password.
1723                 </para></step>
1724         </procedure>
1726         </sect2>
1728         <sect2>
1729                 <title>Key Points Learned</title>
1731                 <para>
1732                 The network you have just deployed has been a valuable exercise in forced constraint.
1733                 You have deployed a network that works well, although you may soon start to see
1734                 performance problems, at which time the modifications demonstrated in the following
1735                 chapter bring the network to life. The following key learning points were experienced:
1736                 </para>
1738                 <itemizedlist>
1739                         <listitem><para>
1740                         The power of using &smb.conf; include files
1741                         </para></listitem>
1743                         <listitem><para>
1744                         Use of a single PDC over a routed network
1745                         </para></listitem>
1747                         <listitem><para>
1748                         Joining a Samba-3 Domain Member server to a Samba-3 Domain
1749                         </para></listitem>
1751                         <listitem><para>
1752                         Configuration of winbind to use Domain Users and Groups for Samba access
1753                         to resources on the Domain Member servers
1754                         </para></listitem>
1756                         <listitem><para>
1757                         The introduction of roaming profiles
1758                         </para></listitem>
1760                 </itemizedlist>
1762         </sect2>
1764 </sect1>
1766 <sect1>
1767         <title>Questions and Answers</title>
1769         <para>
1770         </para>
1772         <qandaset defaultlabel="chap01qa" type="number">
1773         <qandaentry>
1774         <question>
1776                 <para>
1777                 The example &smb.conf; files in this chapter make use of the <parameter>include</parameter> facility.
1778                 How may I get to see what the actual working &smb.conf; settings are?
1779                 </para>
1781         </question>
1782         <answer>
1784                 <para>
1785                 You may readily see the net compound effect of the included files by running:
1786 <screen>
1787 &rootprompt; testparm -s | less
1788 </screen>
1789                 </para>
1791         </answer>
1792         </qandaentry>
1794         <qandaentry>
1795         <question>
1797                 <para>
1798                 Why does the include file <filename>common.conf</filename> have an empty include statement?
1799                 </para>
1801         </question>
1802         <answer>
1804                 <para>
1805                 The use of the empty include statement nullifies further includes. For example, let's say you 
1806                 desire to have just an smb.conf file that is built from the array of include files of which the
1807                 master control file is called <filename>master.conf</filename>. The following command 
1808                 produces a compound &smb.conf; file.
1809 <screen>
1810 &rootprompt; testparm -s /etc/samba/master.conf > /etc/samba/smb.conf
1811 </screen>
1812                 If the include parameter was not in the common.conf file, the final &smb.conf; file leaves
1813                 the include in place, even though the file it points to has already been included. This is a bug
1814                 that will be fixed at a future date.
1815                 </para>
1817         </answer>
1818         </qandaentry>
1820         <qandaentry>
1821         <question>
1823                 <para>
1824                 I accept that the simplest configuration necessary to do the job is the best. The use of <parameter>tdbsam</parameter>
1825                 passdb backend is much simpler than having to manage an LDAP-based <parameter>ldapsam</parameter> passdb backend.
1826                 I tried using <command>rsync</command> to replicate the <filename>passdb.tdb</filename>, and it seems to work fine!
1827                 So what is the problem?
1828                 </para>
1830         </question>
1831         <answer>
1833                 <para>
1834                 Replication of the <parameter>tdbsam</parameter> database file can result in loss of currency in its
1835                 contents between the PDC and BDCs. The most notable symptom is that workstations may not be able
1836                 to log onto the network following a reboot and may have to re-join the Domain to recover network
1837                 access capability.
1838                 </para>
1840         </answer>
1841         </qandaentry>
1843         <qandaentry>
1844         <question>
1846                 <para>
1847                 You are using DHCP Relay enabled on the routers as well as a local DHCP server. Will this cause a clash?
1848                 </para>
1850         </question>
1851         <answer>
1853                 <para>
1854                 No. It is possible to have as many DHCP servers on a network segment as makes sense. A DHCP server
1855                 offers an IP address lease, but it is the client that determines which offer is accepted, no matter how many
1856                 offers are made. Under normal operation, the client accepts the first offer it receives.
1857                 </para>
1859                 <para>
1860                 The only exception to this rule is when the client makes a directed request from a specific DHCP server
1861                 for renewal of the lease it has. This means that under normal circumstances there is no risk of a clash.
1862                 </para>
1864         </answer>
1865         </qandaentry>
1867         <qandaentry>
1868         <question>
1870                 <para>
1871                 How does the Windows client find the PDC?
1872                 </para>
1874         </question>
1875         <answer>
1877                 <para>
1878                 The Windows client obtains the WINS server address from the DHCP lease information. It also
1879                 obtains from the DHCP lease information the parameter that causes it to use directed UDP (UDP Unicast)
1880                 to register itself with the WINS server and to obtain enumeration of vital network information to 
1881                 enable it to operate successfully.
1882                 </para>
1884         </answer>
1885         </qandaentry>
1887         <qandaentry>
1888         <question>
1890                 <para>
1891                 Why did you enable IP forwarding (routing) only on the server called <constant>MASSIVE</constant>?
1892                 </para>
1894         </question>
1895         <answer>
1897                 <para>
1898                 The server called <constant>MASSIVE</constant> is acting as a router to the Internet. No other server
1899                 (BLDG1 or BLDG2) has any need for IP forwarding since they are attached only to their own network.
1900                 Route table entries are needed to direct MASSIVE to send all traffic intended for the remote network
1901                 segments to the router that is its gateway to them.
1902                 </para>
1904         </answer>
1905         </qandaentry>
1907         <qandaentry>
1908         <question>
1910                 <para>
1911                 You did nothing special to implement roaming profiles. Why?
1912                 </para>
1914         </question>
1915         <answer>
1917                 <para>
1918                 Unless configured to do otherwise, the default behavior with Samba-3 and Windows XP Professional
1919                 clients is to use roaming profiles.
1920                 </para>
1922         </answer>
1923         </qandaentry>
1925         <qandaentry>
1926         <question>
1928                 <para>
1929                 On the Domain Member computers, you configured winbind in the <filename>/etc/nsswitch.conf</filename> file.
1930                 You did not configure any PAM settings. Is this an omission?
1931                 </para>
1933         </question>
1934         <answer>
1936                 <para>
1937                 PAM is needed only for authentication. When Samba is using Microsoft encrypted passwords, it makes only
1938                 marginal use of PAM. PAM configuration handles only authentication. If you want to log onto the Domain
1939                 Member servers using Windows networking user names and passwords, it is necessary to configure PAM
1940                 to enable the use of winbind. Samba makes use only of the identity resolution facilities of the name
1941                 service switcher (NSS).
1942                 </para>
1944         </answer>
1945         </qandaentry>
1947         <qandaentry>
1948         <question>
1950                 <para>
1951                 You are starting SWAT up on this example but have not discussed that anywhere. Why did you do this?
1952                 </para>
1954         </question>
1955         <answer>
1957                 <para>
1958                 Oh, I did not think you would notice that. It is there so that it can be used. This is more fully discussed
1959                 in <emphasis>TOSHARG</emphasis>, where it has a full chapter dedicated to the subject. While we are on the 
1960                 subject, it should be noted that you should definitely not use SWAT on any system that makes use 
1961                 of &smb.conf; <parameter>include</parameter> files because SWAT optimizes them out into an aggregated 
1962                 file but leaves in place a broken reference to the top layer include file. SWAT was not designed to 
1963                 handle this functionality gracefully.
1964                 </para>
1966         </answer>
1967         </qandaentry>
1969         <qandaentry>
1970         <question>
1972                 <para>
1973                 The Domain Controller has an auto-shutdown script. Isn't that dangerous?
1974                 </para>
1976         </question>
1977         <answer>
1979                 <para>
1980                 Well done, you spotted that! I guess it is dangerous. It is good to know that you can do this, though.
1981                 </para>
1983         </answer>
1984         </qandaentry>
1986         </qandaset>
1988 </sect1>
1990 </chapter>