** Description changed:

  [ Impact ]
  
  When SSSD attempts to renew the machine account password, it invokes realm.
  However, realmd 0.17.1 does not have support for the renew command.
  
  Instead, the command prints the general usage information and exits with
  an error.
  
  As a result, the machine account password is never updated in Active
  Directory.
  
  [ Test Plan ]
  
  To test the fix for this bug, an active directory realm is needed, which
  makes this a bit involved.
  
  I propose two test plans: a) autopkgtest as described below, and b) a
  simple command-line check of realm.
  
  a)
  The samba package was updated to include a new machine account password 
renewal test in its samba-ad-dc-provisioning-internal-dns autopkgtest.
  
  The test plan therefore is to run the samba autopkgtests with this new
  test. The output of a successful run will look like this:
  
  ## Verify that machine account password renewal works with method realmd_sssd
  ## Stopping sssd in member server
  ## Setting ad_machine_account_password_renewal_opts for renewal task every 60s
  ## Forcing machine account password to look expired
  Modified 1 records successfully
  ## Sampling whenChanged for member-server
  ## Initial whenChanged: whenChanged: 20261106231005.0Z
  ## Starting sssd in member server
  ## Polling whenChanged for machine password renewal
  ## Polling whenChanged (5/70s)
  ## Polling whenChanged (10/70s)
  ## whenChanged updated: whenChanged: 20261106231014.0Z
  
  For the devel release, samba with this test will be uploaded first, and
  then the realmd upload should trigger a samba test as well.
  
  For SRUs, samba can be uploaded with a block-proposed tag, so that it's
  only there for the test, or the test can be invoked manually locally and
  its output used to demonstrate the fixed bug.
  
  b) Verify renew command exists
  
  Run:
  $ realm renew --help
  Usage:
-   realm [OPTION…] renew REALM
+   realm [OPTION…] renew REALM
  (...)
  
  Search for renew documentation in the realm manpage:
  RENEW
-      Renew the machine account password and update the keytab.
+      Renew the machine account password and update the keytab.
  
-          $ realm renew
+          $ realm renew
  
-          $ realm renew --computer-password-lifetime=10 domain.example.com
+          $ realm renew --computer-password-lifetime=10 domain.example.com
  (...)
- 
  
  [ Where problems could occur ]
  
+ Besides adding a new command, which is essentially opt-in, there is a
+ very small refactoring patch that the new command depends on:
+ lp2172750-fix-error-message-when-removing-host-from-ad.patch
+ 
+ It is in the path about joining and leaving domains, and that is covered
+ in the samba autopkgtests.
+ 
+ Regressions in the account renewal functionality being introduced in
+ this SRU might only be noticed after 30 days (the default interval).
+ That's also why the original bug wasn't noticed: upgrades or fresh
+ installs of resolute would only notice something was wrong after that
+ period of time.
+ 
  [ Other Info ]
+ n/a
  
-  * Anything else you think is useful to include
- 
-  * Make sure to explain any deviation from the norm, to save the SRU
-    reviewer from having to infer your reasoning, possibly incorrectly.
-    This should also help reduce review iterations, particularly when the
-    reason for the deviation is not obvious.
- 
-  * Anticipate questions from users, SRU, +1 maintenance, security teams
-    and the Technical Board and address these questions in advance
+ [ Original Description ]
  
  Ubuntu 26.04.1 LTS
  sssd 2.12.0-1ubuntu5.5
  realm 0.17.1-3build3
  
  When SSSD attempts to renew the machine account password, it invokes realm.
  However, realmd 0.17.1 does not appear to support the required realm renew 
command.
  Instead, the command prints the general usage information and exits with an 
error.
  As a result, the machine account password is never updated in Active 
Directory.
  This may be based on a change of default behaviour of config value 
ad_machine_account_password_renewal_opts from adcli to realm. Former Ubuntu 
Versions use adcli by default. there are some similar reports for other systems 
describing the exact problem: 
https://bugzilla.redhat.com/show_bug.cgi?id=2379224
  
  Thanks

** Description changed:

  [ Impact ]
  
- When SSSD attempts to renew the machine account password, it invokes realm.
- However, realmd 0.17.1 does not have support for the renew command.
+ When SSSD attempts to renew the machine account password, it invokes
+ realm(8). However, realmd 0.17.1 does not have support for the renew
+ command.
  
  Instead, the command prints the general usage information and exits with
- an error.
- 
- As a result, the machine account password is never updated in Active
- Directory.
+ an error, and the machine account's password is not renewed.
  
  [ Test Plan ]
  
  To test the fix for this bug, an active directory realm is needed, which
  makes this a bit involved.
  
  I propose two test plans: a) autopkgtest as described below, and b) a
  simple command-line check of realm.
  
  a)
  The samba package was updated to include a new machine account password 
renewal test in its samba-ad-dc-provisioning-internal-dns autopkgtest.
  
  The test plan therefore is to run the samba autopkgtests with this new
  test. The output of a successful run will look like this:
  
  ## Verify that machine account password renewal works with method realmd_sssd
  ## Stopping sssd in member server
  ## Setting ad_machine_account_password_renewal_opts for renewal task every 60s
  ## Forcing machine account password to look expired
  Modified 1 records successfully
  ## Sampling whenChanged for member-server
  ## Initial whenChanged: whenChanged: 20261106231005.0Z
  ## Starting sssd in member server
  ## Polling whenChanged for machine password renewal
  ## Polling whenChanged (5/70s)
  ## Polling whenChanged (10/70s)
  ## whenChanged updated: whenChanged: 20261106231014.0Z
  
  For the devel release, samba with this test will be uploaded first, and
  then the realmd upload should trigger a samba test as well.
  
  For SRUs, samba can be uploaded with a block-proposed tag, so that it's
  only there for the test, or the test can be invoked manually locally and
  its output used to demonstrate the fixed bug.
  
  b) Verify renew command exists
  
  Run:
  $ realm renew --help
  Usage:
    realm [OPTION…] renew REALM
  (...)
  
  Search for renew documentation in the realm manpage:
  RENEW
       Renew the machine account password and update the keytab.
  
           $ realm renew
  
           $ realm renew --computer-password-lifetime=10 domain.example.com
  (...)
  
  [ Where problems could occur ]
  
  Besides adding a new command, which is essentially opt-in, there is a
  very small refactoring patch that the new command depends on:
  lp2172750-fix-error-message-when-removing-host-from-ad.patch
  
  It is in the path about joining and leaving domains, and that is covered
  in the samba autopkgtests.
  
  Regressions in the account renewal functionality being introduced in
  this SRU might only be noticed after 30 days (the default interval).
  That's also why the original bug wasn't noticed: upgrades or fresh
  installs of resolute would only notice something was wrong after that
  period of time.
  
  [ Other Info ]
  n/a
  
  [ Original Description ]
  
  Ubuntu 26.04.1 LTS
  sssd 2.12.0-1ubuntu5.5
  realm 0.17.1-3build3
  
  When SSSD attempts to renew the machine account password, it invokes realm.
  However, realmd 0.17.1 does not appear to support the required realm renew 
command.
  Instead, the command prints the general usage information and exits with an 
error.
  As a result, the machine account password is never updated in Active 
Directory.
  This may be based on a change of default behaviour of config value 
ad_machine_account_password_renewal_opts from adcli to realm. Former Ubuntu 
Versions use adcli by default. there are some similar reports for other systems 
describing the exact problem: 
https://bugzilla.redhat.com/show_bug.cgi?id=2379224
  
  Thanks

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

Title:
  sssd fails to renew machine account password

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


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

Reply via email to