M HYPE SPLASH
// general

Force change password upon next logon

By John Peck

How can I make sure the currently logged in Administrator account will be forced to change its password, upon the next logon, and only on this next logon.

This is a standalone Windows 7 (Home Premium) machine, with only a single user ('me'), no domain controller, no network policies, etc.

3 Answers

This is not possible on a Home Premium version of windows, and needs a Business or Pro version or higher, as it requires local group policies to exist.

If you upgrade windows 7 to Business Premium, then the following part of the answer can be used:

You can do this from Computer Management.

Go to the control panel, Administrative tools, then Computer management.

In the left menu, find Local Users and Groups.

Open it, and go to Users.

You will find a list of all users on your computer.

Double click the user you want to edit.

You will find a box that says [ ] User must change password at next logon. Check the box and hit ok.

This option will be grayed out for domain users because domain users are controlled through Active Directory. I know this is not applicable for you, but I'm listing this in case someone else finds this that has a pc that is joined to a domain.

This feature exists in every NT version of windows, going back to Windows NT 4. It also is included in Windows 10.

5

Here's what I found worked for me on Windows 10 Home.

wmic UserAccount where name='John Doe' set Passwordexpires=true

Followed by

net user "John Doe" /logonpasswordchg:yes

This series of steps should give the impression of the "password must be changed on next logon":

According to this Windows Central article, you can configure an account's password to expire with WMIC:

wmic UserAccount where Name='USERNAME' set PasswordExpires=True

Note: Replace "USERNAME" with the name of the account you want the password to expire.

This causes the account to expire after they reach their max password age. You can configure the max age for all accounts on the machine to 1 day with:

net accounts /maxpwage:1

Finally, create a batch script and put it in the Startup folder of the target user's account to disable expiring passwords with the command:

wmic UserAccount where Name='USERNAME' set PasswordExpires=False
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy