ipa-join(1)
π ipa-join(1) β the manual page, but make it a group chat π
okay bestie, sit down, we're learning ipa-join today and honestly? it's giving main character energy. this is from the IPA Manual Pages and it's literally about joining a machine to an IPA realm and grabbing a keytab for the host service principal. no cap. π¦
β¨ NAME β¨
ipa-join β join a machine to an IPA realm and get a keytab for the host service principal π
β¨ SYNOPSIS β¨
ipa-join [-d|--debug] [-q|--quiet] [-u|--unenroll] [-h|--hostname
hostname] [-s|--server hostname] [-k|--keytab filename] [-w|--bindpw
password] [-b|--basedn basedn] [-?|--help] [--usage]
β¨ DESCRIPTION β¨
so basically π β this joins a host to an IPA realm and retrieves a kerberos keytab for the host service principal, or it unenrolls an already-enrolled host from an IPA server. both. she does both.
kerberos keytabs are used by services (like sshd, iconic behavior) to perform kerberos authentication. a keytab is a file with one or more secrets (or keys) for a kerberos principal. that's it. that's the whole vibe.
the ipa-join command will create and retrieve a service principal for host/foo.example.com@EXAMPLE.COM and place it by default into /etc/krb5.keytab. where it lands can be overridden with the -k option, because we love options. πΈ
the IPA server to contact is set in /etc/ipa/default.conf by default and can be overridden using the -s,--server option.
now. in order to join, the machine needs to be authenticated. this can happen in one of two ways:
- Authenticate using the current kerberos principal
- Provide a password to authenticate with
if a client host has already been joined to the IPA realm, theipa-joincommand will fail. π the host will need to be removed from the server usingipa host-del FQDNin order to join the client to the realm. that's the rule, bestie.
this command is normally executed by the ipa-client-install command as part of the enrollment process. it's not out here freelancing, she's on a team. π
the reverse is unenrollment. unenrolling a host removes the Kerberos key on the IPA server. this prepares the host to be re-enrolled. this uses the host principal stored in /etc/krb5.conf to authenticate to the IPA server to perform the unenrollment.
PLEASE NOTE π β while theipa-joinoption removes the client from the domain, it does not actually uninstall the client or properly remove all of the IPA-related configuration. the only way to uninstall a client completely is to useipa-client-install --uninstall(seeipa-client-install(1)). so don't be out here thinking she cleaned up. she did not. she removed one thing and dipped.
β¨ OPTIONS β¨
-h,--hostnamehostname β the hostname of this server (FQDN). by default the canonical name fromgetaddrinfo(3)forgethostname(2)is used. π«Ά-s,--serverserver β the hostname of the IPA server (FQDN). note that by default there is no/etc/ipa/default.conf, so in most cases it needs to be supplied. yes really. bring your own. π-k,--keytabkeytab-file β the keytab file where to append the new key (will be created if it does not exist). default:/etc/krb5.keytabβ¨-w,--bindpwpassword β the password to use if not using Kerberos to authenticate. use a password of this particular host (one time password created on IPA server). π₯-b,--basednbasedn β the basedn of the IPA server (of the formdc=example,dc=com). this is only needed when not using Kerberos to authenticate and anonymous binds are disallowed in the IPA LDAP server. π-f,--forceβ force enrolling the host even if host entry exists. chaotic but valid. π-u,--unenrollβ unenroll this host from the IPA server. no keytab entry is removed in the process (seeipa-rmkeytab(1)). π-q,--quietβ quiet mode. only errors are displayed. shhh. π€«-d,--debugβ print the raw RPC output in GSSAPI mode. nerd mode activated, respectfully. π§-?,--helpβ help π--usageβ usage π
β¨ EXAMPLES β¨
join IPA domain and retrieve a keytab with kerberos credentials. π
# kinit admin
# ipa-join
join IPA domain and retrieve a keytab using a one-time password. π
# ipa-join -w secret123
join IPA domain and save the keytab in another location. π¦
# ipa-join -k /tmp/host.keytab
β¨ EXIT STATUS β¨
the exit status is 0 on success, nonzero on error. here's the whole roster, no skips, no shortcuts:
0Success β1Kerberos context initialization failed2Incorrect usage3Out of memory4Invalid service principal name5No Kerberos credentials cache6No Kerberos principal and no bind DN and password7Failed to open keytab8Failed to create key material9Setting keytab failed10Bind password required when using a bind DN11Failed to add key to keytab12Failed to close keytab13Host is already enrolled14LDAP failure15Incorrect bulk password16Host name must be fully-qualified17RPC fault18Principal not found in host entry19Unable to generate Kerberos credentials cache20Unenrollment result not in RPC response21Failed to get default Kerberos realm22Unable to auto-detect fully-qualified hostname
β¨ SEE ALSO β¨
ipa-rmkeytab(1) ipa-client-install(1) β go read those too, bestie, they're part of the lore. π
and that's the whole page!! this one's from the IPA crew, dated Oct 8 2009 (vintage, honestly, she's been slaying since 2009), so if you ever need to remember her, that's where she lives. ily, go join a realm responsibly πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- centos-stream 10: ipa-client 4.13.4-1.el10 Β· GPL-3.0-or-later
- centos-stream 9: ipa-client 4.13.4-1.el9 Β· GPL-3.0-or-later
- debian bookworm: freeipa-client 4.9.11-1 Β· GPL-3.0-or-later
- debian trixie: freeipa-client 4.12.4-1 Β· GPL-3.0-or-later
- fedora 43: freeipa-client 4.12.5-3.fc43 Β· GPL-3.0-or-later
- fedora 43: freeipa-client 4.13.4-2.fc43
- fedora 43: freeipa-client 4.13.4-3.fc43 Β· GPL-3.0-or-later
- fedora 44: freeipa-client 4.13.1-9.fc44 Β· GPL-3.0-or-later
- fedora 44: freeipa-client 4.13.4-2.fc44
- fedora 44: freeipa-client 4.13.4-3.fc44 Β· GPL-3.0-or-later
- nixos 26.05: freeipa 4.12.5
- nixpkgs unstable: freeipa 4.13.1
- ubuntu jammy: freeipa-client 4.9.8-1 Β· GPL-3.0-or-later
- ubuntu noble: freeipa-client 4.11.1-2 Β· GPL-3.0-or-later
- ubuntu questing: freeipa-client 4.12.4-1
- ubuntu resolute: freeipa-client 4.13.1-1 Β· GPL-3.0-or-later
- ubuntu stonking: freeipa-client 4.13.1-1build1 Β· GPL-3.0-or-later
- Copyright (C) 2009 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms