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