-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Hello,
On RHEL 9, after joining an Active Directory domain using realm join, I configured SSSD (2.9.7) with ad_gpo_access_control = enforcing to use GPOs for granting access. However, access is denied on the first login attempt, even though the user is a member of a group allowed by the GPO (“Allow log on through Remote Interactive”).
On the second login attempt, access succeeds because the group SIDs are fully resolved. This suggests that SID resolution takes too long.
Observed behavior:
On first login, the user SID is resolved, but the group SID list is incomplete (only primary group and a few defaults like “Domain Users”).
As a result, access_granted = 0 and login fails with Host Access Denied.
On second login, the group SID list mostly is complete and access is granted and everything works like intended.
Expected behavior:
SSSD should resolve all relevant group SIDs before enforcing GPO access control, even with performance penalty.
First Login Attempt:
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] RESULTANT POLICY:
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] gpo_map_type: Remote Interactive
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] allowed_size = 2
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] allowed_sids[0] = S-1-5-21-1930873976-2164.....
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] allowed_sids[1] = S-1-5-21-1930873976-2164.....
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] denied_size = 0
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_get_sids] (0x2000): [RID#9] SID of the primary group with gid '0' is '(null)'
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] CURRENT USER:
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] user_sid = S-1-5-21-1930873976-2164.....
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] group_sids[0] = S-1-5-21-1930873976-2164.....
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] group_sids[1] = S-1-5-11
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] POLICY DECISION:
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] access_granted = 0
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#9] access_denied = 0
* (2025-11-25 10:34:56): [be[example.com]] [ad_gpo_perform_hbac_processing] (0x0040): [RID#9] GPO access check failed: [1432158236](Host Access Denied)Second Login Attempt:
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] RESULTANT POLICY:
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] gpo_map_type: Remote Interactive
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] allowed_size = 2
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] allowed_sids[0] = S-1-5-21-1930873976-216.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] allowed_sids[1] = S-1-5-21-1930873976-216.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] denied_size = 0
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] CURRENT USER:
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] user_sid = S-1-5-21-1930873976-2164.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[0] = S-1-5-21-1930873976-2164.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[1] = S-1-5-21-1930873976-2164.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[2] = S-1-5-21-1930873976-2164.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[3] = S-1-5-21-1930873976-2164.....
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[4] = S-1-5-21-1930873976-2164.....
.
.
.
.
.
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] group_sids[56] = S-......
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] POLICY DECISION:
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] access_granted = 1
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_check] (0x0400): [RID#13] access_denied = 0
(2025-11-25 10:35:07): [be[example.com]] [ad_gpo_access_done] (0x0400): [RID#13] GPO-based access control successful.As you can see there is about 11 Seconds between the login attempts.
Here is my sssd.conf:
[sssd]
config_file_version = 20
services = nss, pam, sudo
domains = example.com
[pam]
offline_credentials_expiration = 14
offline_failed_login_attempts = 3
offline_failed_login_delay = 5
[sudo]
[domain/example.com]
default_shell = /bin/bash
krb5_realm = example.com
krb5_store_password_if_offline = True
cache_credentials = False
enumerate = False
cached_auth_timeout = 0
entry_cache_timeout = 300
refresh_expired_interval = 225
realmd_tags = manages-system joined-with-adcli
fallback_homedir = /home/%u
ad_domain = example.com
ad_server = ad1.example.com
ad_backup_server = ad2.example.com
ad_hostname = XY.example.com
ad_gpo_access_control = enforcing
ad_gpo_cache_timeout = 300
ad_use_ldaps = True
use_fully_qualified_names = False
ldap_id_mapping = True
ldap_sudo_search_base = <working Filter>
ldap_tls_reqcert = demand
ldap_tls_cacert = /etc/ssl/certs/ca-bundle.crt
id_provider = ad
access_provider = ad
auth_provider = ad
chpass_provider = ad
sudo_provider = ad
dyndns_update = False
ad_enable_gc = True
ldap_group_nesting_level = 5Is there a solution for my problem? I would take a few seconds penalty instead of an instant connection refused message....
Thanks,
Thomas