Normally this works as follows:
1. You add the NetBIOS name of your Samba server to the computers in your Active directory. Let's assume the name of your Active Directory domain is YOURDOMAIN.COM, the NetBIOS name of your Samba Server is YOURSAMBA and the NetBIOS name of your Active Directory Server is YOURADSERVER.
If YOURSAMBA is already member of YOURDOMAIN.COM, delete the computer account, first, then reenter it.
2. You need to type in the following command as root:
smbpasswd –j YOURDOMAIN.COM –r YOURADSERVER –D -3
Now you should get the reply "You successfully joined the domain YOURDOMAIN.COM.
3. If this command does not succeed the following can be tried:
smbpasswd –j GLS-HOLDING –r NLGLS001S005 –Uadministrator%passwort
(you need to replace the string password by the administrator password of the domain YOURDOMAIN.COM.)
Success!