If you weren’t able to succeed in integrating Active Directory into Linux, don’t worry. This article will show you how to test the Kerberos authentication and join the Active Directory domain manually so you can identify the problem.
Launch the terminal window and type in the highlighted items below.
Test the Kerberos authentication
Kerberos is an authentication mechanism used by Active Directory to verify user or host identity. We will use kinit, an executable used to obtain Kerberos access granting ticket, to test the Kerberos authentication mechanism.
[root@mail ~]# kinit bugsbunny
Change bugsbunny to any Active Directory user account.
If it replies
- Cannot resolve network address for KDC in requested realm while getting initial credentials
DNS problem, check the DNS or use ip addresses in the Domain Controllers field of the Winbind Settings.
- Cannot find KDC for requested realm while getting initial credentials
Check the spelling of your Active Directory realm and check the spelling in Winbind Settings. Capitalization is important.
- Client not found in Kerberos database while getting initial credentials
Check the user name you used if it exists in Active Directory.
- Cannot contact any KDC for requested realm while getting initial credentials
Check if the domain controller you specified in Winbind Settings is indeed working is not firewalled.
See Winbind Setting for RHEL/CentOS 5
See Winbind Setting for RHEL/CentOS 4
Password for bugsbunny@ACME.LOCAL: type in the password here
If it replies
- Preauthentication failed while getting initial credentials
It means the password is wrong.
- Password has expired while getting initial credentials
The password is no longer valid and needs to be changed.
- Clock skew too great while getting initial credentials
Synchronize your clocks using NTP. For a quick and temporary fix, use net time set to synchronize time with the domain controller.
To permanently fix the problem, both the Active Directory server and the Linux server should synchronize their time with an NTP server. See how to synchronize system clock in Linux. For Windows, use the command
net time /setsntp:"0.pool.ntp.org 1.pool.ntp.org"
Replace “0.pool.ntp.org …” with your preferred NTP server.
- KDC reply did not match expectations while getting initial credentials
Make sure the realm is correct and capitalized in /etc/krb5.conf. If the realm is ACME.LOCAL, this error will appear if ACME, acme, acme.local is used as the realm.
Join the Active Directory Domain
[root@mail ~]# net ads join -U administrator
Replace administrator with any user name having Domain Admin rights. Specify your password when asked. You should be able to join the Active Directory domain now.
Restart winbind
After successfully joining, you need to restart winbind using the command below.
[root@mail ~]# service winbind restart
Visit the forum to ask for help or to give a comment.
***
Posted on 4/25/2007 and last updated on 4/23/2011
Filed under Active Directory , Kerberos , Samba
May 6th, 2008 at 4:34 pm
Hi. I’m running opensuse 10.3 and samba-3.0.26a-3.5. I’m trying to make Windbind and Active Directory work together.When I run smb -b |grep LDAP I don’t get HAVE_LDAP_DOMAIN2HOSTLIST
host:/etc/samba # smbd -b | grep LDAP
HAVE_LDAP_H
HAVE_LDAP
HAVE_LDAP_ADD_RESULT_ENTRY
HAVE_LDAP_INIT
HAVE_LDAP_INITIALIZE
HAVE_LDAP_SET_REBIND_PROC
HAVE_LIBLDAP
LDAP_SET_REBIND_PROC_ARGS
Should I necessarily have it listed?.
However trying:
host:/etc/samba # kinit -V admin@PRUEBA
Password for admin@PRUEBA:
Authenticated to Kerberos v5
host:/etc/samba # net ads join -U admin
admin’s password:
Using short domain name — MAIN
Joined ‘HOST’ to realm ‘PRUEBA’
host:/etc/samba # net ads testjoin
Join is OK
When I run wbinfo -u
host:/etc/samba # wbinfo -u
Error looking up domain users
And I see the message in the log file and when I run
2008/05/02 13:32:30, 1] libads/cldap.c:recv_cldap_netlogon(247) Failed to parse cldap reply
It seems it’s working, but I just keep getting those errors in the log files and of course it won’t work. Can anybody help me?
Thank you in advance.
May 28th, 2009 at 5:35 pm
I get these two errors when joining the domain, and doing a getent passwd doesn’t list the AD password/accounts on CENTOS 5 machine.
Using short domain name — XXDOMAIN
DNS update failed!
July 10th, 2009 at 12:44 am
It seems to me that everything is going smoothly. Kerberos auth works fine, I see the entries using getent, I can su to a domain user account and it creates the home directories, I get everything fine back from wbinfo.
The problem is, on the login screen, it won’t recognize the domain user accounts. /var/log/secure says that pam can’t locate the user info. /etc/pam.d/login points to system-auth, which has all the right krb entries. Any advice?