Rocky 9.8 Apache sudo issue

Since upgrading to Rocky 9.8 I am running as the root at the moment and I wanted to run a command starting with sudo -u apache but when I run the complete command I am now getting a error:

sudo: Password expired, contact your system administrator

sudo: a password is required

I have never seen this before when running the sudo -u apache command. Anyway I decided to check to see if there was a indeed an expire limit on the user and ran a:

chage --list apache

and the results are:

Last password change : May 10, 2024
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1

So I am not sure what is causing this issue. Was hoping someone had an insight on this.

What user are you running the sudo command as? Eg:, what user did you login with before you ran the sudo command? Sounds like you need to check that particular user’s password, not the apache one.

I am logged in as myself doing a sudo su command to elevate my personal account to root. When I run sudo -u apache i am telling sudo to run as user apache. I have run this command for years when working with nextcloud server. It is just after the last update I started gettting this password expired error.

Got it, rebooted the vm a few times and it started working. Must have been a weird glitch.