Public bug reported:

When using sss_override on systems joined to Active Directory via SSSD,
overrides do not take effect when logging in or querying via User
Principal Name (UPN) if the UPN and sAMAccountName differ. Additionally,
querying the UPN returns the original high UID/GID and taints the SSSD
cache, reverting lookups for the sAMAccountName back to the un-
overridden IDs until the cache is invalidated.

This issue has been raised for RHEL [0] and fixed upstream [1].

Package: sssd 2.9.4-1.1ubuntu6.8
Release: Ubuntu 24.04


To reproduce:

Configure an Active Directory account in sssd whose sAMAccountName and
UPN differ, e.g.,

```bash
export SAN=testuser
export [email protected]
```

Apply an override using the sAMAccountName and restart SSSD:

```bash
sudo sss_override user-add testuser -u 2000 -g 2000
sudo systemctl restart sssd
```

Check the override works for the sAMAccountName:

```bash
id testuser
```

Expected: `uid=2000`, `gid=2000`. The patch should not change this
behaviour.

Query using the UPN:

```bash
id [email protected]
```

Unpatched output: the original un-overridden UID/GID.

Query the sAMAccountName again:

```bash
id testuser
```

Unpatched output: the original UID/GID. The cache is tainted until it is
cleared with `sudo sss_cache -u testuser`.

I plan to submit an SRU of the upstream backported patch [2].

[0]: https://redhat.atlassian.net/browse/RHEL-72935
[1]: https://github.com/SSSD/sssd/pull/7998
[2]: https://github.com/SSSD/sssd/pull/8324

** Affects: sssd (Ubuntu)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: Fix Released

** Affects: sssd (Ubuntu Noble)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: Confirmed

** Affects: sssd (Ubuntu Resolute)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: Fix Released

** Affects: sssd (Ubuntu Stonking)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: Fix Released

** Affects: sssd (Ubuntu Tenacious)
     Importance: Undecided
     Assignee: Zachary Raines (raineszm)
         Status: Fix Released

** Also affects: sssd (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: sssd (Ubuntu Resolute)
   Importance: Undecided
       Status: New

** Also affects: sssd (Ubuntu Stonking)
   Importance: Undecided
       Status: New

** Also affects: sssd (Ubuntu Tenacious)
   Importance: Undecided
     Assignee: Zachary Raines (raineszm)
       Status: Confirmed

** Changed in: sssd (Ubuntu Tenacious)
       Status: Confirmed => New

** Changed in: sssd (Ubuntu Noble)
       Status: New => Confirmed

** Changed in: sssd (Ubuntu Resolute)
       Status: New => Fix Released

** Changed in: sssd (Ubuntu Stonking)
       Status: New => Fix Released

** Changed in: sssd (Ubuntu Tenacious)
       Status: New => Fix Released

** Changed in: sssd (Ubuntu Noble)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: sssd (Ubuntu Resolute)
     Assignee: (unassigned) => Zachary Raines (raineszm)

** Changed in: sssd (Ubuntu Stonking)
     Assignee: (unassigned) => Zachary Raines (raineszm)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174674

Title:
  sss_overide gives wrong uid/gid when UPN and sAMAccountName differ

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sssd/+bug/2174674/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to