VaultNetwork.netVault Network Boards
Author Topic: Windows 7 password expiration question [Locked]
Recty
Posts: 12
Registered:
I'm on a Windows 7 Professional PC at work.

I know my password is expiring soon, but I dont know how soon.

Anyone have any clue if there is a way I can tell how many days I have left? I've googled it, I cant find an answer.

I want to be able to have the average user do this, so if the answer is "Log onto the server and..." then it wont work for us.

Thanks for any ideas you can give!
Ravynmagi  4 stars
Title: Moderator
Posts: 1,098
Registered: 2001-12-23 17:10:17
Not sure if there is a way. If the PC is on the domain, it should send a warning starting, I think, 14 days before it expires.
IvanDF  1 star
Title: Veni, vidi, vici
Posts: 190
Registered: 2004-11-28 11:24:08
Ravynmagi posted:

Not sure if there is a way. If the PC is on the domain, it should send a warning starting, I think, 14 days before it expires.


Correct you get a 14 day warning. I pulled up active directory and I dont see any place where it tells me when someones pw will expire. It has a place where the account will expire, if the account is set to do that, but not hte pw.

 

-----signature-----
360 Gamer Tag: Ivan34
Steam ID: OSUIvan
Steelwind_Oo  4 stars
Title: Lurking Oo
Posts: 1,789
Registered: 2000-9-30 10:26:30
Actually the 14 days is set via group policy on a domain but yeah the default is 14 I believe.


To see when yours expires enter the below command at the command prompt...

net user username /domain

With username being your username

Assuming you aren't restricted from doing this via group policies you will see the details about your account, including when the password expires.

 

-----signature-----
'God is an imaginary friend for grownups.', Walter Crewes (Morgan Freeman), The Big Bounce
Don't be afraid to ask dumb questions they're easier to handle than dumb mistakes!
Xbox 360 Gamer Tag: SteelwindOo
e93% a53% s33% k13%
Recty
Posts: 12
Registered:
Yep, we've actually set through group policy only a one week reminder window, so it isnt 14 days here but I do believe 14 days was standard.

And yep, I looked in AD already all over the place for finding this... I sure couldnt. And really, I want a user to be able to access this, so AD isnt an option.

It seems like such a weird thing to me, I would think there would be some easy way to find it saying "ou have 5 days left until your password expires" but I sure cant seem to find it.

Anyone have any other ideas?
Recty
Posts: 12
Registered:
Steelwind_Oo posted:

Actually the 14 days is set via group policy on a domain but yeah the default is 14 I believe.


To see when yours expires enter the below command at the command prompt...

net user username /domain

With username being your username

Assuming you aren't restricted from doing this via group policies you will see the details about your account, including when the password expires.

Ah, very nice. This is what I was looking for. Now, I wish there was a way to pull the data out under the Password Expires field. I dont need a user seeing all that information, just the one data point is plenty.
Steelwind_Oo  4 stars
Title: Lurking Oo
Posts: 1,789
Registered: 2000-9-30 10:26:30
If it was linux you could grep but there are other pretty easy ways to do it in windows. Give me a minute.

 

-----signature-----
'God is an imaginary friend for grownups.', Walter Crewes (Morgan Freeman), The Big Bounce
Don't be afraid to ask dumb questions they're easier to handle than dumb mistakes!
Xbox 360 Gamer Tag: SteelwindOo
e93% a53% s33% k13%
Recty
Posts: 12
Registered:
I was able to get this done with a little work.

I basically logged the file using ">>" from a command prompt, then used AutoIT and searched for the expression I wanted, grabbed that out and popped it up as a message box. Pretty simple once I had the data I needed, I just had a hard time finding out how to get that data.

If you have a better way, VBS or something, I'm all ears, I never mind improving my code
Steelwind_Oo  4 stars
Title: Lurking Oo
Posts: 1,789
Registered: 2000-9-30 10:26:30
Bah, I lose my edge when I've been up over 24 hours, lol...


net user %username% /domain | find "Password expires"

Exactly as typed. %username% should be an environment variable set when the user logs in. In some weird cases I have had it not populate properly (mostly in heavily trafficked terminal server situations) in which case you'll have to provide it.

 

-----signature-----
'God is an imaginary friend for grownups.', Walter Crewes (Morgan Freeman), The Big Bounce
Don't be afraid to ask dumb questions they're easier to handle than dumb mistakes!
Xbox 360 Gamer Tag: SteelwindOo
e93% a53% s33% k13%
Steelwind_Oo  4 stars
Title: Lurking Oo
Posts: 1,789
Registered: 2000-9-30 10:26:30
net user %username% /domain | find "Password expires" | msg %username%

... if you want it to popup a dialog to the user with the expiration message.

 

-----signature-----
'God is an imaginary friend for grownups.', Walter Crewes (Morgan Freeman), The Big Bounce
Don't be afraid to ask dumb questions they're easier to handle than dumb mistakes!
Xbox 360 Gamer Tag: SteelwindOo
e93% a53% s33% k13%

VaultNetwork.net is an independently operated community forum and is not affiliated with, endorsed by, or technically based on IGN, GameSpy, FilePlanet, GameStats, or the former IGN/GameSpy Vault Network.
References to VaultNetwork.net mean this site/domain. VNBoards-style presentation is a visual homage only. By using this site, you agree to the forum rules.