[SRU] Adsys can't properly resolve registry.pol vs Regristry.pol

Bug #2080390 reported by David Clark
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
adsys (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Noble
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

adsys is only able to parse .pol files exactly named "Registry.pol". With this, it is now able to ignore casing on the registry file and behave more similarly to what Windows machines do (as they ignore casing).

[Test Plan]

1. Configure a GPO in the AD controller and rename the registry file to "registry.pol"
  - File can be found at "\\domain.com\sysvol\policies\{policy-id}"

2. Install adsys and update the policies
  - `adsysctl policy update --all`

3. adsys should correctly fetch and apply all policies, regardless of the registry name format;

[Where Problems Could Occur]

Due to adsys not being able to parse these files before, some policies that weren't applied before on the client due to this issue will be applied now. This could cause behaviors that were unexpected by the AD administrators (depending on how the GPOs were configured).

[Original Description]

We're conducting tests to validate Ubuntu Pro 24.04 as supported corporate OS, we managed to integrate it with AD and fetch gpo's with adsys, however our domain controllers sends some GPO's in a file named `Registry.pol` which is what adsys expects[2], while other policies come as `registry.pol` which adsys doesn't read[3].

If I create a symlink from registry.pol to Registry.pol the GPO is applied fine.:

root@deskun:/var/cache/adsys/sysvol/Policies/{8C89C929-97A5-4B64-BD71-E56B91D56A16}/User# ls -l
total 12
lrwxrwxrwx 1 root root 12 Sep 5 19:48 Registry.pol -> registry.pol
-rw------- 1 root root 552 Sep 5 19:36 comment.cmtx
-rw------- 1 root root 4960 Sep 5 19:36 registry.pol

[2] https://github.com/ubuntu/adsys/blob/5dc6cd8707b8b0c597fd01e9525ae9bcc668c217/internal/ad/ad.go#L513

[3]: level=debug msg="github.com/ubuntu/adsys/internal/ad/ad.go:527 (*AD).parseGPOs.func1() Policy \"Workstations - Piloto Ubuntu\" doesn't have any policy for class \"user\" open /var/cache/adsys/sysvol/Policies/{8C89C929-97A5-4B64-BD71-E56B91D56A16}/User/Registry.pol: no such file or directory"

description: updated
information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package adsys - 0.15.2

---------------
adsys (0.15.2) oracular; urgency=medium

  [ Davi Henrique ]
  * Ignore casing when fetching Registry.pol (LP: #2080390)
  * Add configurable timeout for listing GPOs (LP: #2081966)

  [ Felipe Alencastro ]
  * Add support for DCONF usb settings (LP: #2081968)

 -- Denison Barbosa <email address hidden> Wed, 25 Sep 2024 08:06:40 -0400

Changed in adsys (Ubuntu):
status: New → Fix Released
description: updated
description: updated
summary: - Adsys can't properly resolve registry.pol vs Regristry.pol
+ [SRU] Adsys can't properly resolve registry.pol vs Regristry.pol
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted adsys into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/adsys/0.14.3~24.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in adsys (Ubuntu Noble):
status: New → Fix Committed
tags: added: verification-needed verification-needed-noble
Changed in adsys (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello David, or anyone else affected,

Accepted adsys into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/adsys/0.14.3~22.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Denison Barbosa (justdenis) wrote :

The test plan was executed for Noble (24.04) and I confirm it was successful. The package version used for the tests is the one proposed, as can be seen by the output of apt-cache policy:
adsys:
  Installed: 0.14.3~24.04
  Candidate: 0.14.3~24.04
  Version table:
 *** 0.14.3~24.04 100
        100 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages

The following steps were executed:

1) Create a fresh VM with Ubuntu 24.04;
2) Join an active directory domain (created for test purposes);
3) Install adsys;
4) In the AD server, configure a GPO and then rename the Registry.pol file to registry.pol;
   - The file can be found in \\{domain}\SYSVOL\{domain}\Policies\{policyID}\{User or Machine}
5) Authenticate on the Ubuntu client with an AD user to which the policy should be applied;

After step 5, adsys properly resolves the lowercased registry.pol file and correctly applies the GPO to the user.

Revision history for this message
Denison Barbosa (justdenis) wrote :

The test plan was executed for Jammy (22.04) and I confirm it was successful. The package version used for the tests is the one proposed, as can be seen by the output of apt-cache policy:
adsys:
  Installed: 0.14.3~22.04
  Candidate: 0.14.3~22.04
  Version table:
 *** 0.14.3~22.04 500
        500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages

The following steps were executed:

1) Create a fresh VM with Ubuntu 22.04;
2) Join an active directory domain (created for test purposes);
3) Install adsys;
4) In the AD server, configure a GPO and then rename the Registry.pol file to registry.pol;
   - The file can be found in \\{domain}\SYSVOL\{domain}\Policies\{policyID}\{User or Machine}
5) Authenticate on the Ubuntu client with an AD user to which the policy should be applied;

After step 5, adsys properly resolves the lowercased registry.pol file and correctly applies the GPO to the user.

tags: added: verification-done verification-done-jammy verification-done-noble
removed: verification-needed verification-needed-jammy verification-needed-noble
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for adsys has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package adsys - 0.14.3~24.04

---------------
adsys (0.14.3~24.04) noble; urgency=medium

  [Davi Henrique]
  * Ignore casing when fetching Registry.pol (LP: #2080390)
  * Add configurable timeout for listing GPOs (LP: #2081966)

  [Felipe Alencastro]
  * Add support for DCONF usb settings (LP: #2081968)

 -- Denison Barbosa <email address hidden> Tue, 19 Nov 2024 06:28:25 -0400

Changed in adsys (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package adsys - 0.14.3~22.04

---------------
adsys (0.14.3~22.04) jammy; urgency=medium

  [Davi Henrique]
  * Ignore casing when fetching Registry.pol (LP: #2080390)
  * Add configurable timeout for listing GPOs (LP: #2081966)

  [Felipe Alencastro]
  * Add support for DCONF usb settings (LP: #2081968)

 -- Denison Barbosa <email address hidden> Tue, 19 Nov 2024 06:38:20 -0400

Changed in adsys (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.