1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
<chapter id="ntmigration">
<title>Migrating NT4 Domain to Samba-3</title>
<para>
Ever since Microsoft announced that they are discontinuing support for Windows
NT4, Samba users started to ask for detailed instructions for how to migrate
from NT4 to Samba-3. This chapter provides background information that should
meet these needs.
</para>
<para>
One wonders how many NT4 systems will be left in service by the time you read this
book though.
</para>
<sect1>
<title>Introduction</title>
<para><indexterm>
<primary>migration</primary>
</indexterm>
Network administrators who want to migrate off a Windows NT4 environment know
one thing with certainty. They feel that NT4 has been abandoned and they want
to update. The desire to get off NT4 and to not adopt Windows 200x and Active
Directory is driven by a mixture of concerns over complexity, cost, fear of
failure, and much more.
</para>
<para>
<indexterm><primary>group policies</primary></indexterm>
<indexterm><primary>accounts</primary><secondary>user</secondary></indexterm>
<indexterm><primary>accounts</primary><secondary>group</secondary></indexterm>
<indexterm><primary>accounts</primary><secondary>machine</secondary></indexterm>
The migration from NT4 to Samba-3 can involve a number of factors, including:
migration of data to another server, migration of network environment controls
such as group policies, and finally migration of the users, groups, and machine
accounts.
</para>
<para>
<indexterm><primary>accounts</primary><secondary>Domain</secondary></indexterm>
It should be pointed out now that it is possible to migrate some systems from
Windows NT4 Domain environments to a Samba-3 Domain Environment. This is certainly
not possible in every case. It is possible to just migrate the Domain accounts
to Samba-3 and then to switch machines, but as a hands-off transition, this is more
an exception than the rule. Most systems require some tweaking and adjusting
following migration before an environment that is acceptable for immediate use
is obtained.
</para>
<sect2>
<title>Assignment Tasks</title>
<para>
<indexterm><primary>LDAP</primary></indexterm>
<indexterm><primary>ldapsam</primary></indexterm>
<indexterm><primary>passdb backend</primary></indexterm>
You are about to migrate an MS Windows NT4 Domain accounts database to
a Samba-3 server. The Samba-3 server is using a
<parameter>passdb backend</parameter> based on LDAP. The
<constant>ldapsam</constant> is ideal because an LDAP backend can be distributed
for use with BDCs &smbmdash; generally essential for larger networks.
</para>
<para>
Your objective is to document the process of migrating user and group accounts
from several NT4 Domains into a single Samba-3 LDAP backend database.
</para>
</sect2>
</sect1>
<sect1>
<title>Dissection and Discussion</title>
<para>
<indexterm><primary>snap-shot</primary></indexterm>
<indexterm><primary>NT4 registry</primary></indexterm>
<indexterm><primary>registry</primary><secondary>keys</secondary><tertiary>SAM</tertiary></indexterm>
<indexterm><primary>registry</primary><secondary>keys</secondary><tertiary>SECURITY</tertiary></indexterm>
<indexterm><primary>SAM</primary></indexterm>
<indexterm><primary>Security Account Manager</primary><see>SAM</see></indexterm>
The migration process takes a snap-shot of information that is stored in the
Windows NT4 registry based accounts database. That information resides in
the Security Account Manager (SAM) portion of the NT4 Registry under keys called
<constant>SAM</constant> and <constant>SECURITY</constant>.
</para>
<warning><para>
<indexterm><primary>crippled</primary></indexterm>
<indexterm><primary>inoperative</primary></indexterm>
The Windows NT4 registry keys called <constant>SAM</constant> and <constant>SECURITY</constant>
are protected so that you cannot view the contents. If you change the security setting
to reveal the contents under these hive keys, your Windows NT4 Domain is crippled. Do not
do this unless you are willing to render your domain controller inoperative.
</para></warning>
<para>
<indexterm><primary>migration</primary><secondary>objectives</secondary></indexterm>
<indexterm><primary>disruptive</primary></indexterm>
Before commencing an NT4 to Samba-3 migration, you should consider what your objectives are.
While in some cases it is possible simply to migrate an NT4 domain to a single Samba-3 server,
that may not be a good idea from an administration perspective. Since the process involves going
through a certain amount of disruptive activity anyhow, why not take this as an opportunity to
review the structure of the network, how Windows clients are controlled and how they
interact with the network environment.
</para>
<para>
<indexterm><primary>network</primary><secondary>logon scripts</secondary></indexterm>
<indexterm><primary>profiles share</primary></indexterm>
<indexterm><primary>security descriptors</primary></indexterm>
MS Windows NT4 was introduced some time around 1996. Many environments in which NT4 was deployed
have done little to keep the NT4 server environment up-to-date with more recent Windows releases,
particularly Windows XP Professional. The migration provides opportunity to revise and update
roaming profile deployment as well as folder redirection. Given that you must port the
greater network configuration of this from the old NT4 server to the new Samba-3 server.
Do not forget to validate the security descriptors in the profiles share as well as network logon
scripts. Feedback from sites that are migrating to Samba-3 suggests that many are using this
as a good time to update desktop systems also. In all, the extra effort should constitute no
real disruption to users, rather with due diligence and care should make their network experience
a much happier one.
</para>
<sect2>
<title>Technical Issues</title>
<para>
<indexterm><primary>strategic</primary></indexterm>
<indexterm><primary>active directory</primary></indexterm>
Migration of an NT4 Domain user and group database to Samba-3 involves a certain strategic
element. Many sites have asked for instructions regarding merging of multiple different NT4
Domains into one Samba-3 LDAP database. It would appear that this is viewed as a significant
added value compared with the alternative of migration to Windows Server 200x and Active
Directory. The diagram in <link linkend="ch8-migration"/> illustrates the effect of migration
from a Windows NT4 Domain to a Samba Domain.
</para>
<image id="ch8-migration">
<imagedescription>Schematic Explaining the <command>net rpc vampire</command> Process</imagedescription>
<imagefile scale="55">ch8-migration</imagefile>
</image>
<para>
<indexterm><primary>merge</primary></indexterm>
<indexterm><primary>passdb.tdb</primary></indexterm>
If you are wanting to merge multiple NT4 Domain account databases into one Samba Domain,
you must now dump the contents of the first migration and edit it as appropriate. Now clean
out (remove) the tdbsam backend file (<filename>passdb.tdb</filename>), or the LDAP database
files. You must start each migration with a new database into which you merge your NT4
domains.
</para>
<para><indexterm>
<primary>dump</primary>
</indexterm>
At this point, you are ready to perform the second migration following the same steps as
for the first. In other words, dump the database, edit it, and then you may merge the
dump for the first and second migrations.
</para>
<para><indexterm>
<primary>LDAP</primary>
</indexterm><indexterm>
<primary>migrate</primary>
</indexterm><indexterm>
<primary>Domain SID</primary>
</indexterm>
You must be careful. If you choose to migrate to an LDAP backend, your dump file
now contains the full account information, including the Domain SID. The Domain SID for each
of the two NT4 Domains will be different. You must choose one, and change the Domain
portion of the account SIDs so that all are the same.
</para>
<para>
<indexterm><primary>passdb.tdb</primary></indexterm>
<indexterm><primary>/etc/passwd</primary></indexterm>
<indexterm><primary>merged</primary></indexterm>
<indexterm><primary>logon script</primary></indexterm>
<indexterm><primary>logon hours</primary></indexterm>
<indexterm><primary>logon machines</primary></indexterm>
<indexterm><primary>profile path</primary></indexterm>
<indexterm><primary>smbpasswd</primary></indexterm>
<indexterm><primary>tdbsam</primary></indexterm>
<indexterm><primary>LDAP backend</primary></indexterm>
<indexterm><primary>export</primary></indexterm>
<indexterm><primary>import</primary></indexterm>
If you choose to use a tdbsam (<filename>passdb.tdb</filename>) backend file, your best choice
is to use <command>pdbedit</command> to export the contents of the tdbsam file into an
smbpasswd data file. This automatically strips out all Domain specific information,
such as logon hours, logon machines, logon script, profile path, as well as the Domain SID.
The resulting file can be easily merged with other migration attempts (each of which must start
with a clean file). It should also be noted that all users that end up in the merged smbpasswd
file must have an account in <filename>/etc/passwd</filename>. The resulting smbpasswd file
may be exported/imported into either a tdbsam (<filename>passdb.tdb</filename>), or else into
an LDAP backend.
</para>
<image id="NT4DUM">
<imagedescription>View of Accounts in NT4 Domain User Manager</imagedescription>
<imagefile scale="50">UserMgrNT4</imagefile>
</image>
</sect2>
<sect2>
<title>Political Issues</title>
<para>
The merging of multiple Windows NT4 style Domains into a single LDAP-backend-based Samba-3
Domain may be seen by those who had power over them as a loss of prestige or a loss of
power. The imposition of a single Domain may even be seen as a threat. So in migrating and
merging account databases, be consciously aware of the political fall-out in which you
may find yourself entangled when key staff feel a loss of prestige.
</para>
<para>
The best advice that can be given to those who set out to merge NT4 Domains into one single
Samba-3 Domain is to promote (sell) the action as one that reduces costs and delivers
greater network interoperability and manageability.
</para>
</sect2>
</sect1>
<sect1>
<title>Implementation</title>
<para>
From feedback on the Samba mailing lists it would appear that most Windows NT4 migrations
to Samba-3 are being performed using a new server or a new installation of a Linux or UNIX
server. If you contemplate doing this also, please note that the steps that follow in this
chapter assume familiarity with the information that has been previously covered in this
book. The reader is particularly encouraged to be familiar with <link linkend="secure"/>,
<link linkend="Big500users"/> and <link linkend="happy"/>.
</para>
<para>
You can present here the steps and example output for two NT4 to Samba-3 Domain migrations. The
first uses an LDAP-based backend, and the second uses a tdbsam backend. In each case the
scripts you specify in the &smb.conf; file for the <parameter>add user script</parameter>
collection of parameters are used to effect the addition of accounts into the passdb backend.
</para>
<para>
Before proceeding to NT4 migration using either a tdbsam or ldapsam it is most strongly recommended to
review <link linkend="ch5-dnshcp-setup"/> for DNS and DHCP configuration. The importance of correctly
functioning name resolution must be recognized. This applies equally for hostname as for netBIOS names
(machine names, computer names, domain names, workgroup names &smbmdash; ALL names!).
</para>
<para>
The migration process involves the following steps:
</para>
<itemizedlist>
<listitem><para>
Prepare the target Samba-3 server. This involves configuring Samba-3 for
migration to either a tdbsam or an ldapsam backend.
</para></listitem>
<listitem><para>
<indexterm><primary>uppercase</primary></indexterm>
<indexterm><primary>Posix</primary></indexterm>
<indexterm><primary>lower-case</primary></indexterm>
Clean up the source NT4 PDC. Delete all accounts that need not be migrated.
Delete all files that should not be migrated. Where possible, change NT Group
names so there are no spaces or uppercase characters. This is important if
the target UNIX host insists on Posix compliant all lower-case user and group
names.
</para></listitem>
<listitem><para>
Step through the migration process.
</para></listitem>
<listitem><para><indexterm><primary>PDC</primary></indexterm>
Remove the NT4 PDC from the network.
</para></listitem>
<listitem><para>
Upgrade the Samba-3 server from a BDC to a PDC, and validate all account
information.
</para></listitem>
</itemizedlist>
<para>
It may help to use the above outline as a pre-migration check-list.
</para>
<sect2>
<title>NT4 Migration Using LDAP Backend</title>
<para>
In this example, the migration is of an NT4 PDC to a Samba-3 PDC with an LDAP backend. The accounts about
to be migrated are shown in <link linkend="NT4DUM"/>. In this example use is made of the
smbldap-tools scripts to add the accounts that are migrated into the ldapsam passdb backend.
Four scripts are essential to the migration process. There are other scripts that will be required
for daily management, but these are not critical to migration. The critical scripts are dependant
on which passdb backend is being used. Refer to <link linkend="ch8-vampire"/> to see which scripts
must be provided so that the migration process can complete.
</para>
<para>
Verify that you have correctly specified in the &smb.conf; file the scripts, and arguments
that should be passed to them, before attempting to perform the account migration.
</para>
<warning><para>
Under absolutely no situations should be the Samba daemons be started until instructed to do so.
Delete the <filename>/etc/samba/secrets.tdb</filename> file and all Samba control tdb files
before commencing the following configuration steps.
</para></warning>
<table id="ch8-vampire">
<title>Samba &smb.conf; Scripts Essential to Migration</title>
<tgroup cols="3">
<colspec align="left"/>
<colspec align="center"/>
<colspec align="center"/>
<thead>
<row>
<entry>Entity</entry>
<entry>ldapsam Script</entry>
<entry>tdbsam Script</entry>
</row>
</thead>
<tbody>
<row>
<entry>Add User Accounts</entry>
<entry>smbldap-useradd</entry>
<entry>useradd</entry>
</row>
<row>
<entry>Delete User Accounts</entry>
<entry>smbldap-userdel</entry>
<entry>userdel</entry>
</row>
<row>
<entry>Add Group Accounts</entry>
<entry>smbldap-groupadd</entry>
<entry>groupadd</entry>
</row>
<row>
<entry>Delete Group Accounts</entry>
<entry>smbldap-groupdel</entry>
<entry>groupdel</entry>
</row>
<row>
<entry>Add User to Group</entry>
<entry>smbldap-groupmod</entry>
<entry>usermod (See Note)</entry>
</row>
<row>
<entry>Add Machine Accounts</entry>
<entry>smbldap-useradd</entry>
<entry>useradd</entry>
</row>
</tbody>
</tgroup>
</table>
<note><para>
<indexterm><primary>usermod</primary></indexterm>
<indexterm><primary>groupmem</primary></indexterm>
<indexterm><primary>smbldap-tools</primary></indexterm>
The UNIX/Linux <command>usermod</command> utility does not permit simple user addition to (or deletion
of users from) groups. This is a feature provided by the smbldap-tools scripts. If you want this
capability you will need to create your own tool to do this. Alternately, you can search the web
to locate a utility called <command>groupmem</command> (by George Kraft) that provides this functionality.
The <command>groupmem</command> utility was contributed to the shadow package but has not surfaced
in the formal commands provided by Linux distributions (March 2004).
</para></note>
<note><para>
<indexterm><primary>tdbdump</primary></indexterm>
The <command>tdbdump</command> utility is a utility that you can build from the Samba source
code tree. Not all Linux binary distributions include this tool. If it is missing from your
Linux distribution you will need to build this yourself, or else for-go its use.
</para></note>
<para>
<indexterm><primary>User Manager</primary></indexterm>
Before starting the migration, all dead accounts were removed from the NT4 domain using the User Manager for Domains.
</para>
<procedure>
<step><para>
Configure the Samba &smb.conf; file to create a BDC. An example configuration is
given here:
<screen>
# Global parameters
[global]
workgroup = DAMNATION
netbios name = MERLIN
passdb backend = ldapsam:ldap://localhost
username map = /etc/samba/smbusers
log level = 1
syslog = 0
log file = /var/log/samba/%m
max log size = 0
smb ports = 139 445
name resolve order = wins bcast hosts
show add printer wizard = Yes
add user script = /opt/IDEALX/sbin/smbldap-useradd -m '%u'
# delete user script = /opt/IDEALX/sbin/smbldap-userdel '%u'
add group script = /opt/IDEALX/sbin/smbldap-groupadd -p '%g'
# delete group script = /opt/IDEALX/sbin/smbldap-groupdel '%g'
add user to group script = \
/opt/IDEALX/sbin/smbldap-groupmod -m '%u' '%g'
# delete user from group script = \
/opt/IDEALX/sbin/smbldap-groupmod -x '%u' '%g'
set primary group script = \
/opt/IDEALX/sbin/smbldap-usermod -g '%g' '%u'
add machine script = /opt/IDEALX/sbin/smbldap-useradd -w '%u'
logon script = scripts\logon.cmd
logon path = \\%L\profiles\%U
logon home = \\%L\%U
logon drive = X:
domain logons = Yes
domain master = No
wins support = Yes
wins proxy = Yes
ldap admin dn = cn=Manager,dc=terpstra-world,dc=org
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap machine suffix = ou=People
ldap passwd sync = Yes
ldap suffix = dc=terpstra-world,dc=org
ldap ssl = no
ldap timeout = 20
ldap user suffix = ou=People
idmap backend = ldap:ldap://localhost
idmap uid = 15000-20000
idmap gid = 15000-20000
winbind nested groups = Yes
ea support = Yes
map acl inherit = Yes
[apps]
comment = Application Data
path = /data/home/apps
read only = No
[media]
comment = Media Files
path = /data/home2
read only = No
[homes]
comment = Home Directories
path = /home/users/%U/Documents
valid users = %S
read only = No
browseable = No
[media]
comment = Media Files
path = /data/home2
read only = No
[homes]
comment = Home Directories
path = /home/users/%U/Documents
valid users = %S
read only = No
browseable = No
[printers]
comment = SMB Print Spool
path = /var/spool/samba
guest ok = Yes
printable = Yes
use client driver = No
browseable = No
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = Yes
locking = No
[profiles]
comment = Profile Share
path = /var/lib/samba/profiles
read only = No
profile acls = Yes
[profdata]
comment = Profile Data Share
path = /var/lib/samba/profdata
read only = No
profile acls = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = root
</screen>
The delete scripts are correctly commented out so that during the process of migration
no account information can be deleted.
</para></step>
<step><para>
<indexterm><primary>slapd.conf</primary></indexterm>
Configure OpenLDAP in preparation for the migration. An example
<filename>sladp.conf</filename> file is shown here:
<screen>
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba3.schema
pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
access to dn.base=""
by self write
by * auth
access to attr=userPassword
by self write
by * auth
access to attr=shadowLastChange
by self write
by * read
access to *
by * read
by anonymous auth
#loglevel 256
#schemacheck on
idletimeout 30
#backend bdb
database bdb
checkpoint 1024 5
cachesize 10000
suffix "dc=terpstra-world,dc=org"
rootdn "cn=Manager,dc=terpstra-world,dc=org"
# rootpw = not24get
rootpw {SSHA}86kTavd9Dw3FAz6qzWTrCOKX/c0Qe+UV
directory /var/lib/ldap
# Indices to maintain
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq
index uidNumber eq
index gidNumber eq
index memberUID eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
</screen>
</para></step>
<step><para>
<indexterm><primary>nss_ldap</primary></indexterm>
<indexterm><primary>/etc/ldap.conf</primary></indexterm>
Install the PADL <command>nss_ldap</command> tool set, then configure the <filename>/etc/ldap.conf</filename>
as shown here:
<screen>
host 127.0.0.1
base dc=terpstra-world,dc=org
ldap_version 3
binddn cn=Manager,dc=terpstra-world,dc=org
bindpw not24get
pam_password exop
nss_base_passwd ou=People,dc=terpstra-world,dc=org?one
nss_base_shadow ou=People,dc=terpstra-world,dc=org?one
nss_base_group ou=Groups,dc=terpstra-world,dc=org?one
ssl off
</screen>
</para></step>
<step><para>
<indexterm><primary>/etc/nsswitch.conf</primary></indexterm>
Edit the <filename>/etc/nsswitch.conf</filename> file so it has the following entries:
<screen>
passwd: files #ldap
shadow: files #ldap
group: files #ldap
hosts: files dns wins
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files
</screen>
Note that the LDAP entries have been commented out. This is deliberate. If these
entries are active (not commented out), and the <filename>/ec/ldap.conf</filename>
file has been configured, when the LDAP server is started, the process
of starting the LDAP server will cause LDAP lookups. This causes the LDAP server
<command>slapd</command> to hang becasue it finds port 389 open and therefore
can not gain exclusive control of it. By commenting these entries out it is possible
to avoid this grid-lock situation and thus the over-all installation and configuration
will progress more smoothly.
</para></step>
<step><para>
Validate the the target NT4 PDC name is being correctly resolved to its IP address by
executing the following:
<screen>
&rootprompt; ping transgression
PING transgression.terpstra-world.org (192.168.1.5) 56(84) bytes of data.
64 bytes from (192.168.1.5): icmp_seq=1 ttl=128 time=0.159 ms
64 bytes from (192.168.1.5): icmp_seq=2 ttl=128 time=0.192 ms
64 bytes from (192.168.1.5): icmp_seq=3 ttl=128 time=0.141 ms
--- transgression.terpstra-world.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.141/0.164/0.192/0.021 ms
</screen>
Do not proceed to the next step if this step fails. It is imperative that the name of the PDC
can be resolved to its IP address. If this is broken, fix it.
</para></step>
<step><para>
Pull the Domain SID from the NT4 Domain that is being migrated as follows:
<screen>
&rootprompt; net rpc getsid -S TRANGRESSION -U Administrator%not24get
Storing SID S-1-5-21-1385457007-882775198-1210191635 \
for Domain DAMNATION in secrets.tdb
</screen>
</para>
<para>
Another way to obtain the domain SID from the target NT4 domain that is being
migrated to Samba-3 by executing the following:
<screen>
&rootprompt; net rpc info -S TRANSGRESSION
</screen>
If this method is used, do not forget to store the SID obtained into the
<filename>secrets.tdb</filename> file. This can be done by executing:
<screen>
&rootprompt; net setlocalsid S-1-5-21-1385457007-882775198-1210191635
</screen>
</para></step>
<step><para>
<indexterm><primary>Idealx</primary></indexterm>
<indexterm><primary>configure.pl</primary></indexterm>
<indexterm><primary>/opt/IDEALX/sbin</primary></indexterm>
<indexterm><primary>smbldap-tools</primary></indexterm>
Install the Idealx <command>smbldap-tools</command> software package following
the instructions given in <link linkend="sbeidealx"/>. The resulting perl scripts
should be located in the <filename>/opt/IDEALX/sbin</filename> directory.
Change into that location, or where ever the scripts have been installed. Execute the
<filename>configure.pl</filename> script to configure the Idealx package for use.
Note: Use the Domain SID obtained from the step above. The following is
an example configuration session:
<screen>
merlin:/opt/IDEALX/sbin # ./configure.pl
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
smbldap-tools script configuration
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Before starting, check
. if your samba controller is up and running.
. if the domain SID is defined (you can get it with the 'net getlocalsid')
. you can leave the configuration using the Crtl-c key combination
. empty value can be set with the "." caracter
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Looking for configuration files...
Samba Config File Location [/etc/samba/smb.conf] >
smbldap Config file Location (global parameters)
[/etc/smbldap-tools/smbldap.conf] >
smbldap Config file Location (bind parameters)
[/etc/smbldap-tools/smbldap_bind.conf] >
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Let's start configuring the smbldap-tools scripts ...
. workgroup name: name of the domain Samba act as a PDC
workgroup name [DAMNATION] >
. netbios name: netbios name of the samba controler
netbios name [MERLIN] >
. logon drive: local path to which the home directory
will be connected (for NT Workstations). Ex: 'H:'
logon drive [X:] > H:
. logon home: home directory location (for Win95/98 or NT Workstation).
(use %U as username) Ex:'\\MERLIN\home\%U'
logon home (leave blank if you don't want homeDirectory)
[\\MERLIN\home\%U] > \\%L\%U
. logon path: directory where roaming profiles are stored.
Ex:'\\MERLIN\profiles\%U'
logon path (leave blank if you don't want roaming profile)
[\\MERLIN\profiles\%U] > \\%L\profiles\%U
. home directory prefix (use %U as username) [/home/%U] > /home/users/%U
. default user netlogon script (use %U as username)
[%U.cmd] > scripts\logon.cmd
default password validation time (time in days) [45] > 180
. ldap suffix [dc=terpstra-world,dc=org] >
. ldap group suffix [ou=Groups] >
. ldap user suffix [ou=People] >
. ldap machine suffix [ou=People] >
. Idmap suffix [ou=Idmap] >
. sambaUnixIdPooldn: object where you want to store the next uidNumber
and gidNumber available for new users and groups
sambaUnixIdPooldn object (relative to ${suffix})
[cn=NextFreeUnixId] > sambaDomainName=DAMNATION
. ldap master server:
IP adress or DNS name of the master (writable) ldap server
ldap master server [] > 127.0.0.1
. ldap master port [389] >
. ldap master bind dn [cn=Manager,dc=terpstra-world,dc=org] >
. ldap master bind password [] >
. ldap slave server: IP adress or DNS name of the slave ldap server:
can also be the master one
ldap slave server [] > 127.0.0.1
. ldap slave port [389] >
. ldap slave bind dn [cn=Manager,dc=terpstra-world,dc=org] >
. ldap slave bind password [] >
. ldap tls support (1/0) [0] >
. SID for domain DAMNATION: SID of the domain
(can be obtained with 'net getlocalsid MERLIN')
SID for domain DAMNATION []
> S-1-5-21-1385457007-882775198-1210191635
. unix password encryption: encryption used for unix passwords
unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA) [SSHA] > MD5
. default user gidNumber [513] >
. default computer gidNumber [515] >
. default login shell [/bin/bash] >
. default domain name to append to mail adress [] > terpstra-world.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
backup old configuration files:
/etc/smbldap-tools/smbldap.conf->
/etc/smbldap-tools/smbldap.conf.old
/etc/smbldap-tools/smbldap_bind.conf->
/etc/smbldap-tools/smbldap_bind.conf.old
writing new configuration file:
/etc/smbldap-tools/smbldap.conf done.
/etc/smbldap-tools/smbldap_bind.conf done.
</screen>
<indexterm><primary>sambaDomainName</primary></indexterm>
Note that the NT4 domain SID that was previously obtained was entered above. Also,
the sambaUnixIdPooldn object was specified as: sambaDomainName=DAMNATION. This is
the location into which the Idealx smbldap-tools store the next available UID/GID
information. It is also where Samba stores domain specific information such as the
next RID, the SID, and so on.
</para></step>
<step><para>
Start the LDAP server using the system interface script. On Novell SLES9
this is done as shown here:
<screen>
&rootprompt; rcldap start
</screen>
</para></step>
<step><para>
Edit the <filename>/etc/nsswitch.conf</filename> file so it has the following entries:
<screen>
passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files dns wins
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files
</screen>
Note that the LDAP entries above have now been uncommented.
</para></step>
<step><para>
The LDAP management password must be installed into the <filename>secrets.tdb</filename>
file as follows:
<screen>
&rootprompt; smbpasswd -w not24get
Setting stored password for
"cn=Manager,dc=terpstra-world,dc=org" in secrets.tdb
</screen>
</para></step>
<step><para>
Populate the LDAP directory as shown here:
<screen>
&rootprompt; /opt/IDEALX/sbin/smbldap-populate -a root -k 0 -m 0
Using workgroup name from sambaUnixIdPooldn (smbldap.conf):
sambaDomainName=DAMNATION
Using builtin directory structure
adding new entry: dc=terpstra-world,dc=org
adding new entry: ou=People,dc=terpstra-world,dc=org
adding new entry: ou=Groups,dc=terpstra-world,dc=org
entry ou=People,dc=terpstra-world,dc=org already exist.
adding new entry: ou=Idmap,dc=terpstra-world,dc=org
adding new entry: sambaDomainName=DAMNATION,dc=terpstra-world,dc=org
adding new entry: uid=root,ou=People,dc=terpstra-world,dc=org
adding new entry: uid=nobody,ou=People,dc=terpstra-world,dc=org
adding new entry: cn=Domain Admins,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Domain Users,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Domain Guests,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Domain Computers,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Administrators,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Print Operators,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Backup Operators,ou=Groups,dc=terpstra-world,dc=org
adding new entry: cn=Replicators,ou=Groups,dc=terpstra-world,dc=org
</screen>
The script trys to add the ou=People container twice, hence the error message.
This is expected behavior.
</para></step>
<step><para>
Restart the LDAP server following initialization of the LDAP directory. Execute the
system control script provided on your system. The following steps can be used on
Novell SUSE SLES 9:
<screen>
&rootprompt; rcldap restart
&rootprompt; chkconfig ldap on
</screen>
</para></step>
<step><para>
Verify that the new user accounts that have been added to the LDAP directory can be
resolved as follows:
<screen>
&rootprompt; getent passwd
...
nobody:x:65534:65533:nobody:/var/lib/nobody:/bin/bash
man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash
news:x:9:13:News system:/etc/news:/bin/bash
uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
+::0:0:::
root:x:0:0:Netbios Domain Administrator:/home/users/root:/bin/false
nobody:x:999:514:nobody:/dev/null:/bin/false
</screen>
Now repeat this for the group accounts as shown here:
<screen>
&rootprompt; getent group
...
nobody:x:65533:
nogroup:x:65534:nobody
users:x:100:
+::0:
Domain Admins:x:512:root
Domain Users:x:513:
Domain Guests:x:514:
Domain Computers:x:515:
Administrators:x:544:
Print Operators:x:550:
Backup Operators:x:551:
Replicators:x:552:
</screen>
In both cases above the LDAP accounts follow the <quote>+::0:</quote> entry.
</para></step>
<step><para>
Now it is time to join the Samba BDC to the target NT4 domain that is being
migrated to Samba-3 by executing the following:
<screen>
&rootprompt; net rpc join -S TRANSGRESSION -U Administrator%not24get
merlin:/opt/IDEALX/sbin # net rpc join -S TRANSGRESSION \
-U Administrator%not24get
Joined domain DAMNATION.
</screen>
</para></step>
<step><para>
Set the new domain administrator (root) password for both UNIX and Windows as shown here:
<screen>
&rootprompt; /opt/IDEALX/sbin/smbldap-passwd root
Changing password for root
New password : ********
Retype new password : ********
</screen>
Note: During account migration the Windows Administrator account will not be migrated
the the Samba server.
</para></step>
<step><para>
Now validate that these accounts can be resolved using Samba's tools as
shown here for user accounts:
<screen>
&rootprompt; pdbedit -Lw
root:0:84B0D8E14D158FF8417EAF50CFAC29C3:
AF6DD3FD4E2EA8BDE1695A3F05EFBF52:[U ]:LCT-425F6467:
nobody:65534:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:
NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:[NU ]:LCT-00000000:
</screen>
Now complete the following step to validate that group account mappings have
been correctly set:
<screen>
&rootprompt; net groupmap list
Domain Admins (S-1-5-21-1385457007-882775198-1210191635-512)
-> Domain Admins
Domain Users (S-1-5-21-1385457007-882775198-1210191635-513)
-> Domain Users
Domain Guests (S-1-5-21-1385457007-882775198-1210191635-514)
-> Domain Guests
Domain Computers (S-1-5-21-1385457007-882775198-1210191635-515)
-> Domain Computers
Administrators (S-1-5-32-544) -> Administrators
Print Operators (S-1-5-32-550) -> Print Operators
Backup Operators (S-1-5-32-551) -> Backup Operators
Replicators (S-1-5-32-552) -> Replicators
</screen>
The above are the expected results for a correctly configured system.
</para></step>
<step><para>
Commence migration as shown here:
<screen>
&rootprompt; net rpc vampire -S TRANSGRESSION \
-U Administrator%not24get > /tmp/vampire.log 2>1
</screen>
Check the vampire log to confirm that only expected errors have been
reported. See <link linkend="sbevam1"/>.
</para></step>
<step><para>
The migration of user accounts can be quickly validated as follows:
<screen>
&rootprompt; pdbedit -Lw
root:0:84B0D8E14D158FF8417EAF50CFAC29C3:...
nobody:65534:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX:...
Administrator:0:84B0D8E14D158FF8417EAF50CFAC29C3:...
Guest:1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:...
TRANSGRESSION$:2:CC044B748CEE294CE76B6B0D1B86C1A8:...
IUSR_TRANSGRESSION:3:64046AC81B056C375F9537FC409085F8:...
MIDEARTH$:4:E93186E5819706D2AAD3B435B51404EE:...
atrickhoffer:5:DC08CFE0C12B2867352502E32A407F23:...
barryf:6:B829BCDE01FF24376E45D5F10408CFBD:...
fsellerby:7:6A97CBEBE8F9826B417EAF50CFAC29C3:...
gdaison:8:48F6A8C8A900024351DA8C2061C5F1D3:...
hrambotham:9:7330D9EA0964465EAAD3B435B51404EE:...
jrhapsody:10:ACBA7D207E2BA35D9BD41A26B01626BD:...
maryk:11:293B5A4CA41F6CA1A7D80430B8342B73:...
jacko:12:8E8982D86BD037C364BBD09A598E07AD:...
bridge:13:0D2CA7D2BE67FE2193BE3A377C968336:...
sharpec:14:8841A75CAC19D2855D8B73B1F4D430F8:...
jimbo:15:6E8BDC904FD9EC5C17306D272A9441BB:...
dhenwick:16:D1694A03C33584BDAAD3B435B51404EE:...
dork:17:69E2D19E69A593D5AAD3B435B51404EE:...
blue:18:E355EBF9559979FEAAD3B435B51404EE:...
billw:19:EE35C3481CF7F7DB484448BC86A641A5:...
rfreshmill:20:7EC033B58661B60CAAD3B435B51404EE:...
MAGGOT$:21:A3B9334765AD30F7AAD3B435B51404EE:...
TRENTWARE$:22:1D92C8DD5E7F0DDF93BE3A377C968336:...
MORTON$:23:89342E69DCA9D3F8AAD3B435B51404EE:...
NARM$:24:2B93E2D1D25448BDAAD3B435B51404EE:...
LAPDOG$:25:14AA535885120943AAD3B435B51404EE:...
SCAVENGER$:26:B6288EB6D147B56F8963805A19B0ED49:...
merlin$:27:820C50523F368C54AB9D85AE603AD09D:...
</screen>
</para></step>
<step><para>
The mapping of UNIX and Windows groups can be validated as show here:
<screen>
&rootprompt; net groupmap list
Domain Admins (S-1-5-21-1385457007-882775198-1210191635-512)
-> Domain Admins
Domain Users (S-1-5-21-1385457007-882775198-1210191635-513)
-> Domain Users
Domain Guests (S-1-5-21-1385457007-882775198-1210191635-514)
-> Domain Guests
Domain Computers (S-1-5-21-1385457007-882775198-1210191635-515)
-> Domain Computers
Administrators (S-1-5-32-544) -> Administrators
Print Operators (S-1-5-32-550) -> Print Operators
Backup Operators (S-1-5-32-551) -> Backup Operators
Replicator (S-1-5-32-552) -> Replicators
Engineers (S-1-5-21-1385457007-882775198-1210191635-1020) -> Engineers
Marketoids (S-1-5-21-1385457007-882775198-1210191635-1022) -> Marketoids
Gnomes (S-1-5-21-1385457007-882775198-1210191635-1023) -> Gnomes
Catalyst (S-1-5-21-1385457007-882775198-1210191635-1024) -> Catalyst
Recieving (S-1-5-21-1385457007-882775198-1210191635-1025) -> Recieving
Rubberboot (S-1-5-21-1385457007-882775198-1210191635-1026) -> Rubberboot
Sales (S-1-5-21-1385457007-882775198-1210191635-1027) -> Sales
Accounting (S-1-5-21-1385457007-882775198-1210191635-1028) -> Accounting
Shipping (S-1-5-21-1385457007-882775198-1210191635-1029) -> Shipping
Account Operators (S-1-5-32-548) -> Account Operators
Guests (S-1-5-32-546) -> Guests
Server Operators (S-1-5-32-549) -> Server Operators
Users (S-1-5-32-545) -> Users
</screen>
It is of vital importance that the domain SID portion of all group
accounts are identical.
</para></step>
<step><para>
The final responsibility in the migration process is to create identical
shares and printing resources on the new Samba-3 server, copy all data
across, set up privilieges and set share and file/directory access controls.
</para></step>
<step><para>
<indexterm><primary>domain master</primary></indexterm>
<indexterm><primary>PDC</primary></indexterm>
Edit the &smb.conf; file to reset the parameter
<smbconfoption name="domain master">Yes</smbconfoption> so that
the Samba server functions as a PDC for the purpose of migration.
Also, uncomment the deletion scripts so they will now be fully functional.
</para></step>
<step><para>
Now shut down the old NT4 PDC. Only when the old NT4 PDC and all
NT4 BDCs have been shut down can the Samba-3 PDC be started.
</para></step>
<step><para>
All workstations should function as they did with the old NT4 PDC. All
inter-domain trust accounts should remain in place and fully functional.
All user logon accounts should also function correctly.
</para></step>
<step><para>
The configuration of Samba-3 BDC servers can be accomplised now, or at any
convenient time in the future. Please refer to the carefully detailed process
for doing this that has been outlined in <link linkend="sbehap-bldg1"/>.
</para></step>
</procedure>
<sect3 id="sbevam1">
<title>Migration Log Validation</title>
<para>
The following <filename>vampire.log</filename> file is typical of a valid migration.
<screen>
adding user Administrator to group Domain Admins
adding user atrickhoffer to group Engineers
adding user dhenwick to group Engineers
adding user dork to group Engineers
adding user rfreshmill to group Marketoids
adding user jacko to group Gnomes
adding user jimbo to group Gnomes
adding user maryk to group Gnomes
adding user gdaison to group Gnomes
adding user dhenwick to group Catalyst
adding user jacko to group Catalyst
adding user jacko to group Recieving
adding user blue to group Recieving
adding user hrambotham to group Rubberboot
adding user billw to group Sales
adding user bridge to group Sales
adding user jrhapsody to group Sales
adding user maryk to group Sales
adding user rfreshmill to group Sales
adding user fsellerby to group Sales
adding user sharpec to group Sales
adding user jimbo to group Accounting
adding user gdaison to group Accounting
adding user jacko to group Shipping
adding user blue to group Shipping
Fetching DOMAIN database
Creating unix group: 'Engineers'
Creating unix group: 'Marketoids'
Creating unix group: 'Gnomes'
Creating unix group: 'Catalyst'
Creating unix group: 'Recieving'
Creating unix group: 'Rubberboot'
Creating unix group: 'Sales'
Creating unix group: 'Accounting'
Creating unix group: 'Shipping'
Creating account: Administrator
Creating account: Guest
Creating account: TRANSGRESSION$
Creating account: IUSR_TRANSGRESSION
Creating account: MIDEARTH$
Creating account: atrickhoffer
Creating account: barryf
Creating account: fsellerby
Creating account: gdaison
Creating account: hrambotham
Creating account: jrhapsody
Creating account: maryk
Creating account: jacko
Creating account: bridge
Creating account: sharpec
Creating account: jimbo
Creating account: dhenwick
Creating account: dork
Creating account: blue
Creating account: billw
Creating account: rfreshmill
Creating account: MAGGOT$
Creating account: TRENTWARE$
Creating account: MORTON$
Creating account: NARM$
Creating account: LAPDOG$
Creating account: SCAVENGER$
Creating account: merlin$
Group members of Domain Admins: Administrator,
Group members of Domain Users: Administrator(primary),
TRANSGRESSION$(primary),IUSR_TRANSGRESSION(primary),
MIDEARTH$(primary),atrickhoffer(primary),barryf(primary),
fsellerby(primary),gdaison(primary),hrambotham(primary),
jrhapsody(primary),maryk(primary),jacko(primary),bridge(primary),
sharpec(primary),jimbo(primary),dhenwick(primary),dork(primary),
blue(primary),billw(primary),rfreshmill(primary),MAGGOT$(primary),
TRENTWARE$(primary),MORTON$(primary),NARM$(primary),
LAPDOG$(primary),SCAVENGER$(primary),merlin$(primary),
Group members of Domain Guests: Guest(primary),
Group members of Engineers: atrickhoffer,dhenwick,dork,
Group members of Marketoids: rfreshmill,
Group members of Gnomes: jacko,jimbo,maryk,gdaison,
Group members of Catalyst: dhenwick,jacko,
Group members of Recieving: jacko,blue,
Group members of Rubberboot: hrambotham,
Group members of Sales: billw,bridge,jrhapsody,maryk,
rfreshmill,fsellerby,sharpec,
Group members of Accounting: jimbo,gdaison,
Group members of Shipping: jacko,blue,
Fetching BUILTIN database
skipping SAM_DOMAIN_INFO delta for 'Builtin' (is not my domain)
Creating unix group: 'Account Operators'
Creating unix group: 'Guests'
Creating unix group: 'Server Operators'
Creating unix group: 'Users'
</screen>
</para>
</sect3>
</sect2>
<sect2>
<title>NT4 Migration Using tdbsam Backend</title>
<para>
In this example, you have chosen to change the Domain name of the NT4 server from
<constant>DRUGPREP</constant> to <constant>MEGANET</constant> prior to the use
of the vampire (migration) tool. This migration process makes use of Linux system tools
(like <command>useradd</command>) to add the accounts that are migrated into the
UNIX/Linux <filename>/etc/passwd</filename>, and <filename>/etc/group</filename>
databases. These entries must therefore be present, and correct options specified,
in your &smb.conf; file or else the migration does not work as it should.
</para>
<procedure>
<step><para>
Prepare a Samba-3 server precisely per the instructions shown in Chapter 5.
Set the workgroup name to <constant>MEGANET</constant>.
</para></step>
<step><para><indexterm>
<primary>domain master</primary>
</indexterm><indexterm>
<primary>BDC</primary>
</indexterm>
Edit the &smb.conf; file to temporarily change the parameter
<smbconfoption name="domain master">No</smbconfoption> so
the Samba server functions as a BDC for the purpose of migration.
</para></step>
<step><para>
Start Samba as you have done previously.
</para></step>
<step><para><indexterm>
<primary>net</primary>
<secondary>rpc</secondary>
<tertiary>join</tertiary>
</indexterm>
Join the NT4 Domain as a BDC, as shown here:
<screen>
&rootprompt; net rpc join -S oldnt4pdc -W MEGANET -UAdministrator%not24get
Joined domain MEGANET.
</screen>
</para></step>
<step><para><indexterm>
<primary>net</primary>
<secondary>rpc</secondary>
<tertiary>vampire</tertiary>
</indexterm>
You may vampire the accounts from the NT4 PDC by executing the command, as shown here:
<screen>
&rootprompt; net rpc vampire -S oldnt4pdc -U Administrator%not24get
Fetching DOMAIN database
SAM_DELTA_DOMAIN_INFO not handled
Creating unix group: 'Domain Admins'
Creating unix group: 'Domain Users'
Creating unix group: 'Domain Guests'
Creating unix group: 'Engineers'
Creating unix group: 'Marketoids'
Creating unix group: 'Account Operators'
Creating unix group: 'Administrators'
Creating unix group: 'Backup Operators'
Creating unix group: 'Guests'
Creating unix group: 'Print Operators'
Creating unix group: 'Replicator'
Creating unix group: 'Server Operators'
Creating unix group: 'Users'
Creating account: Administrator
Creating account: Guest
Creating account: oldnt4pdc$
Creating account: jacko
Creating account: maryk
Creating account: bridge
Creating account: sharpec
Creating account: jimbo
Creating account: dhenwick
Creating account: dork
Creating account: blue
Creating account: billw
Creating account: massive$
Group members of Engineers: Administrator,
sharpec(primary),bridge,billw(primary),dhenwick
Group members of Marketoids: Administrator,jacko(primary),
maryk(primary),jimbo,blue(primary),dork(primary)
Creating unix group: 'Gnomes'
Fetching BUILTIN database
SAM_DELTA_DOMAIN_INFO not handled
</screen>
</para></step>
<step><para><indexterm>
<primary>pdbedit</primary>
</indexterm>
At this point, we can validate our migration. Let's look at the accounts
in the form as they would be seen in a smbpasswd file. This achieves that:
<screen>
&rootprompt; pdbedit -Lw
Administrator:505:84B0D8E14D158FF8417EAF50CFAC29C3:
AF6DD3FD4E2EA8BDE1695A3F05EFBF52:[UX ]:LCT-3DF7AA9F:
jimbo:512:6E9A2A51F64A1BD5C187B8085FE1D9DF:
CDF7E305E639966E489A0CEFB95EE5E0:[UX ]:LCT-3E9362BC:
sharpec:511:E4301A7CD8FDD1EC6BBF9BC19CDF8151:
7000255938831D5B948C95C1931534C5:[UX ]:LCT-3E8B42C4:
dhenwick:513:DCD8886141E3F892AAD3B435B51404EE:
2DB36465949CB938DD98C312EFDC2639:[UX ]:LCT-3E939F41:
bridge:510:3FE6873A43101B46417EAF50CFAC29C3:
891741F481AF111B4CAA09A94016BD01:[UX ]:LCT-3E8B4291:
blue:515:256D41D2559BB3D2AAD3B435B51404EE:
9CCADDA4F7D281DD0FAD321478C6F971:[UX ]:LCT-3E939FDC:
diamond$:517:6C8E7B64EDCDBC4218B6345447A4454B:
3323AC63C666CFAACB60C13F65D54E9A:[S ]:LCT-00000000:
oldnt4pdc$:507:3E39430CDCABB5B09ED320D0448AE568:
95DBAF885854A919C7C7E671060478B9:[S ]:LCT-3DF7AA9F:
Guest:506:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[DUX ]:LCT-3E93A008:
billw:516:85380CA7C21B6EBE168C8150662AF11B:
5D7478508293709937E55FB5FBA14C17:[UX ]:LCT-3FED7CA1:
dork:514:78C70DDEC35A35B5AAD3B435B51404EE:
0AD886E015AC595EC0AF40E6C9689E1A:[UX ]:LCT-3E939F9A:
jacko:508:BC472F3BF9A0A5F63832C92FC614B7D1:
0C6822AAF85E86600A40DC73E40D06D5:[UX ]:LCT-3E8B4242:
maryk:509:3636AB7E12EBE79AB79AE2610DD89D4C:
CF271B744F7A55AFDA277FF88D80C527:[UX ]:LCT-3E8B4270:
</screen>
</para></step>
<step><para><indexterm>
<primary>pdbedit</primary>
</indexterm>
An expanded view of a user account entry shows more of what was
obtained from the NT4 PDC:
<screen>
sleeth:~ # pdbedit -Lv maryk
Unix username: maryk
NT username: maryk
Account Flags: [UX ]
User SID: S-1-5-21-1988699175-926296742-1295600288-1003
Primary Group SID: S-1-5-21-1988699175-926296742-1295600288-1007
Full Name: Mary Kathleen
Home Directory: \\diamond\maryk
HomeDir Drive: X:
Logon Script: scripts\logon.bat
Profile Path: \\diamond\profiles\maryk
Domain: MEGANET
Account desc: Peace Maker
Workstations:
Munged dial:
Logon time: 0
Logoff time: Mon, 18 Jan 2038 20:14:07 GMT
Kickoff time: Mon, 18 Jan 2038 20:14:07 GMT
Password last set: Wed, 02 Apr 2003 13:05:04 GMT
Password can change: 0
Password must change: Mon, 18 Jan 2038 20:14:07 GMT
</screen>
</para></step>
<step><para><indexterm>
<primary>net</primary>
<secondary>group</secondary>
</indexterm>
And this command lists the long names of the groups that have been
imported (vampired) from the NT4 PDC:
<screen>
&rootprompt; net group -l -Uroot%not24get -Smassive
Group name Comment
-----------------------------
Engineers Snake Oil Engineers
Marketoids Untrustworthy Hype Vendors
Gnomes Plain Vanilla Garden Gnomes
Replicator Supports file replication in a domain
Guests Users granted guest access to the computer/domain
Administrators Members can fully administer the computer/domain
Users Ordinary users
</screen>
Everything looks well and in order.
</para></step>
<step><para><indexterm>
<primary>domain master</primary>
</indexterm><indexterm>
<primary>PDC</primary>
</indexterm>
Edit the &smb.conf; file to reset the parameter
<smbconfoption name="domain master">Yes</smbconfoption> so
the Samba server functions as a PDC for the purpose of migration.
</para></step>
</procedure>
</sect2>
<sect2>
<title>Key Points Learned</title>
<para>
Migration of an NT4 PDC database to a Samba-3 PDC is possible.
</para>
<itemizedlist>
<listitem><para>
An LDAP backend is a suitable vehicle for NT4 migrations.
</para></listitem>
<listitem><para>
A tdbsam backend can be used to perform a migration.
</para></listitem>
<listitem><para>
Multiple NT4 Domains can be merged into a single Samba-3
Domain.
</para></listitem>
<listitem><para>
The net Samba-3 Domain most likely requires some
administration and updating before going live.
</para></listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1>
<title>Questions and Answers</title>
<para>
</para>
<qandaset defaultlabel="chap08qa" type="number">
<qandaentry>
<question>
<para><indexterm>
<primary>clean database</primary>
</indexterm>
Why must I start each migration with a clean database?
</para>
</question>
<answer>
<para><indexterm>
<primary>merge</primary>
</indexterm>
This is a recommendation that permits the data from each NT4 Domain to
be kept separate until you are ready to merge them. Also, if you do not do this,
you may find errors due to users or groups from multiple Domains having the
same name, but different SIDs. It is better to permit each migration to complete
without undue errors and then to handle the merging of vampired data under
proper supervision.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>Domain SID</primary>
</indexterm>
Is it possible to set my Domain SID to anything I like?
</para>
</question>
<answer>
<para><indexterm>
<primary>auto-generated SID</primary>
</indexterm><indexterm>
<primary>SID</primary>
</indexterm><indexterm>
<primary>Domain SID</primary>
</indexterm>
Yes, so long as the SID you create has the same structure as an auto-generated SID.
The typical SID looks like this: S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX, where
the XXXXXXXXXX can be any number with from 6 to 10 digits. On the other hand, why
would you really want to create your own SID? I cannot think of a good reason.
You may want to set the SID to one that is already in use somewhere on your network,
but that is a little different from straight out creating your own Domain SID.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>/etc/passwd</primary>
</indexterm><indexterm>
<primary>/etc/group</primary>
</indexterm><indexterm>
<primary>tdbsam</primary>
</indexterm><indexterm>
<primary>passdb backend</primary>
</indexterm><indexterm>
<primary>accounts</primary>
<secondary>user</secondary>
</indexterm><indexterm>
<primary>accounts</primary>
<secondary>group</secondary>
</indexterm><indexterm>
<primary>accounts</primary>
<secondary>Domain</secondary>
</indexterm>
When using a tdbsam passdb backend, why must I have all Domain user and group accounts
in <filename>/etc/passwd</filename> and <filename>/etc/group</filename>?
</para>
</question>
<answer>
<para><indexterm>
<primary>UID</primary>
</indexterm><indexterm>
<primary>GID</primary>
</indexterm><indexterm>
<primary>smbpasswd</primary>
</indexterm><indexterm>
<primary>/etc/passwd</primary>
</indexterm><indexterm>
<primary>Posix</primary>
</indexterm><indexterm>
<primary>LDAP database</primary>
</indexterm>
Samba-3 must be able to tie all user and group account SIDs to a UNIX UID or GID. Samba
does not fabricate the UNIX IDs from thin air, but rather requires them to be located
in a suitable place.
</para>
<para>
When migrating a <filename>smbpasswd</filename> file to an LDAP backend, the
UID of each account is taken together with the account information in the
<filename>/etc/passwd</filename> and both sets of data are used to create the account
entrt in the LDAP database.
</para>
<para>
If you elect to create the POSIX account also, the entire UNIX account is copied to the
LDAP backend. The same occurs with NT groups and UNIX groups. At the conclusion of
migration to the LDAP database, the accounts may be removed from the UNIX database files.
In short then, all UNIX and Windows networking accounts, both in tdbsam as well as in
LDAP, require UIDs/GIDs.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>validate</primary>
</indexterm><indexterm>
<primary>connectivity</primary>
</indexterm><indexterm>
<primary>migration</primary>
</indexterm>
Why did you validate connectivity before attempting migration?
</para>
</question>
<answer>
<para>
Access validation before attempting to migrate NT4 Domain accounts helps to pin-point
potential problems that may otherwise affect or impede account migration. I am always
mindful of the 4P's of migration &smbmdash; Planning Prevents Poor Performance.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How would you merge 10 tdbsam-based domains into an LDAP database?
</para>
</question>
<answer>
<para><indexterm>
<primary>risk</primary>
</indexterm><indexterm>
<primary>dump</primary>
</indexterm><indexterm>
<primary>tdbsam</primary>
</indexterm><indexterm>
<primary>Samba Domain</primary>
</indexterm><indexterm>
<primary>UID</primary>
</indexterm><indexterm>
<primary>GID</primary>
</indexterm><indexterm>
<primary>pdbedit</primary>
</indexterm><indexterm>
<primary>transfer</primary>
</indexterm><indexterm>
<primary>smbpasswd</primary>
</indexterm><indexterm>
<primary>LDAP</primary>
</indexterm><indexterm>
<primary>tool</primary>
</indexterm>
If you have 10 tdbsam Samba Domains, there is considerable risk that there are a number of
accounts that have the same UNIX identifier (UID/GID). This means that you almost
certainly have to edit a lot of data. It would be easiest to dump each database in smbpasswd
file format and then manually edit all records to ensure that each has a unique UID. Each
file can then be imported a number of ways. You can use the <command>pdbedit</command> tool,
to affect a transfer from the smbpasswd file to LDAP, or you can migrate them en masse to
tdbsam and then to LDAP. The final choice is yours. Just remember to verify all accounts that
you have migrated before handing over access to a user. After all, too many users with a bad
migration experience may threaten your career.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>machine accounts</primary>
</indexterm><indexterm>
<primary>accounts</primary>
<secondary>machine</secondary>
</indexterm>
I want to change my Domain name after I migrate all accounts from an NT4 Domain to a
Samba-3 Domain. Does it make any sense to migrate the machine accounts in that case?
</para>
</question>
<answer>
<para><indexterm>
<primary>registry</primary>
</indexterm><indexterm>
<primary>un-join</primary>
</indexterm><indexterm>
<primary>rejoin</primary>
</indexterm><indexterm>
<primary>tattooing</primary>
</indexterm>
I would recommend not. The machine accounts should still work, but there are registry entries
on each Windows NT4 and upward client that have a tattoo of the old domain name. If you
un-join the domain and then rejoin the newly renamed Samba-3 Domain, you can be certain to avoid
this tattooing effect.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>multiple group mappings</primary>
</indexterm>
After merging multiple NT4 Domains into a Samba-3 Domain, I lost all multiple group mappings. Why?
</para>
</question>
<answer>
<para><indexterm>
<primary>/etc/passwd</primary>
</indexterm><indexterm>
<primary>/etc/group</primary>
</indexterm>
Samba-3 currently does not implement multiple group membership internally. If you use the Windows
NT4 Domain User Manager to manage accounts and you have an LDAP backend, the multiple group
membership is stored in the Posix groups area. If you use either tdbsam or smbpasswd backend,
then multiple group membership is handled through the UNIX groups file. When you dump the user
accounts no group account information is provided. When you edit (change) UIDs and GIDs in each
file to which you migrated the NT4 Domain data, do not forget to edit the UNIX <filename>/etc/passwd</filename>
and <filename>/etc/group</filename> information also. That is where the multiple group information
is most closely at your fingertips.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How can I reset group membership after loading the account information into the LDAP database?
</para>
</question>
<answer>
<para><indexterm>
<primary>SRVTOOLS.EXE</primary>
</indexterm>
You can use the NT4 Domain User Manager that can be downloaded from the Microsoft Web site. The
installation file is called <filename>SRVTOOLS.EXE</filename>.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>group names</primary>
</indexterm>
What are the limits or constraints that apply to group names?
</para>
</question>
<answer>
<para><indexterm>
<primary>limit</primary>
</indexterm><indexterm>
<primary>shadow-utils</primary>
</indexterm><indexterm>
<primary>groupadd</primary>
</indexterm><indexterm>
<primary>groupdel</primary>
</indexterm><indexterm>
<primary>groupmod</primary>
</indexterm><indexterm>
<primary>account names</primary>
</indexterm>
A Windows 200x group name can be up to 254 characters long, while in Windows NT4 the group
name is limited to 20 characters. Most UNIX systems limit this to 32 characters. Windows
groups can contain upper- and lower-case characters, as well as spaces.
Many UNIX system do not permit the use of upper-case characters, and some do not permit the
space character either. A number of systems (i.e., Linux) work fine with both upper-case
and space characters in group names, but the shadow-utils package that provides the group
control functions (<command>groupadd, groupmod, groupdel</command>, and so on) do not permit them.
Also, a number of UNIX systems management tools enforce their own particular interpretation
of the Posix standards, and likewise do not permit upper-case or space characters in group
or user account names. You have to experiment with your system to find what its
peculiarities are.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para><indexterm>
<primary>vampire</primary>
</indexterm>
My Windows NT4 PDC has 323,000 user accounts. How long will it take to migrate them to a Samba-3
LDAP backend system using the vampire process?
</para>
</question>
<answer>
<para>
UNIX UIDs and GIDs on most UNIX systems use an unsigned short or an unsigned integer. Recent Linux
kernels support at least a much larger number. On systems that have a 16-bit constraint on UID/GIDs,
you would not be able to migrate 323,000 accounts because this number can not fit into a 16-bit unsigned
integer. UNIX/Linux systems that have a 32-bit UID/GID can easily handle this number of accounts.
Please check this carefully before you attempt to effect a migration using the vampire process.
</para>
<para><indexterm>
<primary>Migration speed</primary>
</indexterm>
Migration speed depends much on the processor speed, the network speed, disk I/O capability, and
LDAP update overheads. On a dual processor AMD MP1600+ with 1 GB memory, that was mirroring LDAP
to a second identical system over 1 gigabit ethernet, I was able to migrate around 180 user accounts
per minute. Migration would obviously go much faster if LDAP mirroring is turned off during the migration.
</para>
</answer>
</qandaentry>
</qandaset>
</sect1>
</chapter>
|