Section 8.3. Updating a Samba-3 Installation


8.3. Updating a Samba-3 Installation

The 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 Server

The 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.5

With 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.10

When 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 Release

Samba-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 Server

The 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 Server

Replacement 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 Controller

In 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:

  • Where UNIX (POSIX) user and group accounts are stored in the system /etc/passwd, /etc/shadow, and /etc/group files, be sure to add the same accounts with identical UID and GID values for each user.

    Where LDAP is used, if the new system is intended to be the LDAP server, migrate it across by configuring the LDAP server (/etc/openldap/slapd.conf). The directory can be populated either initially by setting this LDAP server up as a slave or by dumping the data from the old LDAP server using the slapcat command and then reloading the same data into the new LDAP server using the slapadd command. Do not forget to install and configure the nss_ldap tool and the /etc/nsswitch.conf (as shown in Chapter 5, "Making Happy Users").

  • Copy the smb.conf file from the old server to the new server into the correct location as indicated previously in this chapter.

  • Copy the secrets.tdb file, the smbpasswd file (if it is used), the /etc/samba/passdb.tdb file (only used by the TDbsam backend), and all the tdb control files from the old system to the correct location on the new system.

  • Before starting the Samba daemons, verify that the hostname of the new server is identical to that of the old one. Note: The IP address can be different from that of the old server.

  • Copy all files from the old server to the new server, taking precaution to preserve all file ownership and permissions as well as any POSIX ACLs that may have been created on the old server.

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 Directory

Yes, 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

1.

Administrator password must be THE SAME on the Samba server, the 2003 ADS, and the local Administrator account on the workstations. Perhaps this goes without saying, but there needs to be an account called Administrator in your Samba domain, with full administrative (root) rights to that domain.

2.

In the Advanced/DNS section of the TCP/IP settings on your Windows workstations, make sure the DNS suffix for this connection field is blank.

3.

Because you are migrating from Samba, user passwords cannot be migrated. You'll have to reset everyone's passwords. (If you were migrating from NT4 to ADS, you could migrate passwords as well.) To date this has not been attempted with roaming profile support; it has been documented as working with local profiles.

4.

Disable the Windows Firewall on all workstations. Otherwise, workstations won't be migrated to the new domain.

5.

When migrating machines, always test first (using ADMT's test mode) and satisfy all errors before committing the migration. Note that the test will always fail, because the machine will not have been actually migrated. You'll need to interpret the errors to know whether the failure was due to a problem or simply to the fact that it was just a test.

There are some significant benefits of using the ADMT, besides just migrating user accounts. ADMT can be found on the Windows 2003 CD.

  • You can migrate workstations remotely. You can specify that SIDs be simply added instead of replaced, giving you the option of joining a workstation back to the old domain if something goes awry. The workstations will be joined to the new domain.

  • Not only are user accounts migrated from the old domain to the new domain, but ACLs on the workstations are migrated as well. Like SIDs, ACLs can be added instead of replaced.

  • Locally stored user profiles on workstations are migrated as well, presenting almost no disruption to the user. Saved passwords will be lost, just as when you administratively reset the password in Windows ADS.

  • The ADMT lets you test all operations before actually performing the migration. Accounts and workstations can be migrated individually or in batches. User accounts can be safely migrated all at once (since no changes are made on the original domain). It is recommended to migrate only one or two workstations as a test before committing them all.



    Samba-3 by Example. Practical Exercises to Successful Deployment
    Samba-3 by Example: Practical Exercises to Successful Deployment (2nd Edition)
    ISBN: 013188221X
    EAN: 2147483647
    Year: 2005
    Pages: 142

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net