#9111 Server host name not saved by the script ?
Closed: fixed 2 years ago by frenaud. Opened 2 years ago by laurentdelacre.

Request for enhancement

As admin , I want to configure a freeipa server on my fedora 35 server.

Issue

When I want to install freeipa, the script complains about a non fully-qualified hostname altough i'm giving it:

[root@fedora ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.2.2 dc.ccm.indl.be dc
192.168.2.1 gw.ccm.indl.be gw
[root@fedora ~]# ipa-server-install

The log file for this installation can be found in /var/log/ipaserver-install.log

This program will set up the IPA Server.
Version 4.9.8

This includes:
* Configure a stand-alone CA (dogtag) for certificate management
* Configure the NTP client (chronyd)
* Create and configure an instance of Directory Server
* Create and configure a Kerberos Key Distribution Center (KDC)
* Configure Apache (httpd)
* Configure SID generation
* Configure the KDC to enable PKINIT

To accept the default shown in brackets, press the Enter key.

Do you want to configure integrated DNS (BIND)? [no]:

Enter the fully qualified domain name of the computer
on which you're setting up server software. Using the form
<hostname>.<domainname>
Example: master.example.com.

Server host name [fedora]: dc.ccm.indl.be.

Invalid hostname 'fedora', must be fully-qualified.
The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information
[root@fedora ~]#

Strange... why does it still use "fedora" and not "dc.ccm.indl.be" ???


Looks like a bug.

Workaround is to pass in the hostname on the command-line:

ipa-server-install --hostname dc.ccm.indl.be

Looks like the bug was introduced in 9094dfc in 2020.

The problem is that the value is read into the variable host_name but the variable passed into verify_fqdn is host_default which is either the --hostname value or the FQDN of the current system. So it isn't verifying the value read in.

Metadata Update from @rcritten:
- Issue assigned to rcritten

2 years ago

master:

  • 8b517e6 Verify the user-provided hostname in the server installer
  • b445cff Strip off trailing period of a user-provided FQDN in installer

ipa-4-9:

  • 7ac8e96 Verify the user-provided hostname in the server installer
  • 57de18e Strip off trailing period of a user-provided FQDN in installer

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata