Before proceeding further, be aware that modifying how Linux deals with accounts can be dangerous. A mistake can make it impossible to log in, even as root! When changing Linux accounts, it’s best to leave a root login running at all times on a virtual terminal or from a remote system. Moreover, always save a copy of each system configuration file before making any changes. That way, you can undo any mistakes you might make.
What Does Winbind Do?
Linux authentication is a multi-layered thing. Two components are particularly important:
*The Pluggable Authentication Modules (PAM) system is a way to modularize password verification, account setup, and similar features. Using PAM, programs that need to authenticate users (such as the login tool) call PAM rather than checking /etc/passwd themselves. With PAM acting as a layer of abstraction, you can reconfigure PAM to use a new authentication tool (such as an NT domain controller rather than /etc/passwd and /etc/shadow) without modifying any user programs.
*The Name Service Switch (NSS) system verifies the existence of an account (among other things). By telling NSS to use an NT domain controller, you won’t need to maintain non-password account information in /etc/passwd. If NSS doesn’t know about the NT domain controller, PAM could still use the domain controller for authentication, but you’d still need valid account data in /etc/passwd, even if you didn’t store passwords locally.
Winbind is a set of libraries that works with PAM and NSS to link the Linux authentication system to an NT domain controller (be it a Windows NT system, a Windows Active Directory controller, or a Samba server configured to function as a domain controller.) To make Winbind work, you must install Winbind, join the domain, and then configure both PAM and NSS.
Installing Winbind is usually straightforward, as it’s typically installed as part of the main Samba package. Look for the file pam_winbind.so in /lib/security/ or /usr/lib/security/, as well as /lib/libnss_winbind.so and /usr/sbin/winbindd. If any of these files aren’t present, peruse your distribution’s Samba packages. Or, if you installed Samba from source code, you must use the ––with-pam configure option. Then, after building or rebuilding Samba, check the source/nsswitch/ subdirectory of the Samba source tree and copy the files to appropriate locations. Sometimes, /lib/libnss_windbind.so is a symbolic link to /lib/libnss_winbind.so.2. If both files aren’t present, create a symbolic link.
Joining a Domain
Once you’ve confirmed that all the necessary files are present, you can configure your system to use Winbind. This task begins with making some changes to smb.conf (usually located in /etc/samba/). Listing One shows typical options for Winbind, all of which appear in the [global] section of the file.
No comments yet.