3. Install the RID Backend

If you recall from my last article, Winbind by default maps Windows accounts to Unix accounts differently for each Active Directory workstation. Since exporting home directories via NFS demands that UIDs be consistent, we need to change the way Winbind performs its mappings.

One of the directives which may be configured in /etc/samba/smb.conf is idmap backend. By default, this backend is a local file called winbindd_idmap.tdb located in /var/lib/samba/. The problem with this backend is that Winbind generates its ID mappings in an inconsistent way. We need to change our idmap backend to something which will provide consistent mappings.

The backend module that we will be using is the RID backend. This module provides an algorithm which keeps mappings consistent on all workstations.

If you have a Debian package for Samba 3.0.22, then this backend is already installed and ready for use. For Samba 3.0.14a, however, you will need to build and install the module yourself.

If sudo smbd -V reports that you have version 3.0.22, then you may skip the rest of this section. Otherwise, download and unpack the source code for Samba 3.0.14a, copy this shell script to the source directory, and run the script from that directory with sudo sh build-rid.sh. The script installs compilation prerequisites, builds the RID module, and copies the module to the appropriate location in the system. Do this on both the server and the client.