Joining Headless Ubuntu Server 24.04 - realmd fails

Hello everyone,

I’m currently evaluating UCS as a potential replacement for our Windows Server 2022 Active Directory environment. My long-term goal is to automate the client join process with Ansible, but for now, I’m focused on achieving a reliable, fully headless command-line join for our Ubuntu 24.04 servers.

I’ve been avoiding the official Univention Join Assistant script because it installs a number of GUI packages, which we want to avoid on our minimal server installations.

To ensure my UCS 5.2 server is configured correctly, I successfully joined an Ubuntu Desktop 24.04 VM using the Join Assistant, so I’m confident the server-side setup is working as expected.

My issue is with the headless server. I’ve been following various guides, including these threads on the forum, that recommend using realmd and sssd for the join:

Ubuntu Join Skript für “current” Versions

Can I Add Debian Client to UCS Domain?

However, every attempt to discover or join the domain fails with the following error:

! Couldn't find default naming context on LDAP server MYDOMAIN.INTERNAL

I have also tried using net ads join as an alternative, but this has resulted in a different set of errors.

I’m wondering if anyone in the community has successfully performed a headless join for Ubuntu Server 24.04 to a UCS 5.2 domain? Specifically, I’m looking for:

  1. A working set of commands or a custom script that achieves a clean, headless join.
  2. Any information on modifying the official join scripts (like the one from Philipp Hahn, univention-domain-join) to prevent the installation of GUI dependencies.

Any advice or pointers would be greatly appreciated.

Thank you!