zjorz / Public-AD-Scripts

AD Scripts
GNU General Public License v3.0
273 stars 77 forks source link

Timeout period expired error, but password still reset #8

Closed DiPersiaTech closed 1 year ago

DiPersiaTech commented 2 years ago

I'm running v2.8 of the kerberos password reset script. I run this for a handful of clients and haven't found a pattern to this error, though I believe it always errors on the same customer environments. Can be a 2008R2 (I know) domain, all the way up through a 2016 domain, and can have one or multiple DCs in the domain.

Exact error is below and am happy to provide additional output if helpful. I've looked through the script, but no ideas. Password shows as having been successfully updated despite this error. Just takes a good two minutes to time out.

[2022-04-25 15:41:26] :   --> RWDC To Reset Password On.............: 'DC002.domain.local'
[2022-04-25 15:41:26] :   --> sAMAccountName Of KrbTgt Account......: 'krbtgt'
[2022-04-25 15:41:26] :   --> Distinguished Name Of KrbTgt Account..: 'CN=krbtgt,CN=Users,DC=domain,DC=local'
[2022-04-25 15:41:26] :   --> Number Of Chars For Pwd Generation....: '64'
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] :   --> Setting the new password for [CN=krbtgt,CN=Users,DC=domain,DC=local] FAILED on RWDC [DC002.domain.local]!...
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] : Exception Type......: Microsoft.ActiveDirectory.Management.ADException
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] : Exception Message...: This operation returned because the timeout period expired
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] : Error On Script Line: 626
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] :
[2022-04-25 15:43:25] :   --> Previous Password Set Date/Time.......: '2021-12-15 08:43:27'
[2022-04-25 15:43:25] :   --> New Password Set Date/Time............: '2022-04-25 15:41:26'
boof-boof-boof commented 2 years ago

I experienced exactly this while running mode 6 in a production environment - the timeout occurs but after around 2 minutes the script continues and performs the reset as normal then passed all checks.

DiPersiaTech commented 2 years ago

Yeh, ran the script this week on a dozen or so environments. On probably 80% of them, this behavior prevailed. No pattern I can find. Looked through the code and nothing jumping out at me.

zjorz commented 2 years ago

Hi, I'm writing a new version of the script. It has lots of changes. Wanna give it a try? Please let me know and I'll send you a copy

DiPersiaTech commented 2 years ago

Sure, send it over. What's the best way to touch base directly?

zjorz commented 2 years ago

please mail me using the mail address in the script

zjorz commented 1 year ago

Latest version contains fix to this