syncing docs from 3.0 tree (thanks jelmer).
[Samba.git] / docs / docbook / projdoc / NT4Migration.xml
blob36bafee2afd1e821979fa9d15d9fbe41e8cf70bd
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 organisations 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 organisation. 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 organisation's dependency on Microsoft</para></listitem>
53 </itemizedlist>
55 <para>
56 Make sure that 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 that 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 can NOT 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 includes:
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 (ie:Can run more than one 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 that 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 organisation there can be a single LDAP database, which itself can be distributed (ie: 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 (eg: ping timing) between the remote segment and the PDC. If long (more than 100 ms)
125 locate a backup controller (BDC) on the remote segmanet to serve as the local authentication and
126 access control server.
127 </para>
128 </sect3>
130 <sect3>
131 <title>Server Share and Directory Layout</title>
133 <para>
134 There are cardinal rules to effective network design. These can not be broken with impunity.
135 The most important rule: Simplicity is king in every well controlled network. Every part of
136 the infrastructure must be managed, the more complex it is, the greater will be the demand
137 of keeping systems secure and functional.
138 </para>
140 <para>
141 Keep in mind the nature of how data must be share. Physical disk space layout should be considered
142 carefully. Some data must be backed up. The simpler the disk layout the easier it will be to
143 keep track of backed needs. Identify what back media will be meet needs, consider backup to tape
144 , CD-ROM or (DVD-ROM), or other off-line storage medium. Plan and implement for minimum
145 maintenance. Leave nothing to chance in your design, above all, do not leave backups to chance:
146 Backup and test, validate every backup, create a disaster recovery plan and prove that it works.
147 </para>
149 <para>
150 Users should be grouped according to data access control needs. File and directory access 
151 is best controlled via group permissions and the use of the "sticky bit" on group controlled
152 directories may substantially avoid file access complaints from samba share users.
153 </para>
155 <para>
156 Inexperienced  network administrators often attempt elaborate techniques to set access
157 controls on files, directories, shares, as well as in share definitions.
158 Keep your design and implementation simple and document your design extensively. Have others
159 audit your documentation. Do not create a complex mess that your successor will not understand.
160 Remember, job security through complex design and implementation may cause loss of operations
161 and downtime to users as the new administrator learns to untangle your knots. Keep access
162 controls simple and effective and make sure that users will never be interrupted by stupid
163 complexity.
164 </para>
165 </sect3>
167 <sect3>
168 <title>Logon Scripts</title>
170 <para>
171 Logon scripts can help to ensure that all users gain share and printer connections they need.
172 </para>
174 <para>
175 Logon scripts can be created 'on-the-fly' so that all commands executed are specific to the
176 rights and priviliges granted to the user. The preferred controls should be affected through
177 group membership so that group information can be used to custom create a logon script using
178 the <smbconfoption><name>root preexec</name></smbconfoption> parameters to the <smbconfsection>NETLOGON</smbconfsection> share.
179 </para>
181 <para>
182 Some sites prefer to use a tool such as <command>kixstart</command> to establish a controlled
183 user environment. In any case you may wish to do a google search for logon script process controls.
184 In particular, you may wish to explore the use of the Microsoft knowledgebase article KB189105 that
185 deals with how to add printers without user intervention via the logon script process.
186 </para>
187 </sect3>
189 <sect3>
190 <title>Profile Migration/Creation</title>
192 <para>
193 User and Group Profiles may be migrated using the tools described in the section titled Desktop Profile
194 Management.
195 </para>
197 <para>
198 Profiles may also be managed using the Samba-3 tool <command>profiles</command>. This tool allows
199 the MS Windows NT style security identifiers (SIDs) that are stored inside the profile NTuser.DAT file
200 to be changed to the SID of the Samba-3 domain.
201 </para>
202 </sect3>
204 <sect3>
205 <title>User and Group Accounts</title>
207 <para>
208 It is possible to migrate all account settings from an MS Windows NT4 domain to Samba-3. Before
209 attempting to migrate user and group accounts it is STRONGLY advised to create in Samba-3 the
210 groups that are present on the MS Windows NT4 domain <emphasis>AND</emphasis> to map these to
211 suitable Unix/Linux groups. By following this simple advice all user and group attributes
212 should migrate painlessly.
213 </para>
214 </sect3>
216 </sect2>
218 <sect2>
219 <title>Steps In Migration Process</title>
221 <para>
222 The approximate migration process is described below.
223 </para>
225 <itemizedlist>
226 <listitem><para>
227 You will have an NT4 PDC that has the users, groups, policies and profiles to be migrated
228 </para></listitem>
230 <listitem><para>
231 Samba-3 set up as a DC with netlogon share, profile share, etc. Configure the &smb.conf; file
232 to fucntion as a BDC. ie: <parameter>domain master = No</parameter>.
233 </para></listitem>
234 </itemizedlist>
236 <procedure><title>The Account Migration Process</title>
237         <step><para>Create a BDC account for the samba server using NT Server Manager</para>
238                 <substeps><step><para>Samba must NOT be running</para></step></substeps></step>
240         <step><para><userinput>net rpc join -S <replaceable>NT4PDC</replaceable> -w <replaceable>DOMNAME</replaceable> -U Administrator%<replaceable>passwd</replaceable></userinput></para></step>
242         <step><para><userinput>net rpc vampire -S <replaceable>NT4PDC</replaceable> -U administrator%<replaceable>passwd</replaceable></userinput></para></step>
244         <step><para><userinput>pdbedit -L</userinput></para>
245                 <substeps><step><para>Note - did the users migrate?</para></step></substeps>
246         </step>
248         <step><para>
249         Now assign each of the UNIX groups to NT groups:
250         (Note: It may be useful to copy this text to a script called
251         <filename>initGroups.sh</filename>)
252         <programlisting>
253 #!/bin/bash
254 #### Keep this as a shell script for future re-use
255                         
256 # First assign well known domain global groups
257 net groupmap modify ntgroup="Domain Admins" unixgroup=ntadmins
258 net groupmap modify ntgroup="Domain Guests" unixgroup=nobody
259 net groupmap modify ntgroup="Domain Users" unixgroup=users
261 # Now for our added domain global groups
262 net groupmap add ntgroup="Designers" unixgroup=designers type=d rid=3200
263 net groupmap add ntgroup="Engineers" unixgroup=engineers type=d rid=3210
264 net groupmap add ntgroup="QA Team"   unixgroup=qateam    type=d rid=3220
265 </programlisting>
266         </para></step>
268         <step><para><userinput>net groupmap list</userinput></para>
269                 <substeps><step><para>Now check that all groups are recognised</para></step></substeps>
270         </step>
271 </procedure>
273 <para>
274 Now migrate all the profiles, then migrate all policy files.
275 </para>
277 </sect2>
278 </sect1>
280 <sect1>
281 <title>Migration Options</title>
283 <para>
284 Sites that wish to migrate from MS Windows NT4 Domain Control to a Samba based solution
285 generally fit into three basic categories.
286 </para>
288 <table frame="all"><title>The 3 Major Site Types</title>
289 <tgroup cols="2">
290         <colspec align="left"/>
291         <colspec align="justify"/>
292         <thead>
293         <row><entry>Number of Users</entry><entry>Description</entry></row>
294         </thead>
295         <tbody>
296         <row><entry>&lt; 50</entry><entry><para>Want simple conversion with NO pain</para></entry></row>
297         <row><entry>50 - 250</entry><entry><para>Want new features, can manage some in-house complexity</para></entry></row>
298         <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>
299         </tbody>
300 </tgroup>
301 </table>
303 <sect2>
304 <title>Planning for Success</title>
306 <para>
307 There are three basic choices for sites that intend to migrate from MS Windows NT4
308 to Samba-3.
309 </para>
311 <itemizedlist>
312         <listitem><para>
313         Simple Conversion (total replacement)
314         </para></listitem>
316         <listitem><para>
317         Upgraded Conversion (could be one of integration)
318         </para></listitem>
320         <listitem><para>
321         Complete Redesign (completely new solution)
322         </para></listitem>
323 </itemizedlist>
325 <para>
326 Minimise down-stream problems by:
327 </para>
329 <itemizedlist>
330         <listitem><para>
331         Take sufficient time
332         </para></listitem>
334         <listitem><para>
335         Avoid Panic
336         </para></listitem>
338         <listitem><para>
339         Test ALL assumptions
340         </para></listitem>
342         <listitem><para>
343         Test full roll-out program, including workstation deployment
344         </para></listitem>
345 </itemizedlist>
347 <table frame="all"><title>Nature of the Conversion Choices</title>
348 <tgroup cols="3">
349         <colspec align="justify"/>
350         <colspec align="justify"/>
351         <colspec align="justify"/>
352         <thead>
353         <row><entry>Simple</entry><entry>Upgraded</entry><entry>Redesign</entry></row>
354         </thead>
355         <tbody>
356         <row>
357         <entry><para>Make use of minimal OS specific features</para></entry>
358         <entry><para>Translate NT4 features to new host OS features</para></entry>
359         <entry><para>Decide:</para></entry>
360         </row>
361         <row>
362         <entry><para>Suck all accounts from NT4 into Samba-3</para></entry>
363         <entry><para>Copy and improve:</para></entry>
364         <entry><para>Authentication Regime (database location and access)</para></entry>
365         </row>
366         <row>
367         <entry><para>Make least number of operational changes</para></entry>
368         <entry><para>Make progressive improvements</para></entry>
369         <entry><para>Desktop Management Methods</para></entry>
370         </row>
371         <row>
372         <entry><para>Take least amount of time to migrate</para></entry>
373         <entry><para>Minimise user impact</para></entry>
374         <entry><para>Better Control of Desktops / Users</para></entry>
375         </row>
376         <row>
377         <entry><para>Live versus Isolated Conversion</para></entry>
378         <entry><para>Maximise functionality</para></entry>
379         <entry><para>Identify Needs for: Manageability, Scalability, Security, Availability</para></entry>
380         </row>
381         <row>
382         <entry><para>Integrate Samba-3 then migrate while users are active, then Change of control (ie: swap out)</para></entry>
383         <entry><para>Take advantage of lower maintenance opportunity</para></entry>
384         <entry><para></para></entry>
385         </row>
386         </tbody>
387 </tgroup>
388 </table>
389 </sect2>
391 <sect2>
392 <title>Samba-3 Implementation Choices</title>
394 <variablelist>
395         <varlistentry><term>Authentication database/back end:</term><listitem>
396                 <para>
397                 Samba-3 can use an external authentication backend:
398                 </para>
400                 <para>
401                 <itemizedlist>
402                         <listitem><para>Winbind (external Samba or NT4/200x server)</para></listitem>
403                         <listitem><para>External server could use Active Directory or NT4 Domain</para></listitem>
404                         <listitem><para>Can use pam_mkhomedir.so to auto-create home dirs</para></listitem>
405                 </itemizedlist>
406                 </para>
408                 <para>
409                 Samba-3 can use a local authentication backend:
410                 <itemizedlist>
411                         <listitem><para>smbpasswd, tdbsam, ldapsam, mysqlsam</para></listitem>
412                 </itemizedlist>
413                 </para>
414                 </listitem>
415         </varlistentry>
417         <varlistentry><term>Access Control Points:</term><listitem>
418                 <itemizedlist>
419                         <listitem><para>On the Share itself - using Share ACLs</para></listitem>
420                         <listitem><para>On the file system - using UNIX permissions on files and directories</para>
421                                 <para>Note: Can Enable Posix ACLs in file system also</para></listitem>
422                         <listitem><para>Through Samba share parameters - Not recommended - except as last resort</para></listitem>
423                 </itemizedlist>
424                 </listitem>
425         </varlistentry>
427         <varlistentry><term>Policies (migrate or create new ones):</term><listitem>
428                 <itemizedlist>
429                         <listitem><para>Using Group Policy Editor (NT4)</para></listitem>
430                         <listitem><para>- Watch out for Tattoo effect</para></listitem>
431                 </itemizedlist>
432                 </listitem>
433         </varlistentry>
435         <varlistentry><term>User and Group Profiles:</term><listitem>
436                 <para>
437                 Platform specific so use platform tool to change from a Local to a Roaming profile
438                 Can use new profiles tool to change SIDs (NTUser.DAT)
439                 </para>
440                 </listitem>
441         </varlistentry>
443         <varlistentry><term>Logon Scripts:</term><listitem>
444                 <para>
445                 Know how they work
446                 </para>
447                 </listitem>
448         </varlistentry>
450         <varlistentry><term>User and Group mapping to Unix/Linux:</term><listitem>
451                 <itemizedlist>
452                         <listitem><para>username map facility may be needed</para></listitem>
453                         <listitem><para>Use 'net groupmap' to connect NT4 groups to Unix groups</para></listitem>
454                         <listitem><para>Use pdbedit to set/change user configuration</para>
456                                 <para>
457                                 NOTE: When migrating to LDAP back, end it may be easier to dump initial
458                                 LDAP database to LDIF, then edit, then reload into LDAP
459                                 </para>
460                         </listitem>
461                 </itemizedlist>
462                 </listitem>
463         </varlistentry>
465         <varlistentry><term>OS specific scripts/programs may be needed:</term><listitem>
466                 <itemizedlist>
467                         <listitem><para>Add/Delete Users: Note OS limits on size of name
468                                 (Linux 8 chars) NT4 up to 254 chars</para></listitem>
469                         <listitem><para>Add/Delete Machines: Applied only to domain members
470                                 (Note: Machine names may be limited to 16 characters)</para></listitem>
471                         <listitem><para>Use 'net groupmap' to connect NT4 groups to Unix groups</para></listitem>
472                         <listitem><para>Add/Delete Groups: Note OS limits on size and nature.
473                                 Linux limit is 16 char, no spaces and no upper case chars (groupadd)</para></listitem>
474                 </itemizedlist>
475                 </listitem>
476         </varlistentry>
478         <varlistentry><term>Migration Tools:</term><listitem>
479                 <para>
480                 Domain Control (NT4 Style) Profiles, Policies, Access Controls, Security
481                 <itemizedlist>
482                         <listitem><para>Samba: net, rpcclient, smbpasswd, pdbedit, profiles</para></listitem>
483                         <listitem><para>Windows: NT4 Domain User Manager, Server Manager (NEXUS)</para></listitem>
484                 </itemizedlist>
485                 </para>
486                 </listitem>
487         </varlistentry>
488 </variablelist>
490 </sect2>
492 </sect1>
494 </chapter>