Join Samba 3 to Your Active Directory Domain - Page 3
Enabling Windbind
Debian users may need to install the winbind package separately. RPM users will find it in the samba-common RPM. First, edit /etc/nsswitch.conf. The first three lines are the most important; the others vary according to your system:
| passwd: | compat winbind |
| group: | compat winbind |
| shadow: | compat |
| hosts: | files dns wins |
| networks: | files dns |
| protocols: | db files |
| services: | db files |
| ethers: | db files |
| rpc: | db files |
Save your changes, and fire up windbind and Samba:
# /etc/init.d/samba start
Now verify that windbind is working. These commands pull lists of users and groups from the AD domain controller:
# wbinfo -u
BIGSERVER+Administrator
BIGSERVER+Guest
BIGSERVER+cschroder
BIGSERVER+mhall
# wbinfo -g
BIGSERVER+Domain Computers
BIGSERVER+Domain Admins
BIGSERVER+Domain Guests
BIGSERVER+Domain Users
This command verifies that logins and passwords are coming from the AD server, and not the local machine:
# getent passwd
BIGSERVER+cschroder:x:1000:1000:,,,:/home/BIGSERVER/cschroder:/bin/bash
If winbind is not working and local authentication is still active, they will not have the BIGSERVER+ prefix. Finally, as root run net ads info to display the AD server information.
Troubleshooting
If you've gotten this far and everything works, your Samba server is now a fully-fledged member of your Active Directory domain, and can be managed like any other AD object. A nice bonus is you may have local Linux accounts on the Samba box that are not visible in Active Directory; which means your Samba admins can SSH directly into the Samba server for admin chores, and not have to fuss with AD roadblocks.
A good troubleshooting guide is chapter 9 of "Samba-3 by Example" (Adding UNIX/LINUX Servers and Clients). Also refer to chapter 12 (Identity Mapping) of "The Official Samba-3 HOWTO and Reference Guide" to learn about winbind in greater depth.
Resources
-
Many good Samba books and howtos here.
-
Network Installation of Windows Printers from Samba tells how to automatically install Windows printers from Samba.
- Chapter 23 of the Linux Cookbook covers Samba basics in depth, including printing and file sharing, and connecting from both Windows and Linux clients.



