0

I've been asked to join linux hosts in my company to freeIPA. But the problem is that I'm not allowed to change hostnames. So I should leave hosts NetBios names intact.

I am wondering if there is any idea to implement such a thing (like alias name for hostname or something)?

2 Answers 2

1

You should be able to do this by using the appropriate ipa-client-install commands. By default, IPA takes the domain name of your hostname (so for hostname.example.com, it takes example.com and searches for SRV records. If you specify --domain, it uses the domain specified.

From man ipa-client-install:

--domain=DOMAIN
The primary DNS domain of an existing IPA deployment, e.g. example.com. This DNS domain should contain the SRV records generated by the IPA server installer. Usually the name is a lower-cased name of an IPA Kerberos realm name.

If this doesn't work, let me know. I am unable to test at the moment but can look at the configurations to help find out how to do it.

1
  • I've tried it with --domain and specified a --hostname for it but after installation it changes the hostname to an FQDN ... Commented Jun 16, 2022 at 14:06
1

Echoing cutrightjm's answer, here is the ipa-client-install command I used to join Ubuntu linux hosts to a FreeIPA cluster (of CentOS 7.6 machines), where the client hostnames existed and were different from the realm/domain name used by the FreeIPA servers:

ipa-client-install --unattended --no-ntp \
  --principal=ipa-principal-name --password=ipa-principal-pass \
  --domain=ipa.domain.name \
  --server=fqdn.of.an.ipa.server

This worked when the client already had its short hostname and "full" hostname (FQDN) set up in its kernel and was resolvable in the LAN's DNS servers. FreeIPA was only used for authenticating user access via ssh and controlling access to cron and sudo on the client machines, not service discovery or DNS resolving or NTP.

Without the --hostname option, the ipa-client-install command (a Python script) does not try to set the client machine's hostname. It makes Python calls to learn the client's FQDN and passes it to the FreeIPA servers during registration. For Ubuntu, it found the correct FQDN as long as the local host config would return the right hostnames from hostname -s and hostname -f, and both the client machine and the FreeIPA servers were able to resolve forward lookups of the client's FQDN in DNS. After the command was done, the hostname on the client was not changed, and the FreeIPA servers knew the client by its FQDN, not its "short" hostname.

Both the local kernel config and the DNS records needed to be set up before invoking ipa-client-install.

Again, this is an echo of cutrightjm's answer to include the --domain and exclude the --hostname option in your ipa-client-install command, based on my experience with a very similar use case. I've included the preconditions that I needed to make it succeed with my clients and FreeIPA servers.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.