Password of local Account expires too early on a Intune managed AzureAD-joined Device

Alexander Riegel 1 Reputation point
2022-08-10T10:56:29.09+00:00

Hello guys,

For security reasons we don't want the logged-in daily user to be administrator, so we decided to create a local administrator per script for all devices with a default pw which has to be changed by the first login, which can be used for Installations and other stuff.

After changing the pw and setting the flag for "pw never expires" the flag magically disapears after four hours and so the pw has to be set after 42 days. Resetting the flag only takes effect for 4 hours. For testing we created other local accounts manually with administrator and normal rights and they act the same.

We have no Policies in Intune which can affect the local users and our clients are azuread-joined only.

As a workaround we changed the local pw-policy so that the pw only expires after 998 days.
when running the "net user" command it says, that the pw expires in roundabout 3 years, but after 42 days the pw has to be changed (flag to change pw is set). If we again run "net user" it still says, that the pw will expire in 2 years. If we remove the flag, that forces the user to change the pw and try to login we get an error, that the pw is expired.

Question 1: Where can I see the real Information when a pw will be expired?
Question 2: Does anybody else faced this problem before and has an solution how to fix the problem on an Intune managed Device without an on-premise AD

Thanks, Alex

-----------------------------------------------------------------------------------------

Auf deutsch:

Hallo zusammen,

ich bin mit meinem Latein langsam aber sicher am Ende.

Folgender Sachverhalt:

Aus Sicherheitsgründen haben die Accounts auf den Geräten keine Administratorenberechtigungen. Um den Entwicklern dennoch die Möglichkeit zu geben Software zu Installieren/Systemumgebungsvariablen zu setzten, etc. haben wir per Script einen lokalen Administrator mit Standardpasswort auf allen Geräten angelegt (Kennwort muss bei erster Anmeldung geändert werden).

Nachdem das Kennwort geändert wurde sollten die Benutzer das Kennwort auf "läuft nie ab" setzen.

Problem: Nach ca. 4 Stunden wird das Flag "Kennwort läuft nie ab" automatisch entfernt.

Das Betrifft alle lokalen Benutzerkonten, auch die die zu testzwecken manuell angelegt wurden.

Nach 42 Tagen ist das Konto gesperrt und muss neu gesetzt werden, was nicht jedes mal klappt (Fehlermeldung: Zur Verarbeitung dieses Befehls sind nicht genügend Speicherresourcen verfügbar.) -> mega nervig und benötigt einen Administrator um das Kennwort neu zu setzen.

Da wir keinerlei Policies haben die lokale Benutzer betreffen und die Geräte auch nicht an einem on-premise AD hängen und dennoch eine Lösung brauchten, haben wir uns für einen Workaround entschieden, der uns den Ärger nur alle 998+ Tage bescheren sollte.

Workaround: Wir haben die lokale Kennwortablaufrichtlinie von 42 auf 998 Tage angehoben.

Problem: nach ca. 42 Tagen muss der Benutzer erneut das Kennwort ändern.

Diagnose: net user lokaler-admin-benutzername zeigt an, dass das Kennwort noch über zwei Jahre nicht ablaufen sollte.

Probiert: Wenn man man am Benutzer das Flag "Benutzer muss Kennwort bei nächstem Login ändern" entfernt, dann wird beim Loginversuch dennoch angezeigt, dass das Kennwort abgelaufen ist.

Frage 1: Wo kann ich nachschauen wann das Kennwort tatsächlich abläuft, da die Aussage von "net user" scheinbar nicht Korrekt ist, bzw. das System seine Info woanders bezieht?

Frage 2: Kennt jemand das Problem und kann eine Funktionierende Lösung bieten, die mich nicht ständig dazu zwingt von einem Büro zum anderen zu rennen um das Kennwort zu überschreiben?

Viele Grüße

Alex

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,593 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,748 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,713 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,428 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,341 Reputation points
    2022-08-11T15:49:01.82+00:00

    Hi there,

    Have you tried setting the password to never expire?

    As an admin, you can make user passwords expire after a certain number of days, or set passwords to never expire. By default, passwords are set to never expire for your organization.

    Set the password expiration policy for your organization https://learn.microsoft.com/en-us/microsoft-365/admin/manage/set-password-expiration-policy?view=o365-worldwide

    You can use the Powershell script to find the password expiration date. Using the attribute, “msDS-UserPasswordExpiryTimeComputed,” you can easily get the password expiration date for a single user, with:

    Get-ADUser -Identity UserName -Properties msDS-UserPasswordExpiryTimeComputed).'msDS-UserPasswordExpiryTimeComputed'

    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–


  2. J. Manuel Nieto González 1 Reputation point
    2022-10-01T04:21:14.04+00:00

    Hola Alex.

    We are seeing same or similar behavior. Had Local Admin account (even before Intune enrollment) and HAADJ. Now the HAADJ systems are disabling "Password never expires" for local account every x amount of time, I assume it would be around the 4-hour mark as you mention.

    First we blamed password complexity (It's in a GPO in local AD). Changed complexity to comply with policy in a few system, still the same. Created a Proactive Remediation to run every x days, still happening.

    We haven't seen and/or confirmed this on AAD joined systems, but we only have the first 2 Autopilot systems in lab, these are the only ones AAD joined.

    We'll join this adventure and report if we find anything on our side.
    BTW, seems we're not alone: a-case-of-the-unexplained-intune-password-policy-and-forced-local-account-password-changes

    Best regards
    @jmanuelnieto

    0 comments No comments