Samba Net Ads Join “Cannot Find KDC” Error Fixed

When I set up Samba 3.5.4 on a Centos 5 server, I ran into a problem. I got this error whenever I tried to use the net ads join command:

Cannot find KDC for requested realm

I first tried to use -I flag to manually specify the KDC , but it did not work. I then realized that I did not have the realm defined in the /etc/krb5.conf file. So, I added this to the file and all went well except for the DNS error.

MYCOMPANY.COM = {
kdc = pdc.mycompany.com:88
admin_server = pdc.mycompany.com:749
default_domain = mycompany.com
}

I will post again about the DNS update error.