1 <chapter id=
"NT4Migration">
4 <pubdate>April
3,
2003</pubdate>
7 <title>Migration from NT4 PDC to Samba-
3 PDC
</title>
10 This is a rough guide to assist those wishing to migrate from NT4 domain control to
11 Samba-
3 based domain control.
15 <title>Planning and Getting Started
</title>
18 In the IT world there is often a saying that all problems are encountered because of
19 poor planning. The corrollary to this saying is that not all problems can be anticpated
20 and planned for. Then again, good planning will anticpate most show stopper type situations.
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.
30 <title>Objectives
</title>
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.
41 It is strongly advised that before attempting a migration to a Samba-
3 controlled network
42 that every possible effort be made to gain all-round commitment to the change. Firstly, you
43 should know precisely
<emphasis>why
</emphasis> the change is important for the organisation.
44 Possible motivations to make a change include:
49 <para>Improve network manageability
</para>
52 <para>Obtain better user level functionality
</para>
55 <para>Reduce network operating costs
</para>
58 <para>Reduce exposure caused by Microsoft withdrawal of NT4 support
</para>
61 <para>Avoid MS License
6 implications
</para>
64 <para>Reduce organisation's dependency on Microsoft
</para>
69 It is vital that it be well recognised that Samba-
3 is NOT MS Windows NT4. Samba-
3 offers
70 an alternative solution that is both different from MS Windows NT4 and that offers some
71 advantages compared with it. It should also be recognised that Samba-
3 lacks many of the
72 features that Microsoft has promoted as core values in migration from MS Windows NT4 to
73 MS Windows
2000 and beyond (with or without Active Directory services).
77 What are the features that Samba-
3 can NOT provide?
82 <para>Active Directory Server
</para>
85 <para>Group Policy Objects (in Active Direcrtory)
</para>
88 <para>Machine Policy objects
</para>
91 <para>Logon Scripts in Active Directorty
</para>
94 <para>Software Application and Access Controls in Active Directory
</para>
99 The features that Samba-
3 DOES provide and that may be of compelling interest to your site
105 <para>Lower Cost of Ownership
</para>
108 <para>Global availability of support with no strings attached
</para>
111 <para>Dynamic SMB Servers (ie:Can run more than one server per Unix/Linux system)
</para>
114 <para>Creation of on-the-fly logon scripts
</para>
117 <para>Creation of on-the-fly Policy Files
</para>
120 <para>Greater Stability, Reliability, Performance and Availability
</para>
123 <para>Manageability via an ssh connection
</para>
126 <para>Flexible choices of back-end authentication technologies (tdbsam, ldapsam, mysqlsam)
</para>
129 <para>Ability to implement a full single-signon architecture
</para>
132 <para>Ability to distribute authentication systems for absolute minimum wide area network bandwidth demand
</para>
137 Before migrating a network from MS Windows NT4 to Samba-
3 it is vital that all necessary factors are
138 considered. Users should be educated about changes they may experience so that the change will be a
139 welcome one and not become an obstacle to the work they need to do. The following are some of the
140 factors that will go into a successful migration:
144 <title>Domain Layout
</title>
147 Samba-
3 can be configured as a domain controller, a back-up domain controller (probably best called
148 a secondary controller), a domain member, or as a stand-alone server. The Windows network security
149 domain context should be sized and scoped before implementation. Particular attention needs to be
150 paid to the location of the primary domain controller (PDC) as well as backup controllers (BDCs).
151 It should be noted that one way in which Samba-
3 differs from Microsoft technology is that if one
152 chooses to use an LDAP authentication backend then the same database can be used by several different
153 domains. This means that in a complex organisation there can be a single LDAP database, that itself
154 can be distributed, that can simultaneously serve multiple domains (that can also be widely distributed).
158 It is recommended that from a design perspective, the number of users per server, as well as the number
159 of servers, per domain should be scaled according to needs and should also consider server capacity
160 and network bandwidth.
164 A physical network segment may house several domains, each of which may span multiple network segments.
165 Where domains span routed network segments it is most advisable to consider and test the performance
166 implications of the design and layout of a network. A Centrally located domain controller that is being
167 designed to serve mulitple routed network segments may result in severe performance problems if the
168 response time (eg: ping timing) between the remote segment and the PDC is more than
100 ms. In situations
169 where the delay is too long it is highly recommended to locate a backup controller (BDC) to serve as
170 the local authentication and access control server.
175 <title>Server Share and Directory Layout
</title>
178 There are few cardinal rules to effective network design that can be broken with impunity.
179 The most important rule of effective network management is that simplicity is king in every
180 well controlled network. Every part of the infrastructure must be managed, the more complex
181 it is, the greater will be the demand of keeping systems secure and functional.
185 The nature of the data that must be stored needs to be born in mind when deciding how many
186 shares must be created. The physical disk space layout should also be taken into account
187 when designing where share points will be created. Keep in mind that all data needs to be
188 backed up, thus the simpler the disk layout the easier it will be to keep track of what must
189 be backed up to tape or other off-line storage medium. Always plan and implement for minimum
190 maintenance. Leave nothing to chance in your design, above all, do not leave backups to chance:
191 Backup and test, validate every backup, create a disaster recovery plan and prove that it works.
195 Users should be grouped according to data access control needs. File and directory access
196 is best controlled via group permissions and the use of the
"sticky bit" on group controlled
197 directories may substantially avoid file access complaints from samba share users.
201 Many network administrators who are new to the game will attempt to use elaborate techniques
202 to set access controls, on files, directories, shares, as well as in share definitions.
203 There is the ever present danger that that administrator's successor will not understand the
204 complex mess that has been inherited. Remember, apparent job security through complex design
205 and implementation may ultimately cause loss of operations and downtime to users as the new
206 administrator learns to untangle your web. Keep access controls simple and effective and
207 make sure that users will never be interrupted by the stupidity of complexity.
212 <title>Logon Scripts
</title>
215 Please refer to the section of this document on Advanced Network Adminsitration for information
216 regarding the network logon script options for Samba-
3. Logon scripts can help to ensure that
217 all users gain share and printer connections they need.
221 Logon scripts can be created on-the-fly so that all commands executed are specific to the
222 rights and privilidges granted to the user. The preferred controls should be affected through
223 group membership so that group information can be used to custom create a logong script using
224 the
<filename>root preexec
</filename> parameters to the
<filename>NETLOGON
</filename> share.
228 Some sites prefer to use a tool such as
<filename>kixstart
</filename> to establish a controlled
229 user environment. In any case you may wish to do a google search for logon script process controls.
230 In particular, you may wish to explore the use of the Microsoft knowledgebase article KB189105 that
231 deals with how to add printers without user intervention via the logon script process.
236 <title>Profile Migration/Creation
</title>
239 User and Group Profiles may be migrated using the tools described in the section titled Desktop Profile
244 Profiles may also be managed using the Samba-
3 tool
<filename>profiles
</filename>. This tool allows
245 the MS Windows NT style security identifiers (SIDs) that are stored inside the profile NTuser.DAT file
246 to be changed to the SID of the Samba-
3 domain.
251 <title>User and Group Accounts
</title>
254 It is possible to migrate all account settings from an MS Windows NT4 domain to Samba-
3. Before
255 attempting to migrate user and group accounts it is STRONGLY advised to create in Samba-
3 the
256 groups that are present on the MS Windows NT4 domain
<emphasis>AND
</emphasis> to connect these to
257 suitable Unix/Linux groups. Following this simple advice will mean that all user and group attributes
258 should migrate painlessly.
265 <title>Steps In Migration Process
</title>
268 The approximate migration process is described below.
273 You will have an NT4 PDC that has the users, groups, policies and profiles to be migrated
277 Samba-
3 set up as a DC with netlogon share, profile share, etc.
281 <procedure><title>The Account Migration Process
</title>
282 <step><para>Create a BDC account for the samba server using NT Server Manager
</para>
283 <substeps><step><para>Samba must NOT be running
</para></step></substeps></step>
286 <para>rpcclient NT4PDC -U Administrator%passwd
</para>
287 <substeps><step><para>lsaquery
</para></step>
288 <step><para>Note the SID returned
</para></step>
292 <step><para>net getsid -S NT4PDC -w DOMNAME -U Administrator%passwd
</para>
293 <substeps><step><para>Note the SID
</para></step></substeps>
296 <step><para>net getlocalsid
</para>
298 <step><para>Note the SID, now check that all three SIDS reported are the same!
</para></step>
302 <step><para>net rpc join -S NT4PDC -w DOMNAME -U Administrator%passwd
</para></step>
304 <step><para>net rpc vampire -S NT4PDC -U administrator%passwd
</para></step>
306 <step><para>pdbedit -l
</para>
307 <substeps><step><para>Note - did the users migrate?
</para></step></substeps>
310 <step><para>initGrps.sh DOMNAME
</para></step>
312 <step><para>net groupmap list
</para>
313 <substeps><step><para>Now check that all groups are recognised
</para></step></substeps>
316 <step><para>net rpc campire -S NT4PDC -U administrator%passwd
</para></step>
318 <step><para>pdbedit -lv
</para>
320 <para>Note - check that all group membership has been migrated
</para>
326 Now it is time to migrate all the profiles, then migrate all policy files.
334 <title>Migration Options
</title>
337 Based on feedback from many sites as well as from actual installation and maintenance
338 experience sites that wish to migrate from MS Windows NT4 Domain Control to a Samba
339 based solution fit into three basic categories.
342 <table frame=
"all"><title>The
3 Major Site Types
</title>
343 <tgroup cols=
"2" align=
"center">
345 <row><entry align=
"center">Number of Users
</entry><entry>Description
</entry></row>
348 <row><entry align=
"center">< 50</entry><entry><para>Want simple conversion with NO pain
</para></entry></row>
349 <row><entry align=
"center">50 -
250</entry><entry><para>Want new features, can manage some in-house complexity
</para></entry></row>
350 <row><entry align=
"center">> 250</entry><entry><para>Solution/Implementation MUST scale well, complex needs. Cross departmental decision process. Local expertise in most areas
</para></entry></row>
356 <title>Planning for Success
</title>
359 There are three basic choices for sites that intend to migrate from MS Windwows NT4
365 Simple Conversion (total replacement)
369 Upgraded Conversion (could be one of integration)
373 Complete Redesign (completely new solution)
378 No matter what choice you make, the following rules will minimise down-stream problems:
395 Test full roll-out program, including workstation deployment
399 <table frame=
"top"><title>Nature of the Conversion Choices
</title>
400 <tgroup cols=
"3" align=
"center">
402 <row><entry>Simple
</entry><entry>Upgraded
</entry><entry>Redesign
</entry></row>
406 <entry><para>Make use of minimal OS specific features
</para></entry>
407 <entry><para>Translate NT4 features to new host OS features
</para></entry>
408 <entry><para>Decide:
</para></entry>
411 <entry><para>Suck all accounts from NT4 into Samba-
3</para></entry>
412 <entry><para>Copy and improve:
</para></entry>
413 <entry><para>Authentication Regime (database location and access)
</para></entry>
416 <entry><para>Make least number of operational changes
</para></entry>
417 <entry><para>Make progressive improvements
</para></entry>
418 <entry><para>Desktop Management Methods
</para></entry>
421 <entry><para>Take least amount of time to migrate
</para></entry>
422 <entry><para>Minimise user impact
</para></entry>
423 <entry><para>Better Control of Desktops / Users
</para></entry>
426 <entry><para>Live versus Isolated Conversion
</para></entry>
427 <entry><para>Maximise functionality
</para></entry>
428 <entry><para>Identify Needs for: Manageability, Scalability, Security, Availability
</para></entry>
431 <entry><para>Integrate Samba-
3 then migrate while users are active, then Change of control (ie: swap out)
</para></entry>
432 <entry><para>Take advantage of lower maintenance opportunity
</para></entry>
433 <entry><para></para></entry>
441 <title>Samba Implementation Choices
</title>
443 <para><programlisting>
444 Authentication database back end
445 Winbind (external Samba or NT4/
200x server)
446 Can use pam_mkhomedir.so to auto-create home dirs
447 External server could use Active Directory or NT4 Domain
450 smbpasswd, tdbsam, ldapsam, MySQLsam
452 Access Control Points
453 On the Share itself (Use NT4 Server Manager)
455 Unix permissions on files and directories
456 Posix ACLs enablement in file system?
457 Through Samba share parameters
458 Not recommended - except as only resort
460 Policies (migrate or create new ones)
461 Group Policy Editor (NT4)
462 Watch out for Tattoo effect
464 User and Group Profiles
465 Platform specific so use platform tool to change from a Local
466 to a Roaming profile Can use new profiles tool to change SIDs
469 Logon Scripts (Know how they work)
471 User and Group mapping to Unix/Linux
472 username map facility may be needed
473 Use 'net groupmap' to connect NT4 groups to Unix groups
474 Use pdbedit to set/change user configuration
476 If migrating to LDAP back end it may be easier to dump initial LDAP database
477 to LDIF, then edit, then reload into LDAP
479 OS specific scripts / programs may be needed
481 Note OS limits on size of name (Linux
8 chars)
483 Add / delete machines
484 Applied only to domain members (note up to
16 chars)
486 Note OS limits on size and nature
487 Linux limit is
16 char,
488 no spaces and no upper case chars (groupadd)
491 Domain Control (NT4 Style)
492 Profiles, Policies, Access Controls, Security
495 Samba: net, rpcclient, smbpasswd, pdbedit, profiles
496 Windows: NT4 Domain User Manager, Server Manager (NEXUS)
499 New SAM back end (smbpasswd, tdbsam, ldapsam, mysqlsam)