4461f0fdcb08dbf6a192cbd59faaff3378f12509
[vlendec/samba-autobuild/.git] / docs / docbook / projdoc / upgrading-to-3.0.xml
1 <chapter id="upgrading-to-3.0">
2 <chapterinfo>
3         &author.jelmer;
4         &author.jht;
5         &author.jerry;
6         <pubdate>June 30, 2003</pubdate>
7 </chapterinfo>
8
9 <title>Upgrading from Samba-2.x to Samba-3.0.0</title>
10
11 <para>
12 This chapter deals exclusively with the differences between Samba-3.0.0 and Samba-2.2.8a.
13 It points out where configuration parameters have changed, and provides a simple guide for 
14 the move from 2.2.x to 3.0.0.
15 </para>
16
17 <sect1>
18 <title>Quick Migration Guide</title>
19
20 <para>
21 Samba-3.0.0 default behavior should be approximately the same as Samba-2.2.x.
22 The default behavior when the new parameter <smbconfoption><name>passdb backend</name></smbconfoption>
23 is not defined in the &smb.conf; file provides the same default behviour as Samba-2.2.x
24 with <smbconfoption><name>encrypt passwords</name><value>Yes</value></smbconfoption>, and
25 will use the <filename>smbpasswd</filename> database.
26 </para>
27
28 <para>
29 So why say that <emphasis>behavior should be approximately the same as Samba-2.2.x?</emphasis> Because
30 Samba-3.0.0 can negotiate new protocols, such as support for native Unicode, that may result in
31 differing protocol code paths being taken. The new behavior under such circumstances is not
32 exactly the same as the old one. The good news is that the domain and machine SIDs will be
33 preserved across the upgrade.
34 </para>
35
36 <para>
37 If the Samba-2.2.x system was using an LDAP backend, and there is no time to update the LDAP
38 database, then make sure that <smbconfoption><name>passdb backend</name><value>ldapsam_compat</value></smbconfoption>
39 is specified in the &smb.conf; file. For the rest, behavior should remain more or less the same.
40 At a later date, when there is time to implement a new Samba-3 compatible LDAP backend, it is possible
41 to migrate the old LDAP database to the new one through use of the <command>pdbedit</command>.
42 See <link linkend="pdbeditthing"/>.
43 </para>
44
45 </sect1>
46
47 <sect1>
48 <title>New Features in Samba-3</title>
49
50 <para>
51 The major new features are:
52 </para>
53
54 <orderedlist numberation="arabic">
55         <listitem><para>
56         Active Directory support. This release is able to join an ADS realm
57         as a member server and authenticate users using LDAP/kerberos.
58         </para></listitem>
59
60         <listitem><para>
61         Unicode support. Samba will now negotiate unicode on the wire and
62         internally there is a much better infrastructure for multi-byte
63         and unicode character sets.
64         </para></listitem>
65
66         <listitem><para>
67         New authentication system. The internal authentication system has
68         been almost completely rewritten. Most of the changes are internal,
69         but the new authoring system is also very configurable.
70         </para></listitem>
71
72         <listitem><para>
73         New filename mangling system. The filename mangling system has been
74         completely rewritten. An internal database now stores mangling maps
75         persistently.
76         </para></listitem>
77
78         <listitem><para>
79         New <quote>net</quote> command. A new <quote>net</quote> command has been added. It is
80         somewhat similar to the <quote>net</quote> command in Windows. Eventually, we
81         plan to replace a bunch of other utilities (such as smbpasswd)
82         with subcommands in <quote>net</quote>.
83         </para></listitem>
84
85         <listitem><para>
86         Samba now negotiates NT-style status32 codes on the wire. This
87         considerably improves error handling.
88         </para></listitem>
89
90         <listitem><para>
91         Better Windows 200x/XP printing support including publishing
92         printer attributes in Active Directory.
93         </para></listitem>
94
95         <listitem><para>
96         New loadable RPC modules for passdb backends and character sets.
97         </para></listitem>
98
99         <listitem><para>
100         New default dual-daemon winbindd support for better performance.
101         </para></listitem>
102
103         <listitem><para>
104         Support for migrating from a Windows NT 4.0 domain to a Samba
105         domain and maintaining user, group and domain SIDs.
106         </para></listitem>
107
108         <listitem><para>
109         Support for establishing trust relationships with Windows NT 4.0
110         Domain Controllers.
111         </para></listitem>
112
113         <listitem><para>
114         Initial support for a distributed Winbind architecture using
115         an LDAP directory for storing SID to UID/GID mappings.
116         </para></listitem>
117
118         <listitem><para>
119         Major updates to the Samba documentation tree.
120         </para></listitem>
121
122         <listitem><para>
123         Full support for client and server SMB signing to ensure
124         compatibility with default Windows 2003 security settings.
125         </para></listitem>
126 </orderedlist>
127
128 <para>
129 Plus lots of other improvements!
130 </para>
131
132 </sect1>
133
134 <sect1>
135 <title>Configuration Parameter Changes</title>
136
137 <para>
138 This section contains a brief listing of changes to &smb.conf; options
139 in the 3.0.0 release. Please refer to the smb.conf(5) man page for
140 complete descriptions of new or modified parameters.
141 </para>
142
143 <sect2>
144 <title>Removed Parameters</title>
145
146 <para>(Ordered Alphabetically):</para>
147
148 <itemizedlist>
149         <listitem><para>admin log </para></listitem>
150         <listitem><para>alternate permissions </para></listitem>
151         <listitem><para>character set </para></listitem>
152         <listitem><para>client codepage </para></listitem>
153         <listitem><para>code page directory </para></listitem>
154         <listitem><para>coding system </para></listitem>
155         <listitem><para>domain admin group </para></listitem>
156         <listitem><para>domain guest group </para></listitem>
157         <listitem><para>force unknown acl user </para></listitem>
158         <listitem><para>nt smb support </para></listitem>
159         <listitem><para>post script </para></listitem>
160         <listitem><para>printer driver </para></listitem>
161         <listitem><para>printer driver file </para></listitem>
162         <listitem><para>printer driver location </para></listitem>
163         <listitem><para>status </para></listitem>
164         <listitem><para>stip dot </para></listitem>
165         <listitem><para>total print jobs </para></listitem>
166         <listitem><para>use rhosts </para></listitem>
167         <listitem><para>valid chars </para></listitem>
168         <listitem><para>vfs options </para></listitem>
169 </itemizedlist>
170
171 </sect2>
172
173 <sect2>
174 <title>New Parameters</title>
175
176 <para>(New parameters have been grouped by function):</para>
177
178 <para>Remote Management</para>
179
180 <itemizedlist>
181         <listitem><para>abort shutdown script </para></listitem>
182         <listitem><para>shutdown script </para></listitem>
183 </itemizedlist>
184
185 <para>User and Group Account Management:</para>
186
187 <itemizedlist>
188         <listitem><para>add group script </para></listitem>
189         <listitem><para>add machine script </para></listitem>
190         <listitem><para>add user to group script </para></listitem>
191         <listitem><para>algorithmic rid base </para></listitem>
192         <listitem><para>delete group script </para></listitem>
193         <listitem><para>delete user from group script </para></listitem>
194         <listitem><para>passdb backend </para></listitem>
195         <listitem><para>set primary group script </para></listitem>
196 </itemizedlist>
197
198 <para>Authentication:</para>
199
200 <itemizedlist>
201         <listitem><para>auth methods </para></listitem>
202         <listitem><para>realm </para></listitem>
203 </itemizedlist>
204
205 <para>Protocol Options:</para>
206
207 <itemizedlist>
208         <listitem><para>client lanman auth </para></listitem>
209         <listitem><para>client NTLMv2 auth </para></listitem>
210         <listitem><para>client schannel </para></listitem>
211         <listitem><para>client signing </para></listitem>
212         <listitem><para>client use spnego </para></listitem>
213         <listitem><para>disable netbios </para></listitem>
214         <listitem><para>ntlm auth </para></listitem>
215         <listitem><para>paranoid server security </para></listitem>
216         <listitem><para>server schannel </para></listitem>
217         <listitem><para>server signing </para></listitem>
218         <listitem><para>smb ports </para></listitem>
219         <listitem><para>use spnego </para></listitem>
220 </itemizedlist>
221
222 <para>File Service:</para>
223
224 <itemizedlist>
225         <listitem><para>get quota command </para></listitem>
226         <listitem><para>hide special files </para></listitem>
227         <listitem><para>hide unwriteable files </para></listitem>
228         <listitem><para>hostname lookups </para></listitem>
229         <listitem><para>kernel change notify </para></listitem>
230         <listitem><para>mangle prefix </para></listitem>
231         <listitem><para>map acl inherit </para></listitem>
232         <listitem><para>msdfs proxy </para></listitem>
233         <listitem><para>set quota command </para></listitem>
234         <listitem><para>use sendfile </para></listitem>
235         <listitem><para>vfs objects </para></listitem>
236 </itemizedlist>
237
238 <para>Printing:</para>
239
240 <itemizedlist>
241         <listitem><para>max reported print jobs </para></listitem>
242 </itemizedlist> 
243
244
245 <para>Unicode and Character Sets:</para>
246
247 <itemizedlist>
248         <listitem><para>display charset </para></listitem>
249         <listitem><para>dos charset </para></listitem>
250         <listitem><para>unicode </para></listitem>
251         <listitem><para>UNIX charset </para></listitem>
252 </itemizedlist>
253
254 <para>SID to UID/GID Mappings:</para>
255
256 <itemizedlist>
257         <listitem><para>idmap backend </para></listitem>
258         <listitem><para>idmap gid </para></listitem>
259         <listitem><para>idmap uid </para></listitem>
260         <listitem><para>winbind enable local accounts </para></listitem>
261         <listitem><para>winbind trusted domains only </para></listitem>
262         <listitem><para>template primary group </para></listitem>
263         <listitem><para>enable rid algorithm </para></listitem>
264 </itemizedlist>
265
266 <para>LDAP:</para>
267
268 <itemizedlist>
269         <listitem><para>ldap delete dn </para></listitem>
270         <listitem><para>ldap group suffix </para></listitem>
271         <listitem><para>ldap idmap suffix </para></listitem>
272         <listitem><para>ldap machine suffix </para></listitem>
273         <listitem><para>ldap passwd sync </para></listitem>
274         <listitem><para>ldap trust ids </para></listitem>
275         <listitem><para>ldap user suffix </para></listitem>
276 </itemizedlist>
277
278 <para>General Configuration:</para>
279
280 <itemizedlist>
281         <listitem><para>preload modules </para></listitem>
282         <listitem><para>privatedir </para></listitem>
283 </itemizedlist>
284
285 </sect2>
286
287 <sect2>
288 <title>Modified Parameters (Changes in Behavior):</title>
289
290 <itemizedlist>
291         <listitem><para>encrypt passwords (enabled by default) </para></listitem>
292         <listitem><para>mangling method (set to hash2 by default) </para></listitem>
293         <listitem><para>passwd chat </para></listitem>
294         <listitem><para>passwd program </para></listitem>
295         <listitem><para>password server </para></listitem>
296         <listitem><para>restrict anonymous (integer value) </para></listitem>
297         <listitem><para>security (new ads value) </para></listitem>
298         <listitem><para>strict locking (enabled by default) </para></listitem>
299         <listitem><para>winbind cache time (increased to 5 minutes) </para></listitem>
300         <listitem><para>winbind uid (deprecated in favor of idmap uid) </para></listitem>
301         <listitem><para>winbind gid (deprecated in favor of idmap gid) </para></listitem>
302 </itemizedlist>
303
304 </sect2>
305
306 </sect1>
307
308 <sect1>
309 <title>New Functionality</title>
310
311         <sect2>
312         <title>Databases</title>
313
314         <para>
315         This section contains brief descriptions of any new databases
316         introduced in Samba-3. Please remember to backup your existing
317         ${lock directory}/*tdb before upgrading to Samba-3. Samba will
318         upgrade databases as they are opened (if necessary), but downgrading
319         from 3.0 to 2.2 is an unsupported path.
320         </para>
321
322         <para>
323         The new tdb files are described in <link linkend="tdbfiledesc"/>.
324         </para>
325
326
327         <table frame='all' id="tdbfiledesc"><title>TDB File Descriptions</title>
328         <tgroup cols='3'>
329                         <colspec align="left"/>
330                         <colspec align="justify" width="1*"/>
331                         <colspec align="left"/>
332                 <thead>
333                 <row>
334                         <entry align="left">Name</entry>
335                         <entry align="justify">Description</entry>
336                         <entry align="center">Backup?</entry>
337                 </row>
338                 </thead>
339                 <tbody>
340                 <row>
341                         <entry>account_policy</entry>
342                         <entry>User policy settings</entry>
343                         <entry>yes</entry>
344                 </row>
345                 <row>
346                         <entry>gencache</entry>
347                         <entry>Generic caching db</entry>
348                         <entry>no</entry>
349                 </row>
350                 <row>
351                         <entry>group_mapping</entry>
352                         <entry><para>Mapping table from Windows groups/SID to UNIX groups</para></entry>
353                         <entry>yes</entry>
354                 </row>
355                 <row>
356                         <entry>idmap</entry>
357                         <entry><para>new ID map table from SIDS to UNIX UIDs/GIDs</para></entry>
358                         <entry>yes</entry>
359                 </row>
360                 <row>
361                         <entry>namecache</entry>
362                         <entry>Name resolution cache entries</entry>
363                         <entry>no</entry>
364                 </row>
365                 <row>
366                         <entry>netlogon_unigrp</entry>
367                         <entry><para>Cache of universal group membership obtained when operating
368                                 as a member of a Windows domain</para></entry>
369                         <entry>no</entry>
370                 </row>
371                 <row>
372                         <entry>printing/*.tdb</entry>
373                         <entry><para>Cached output from `lpq command' created on a per print 
374                                 service basis</para></entry>
375                         <entry>no</entry>
376                 </row>
377                 <row>
378
379                         <entry>registry</entry>
380                         <entry><para>Read-only Samba registry skeleton that provides support for
381                                 exporting various db tables via the winreg RPCs</para></entry>
382                         <entry>no</entry>
383                 </row>
384                 </tbody>
385         </tgroup>
386         </table>
387
388         </sect2>
389
390         <sect2>
391         <title>Changes in Behavior</title>
392
393         <para>
394         The following issues are known changes in behavior between Samba-2.2 and
395         Samba-3 that may affect certain installations of Samba.
396         </para>
397
398         <orderedlist>
399                 <listitem><para>
400                 When operating as a member of a Windows domain, Samba-2.2 would
401                 map any users authenticated by the remote DC to the <quote>guest account</quote>
402                 if a uid could not be obtained via the getpwnam() call. Samba-3
403                 rejects the connection as <?latex \linebreak ?>NT_STATUS_LOGON_FAILURE. There is no
404                 current work around to re-establish the Samba-2.2 behavior.
405                 </para></listitem>
406
407                 <listitem><para>
408                 When adding machines to a Samba-2.2 controlled domain, the
409                 <quote>add user script</quote> was used to create the UNIX identity of the
410                 Machine Trust Account. Samba-3 introduces a new <quote>add machine
411                 script</quote> that must be specified for this purpose. Samba-3 will
412                 not fall back to using the <quote>add user script</quote> in the absence of
413                 an <quote>add machine script</quote>.
414                 </para></listitem>
415         </orderedlist>
416
417         </sect2>
418
419         <sect2>
420         <title>Charsets</title>
421
422         <para>
423         You might experience problems with special characters when communicating with old DOS
424         clients. Codepage support has changed in Samba-3. Read <link linkend="unicode"/>, for details.
425         </para>
426
427         </sect2>
428
429         <sect2>
430         <title>Passdb Backends and Authentication</title>
431
432         <para>
433         There have been a few new changes that Samba administrators should be
434         aware of when moving to Samba-3.
435         </para>
436
437         <orderedlist>
438                 <listitem><para>
439                 Encrypted passwords have been enabled by default in order to
440                 interoperate better with out-of-the-box Windows client
441                 installations. This does mean that either (a) a Samba account
442                 must be created for each user, or (b) <quote>encrypt passwords = no</quote>
443                 must be explicitly defined in &smb.conf;.
444                 </para></listitem>
445
446                 <listitem><para>
447                 Inclusion of new <smbconfoption><name>security</name><value>ads</value></smbconfoption> option for integration
448                 with an Active Directory domain using the native Windows Kerberos 5 and LDAP protocols.
449                 </para></listitem>
450         </orderedlist>
451
452         <para>
453         Samba-3 also includes the possibility of setting up chains
454         of authentication methods 
455         (<smbconfoption><name>auth methods</name></smbconfoption>) and account
456         storage backends 
457         (<smbconfoption><name>passdb backend</name></smbconfoption>). 
458         Please refer to the &smb.conf;
459         man page and <link linkend="passdb"/>, for details. While both parameters assume sane default
460         values, it is likely that you will need to understand what the
461         values actually mean in order to ensure Samba operates correctly.
462         </para>
463
464         <para>
465 <indexterm><primary>pdbedit</primary></indexterm>
466         Certain functions of the <command>smbpasswd</command> tool have been split between the
467         new <command>smbpasswd</command> utility, the <command>net</command> tool and the new <command>pdbedit</command>
468         utility. See the respective man pages for details.
469         </para>
470
471         </sect2>
472
473         <sect2>
474         <title>LDAP</title>
475
476         <para>
477         This section outlines the new features effecting Samba/LDAP integration.
478         </para>
479
480                 <sect3>
481                 <title>New Schema</title>
482
483                 <para>
484                 A new object class (sambaSamAccount) has been introduced to replace
485                 the old sambaAccount. This change aids us in the renaming of attributes
486                 to prevent clashes with attributes from other vendors. There is a
487                 conversion script (examples/LDAP/convertSambaAccount) to modify an LDIF
488                 file to the new schema.
489                 </para>
490
491                 <para>
492                 Example:
493                 </para>
494                 <para><screen>
495                 &prompt;ldapsearch .... -b "ou=people,dc=..." &gt; old.ldif
496                 &prompt;convertSambaAccount &lt;DOM SID&gt; old.ldif new.ldif
497                 </screen></para>
498
499                 <para>
500                 The &lt;DOM SID&gt; can be obtained by running 
501 <screen>
502 &prompt;<userinput>net getlocalsid &lt;DOMAINNAME&gt;</userinput>
503 </screen>
504                 on the Samba PDC as root.
505                 </para>
506
507                 <para>
508                 The old sambaAccount schema may still be used by specifying the
509                 <parameter>ldapsam_compat</parameter> passdb backend. However, the sambaAccount and
510                 associated attributes have been moved to the historical section of
511                 the schema file and must be uncommented before use if needed.
512                 The Samba-2.2 object class declaration for a sambaAccount has not changed
513                 in the Samba-3 samba.schema file.
514                 </para>
515
516                 <para>
517                 Other new object classes and their uses include:
518                 </para>
519
520                 <itemizedlist>
521                         <listitem><para>
522                         sambaDomain &smbmdash; domain information used to allocate RIDs
523                         for users and groups as necessary. The attributes are added
524                         in <quote>ldap suffix</quote> directory entry automatically if
525                         an idmap UID/GID range has been set and the <quote>ldapsam</quote>
526                         passdb backend has been selected.
527                         </para></listitem>
528
529                         <listitem><para>
530                         sambaGroupMapping &smbmdash; an object representing the
531                         relationship between a posixGroup and a Windows
532                         group/SID. These entries are stored in the <quote>ldap
533                         group suffix</quote> and managed by the <quote>net groupmap</quote> command.
534                         </para></listitem>
535
536                         <listitem><para>
537                         sambaUNIXIdPool &smbmdash; created in the <quote>ldap idmap suffix</quote> entry
538                         automatically and contains the next available <quote>idmap UID</quote> and
539                         <quote>idmap GID</quote>.
540                         </para></listitem>
541
542                         <listitem><para>
543                         sambaIdmapEntry &smbmdash; object storing a mapping between a
544                         SID and a UNIX UID/GID. These objects are created by the
545                         idmap_ldap module as needed.
546                         </para></listitem>
547                 </itemizedlist>
548
549                 </sect3>
550
551                 <sect3>
552                 <title>New Suffix for Searching</title>
553
554                 <para>
555                 The following new smb.conf parameters have been added to aid in directing
556                 certain LDAP queries when <parameter>passdb backend = ldapsam://...</parameter> has been
557                 specified.
558                 </para>
559
560                 <itemizedlist>
561                         <listitem><para>ldap suffix         &smbmdash; used to search for user and computer accounts.</para></listitem>
562                         <listitem><para>ldap user suffix    &smbmdash; used to store user accounts.</para></listitem>
563                         <listitem><para>ldap machine suffix &smbmdash; used to store Machine Trust Accounts.</para></listitem>
564                         <listitem><para>ldap group suffix   &smbmdash; location of posixGroup/sambaGroupMapping entries.</para></listitem>
565                         <listitem><para>ldap idmap suffix   &smbmdash; location of sambaIdmapEntry objects.</para></listitem>
566                 </itemizedlist>
567
568                 <para>
569                 If an <parameter>ldap suffix</parameter> is defined, it will be appended to all of the
570                 remaining sub-suffix parameters. In this case, the order of the suffix
571                 listings in smb.conf is important. Always place the <parameter>ldap suffix</parameter> first
572                 in the list.
573                 </para>
574
575                 <para>
576                 Due to a limitation in Samba's &smb.conf; parsing, you should not surround
577                 the DNs with quotation marks.
578                 </para>
579
580                 </sect3>
581
582                 <sect3>
583                 <title>IdMap LDAP Support</title>
584
585                 <para>
586                 Samba-3 supports an ldap backend for the idmap subsystem. The
587                 following options inform Samba that the idmap table should be
588                 stored on the directory server onterose in the "ou=idmap,dc=quenya,dc=org" partition.
589                 </para>
590
591                 <smbconfblock>
592                 <smbconfsection>[global]</smbconfsection>
593                 <member>...</member>
594                 <smbconfoption><name>idmap backend</name><value>ldap:ldap://onterose/</value></smbconfoption>
595                 <smbconfoption><name>ldap idmap suffix</name><value>ou=idmap,dc=quenya,dc=org</value></smbconfoption>
596                 <smbconfoption><name>idmap uid</name><value>40000-50000</value></smbconfoption>
597                 <smbconfoption><name>idmap gid</name><value>40000-50000</value></smbconfoption>
598                 </smbconfblock>
599
600                 <para>
601                 This configuration allows Winbind installations on multiple servers to
602                 share a UID/GID number space, thus avoiding the interoperability problems
603                 with NFS that were present in Samba-2.2.
604                 </para>
605
606                 </sect3>
607
608         </sect2>
609
610 </sect1>
611
612 </chapter>