Configuring OpenLDAP for centralized authentication on Fedora
Configuring OpenLDAP for centralized authentication on Fedora gives administrators one source for usernames, groups, and password checks. SSSD connects Fedora hosts to the directory, so login and sudo decisions can follow centrally managed membership instead of copied /etc/passwd and /etc/group files. The directory remains an identity backbone, not a replacement for host-level controls.
Australian deployments often span Sydney, Melbourne, and Brisbane, including staff working from home. Naming the internal domain example.com.au and using dc=example,dc=au separates the LDAP namespace from email addresses. Australian spelling, including “authorised”, “organisation”, and “licence”, also belongs in operating procedures and support notes.
Many Australian teams mix Fedora engineering workstations with RHEL or CentOS servers, so interoperability matters as much as the initial Fedora setup. OpenLDAP can serve both estates, while each host retains its own sudo rules, SSH policy, and recovery access. Centralisation should remove duplicate account administration without turning the directory into a single point of failure.
Plan for privacy as well as convenience. Login events and directory attributes can contain personal information, making the Australian Privacy Act 1988 and Australian Privacy Principles relevant for many organisations. Support teams in different AEST and AEDT zones also need a clear runbook, monitoring ownership, and a tested way to regain access when PAM or DNS fails.
Plan the directory and trust boundaries
Design the tree around stable organisational units such as ou=people, ou=groups, and ou=services, all below the base DN. Map login names to uid values and use inetOrgPerson for staff records. Keep a service directory for non-human identities, such as cn=svc-bind, rather than reusing administrator credentials.
Separate duties across three roles: the olcRootDN for directory administration, a read-only bind account for SSSD searches, and a policy owner for group membership. Apply ACLs so users can change their own password but cannot browse unrelated records. Retain a locked local root account on each host for break-glass access.
Install slapd with TLS
Install the server, client tools, and SELinux utilities on Fedora, then enable the directory daemon:
sudo dnf install openldap openldap-server openldap-clients policycoreutils-python-utils
sudo systemctl enable --now slapd
Before adding entries, inspect the generated cn=config and replace the sample MDB suffix and root DN with the planned values. Set the root password from a slappasswd hash rather than plain text; ldapmodify -Y EXTERNAL -H ldapi:/// edits local configuration without traversing the network.
Give slapd a certificate whose SAN matches ldap.example.com.au. Place the key under /etc/openldap/certs, owned by root:ldap with mode 0640, and restore the correct SELinux context after copying it. Allow the encrypted listener through the firewall:
sudo firewall-cmd --permanent --add-port=636/tcp
sudo firewall-cmd --reload
Use port 389 only when clients explicitly support StartTLS.
Add identities, groups, and access rules
Create the base entry and organisational units with ldapadd, using protected LDIF files:
dn: dc=example,dc=au
objectClass: domain
dc: example
dn: ou=people,dc=example,dc=au
objectClass: organizationalUnit
ou: people
A staff record needs at least the following attributes. Generate a {SSHA} value with slappasswd and add it as userPassword through a protected editing process:
dn: uid=amelia,ou=people,dc=example,dc=au
objectClass: inetOrgPerson
cn: Amelia Nguyen
sn: Nguyen
uid: amelia
mail: amelia@example.com.au
Represent privileged groups as groupOfNames, with member containing the user’s full DN. Do not grant administrator rights merely because someone belongs to a broad group. Password resets and lockouts should follow a controlled process, with the resulting hash written back rather than sent through chat or email.
Configure ACLs on the MDB database so anonymous clients cannot read the tree, the service account can retrieve approved attributes, and each user can update their own password. Validate rule order with ldapwhoami and ldapsearch from a test host. Readers can also consult Serious Code for additional implementation examples while adapting production access rules.
Connect Fedora hosts through SSSD
Install SSSD and authselect on each Fedora client, then select the LDAP-capable SSSD profile:
sudo dnf install sssd sssd-ldap authselect
sudo authselect select sssd with-ldap
sudo systemctl enable --now sssd
Create or extend the authselect-managed SSSD configuration with a domain named corp. Set ldap_uri = ldaps://ldap.example.com.au, ldap_search_base = dc=example,dc=au, ldap_id_attrs = uid, and ldap_default_authtype = password. Supply the service bind DN and secret, restrict the file to root, and run authselect check before applying the profile.
Test identity and authorisation separately with getent passwd amelia, getent group linux-admins, and id amelia. A sudo rule can then reference the centrally supplied group. Test a normal login and controlled sudo action on a non-critical workstation before wider deployment. List two LDAPS endpoints only after replication, certificate distribution, and failover have been tested.
Operate the service and keep recovery ready
Monitor slapd through the systemd journal and configure log retention without recording passwords. Back up both /etc/openldap/slapd.d and /var/lib/openldap; export the database with slapcat and the live configuration with ldapsearch -Y EXTERNAL -H ldapi:///. Schedule restoration exercises, not merely file copies, and verify that the service account has only the privileges it needs.
A failed directory service can also produce a PAM login loop, so preserve a documented local administrator path. The RHEL rescue-mode guide explains how to reach a rescue environment when boot configuration is inaccessible. Although that walkthrough targets RHEL, the same recovery principle applies to Fedora derivatives.
Runbooks should name an on-call owner, state which service handles AEST and AEDT handovers, and identify where Australian privacy obligations apply to retained logs. Record configuration changes, certificate expiry dates, and replication health in one change log. The practical takeaway is to keep a tested local administrator account, restorable directory backup, and repeatable getent validation ready before each rollout.