This blog simply records all I've learned for IT knowledge.

Wednesday, July 16, 2008

Joining linux in windows domain

1. You need to make sure kerberos is installed:
#rpm -qa | grep krb
this should return at least 3 packages: krb5-devel, krb5-libs, and krb5-workstation

2. Make sure ldap development libs are installed:
#rpm -qa | grep ldap-devel

3. Make sure there is an entry of AD DC in /etc/hosts:
10.11.100.100 RSP1.RSPGUAM-DOMAIN.TEST RSP1

4. Edit /etc/krb5.conf based on your AD DC information. After you've modified the file, try:
#/usr/kerberos/bin/kinit Administrator@RSPGUAM-DOMAIN.TEST

If this works, you need to enter the correct password for Administrator. Otherwise, you will get the error message "kinit(v5): Preauthentication failed while getting initial credentials". If not you need double check /etc/resolv.conf and make sure the DNS server has been added.

5. Edit /etc/samba/smb.conf

workgroup = RSPGUAM-DOMAIN
realm = RSPGUAM-DOMAIN
security = ADS

6. Restart samba by "/etc/init.d/smb restart"

7. Run "net ads join -U Administrator@RSPGUAM-DOMAIN.TEST", and input the password for it.

8. Check if the computer has been added in the AD server.

No comments: