When you want to join a domain served by a samba 3 domain controller using Windows 7, you probably will get some errors. To achieve this you must turn on some compatibility options in the Windows register.
1. Run regedit
2. Go to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters
3. Create (or modify) this parameters: "DNSNameResolutionRequired" = DWORD(0) and "DomainCompatibilityMode" = DWORD(1)
4. Join the domain.