Bug 916391 - Joining realm failed: The hostname must be fully-qualified:
Summary: Joining realm failed: The hostname must be fully-qualified:
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-28 00:25 UTC by Dean Hunter
Modified: 2023-07-10 23:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 15:15:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9380 0 None None None 2023-01-30 02:37:50 UTC

Description Dean Hunter 2013-02-28 00:25:49 UTC
Description of problem:
ipa-client-install discovers the fully qualified host name but does not seem to use it. Instead ipa-client-install requires that it be specified.


Version-Release number of selected component (if applicable):
Installed Packages
freeipa-client.x86_64                   3.1.2-1.fc18                    @updates


How reproducible:
Consistent


Actual results:
[root@client18 ~]#   ipa-client-install \
>     --enable-dns-updates \
>     --force-ntpd \
>     --password=adminpassword \
>     --principal=admin \
>     --realm=HUNTER.ORG \
>     --ssh-trust-dns \
>     --unattended
Discovery was successful!
Hostname: client18.hunter.org
Realm: HUNTER.ORG
DNS Domain: hunter.org
IPA Server: ipa.hunter.org
BaseDN: dc=hunter,dc=org

Synchronizing time with KDC...
Joining realm failed: The hostname must be fully-qualified: client18

Installation failed. Rolling back changes.
IPA client is not configured on this system.
[root@client18 ~]#

Comment 1 Dean Hunter 2013-02-28 00:31:33 UTC
Work-around:
[root@client18 ~]#   ipa-client-install \
>     --enable-dns-updates \
>     --force-ntpd \
>     --hostname=client18.hunter.org \
>     --password=adminpassword \
>     --principal=admin \
>     --realm=HUNTER.ORG \
>     --ssh-trust-dns \
>     --unattended
Discovery was successful!
Hostname: client18.hunter.org
Realm: HUNTER.ORG
DNS Domain: hunter.org
IPA Server: ipa.hunter.org
BaseDN: dc=hunter,dc=org

Synchronizing time with KDC...
Enrolled in IPA realm HUNTER.ORG
Created /etc/ipa/default.conf
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm HUNTER.ORG
trying https://ipa.hunter.org/ipa/xml
DNS server record set to: client18.hunter.org -> 192.168.1.101
Forwarding 'host_mod' to server u'https://ipa.hunter.org/ipa/xml'
SSSD enabled
Configured /etc/openldap/ldap.conf
NTP enabled
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config
Client configuration complete.
[root@client18 ~]#

Comment 2 Rob Crittenden 2013-02-28 02:01:03 UTC
See ticket https://fedorahosted.org/freeipa/ticket/3026

Your machine is not configured with a fully-qualified hostname. If this client needs to act as a server (including sshd) then some Kerberos and SSL operations will eventually fail, sometimes in non-obvious ways.

Passing --hostname is a workaround but it just masks the underlying problem. Many Kerberos applications expect gethostname() to return a FQDN. This may not be particularly important for a machine that purely acts as a client which is one reason why the --hostname option exists. Just be aware of the limitations.

Comment 3 Dean Hunter 2013-03-12 15:15:23 UTC
I found that Anaconda/Kickstart was not configuring the host name as I expected. The anaconda-ks.cfg created when manually configuring a new build uses syntax that causes error messages when used to automate the build:

network  --bootproto=dhcp --device=em1 --noipv6 --activate
network  --bootproto=dhcp --hostname=client18.hunter.org

I am still not sure of the correct syntax, but I have started configuring the hostname with hostnamectl from a script after the first boot and before ipa-client-install:

[root@client18 ~]# hostnamectl set-hostname client18.hunter.org --static
[root@client18 ~]# hostnamectl set-hostname "Client 18"         --pretty
[root@client18 ~]# hostnamectl
   Static hostname: client18.hunter.org
   Pretty hostname: Client 18
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: 69d27b356a94476da859461d3a3bc6fd
           Boot ID: 6de4efaf7efc44d88dedaa305bc9e7da
  Operating System: Fedora 18 (Spherical Cow)
       CPE OS Name: cpe:/o:fedoraproject:fedora:18
            Kernel: Linux 3.8.2-206.fc18.x86_64
      Architecture: x86_64
[root@client18 ~]#

Comment 4 John Montes 2014-02-12 23:44:45 UTC
I'm having the same issue on a client system with RedHat 6.4 that is trying to join an IDM domain, but the interesting thing is that if I do the following:

$ hostname   --->  myhost
$ hostname -A  -->   myhost.mydomain.xx
Hostname can retrieve the FQDN

Additionally, my /etc/sysconfig/network has 
HOSTNAME=myhost.mydomain.xx

I can manually try the work-around, but it sure would be nice to have this enhanced just a tad :-)

Comment 5 Alexander Bokovoy 2014-02-13 06:49:10 UTC
(In reply to John Montes from comment #4)
> I'm having the same issue on a client system with RedHat 6.4 that is trying
> to join an IDM domain, but the interesting thing is that if I do the
> following:
> 
> $ hostname   --->  myhost
> $ hostname -A  -->   myhost.mydomain.xx
> Hostname can retrieve the FQDN
> 
> Additionally, my /etc/sysconfig/network has 
> HOSTNAME=myhost.mydomain.xx
> 
> I can manually try the work-around, but it sure would be nice to have this
> enhanced just a tad :-)
Your 'hostname' output should be myhost.mydomain.xx, not 'myhost'. This is basic requirement for Kerberos use in IDM since we create all Kerberos service principals using FQDN and there are no aliases with short names for them, for obvious reasons (IDM allows hosts from different domains to be enrolled, so ipa-1.domain1.coma nd ipa-1.domain2.com can be enrolled at the same time).


Note You need to log in before you can comment on or make changes to this bug.