Suddenly local account can’t log in anymore

Hi guys,

Months ago, I installed PSU and started writing scripts. So far, so good.
Initially, I created a local administrator account, “PSUAdmin.” I was able to log in with this account without any problems. A few weeks ago, I updated to version 5.6.8. After that, I had a few weeks of vacation. Now, suddenly, I can no longer login with local accounts!

Every time I try to log in with my local administrator account, it seems to redirect to https://localhost/login?returnUrl=/reset-password?username=PSUAdmin

But nothing else happens! There is also no dialog box for changing the password.
Under Settings, General, I set “Password Expiration Days” to 0, but it didn’t help.

Fortunately, I can still log in with my domain user, who is also an administrator. I then changed the password for the local administrator account in the admin console, but that didn’t change anything. I also created a new local administrator account, but the same problem persists!

I’ve been struggling with this for days now. Sometimes I even managed to log in with PSUAdmin – BUT ONLY if I entered a completely wrong password?! Strange!

What the hell is going on here?

    Set-PSUAuthenticationMethod -ScriptBlock {
        param(
            [PSCredential]$Credential
        )
    
        if ($Credential.UserName -eq 'PSUAdmin') {
            New-PSUAuthenticationResult -Succes -UserName 'PSUAdmin'
        }
        else {
            New-PSUAuthenticationResult -ErrorMessage 'Bad username or password'
        }
    }