FreeIPA Active Directory trust setup

A FreeIPA Active Directory trust lets AD users sign in to Linux hosts under FreeIPA policy. This page covers the DNS, Samba, ID mapping and testing decisions that decide whether the trust works and stays supportable.

On this page

When a FreeIPA Active Directory trust is the right way to share identity

A cross-forest trust is the right choice when Linux hosts managed by FreeIPA must accept Active Directory users under FreeIPA host access policy, and the organization does not want to copy AD passwords or maintain a second set of Linux accounts. The trust lets AD users authenticate against their home forest while FreeIPA decides which hosts they can reach and which sudo rules apply. Before committing, confirm that you can give the IPA realm a DNS domain that overlaps with no domain in the AD forest. FreeIPA's trust documentation makes this a hard requirement, and it is the first decision that is expensive to reverse.

The work is harder than it looks for four reasons. First, name collisions: a short name such as jsmith may exist on both sides, so the trust must resolve which identity a login refers to. Second, UID and GID mapping: AD assigns SIDs rather than POSIX numbers, so FreeIPA generates ID ranges and ID mapping that Linux clients can use consistently across hosts. Third, policy scope: HBAC rules and sudo rules written for FreeIPA users do not automatically cover trusted AD users, and ID views decide how their attributes appear on each host. Fourth, the Samba components that sit between the two sides, which must be installed, configured and kept in step with the FreeIPA and AD versions in your estate. Ask any partner or internal team to show how each of these four areas will be tested on a sample host before rollout.

Which FreeIPA and AD components the trust depends on

A cross-forest trust between FreeIPA and Active Directory is only as reliable as the pieces beneath it. The cards below cover the identity core, the Samba trust components, name resolution, ID mapping and the Linux clients, and what fails when each one is set up wrong.

The IPA domain core

The IPA domain runs on 389 Directory Server for users, groups, hosts and policy, and on the MIT Kerberos KDC that issues tickets. Trust logins depend on both answering correctly on every replica. Check that the IPA DNS domain does not overlap with any domain in the AD forest, because the FreeIPA trust documentation requires separation, and an overlap makes realm and name resolution ambiguous. Confirm which replicas hold the trust state before you add a second forest.

Trusts documentation

Samba-based trust components

FreeIPA builds the cross-forest trust with Samba components on the IPA side, which handle the trust secret and the Windows-compatible authentication path to AD domain controllers. These components must be installed and current on the IPA servers that take part in the trust. If they are missing or mismatched, the trust may appear to exist while AD users still fail to authenticate. Ask who will own patching of these packages, since they sit outside the normal identity update path.

Two-way DNS resolution

Each side must resolve the other's domain controllers, service records and host names. An IPA client that cannot find an AD domain controller will not complete a Kerberos referral, and an AD host that cannot find IPA servers will fail similarly. Plan the forwarding or delegation between the two DNS zones before the trust is created, and test SRV record lookups from both directions. Keep at least two DNS servers in each client's resolver configuration so one failed server does not block lookups.

ID ranges and ID views

AD users have security identifiers that FreeIPA maps to POSIX user and group IDs through ID ranges. The ID range must not collide with local IPA ranges, and the mapping decides which UID and GID a Linux host shows for each AD account. ID views let you override attributes, such as the login name or home directory, for specific hosts. A wrong range or a conflicting override produces mismatched file ownership and access that differs from host to host. Record the range plan and the view assignments in writing before go-live.

SSSD on the Linux clients

SSSD on each Linux host resolves AD users through the IPA server, applies the caching and the HBAC rules, and reports the identity to PAM and sudo. Clients that run an old or unconfigured SSSD may fail to resolve trusted users even when the server side is correct. Test a login from a host in each HBAC scope, and check that the SSSD cache is cleared after changes to ID views. A client that is missing the trusted-domain setting will silently refuse AD users, which often looks like a password problem to the user.

Decisions to settle before connecting FreeIPA to AD

This table compares the four decisions that shape a FreeIPA and Active Directory trust: the IPA DNS domain, how AD users get mapped on Linux hosts, whether AD groups drive access rules, and whether to trust or migrate. Read each row as a choice with its operational cost, and settle the first row before anything else, because it is hard to change later.

DecisionWhen it fitsWhat it costs operationally
IPA DNS domain that does not overlap any AD domainRequired for a cross-forest trust. The FreeIPA Trusts page states the IPA domain must not overlap any domain in the AD forest.Naming and DNS planning happen up front. Renaming a live IPA domain later is a major change, so confirm the name with DNS and AD owners before deployment.
Default ID mapping for AD usersSuits a small set of Linux hosts where all AD users can share one ID policy and the default mapping is acceptable.Lowest setup effort. Teams must still confirm the ID ranges and UID/GID results on test hosts before go-live.
Per-host-group ID views for AD usersSuits hosts that need different UIDs, login names or overrides for AD users, such as separate application groups.Adds ongoing work to create, scope and review ID views as host groups change. Test each view against the hosts it applies to.
AD groups used directly in HBAC and sudo rulesSuits teams that already manage access by AD group membership and want one source of truth for who may log in or run commands.Requires the AD group to resolve correctly through the trust on every target host. Test HBAC and sudo rules after each AD group change, and confirm who owns that review.
Local IPA groups for HBAC and sudo rulesSuits environments where Linux access should be managed inside FreeIPA, separate from AD group membership.Duplicates some group administration. Someone must keep IPA group membership aligned with AD sources if they overlap.
Cross-forest trustSuits organizations where AD stays the authoritative user store and Linux hosts only need to recognize AD identities.Ongoing dependence on the trust, Samba trust components and AD reachability. Plan monitoring and an owner for trust health.
Migrating identities with ipa migrate-dsSuits environments that intend to retire AD as the source of Linux identities or move users out of another LDAP directory.One-time migration effort plus a continuing duty to keep two sources consistent if AD remains in use. Sudo and HBAC rules need manual migration through LDIF, per the migration how-to.

How to build the FreeIPA Active Directory trust in order

This sequence connects a FreeIPA domain to an Active Directory forest with a cross-forest trust, then confirms that AD users resolve on Linux hosts and can sign in under FreeIPA access policy. Each step ends with a check so a failure is caught before the next layer depends on it.

  1. Confirm the IPA domain does not overlap AD

    Before any installation or trust setup, confirm in writing that the DNS domain planned for FreeIPA does not overlap any domain in the AD forest. The FreeIPA Trusts documentation requires non-overlapping DNS domains for a cross-forest trust, so this is a design decision that is expensive to reverse after hosts are enrolled. Ask the AD administrators to list every domain and subdomain in the forest, and sign off on the IPA domain name. The step is closed when both teams have the same written list and no name appears on both sides.

  2. Verify DNS resolution in both directions

    Confirm that IPA servers can resolve AD domain controllers and service records, and that AD domain controllers can resolve the IPA domain and its servers. Test with forward and reverse lookups, including SRV records for the domain controllers and the IPA servers, from each side. Name resolution is the most common reason trust setup fails late, so run these checks from the actual servers that will take part, not from a workstation. The step is closed when every lookup returns the expected address from both networks.

  3. Prepare Samba trust components and ID ranges

    On the FreeIPA servers that will handle trust, install the Samba trust components supplied by your distribution, and confirm the time sources on all servers are synchronized. Plan the ID ranges that will hold mapped AD users and groups so they do not overlap existing UID and GID ranges in FreeIPA. If ID ranges later need repair, the ipa-idrange-fix tool can check them, but plan the ranges correctly first. The step is closed when the packages are installed on the trust-capable servers, the clocks agree, and the planned ranges are written down and free of overlap.

  4. Establish the cross-forest trust

    Create the trust from the FreeIPA side using the trust commands in the FreeIPA documentation, with an AD account that has the rights needed to create a trust, and confirm the trust direction and type your design calls for. Expect the first server to be involved, because it handles certificate renewal and CRL publication by default, so schedule the change in a window where that server is healthy and backed up. Check the trust status from both the IPA and AD sides. The step is closed when both sides report the trust as established and the trust object is visible in each management tool.

  5. Verify AD user lookups through SSSD

    On a test Linux host enrolled in FreeIPA, confirm that SSSD can resolve AD users and groups, using standard lookup tools such as id and getent against a known AD account. Check that the UIDs and GIDs fall inside the planned ID range and that group membership resolves. If lookups return unexpected IDs, compare the mapping against the ID range plan before changing anything. The step is closed when a named AD user and group resolve consistently on at least one test host.

  6. Apply ID views and HBAC rules

    Apply any ID view overrides needed for the AD users on Linux hosts, then write host-based access control rules that name the AD groups allowed to log in to each host class. Start from a restrictive policy instead of allow_all so that only the intended groups get access. Any change to the first server, including the ID view and rule changes that replicate from it, should be confirmed to have replicated to the other replicas. The step is closed when the rules are in place, replicated, and documented against the group names they use.

  7. Test a login under the policy

    From a permitted AD account, sign in to the test Linux host, and then try the same host with an account outside the permitted groups to confirm it is denied. Check that Kerberos ticket issuance works for the permitted user and that the denial is recorded in the logs. Repeat the test on a second replica or host class where your design requires it. The step is closed when the allowed login succeeds, the denied login fails, and both results are recorded for the change record.

How an AD user's login reaches a Linux host under FreeIPA policy

The diagram follows one AD user signing in to a Linux host enrolled in FreeIPA. The AD forest and the IPA domain sit in separate boundaries, each with its own DNS domain, and the cross-forest trust is the link between them. The host's SSSD client asks the IPA KDC for a ticket, and the KDC checks the AD side through the trust before issuing one. The HBAC rules then decide whether the login is allowed or denied. When you test, confirm the DNS domains do not overlap, the trust validates, and a user outside the allowed rule is refused.

Login path from an AD user through the trust to an HBAC decision.

What drives the effort and cost of an AD trust

This table lists the factors that change how much work an AD trust takes and what it costs to run. Read each row as a question to answer before you request a quote, since the same trust can be small or large depending on these inputs. The main takeaway is that DNS layout, existing policy and replica change control usually decide the effort more than the trust setup itself.

DriverWhy it mattersHow to keep it down
Number of AD forests and domains in scopeEach forest or domain in the trust adds naming checks, trust objects and user mapping to test. A trust to one forest is a different job from a trust to several forests with child domains.Limit the first trust to the forests and domains that need Linux access now. Ask the partner to price each additional forest as a separate scope item.
DNS complexity and split-horizon zonesThe IPA domain must use a DNS name that does not overlap with any AD forest domain. Split-horizon zones, duplicate names or old AD-integrated resolvers add time to find and fix resolution conflicts.Inventory every zone and resolver before design starts. Confirm the IPA DNS domain name early, since changing it later is costly.
Number of Linux hosts and host groups with different policyEach group that needs its own access rule adds HBAC rules, ID views and test cases. Hosts that share a policy are cheaper to validate than hosts that each need exceptions.Group hosts by role and access need. Define a small set of host groups and test one representative host per group.
Existing sudo and HBAC rulesRules already in LDIF, OpenLDAP or old scripts must be recreated or reviewed. Rules that grant broad access need a risk review before AD users receive them.Export and review current rules first. Retire unused rules, then rebuild the rest in FreeIPA with a written test plan.
ID range planningAD users receive UIDs and GIDs through ID mapping. Overlapping or poorly sized ranges cause conflicts that are hard to untangle after users log in. The ipa-idrange-fix tool in FreeIPA 4.13.0 exists for repairing range problems, so check whether your version and environment need it.Plan ranges against the AD SIDs and existing Linux IDs before the trust is created. Ask the partner to document the range layout as a deliverable.
Change windows on replicasTrust setup and policy changes touch every replica. Replicas must be updated one at a time, and the topology must stay healthy during the change. Restoring an outdated backup into a live topology can break replication.Agree change windows and rollback steps in writing. Take a tested backup before each change and verify replication after each replica.
Compliance evidence requestsAssessors often ask for the trust configuration, access rules, change records and test results. Collecting these after the fact takes more time than capturing them during the work.Ask for evidence at the start: configuration exports, test records and approvals. Confirm with your auditor which artifacts they need, since DeployOpen prepares evidence but does not issue audit results.
Ongoing ownership after go-liveRecurring work includes patches, certificate renewal checks, new AD domains and user onboarding for Linux access. Teams without an owner tend to defer these until something fails.Name an internal owner and ask for a support or retainer scope that covers trust maintenance separately from one-time setup.

How the trust changes by topology

This is the most direct case: one IPA domain, one datacenter, and one AD forest that the trust connects to. The IPA domain must use a DNS domain that does not overlap with any domain in the AD forest, so the naming decision comes first and is the hardest to change later. Replica placement is simple, but the trust components still depend on name resolution and time synchronization working in both directions.

  • DNS separation: Choose an IPA DNS domain that sits outside every AD namespace, and confirm that AD domain controllers and IPA servers can each resolve the other's names.
  • Replica placement: Keep the IPA servers dedicated, and confirm the replica count against the current deployment recommendations for a single site.
  • Trust components: Confirm which Samba-based packages your OS release provides for the trust role, and whether the trust agent runs on the IPA servers you plan to use.
  • ID mapping: Plan the ID range and any ID views before you test logins, so Windows users map to stable UIDs on Linux hosts.
  • Testing: Test one AD user on one enrolled Linux host, then widen the test only after the first login and group lookup succeed.

Confirm the naming scheme, the OS packages and the exact trust steps against the FreeIPA Trusts documentation for your release.

Security controls specific to an AD trust

A cross-forest trust gives Active Directory users a path onto Linux hosts and into IPA policy, so the trust itself becomes part of the attack surface. The controls below cover the IPA servers, the release level, the access rules that name AD groups, the AD principals allowed to administer IPA, and the material and backups that hold the trust together.

Keep IPA servers dedicated

The FreeIPA deployment recommendations call for dedicated servers without other applications. For a trust, this matters more because the IPA servers hold the Kerberos KDC, the directory and the Samba trust components that accept Active Directory authentication. Ask which services run on each IPA host, confirm that no general-purpose application shares the host, and check that the AD-facing components are the only added services. Each shared service widens the path to the KDC.

Deployment recommendations

Confirm the 4.13.4 security release

FreeIPA 4.13.4 is a stabilization release dated July 9, 2026, and it fixed two CVEs, including LDAP access control flaws that could let unauthenticated clients obtain credentials. Before the trust goes live, confirm every IPA server and replica runs 4.13.4 or later, and read the release notes to map each CVE to your deployment. Record the version on every server so the status can be checked during audits and after each upgrade.

4.13.4 release notes

Replace allow_all with AD group rules

A trust that leaves allow_all in place lets any authenticated AD user log in to any enrolled Linux host. Replace it with HBAC rules that name specific AD groups, mapped to the hosts and services they need. Test each rule with a representative account from each group before rollout, and confirm that users outside every rule are denied. Keep one rule per host class so that an access review can read the policy in a few minutes.

Trusts documentation

Limit AD principals who administer IPA

Membership in an AD group should not automatically confer administrative rights in IPA. Decide which AD groups, if any, may hold IPA roles, and grant those roles through IPA role and privilege assignments scoped to the minimum needed. Review these assignments on a fixed schedule and remove them when the AD group owner changes. Ask the Windows team who controls membership of each group that is mapped into an IPA role, since that person can grant IPA access.

Protect trust material and backups

The trust relies on shared secret material between the IPA domain and the AD forest, and the IPA backups contain the directory, keys and certificate state. Restrict read access to the backup location and to any file holding trust secrets, and encrypt backups at rest. Test restores in an isolated environment, because the backup documentation warns that restoring an outdated backup into an active replica topology can break replication. Store backup copies outside the IPA servers they protect.

Backup and restore docs

Evaluate DNS over TLS for clients

FreeIPA 4.13.0 introduced DNS over TLS between clients and IdM DNS servers, which protects name lookups used during Kerberos and trust resolution from tampering on the network. Confirm that your deployed version and client OS support it, then decide whether the IdM DNS servers you run will accept encrypted queries from every enrolled host. Test name resolution for AD domain names after enabling it, since a failed lookup can block AD user logins.

4.13.0 release notes

How to test the FreeIPA Active Directory trust and confirm it fails safely

Test the trust in layers, starting with identity resolution and ending with a deliberately broken path. First, confirm that AD users resolve on a Linux host through SSSD: run id with the AD user's name (in the form the trust exposes, such as user@ad.example.com if your ID view uses fully qualified names) and getent passwd for the same principal. The UID and GID should fall inside the ID range the trust created, and group memberships should match what AD shows. Next, request a Kerberos ticket for the AD principal with kinit and confirm with klist that the ticket is issued by the IPA realm's KDC through the cross-realm path. Mismatched or missing group membership at this stage usually points to ID view or ID mapping problems, not to HBAC, so fix identity resolution before testing access.

Then test access decisions with two accounts that should behave differently. Use an AD user that an HBAC rule allows on a specific host and confirm the login succeeds through SSH or the console. Use a second AD user, from a group that is not in the rule, and confirm the login is refused and the denial appears in the host's authentication logs. If sudo rules apply, run sudo -l as each user and confirm that only the commands the rules grant are listed. Keep these tests against a host that is not shared with other workloads, and do not rely on a test that passes only because allow_all is still active. Verify that the rules you intend to be in force are the ones being evaluated, because a permissive default can hide a broken rule.

Finally, break the trust path on purpose in a non-production environment and confirm that access is denied, not opened. Examples include stopping DNS resolution of the AD domain from the test host, or disabling the trust's name resolution, then repeating the login and id checks. Expected behavior is that lookups fail or return nothing and logins are refused, with no fallback to local accounts that grant access. Ask your team to confirm the SSSD behavior on your OS release, since cache settings can keep stale entries for a time. For a security review, keep dated outputs of each test, the HBAC and sudo rule definitions in effect, the trust status from the FreeIPA side, host logs for the allowed and denied attempts, and the failure-test steps with their results. Retest after every change to the trust, DNS or rule set.

Questions buyers ask before hiring help with an AD trust

How much of a FreeIPA rollout does an Active Directory trust add?

The trust is usually a bounded piece of work inside a larger FreeIPA project, not the project itself. Most of the effort comes from decisions made before any trust is created: the IPA DNS domain must not overlap with any domain in the AD forest, so the naming plan, DNS zones and resolver paths have to be settled first. Realm design, replica topology, client enrollment and host policy usually take more time than the trust. Ask the implementation partner to show which parts of the rollout the trust touches and which it leaves alone.

How long does a FreeIPA to Active Directory trust take to set up?

Duration depends on the state of the environment, not on the trust command itself. The main drivers are whether the DNS domain separation is already clean, how many AD domains sit in the forest, whether the Samba-based trust components are already packaged and supported on your OS versions, how quickly the AD team can review and approve the trust objects, and how many test accounts must be verified. Ask for a schedule that lists each of these as its own milestone and names who completes it.

What does the AD team need to provide, and what does the IPA team own?

The AD team owns the forest: it must agree to the trust, confirm the domain and DNS details, and review the authentication scope it grants. The IPA team owns the FreeIPA domain, its DNS, the trust configuration on the IPA side, ID ranges and ID views, and the Linux host policy that AD users fall under. Both teams need a named contact for DNS changes and a shared test plan. Agree this split in writing so neither side assumes the other handles name resolution or access rules.

Can an internal team set up the AD trust without outside help?

Yes, if the team already runs FreeIPA in production and has someone comfortable with Kerberos, DNS, Samba components and AD administration. The harder part is usually not the setup but the verification: confirming ID mapping, testing sign-in from several Linux hosts, and checking that HBAC and sudo rules behave as intended for AD users. A team new to FreeIPA or to cross-forest trusts should weigh the risk of a misconfigured trust against the cost of an outside review. Check the FreeIPA trust documentation with your own platform engineers before deciding.

What should a quote for the AD trust work list?

A useful quote lists the work in phases with deliverables. It should name the environment assumptions, including the AD forest and domains in scope, the FreeIPA version and the operating systems of the IPA servers and clients. It should state what is one-time (design, trust creation, testing, documentation) and what recurs (support, upgrades, re-testing after IPA or AD changes). It should list which items you provide, such as DNS access, AD admin accounts and test users, and what changes are excluded. Ask how retesting after upgrades is handled and whether it is priced separately.

Does the AD trust change anything for Linux hosts that already work?

It can, and this is the question engineers most often miss. Once AD users can authenticate, hosts enrolled in FreeIPA will evaluate AD identities against ID views, ID mapping and host access rules. Hosts without a restrictive HBAC policy may admit AD users that were never intended to log in, and changed UID or GID mapping can affect file ownership. Before enabling the trust, review existing HBAC and sudo rules, confirm which hosts are in scope, and test a sample of hosts with a non-production AD account. Ask your implementer to produce that impact list as part of the design.

How DeployOpen scopes, builds and hands over a FreeIPA AD trust

DeployOpen plans, implements, documents and supports self-hosted FreeIPA inside your own infrastructure, including the cross-forest trust with Active Directory. Each engagement starts from a written scope that fixes deliverables and timelines before any work begins.

How we scope

  • We confirm the AD forest and domain names, and check that the planned IPA DNS domain does not overlap any AD domain.
  • We map which AD users, groups and Linux hosts will be covered, and which sudo and HBAC rules apply to them.
  • The written scope lists the trust components, ID mapping approach, test hosts, handover documents and any retainer for ongoing support.

How we build

  • We set up the FreeIPA realm and trust components in a staging environment before touching production AD.
  • We configure ID ranges and ID views so AD users resolve correctly on enrolled Linux hosts under FreeIPA policy.
  • We test sign-in, Kerberos tickets, group membership and access rules from real AD accounts on representative hosts.

How we hand over

  • You receive the trust configuration, ID view settings, and the list of AD groups mapped to FreeIPA policy.
  • We document the steps to add hosts, verify trust health, and troubleshoot SSSD resolution for AD users.
  • Your team walks through a knowledge transfer session and the runbook for certificate and backup checks before the engagement closes.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after go-live.
  • Retainers can cover FreeIPA stabilization releases and re-testing of AD trust access after changes to either forest.
  • We confirm support boundaries and response expectations in writing, so your team knows what is covered after handover.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.