1 <chapter id="upgrading-to-3.0">
6 <pubdate>June 30, 2003</pubdate>
9 <title>Upgrading from Samba-2.x to Samba-3.0.0</title>
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.
18 <title>Quick Migration Guide</title>
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.
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.
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"/>.
48 <title>New Features in Samba-3</title>
51 The major new features are:
54 <orderedlist numberation="arabic">
56 Active Directory support. This release is able to join an ADS realm
57 as a member server and authenticate users using LDAP/kerberos.
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.
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.
73 New filename mangling system. The filename mangling system has been
74 completely rewritten. An internal database now stores mangling maps
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>.
86 Samba now negotiates NT-style status32 codes on the wire. This
87 considerably improves error handling.
91 Better Windows 200x/XP printing support including publishing
92 printer attributes in Active Directory.
96 New loadable RPC modules for passdb backends and character sets.
100 New default dual-daemon winbindd support for better performance.
104 Support for migrating from a Windows NT 4.0 domain to a Samba
105 domain and maintaining user, group and domain SIDs.
109 Support for establishing trust relationships with Windows NT 4.0
114 Initial support for a distributed Winbind architecture using
115 an LDAP directory for storing SID to UID/GID mappings.
119 Major updates to the Samba documentation tree.
123 Full support for client and server SMB signing to ensure
124 compatibility with default Windows 2003 security settings.
129 Plus lots of other improvements!
135 <title>Configuration Parameter Changes</title>
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.
144 <title>Removed Parameters</title>
146 <para>(Ordered Alphabetically):</para>
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>
174 <title>New Parameters</title>
176 <para>(New parameters have been grouped by function):</para>
178 <para>Remote Management</para>
181 <listitem><para>abort shutdown script </para></listitem>
182 <listitem><para>shutdown script </para></listitem>
185 <para>User and Group Account Management:</para>
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>
198 <para>Authentication:</para>
201 <listitem><para>auth methods </para></listitem>
202 <listitem><para>realm </para></listitem>
205 <para>Protocol Options:</para>
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>
222 <para>File Service:</para>
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>
238 <para>Printing:</para>
241 <listitem><para>max reported print jobs </para></listitem>
245 <para>Unicode and Character Sets:</para>
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>
254 <para>SID to UID/GID Mappings:</para>
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>
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>
278 <para>General Configuration:</para>
281 <listitem><para>preload modules </para></listitem>
282 <listitem><para>privatedir </para></listitem>
288 <title>Modified Parameters (Changes in Behavior):</title>
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>
309 <title>New Functionality</title>
312 <title>Databases</title>
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.
323 The new tdb files are described in <link linkend="tdbfiledesc"/>.
327 <table frame='all' id="tdbfiledesc"><title>TDB File Descriptions</title>
329 <colspec align="left"/>
330 <colspec align="justify" width="1*"/>
331 <colspec align="left"/>
334 <entry align="left">Name</entry>
335 <entry align="justify">Description</entry>
336 <entry align="center">Backup?</entry>
341 <entry>account_policy</entry>
342 <entry>User policy settings</entry>
346 <entry>gencache</entry>
347 <entry>Generic caching db</entry>
351 <entry>group_mapping</entry>
352 <entry><para>Mapping table from Windows groups/SID to UNIX groups</para></entry>
357 <entry><para>new ID map table from SIDS to UNIX UIDs/GIDs</para></entry>
361 <entry>namecache</entry>
362 <entry>Name resolution cache entries</entry>
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>
372 <entry>printing/*.tdb</entry>
373 <entry><para>Cached output from `lpq command' created on a per print
374 service basis</para></entry>
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>
391 <title>Changes in Behavior</title>
394 The following issues are known changes in behavior between Samba-2.2 and
395 Samba-3 that may affect certain installations of Samba.
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.
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>.
420 <title>Charsets</title>
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.
430 <title>Passdb Backends and Authentication</title>
433 There have been a few new changes that Samba administrators should be
434 aware of when moving to Samba-3.
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;.
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.
453 Samba-3 also includes the possibility of setting up chains
454 of authentication methods
455 (<smbconfoption><name>auth methods</name></smbconfoption>) and account
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.
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.
477 This section outlines the new features effecting Samba/LDAP integration.
481 <title>New Schema</title>
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.
495 &prompt;ldapsearch .... -b "ou=people,dc=..." > old.ldif
496 &prompt;convertSambaAccount <DOM SID> old.ldif new.ldif
500 The <DOM SID> can be obtained by running
502 &prompt;<userinput>net getlocalsid <DOMAINNAME></userinput>
504 on the Samba PDC as root.
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.
517 Other new object classes and their uses include:
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.
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.
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>.
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.
552 <title>New Suffix for Searching</title>
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
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>
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
576 Due to a limitation in Samba's &smb.conf; parsing, you should not surround
577 the DNs with quotation marks.
583 <title>IdMap LDAP Support</title>
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.
592 <smbconfsection>[global]</smbconfsection>
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>
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.