I have been at this for a week now, and i would really appreciate any help.I'm setting up both kerberos and openldap on the same ubuntu VM for testing purposes.I was following the configuration for kerberos-ldap (https://help.ubuntu.com/11.04/serverguide/C/kerberos-ldap.html) when I got this error:
sudo kdb5_ldap_util -D cn=admin,dc=example,dc=com create -subtrees dc=example,dc=com -r EXAMPLE.COM -s -H ldap://ldap.example.com
<......entered password for cn=admin and new KDC database.....>
kdb5_ldap_util: Hostname cannot be canonicalized krb5_sname_to_principal, while adding entries to the database

I think its something to do with the /etc/hosts file, but I'm not sure.Here are my configurations:
----------------------kdc.conf----------------------[kdcdefaults] kdc_ports = 88 acl_file = /usr/local/var/krb5kdc/kadm5.acl admin_keytab = /usr/local/var/krb5kdc/kadm5.keytab dict_file = /usr/local/var/krb5kdc/kadm5.dict