8.3. Updating a Samba-3 InstallationThe key concern in this section is to deal with the changes that have been affected in Samba- 3 between the Samba-3.0.0 release and the current update. Network administrators have expressed concerns over the steps that should be taken to update Samba-3 versions. The information in Section 8.1.1.4 would not be necessary if every person who has ever produced Samba executable (binary) files could agree on the preferred location of the smb.conf file and other Samba control files. Clearly, such agreement is further away than a pipedream. Vendors and packagers who produce Samba binary installable packages do not, as a rule, use the default paths used by the Samba-Team for the location of the binary files, the smb.conf file, and the Samba control files (tdb's as well as files such as secrets.tdb). This means that the network or UNIX administrator who sets out to build the Samba executable files from the Samba tarball must take particular care. Failure to take care will result in both the original vendor's version of Samba remaining installed and the new version being installed in the default location used by the Samba-Team. This can lead to confusion and to much lost time as the uninformed administrator deals with apparent failure of the update to take effect. The best advice for those lacking in code compilation experience is to use only vendor (or Samba-Team) provided binary packages. The Samba packages that are provided by the Samba-Team are generally built to use file paths that are compatible with the original OS vendor's practices. If you are not sure whether a binary package complies with the OS vendor's practices, it is better to ask the package maintainer via email than to waste much time dealing with the nuances. Alternately, just diagnose the paths specified by the binary files following the procedure outlined above. 8.3.1. Samba-3 to Samba-3 Updates on the Same ServerThe guidance in this section deals with updates to an existing Samba-3 server installation. 8.3.1.1 Updating from Samba Versions Earlier than 3.0.5With the provision that the binary Samba-3 package has been built with the same path and feature settings as the existing Samba-3 package that is being updated, an update of Samba-3 versions 3.0.0 through 3.0.4 can be updated to 3.0.5 without loss of functionality and without need to change either the smb.conf file or, where used, the LDAP schema. 8.3.1.2 Updating from Samba Versions between 3.0.6 and 3.0.10When updating versions of Samba-3 prior to 3.0.6 to 3.0.6 through 3.0.10, it is necessary only to update the LDAP schema (where LDAP is used). Always use the LDAP schema file that is shipped with the latest Samba-3 update. Samba-3.0.6 introduced the ability to remember the last n number of passwords a user has used. This information will work only with the TDbsam and ldapsam passdb backend facilities. After updating the LDAP schema, do not forget to re-index the LDAP database. 8.3.1.3 Updating from Samba Versions after 3.0.6 to a Current ReleaseSamba-3.0.8 introduced changes in how the username map behaves. It also included a change in behavior of winbindd. Please refer to the man page for smb.conf before implementing any update from versions prior to 3.0.8 to a current version. In Samba-3.0.11 a new privileges interface was implemented. Please refer to Section 5.3.1.1 for information regarding this new feature. It is not necessary to implement the privileges interface, but it is one that has been requested for several years and thus may be of interest at your site. In Samba-3.0.11 there were some functional changes to the ldap user suffix and to the ldap machine suffix behaviors. The following information has been extracted from the WHATSNEW.txt file from this release: ============ LDAP Changes ============ If "ldap user suffix" or "ldap machine suffix" are defined in smb.conf, all user-accounts must reside below the user suffix, and all machine and inter-domain trust-accounts must be located below the machine suffix. Previous Samba releases would fall back to searching the 'ldap suffix' in some cases. 8.3.2. Migrating Samba-3 to a New ServerThe two most likely candidates for replacement of a server are domain member servers and domain controllers. Each needs to be handled slightly differently. 8.3.2.1 Replacing a Domain Member ServerReplacement of a domain member server should be done using the same procedure as outlined in Chapter 7, "Adding Domain Member Servers and Clients" Usually the new server will be introduced with a temporary name. After the old server data has been migrated to the new server, it is customary that the new server be renamed to that of the old server. This will change its SID and will necessitate rejoining to the domain. Following a change of hostname (NetBIOS name) it is a good idea on all servers to shut down the Samba smbd, nmbd, and winbindd services, delete the wins.dat and browse.dat files, then restart Samba. This will ensure that the old name and IP address information is no longer able to interfere with name to IP address resolution. If this is not done, there can be temporary name resolution problems. These problems usually clear within 45 minutes of a name change, but can persist for a longer period of time. If the old domain member server had local accounts, it is necessary to create on the new domain member server the same accounts with the same UID and GID for each account. Where the passdb backend database is stored in the smbpasswd or in the tdbsam format, the user and group account information for UNIX accounts that match the Samba accounts will reside in the system /etc/passwd, /etc/shadow, and /etc/group files. In this case, be sure to copy these account entries to the new target server. Where the user accounts for both UNIX and Samba are stored in LDAP, the new target server must be configured to use the nss_ldap tool set. This will automatically ensure that the appropriate user entities are available on the new server. 8.3.2.2 Replacing a Domain ControllerIn the past, people who replaced a Windows NT4 domain controller typically installed a new server, created printers and file shares on it, then migrate across all data that was destined to reside on it. The same can of course be done with Samba. From recent mailing list postings it would seem that some administrators have the intent to just replace the old Samba server with a new one with the same name as the old one. In this case, simply follow the same process as for upgrading a Samba 2.x system and do the following:
When replacing a Samba domain controller (PDC or BDC) that uses LDAP, the new server need simply be configured to use the LDAP directory, and for the rest it should just work. The domain SID is obtained from the LDAP directory as part of the first connect to the LDAP directory server. All Samba servers, other than one that uses LDAP, depend on the tdb files, and particularly on the secrets.tdb file. So long as the tdb files are all in place, the smb.conf file is preserved, and either the hostname is identical or the netbios name is set to the original server name, Samba should correctly pick up the original SID and preserve all other settings. It is sound advice to validate this before turning the system over to users. 8.3.3. Migration of Samba Accounts to Active DirectoryYes, it works. The Windows ADMT tool can be used to migrate Samba accounts to MS Active Directory. There are a few pitfalls to be aware of: MIGRATION TO ACTIVE DIRECTORY
There are some significant benefits of using the ADMT, besides just migrating user accounts. ADMT can be found on the Windows 2003 CD.
|