I have joined an Ubuntu 14.04 machine to domain using samba 4 but auth is not working. Look what I get:
# net ads keytab create -U 'admin'
Enter admin's password:
ads_get_dnshostname: No dNSHostName attribute!
../source3/libads/kerberos_keytab.c:328: unable to determine machine account's dns name in AD!
Testing if my FQDN is correct I get:
# hostname -d
dom.forest.int
# domainname
(none)
Why does domainname has different behavior than hostname -d? Could this be the problem with Samba?
This is my configuration:
# grep MYPCNAME /etc/hosts
127.0.1.1 MYPCNAME.dom.forest.int MYPCNAME
and this:
# cat /etc/hostname
MYPCNAME
Is my configuration correct? How can I troubleshoot this further?