Follow DTD more strictly
[Samba/gebeck_regimport.git] / docs / docbook / projdoc / NT4Migration.xml
blobb5e651ae6761797ac2158108092e61bc2710d1ca
1 <chapter id="NT4Migration">
2 <chapterinfo>
3         &author.jht;
4         <pubdate>April 3, 2003</pubdate>
5 </chapterinfo>
7 <title>Migration from NT4 PDC to Samba-3 PDC</title>
9 <para>
10 This is a rough guide to assist those wishing to migrate from NT4 Domain Control to
11 Samba-3-based Domain Control.
12 </para>
14 <sect1>
15 <title>Planning and Getting Started</title>
17 <para>
18 In the IT world there is often a saying that all problems are encountered because of
19 poor planning. The corollary to this saying is that not all problems can be anticipated
20 and planned for. Then again, good planning will anticipate most show-stopper-type situations.
21 </para>
23 <para>
24 Those wishing to migrate from MS Windows NT4 Domain Control to a Samba-3 Domain Control
25 environment would do well to develop a detailed migration plan. So here are a few pointers to
26 help migration get under way.
27 </para>
29 <sect2>
30 <title>Objectives</title>
32 <para>
33 The key objective for most organizations will be to make the migration from MS Windows NT4 
34 to Samba-3 Domain Control as painless as possible. One of the challenges you may experience
35 in your migration process may well be one of convincing management that the new environment
36 should remain in place. Many who have introduced open source technologies have experienced
37 pressure to return to a Microsoft-based platform solution at the first sign of trouble. 
38 </para>
40 <para>
41 Before attempting a migration to a Samba-3 controlled network, make every possible effort to
42 gain all-round commitment to the change. Know precisely <emphasis>why</emphasis> the change
43 is important for the organization. Possible motivations to make a change include:
44 </para>
46 <itemizedlist>
47     <listitem><para>Improve network manageability.</para></listitem>
48     <listitem><para>Obtain better user level functionality.</para></listitem>
49     <listitem><para>Reduce network operating costs.</para></listitem>
50     <listitem><para>Reduce exposure caused by Microsoft withdrawal of NT4 support.</para></listitem>
51     <listitem><para>Avoid MS License 6 implications.</para></listitem>
52     <listitem><para>Reduce organization's dependency on Microsoft.</para></listitem>
53 </itemizedlist>
55 <para>
56 Make sure everyone knows that Samba-3 is not MS Windows NT4. Samba-3 offers
57 an alternative solution that is both different from MS Windows NT4 and offers 
58 advantages compared with it. Gain recognition that Samba-3 lacks many of the
59 features that Microsoft has promoted as core values in migration from MS Windows NT4 to 
60 MS Windows 2000 and beyond (with or without Active Directory services).
61 </para>
63 <para>
64 What are the features that Samba-3 cannot provide?
65 </para>
67 <itemizedlist>
68         <listitem><para>Active Directory Server.</para></listitem>
69         <listitem><para>Group Policy Objects (in Active Directory).</para></listitem>
70         <listitem><para>Machine Policy Objects.</para></listitem>
71         <listitem><para>Logon Scripts in Active Directory.</para></listitem>
72         <listitem><para>Software Application and Access Controls in Active Directory.</para></listitem>
73 </itemizedlist>
75 <para>
76 The features that Samba-3 does provide and that may be of compelling interest to your site
77 include:
78 </para>
80 <itemizedlist>
81         <listitem><para>Lower cost of ownership.</para></listitem>
82         <listitem><para>Global availability of support with no strings attached.</para></listitem>
83         <listitem><para>Dynamic SMB Servers (can run more than one SMB/CIFS server per UNIX/Linux system).</para></listitem>
84         <listitem><para>Creation of on-the-fly logon scripts.</para></listitem>
85         <listitem><para>Creation of on-the-fly Policy Files.</para></listitem>
86         <listitem><para>Greater stability, reliability, performance and availability.</para></listitem>
87         <listitem><para>Manageability via an ssh connection.</para></listitem>
88         <listitem><para>Flexible choices of back-end authentication technologies (tdbsam, ldapsam, mysqlsam).</para></listitem>
89         <listitem><para>Ability to implement a full single-sign-on architecture.</para></listitem>
90         <listitem><para>Ability to distribute authentication systems for absolute minimum wide area network bandwidth demand.</para></listitem>
91 </itemizedlist>
93 <para>
94 Before migrating a network from MS Windows NT4 to Samba-3, consider all necessary factors. Users
95 should be educated about changes they may experience so the change will be a welcome one
96 and not become an obstacle to the work they need to do. The following are factors that will 
97 help ensure a successful migration:
98 </para>
100 <sect3>
101 <title>Domain Layout</title>
103 <para>
104 Samba-3 can be configured as a Domain Controller, a back-up Domain Controller (probably best called
105 a secondary controller), a Domain Member, or as a stand-alone Server. The Windows network security
106 domain context should be sized and scoped before implementation. Particular attention needs to be
107 paid to the location of the primary Domain Controller (PDC) as well as backup controllers (BDCs).
108 One way in which Samba-3 differs from Microsoft technology is that if one chooses to use an LDAP
109 authentication backend, then the same database can be used by several different domains. In a
110 complex organization, there can be a single LDAP database, which itself can be distributed (have
111 a master server and multiple slave servers) that can simultaneously serve multiple domains.
112 </para>
114 <para>
115 >From a design perspective, the number of users per server as well as the number of servers per
116 domain should be scaled taking into consideration server capacity and network bandwidth.
117 </para>
119 <para>
120 A physical network segment may house several domains. Each may span multiple network segments.
121 Where domains span routed network segments, consider and test the performance implications of
122 the design and layout of a network. A centrally located Domain Controller that is designed to
123 serve multiple routed network segments may result in severe performance problems. Check the
124 response time (ping timing) between the remote segment and the PDC. If
125 it's long (more than 100 ms),
126 locate a backup controller (BDC) on the remote segment to serve as the local authentication and
127 access control server.
128 </para>
129 </sect3>
131 <sect3>
132 <title>Server Share and Directory Layout</title>
134 <para>
135 There are cardinal rules to effective network design that cannot be broken with impunity.
136 The most important rule: Simplicity is king in every well-controlled network. Every part of
137 the infrastructure must be managed; the more complex it is, the greater will be the demand
138 of keeping systems secure and functional.
139 </para>
141 <para>
142 Keep in mind the nature of how data must be shared. Physical disk space layout should be considered
143 carefully. Some data must be backed up. The simpler the disk layout the easier it will be to
144 keep track of backup needs. Identify what backup media will meet your needs; consider backup to tape,
145 CD-ROM or (DVD-ROM), or other offline storage medium. Plan and implement for minimum
146 maintenance. Leave nothing to chance in your design; above all, do not leave backups to chance:
147 Backup, test, and validate every backup, create a disaster recovery plan and prove that it works.
148 </para>
150 <para>
151 Users should be grouped according to data access control needs. File and directory access 
152 is best controlled via group permissions and the use of the <quote>sticky bit</quote> on group controlled
153 directories may substantially avoid file access complaints from Samba share users.
154 </para>
156 <para>
157 Inexperienced  network administrators often attempt elaborate techniques to set access
158 controls on files, directories, shares, as well as in share definitions.
159 Keep your design and implementation simple and document your design extensively. Have others
160 audit your documentation. Do not create a complex mess that your successor will not understand.
161 Remember, job security through complex design and implementation may cause loss of operations
162 and downtime to users as the new administrator learns to untangle your knots. Keep access
163 controls simple and effective and make sure that users will never be interrupted by obtuse
164 complexity.
165 </para>
166 </sect3>
168 <sect3>
169 <title>Logon Scripts</title>
171 <para>
172 Logon scripts can help to ensure that all users gain the share and printer connections they need.
173 </para>
175 <para>
176 Logon scripts can be created on-the-fly so all commands executed are specific to the
177 rights and privileges granted to the user. The preferred controls should be affected through
178 group membership so group information can be used to create a custom logon script using
179 the <smbconfoption><name>root preexec</name></smbconfoption> parameters to the <smbconfsection>NETLOGON</smbconfsection> share.
180 </para>
182 <para>
183 Some sites prefer to use a tool such as <command>kixstart</command> to establish a controlled
184 user environment. In any case, you may wish to do a Google search for logon script process controls.
185 In particular, you may wish to explore the use of the Microsoft KnowledgeBase article KB189105 that
186 deals with how to add printers without user intervention via the logon script process.
187 </para>
188 </sect3>
190 <sect3>
191 <title>Profile Migration/Creation</title>
193 <para>
194 User and Group Profiles may be migrated using the tools described in the section titled Desktop Profile
195 Management.
196 </para>
199 <para>
200 <indexterm><primary>SID</primary></indexterm>
201 Profiles may also be managed using the Samba-3 tool <command>profiles</command>. This tool allows
202 the MS Windows NT-style security identifiers (SIDs) that are stored inside the profile <filename>NTuser.DAT</filename> file
203 to be changed to the SID of the Samba-3 domain.
204 </para>
205 </sect3>
207 <sect3>
208 <title>User and Group Accounts</title>
210 <para>
211 It is possible to migrate all account settings from an MS Windows NT4 domain to Samba-3. Before
212 attempting to migrate user and group accounts, it is STRONGLY advised to create in Samba-3 the
213 groups that are present on the MS Windows NT4 domain <emphasis>AND</emphasis> to map them to
214 suitable UNIX/Linux groups. By following this simple advice, all user and group attributes
215 should migrate painlessly.
216 </para>
217 </sect3>
219 </sect2>
221 <sect2>
222 <title>Steps in Migration Process</title>
224 <para>
225 The approximate migration process is described below.
226 </para>
228 <itemizedlist>
229 <listitem><para>
230 You have an NT4 PDC that has the users, groups, policies and profiles to be migrated.
231 </para></listitem>
233 <listitem><para>
234 Samba-3 set up as a DC with netlogon share, profile share, and so on. Configure the &smb.conf; file
235 to fucntion as a BDC, i.e., <parameter>domain master = No</parameter>.
236 </para></listitem>
237 </itemizedlist>
239 <procedure><title>The Account Migration Process</title>
240         <step><para>
241 <indexterm><primary>pdbedit</primary></indexterm>
242                         Create a BDC account in the old NT4 domain for the Samba server using NT Server Manager.</para>
243                 <substeps><step><para>Samba must not be running.</para></step></substeps></step>
246         <step><para>
247 <indexterm><primary>net</primary><secondary>rpc</secondary></indexterm>
248                         <userinput>net rpc join -S <replaceable>NT4PDC</replaceable> -w <replaceable>DOMNAME</replaceable> -U Administrator%<replaceable>passwd</replaceable></userinput></para></step>
250         <step><para><userinput>net rpc vampire -S <replaceable>NT4PDC</replaceable> -U administrator%<replaceable>passwd</replaceable></userinput></para></step>
252         <step><para><userinput>pdbedit -L</userinput></para>
253                 <substeps><step><para>Note &smbmdash; did the users migrate?</para></step></substeps>
254         </step>
257         <step><para>
258 <indexterm><primary>net</primary><secondary>groupmap</secondary></indexterm>
259 <indexterm><primary>initGroups.sh</primary></indexterm>
260         Now assign each of the UNIX groups to NT groups:
261         (It may be useful to copy this text to a script called <filename>initGroups.sh</filename>)
262         <programlisting>
263 #!/bin/bash
264 #### Keep this as a shell script for future re-use
265                         
266 # First assign well known domain global groups
267 net groupmap modify ntgroup="Domain Admins" unixgroup=root   rid=512
268 net groupmap modify ntgroup="Domain Users"  unixgroup=users  rid=513
269 net groupmap modify ntgroup="Domain Guests" unixgroup=nobody rid=514
271 # Now for our added domain global groups
272 net groupmap add ntgroup="Designers" unixgroup=designers type=d rid=3200
273 net groupmap add ntgroup="Engineers" unixgroup=engineers type=d rid=3210
274 net groupmap add ntgroup="QA Team"   unixgroup=qateam    type=d rid=3220
275 </programlisting>
276         </para></step>
278         <step><para><userinput>net groupmap list</userinput></para>
279                 <substeps><step><para>Check that all groups are recognized.</para></step></substeps>
280         </step>
281 </procedure>
283 <para>
284 Migrate all the profiles, then migrate all policy files.
285 </para>
287 </sect2>
288 </sect1>
290 <sect1>
291 <title>Migration Options</title>
293 <para>
294 Sites that wish to migrate from MS Windows NT4 Domain Control to a Samba-based solution
295 generally fit into three basic categories. <link linkend="majtypes"/> shows the possibilities.
296 </para>
298 <table frame="all" id="majtypes"><title>The Three Major Site Types</title>
299 <tgroup cols="2">
300         <colspec align="left"/>
301         <colspec align="justify" colwidth="1*"/>
302         <thead>
303         <row><entry>Number of Users</entry><entry>Description</entry></row>
304         </thead>
305         <tbody>
306         <row><entry>&lt; 50</entry><entry><para>Want simple conversion with no pain.</para></entry></row>
307         <row><entry>50 - 250</entry><entry><para>Want new features, can manage some in-house complexity.</para></entry></row>
308         <row><entry>&gt; 250</entry><entry><para>Solution/Implementation must scale well, complex needs. Cross-departmental decision process. Local expertise in most areas.</para></entry></row>
309         </tbody>
310 </tgroup>
311 </table>
313 <sect2>
314 <title>Planning for Success</title>
316 <para>
317 There are three basic choices for sites that intend to migrate from MS Windows NT4
318 to Samba-3:
319 </para>
321 <itemizedlist>
322         <listitem><para>
323         Simple conversion (total replacement).
324         </para></listitem>
326         <listitem><para>
327         Upgraded conversion (could be one of integration).
328         </para></listitem>
330         <listitem><para>
331         Complete redesign (completely new solution).
332         </para></listitem>
333 </itemizedlist>
335 <para>
336 Minimize down-stream problems by:
337 </para>
339 <itemizedlist>
340         <listitem><para>
341         Taking sufficient time.
342         </para></listitem>
344         <listitem><para>
345         Avoiding Panic.
346         </para></listitem>
348         <listitem><para>
349         Testing all assumptions.
350         </para></listitem>
352         <listitem><para>
353         Testing the full roll-out program, including workstation deployment.
354         </para></listitem>
355 </itemizedlist>
357 <para><link linkend="natconchoices"/> lists the conversion choices given the type of migration
358 being contemplated.
359 </para>
361 <table frame="all" id="natconchoices"><title>Nature of the Conversion Choices</title>
362 <tgroup cols="3">
363         <colspec align="justify" colwidth="1*"/>
364         <colspec align="justify" colwidth="1*"/>
365         <colspec align="justify" colwidth="1*"/>
366         <thead>
367         <row><entry>Simple</entry><entry>Upgraded</entry><entry>Redesign</entry></row>
368         </thead>
369         <tbody>
370         <row>
371         <entry><para>Make use of minimal OS specific features.</para></entry>
372         <entry><para>Translate NT4 features to new host OS features.</para></entry>
373         <entry><para>Decide:</para></entry>
374         </row>
375         <row>
376         <entry><para>Move all accounts from NT4 into Samba-3</para></entry>
377         <entry><para>Copy and improve</para></entry>
378         <entry><para>Authentication regime (database location and access)</para></entry>
379         </row>
380         <row>
381         <entry><para>Make least number of operational changes</para></entry>
382         <entry><para>Make progressive improvements</para></entry>
383         <entry><para>Desktop management methods</para></entry>
384         </row>
385         <row>
386         <entry><para>Take least amount of time to migrate</para></entry>
387         <entry><para>Minimize user impact</para></entry>
388         <entry><para>Better control of Desktops/Users</para></entry>
389         </row>
390         <row>
391         <entry><para>Live versus isolated conversion</para></entry>
392         <entry><para>Maximize functionality</para></entry>
393         <entry><para>Identify Needs for: <emphasis>Manageability, Scalability, Security, Availability</emphasis></para></entry>
394         </row>
395         <row>
396         <entry><para>Integrate Samba-3 then migrate while users are active, then change of control (swap out)</para></entry>
397         <entry><para>Take advantage of lower maintenance opportunity</para></entry>
398         <entry><para></para></entry>
399         </row>
400         </tbody>
401 </tgroup>
402 </table>
403 </sect2>
405 <sect2>
406 <title>Samba-3 Implementation Choices</title>
408 <variablelist>
409         <varlistentry><term>Authentication Database/Backend</term><listitem>
410                 <para>
411                 Samba-3 can use an external authentication backend:
412                 </para>
414                 <para>
415                 <itemizedlist>
416                         <listitem><para>Winbind (external Samba or NT4/200x server).</para></listitem>
417                         <listitem><para>External server could use Active Directory or NT4 Domain.</para></listitem>
418                         <listitem><para>Can use pam_mkhomedir.so to auto-create home dirs.</para></listitem>
419                         <listitem><para>
420                                         Samba-3 can use a local authentication backend: <parameter>smbpasswd, tdbsam, ldapsam, mysqlsam</parameter></para></listitem>
421         </itemizedlist>
422                 </para>
423         </listitem></varlistentry>
425         <varlistentry><term>Access Control Points</term><listitem>
426                 <para>
427                 Samba permits Access Control Points to be set:
428                 </para>
429                 <itemizedlist>
430                         <listitem><para>On the share itself &smbmdash; using Share ACLs.</para></listitem>
431                         <listitem><para>On the file system &smbmdash; using UNIX permissions on files and directories.</para>
432                                 <para>Note: Can enable Posix ACLs in file system also.</para></listitem>
433                         <listitem><para>Through Samba share parameters &smbmdash; not recommended except as last resort.</para></listitem>
434                 </itemizedlist>
435                 </listitem>
436         </varlistentry>
438         <varlistentry><term>Policies (migrate or create new ones)</term><listitem>
439                 <para>
440                 Exercise great caution when affecting registry changes, use the right tool and be aware
441                 that changes made through NT4-style <filename>NTConfig.POL</filename> files can leave
442                 permanent changes.
443                 </para>
444                 <itemizedlist>
445                         <listitem><para>Using Group Policy Editor (NT4).</para></listitem>
446                         <listitem><para>Watch out for Tattoo effect.</para></listitem>
447                 </itemizedlist>
448                 </listitem>
449         </varlistentry>
451         <varlistentry><term>User and Group Profiles</term><listitem>
452                 <para>
453                 Platform-specific so use platform tool to change from a Local to a Roaming profile.
454                 Can use new profiles tool to change SIDs (<filename>NTUser.DAT</filename>).
455                 </para>
456                 </listitem>
457         </varlistentry>
459         <varlistentry><term>Logon Scripts</term><listitem>
460                 <para>
461                 Know how they work.
462                 </para>
463                 </listitem>
464         </varlistentry>
467         <varlistentry><term>User and Group Mapping to UNIX/Linux</term><listitem>
468                 <para>
469 <indexterm><primary>pdbedit</primary></indexterm>
470                 User and Group mapping code is new. Many problems have been experienced as network administrators
471                 who are familiar with Samba-2.2.x migrate to Samba-3. Carefully study the chapters that document
472                 the new password backend behavior and the new group mapping functionality.
473                 </para>
474                 <itemizedlist>
475                         <listitem><para>The <parameter>username map</parameter> facility may be needed.</para></listitem>
476                         <listitem><para>Use <command>net groupmap</command> to connect NT4 groups to UNIX groups.</para></listitem>
477                         <listitem><para>Use <command>pdbedit</command> to set/change user configuration.</para>
479                                 <para>
480                                 When migrating to LDAP backend, it may be easier to dump the initial
481                                 LDAP database to LDIF, edit, then reload into LDAP.
482                                 </para>
483                         </listitem>
484                 </itemizedlist>
485                 </listitem>
486         </varlistentry>
488         <varlistentry><term>OS Specific Scripts/Programs may be Needed</term><listitem>
489                 <para>
490                 Every operating system has its peculiarities. These are the result of engineering decisions
491                 that were based on the experience of the designer, and may have side-effects that were not
492                 anticipated. Limitations that may bite the Windows network administrator include:
493                 </para>
494                 <itemizedlist>
495                         <listitem><para>Add/Delete Users: Note OS limits on size of name
496                                 (Linux 8 chars) NT4 up to 254 chars.</para></listitem>
497                         <listitem><para>Add/Delete Machines: Applied only to Domain Members
498                                 (Note: machine names may be limited to 16 characters).</para></listitem>
499                         <listitem><para>Use <command>net groupmap</command> to connect NT4 groups to UNIX groups.</para></listitem>
500                         <listitem><para>Add/Delete Groups: Note OS limits on size and nature.
501                                 Linux limit is 16 char, no spaces and no upper case chars (<command>groupadd</command>).</para></listitem>
502                 </itemizedlist>
503                 </listitem>
504         </varlistentry>
506         <varlistentry><term>Migration Tools</term><listitem>
507                 <para>
508 <indexterm><primary>pdbedit</primary></indexterm>
509                 Domain Control (NT4 Style) Profiles, Policies, Access Controls, Security
510                 <itemizedlist>
511                         <listitem><para>Samba: <command>net, rpcclient, smbpasswd, pdbedit, profiles.</command></para></listitem>
512                         <listitem><para>Windows: <command>NT4 Domain User Manager, Server Manager (NEXUS)</command></para></listitem>
513                 </itemizedlist>
514                         </para>
515                 </listitem>
516         </varlistentry>
517 </variablelist>
519 </sect2>
521 </sect1>
523 </chapter>