Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
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!
-----signature-----
|
Link to this post
|
Ravynmagi
Title: Moderator
Posts:
29,978
Registered:
Dec 23, '01
Extended Info (if available)
Real Post Cnt: 29,452
User ID: 572,278
|
Subject:
Windows 7 password expiration question
|
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.
-----signature-----
(none)
|
Link to this post
|
IvanDF
Title: Veni, vidi, vici
Posts:
7,219
Registered:
Nov 28, '04
Extended Info (if available)
Real Post Cnt: 7,007
User ID: 998,645
|
Subject:
Windows 7 password expiration question
|
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
|
Link to this post
|
Steelwind_Oo
Title: Lurking Oo
Posts:
32,879
Registered:
Sep 30, '00
Extended Info (if available)
Real Post Cnt: 31,007
User ID: 46,829
|
Subject:
Windows 7 password expiration question
|
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%
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
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 "You have 5 days left until your password expires" but I sure cant seem to find it. Anyone have any other ideas?
-----signature-----
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
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.
-----signature-----
|
Link to this post
|
Steelwind_Oo
Title: Lurking Oo
Posts:
32,879
Registered:
Sep 30, '00
Extended Info (if available)
Real Post Cnt: 31,007
User ID: 46,829
|
Subject:
Windows 7 password expiration question
|
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%
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
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
-----signature-----
|
Link to this post
|
Steelwind_Oo
Title: Lurking Oo
Posts:
32,879
Registered:
Sep 30, '00
Extended Info (if available)
Real Post Cnt: 31,007
User ID: 46,829
|
Subject:
Windows 7 password expiration question
|
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%
|
Link to this post
|
Steelwind_Oo
Title: Lurking Oo
Posts:
32,879
Registered:
Sep 30, '00
Extended Info (if available)
Real Post Cnt: 31,007
User ID: 46,829
|
Subject:
Windows 7 password expiration question
|
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%
|
Link to this post
|
Balor_Gafdan
Title: Gun Toting Conservative
Posts:
27,802
Registered:
Dec 20, '01
Extended Info (if available)
Real Post Cnt: 27,282
User ID: 563,478
|
Subject:
Windows 7 password expiration question
|
With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on. Am I missing something with the initial question?
-----signature-----
"The constitutions of most of our States assert that all power is inherent in the people; that... it is their right and duty to be at all times armed." Rolab - PT Warhammer
|
Link to this post
|
Lannai
Posts:
2,526
Registered:
Oct 7, '04
Extended Info (if available)
Real Post Cnt: 1,963
User ID: 973,906
|
Subject:
Windows 7 password expiration question
|
Balor_Gafdan posted: With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on. Am I missing something with the initial question?
He just wanted to know EXACTLY when it was going to expire. I don't think you missed anything...the OP was very clear about what he wanted to do.
-----signature-----
Lannai Fidenian
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
Steelwind_Oo posted: net user %username% /domain | find "Password expires" | msg %username% ... if you want it to popup a dialog to the user with the expiration message.
Thank you, that's much easier than what I wrote up Perfect.
-----signature-----
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
Balor_Gafdan posted: With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on. Am I missing something with the initial question?
Yes... we dont require nightly restarts or log offs here, we just lock the PCs after 30 minutes of inactivity, so some users were not seeing their prompts at login since they just restart monthly or if they are experiencing problems. Also, it's nice to know how long someone has left until password expiration, not just have them guess how long ago they got the warning about changing it.
-----signature-----
|
Link to this post
|
Ookane
Title: Moderator
Posts:
7,677
Registered:
Oct 15, '02
Extended Info (if available)
Real Post Cnt: 7,539
User ID: 727,456
|
Subject:
Windows 7 password expiration question
|
Recty posted:
Balor_Gafdan posted: With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on.
Am I missing something with the initial question?
Yes... we dont require nightly restarts or log offs here, we just lock the PCs after 30 minutes of inactivity, so some users were not seeing their prompts at login since they just restart monthly or if they are experiencing problems.
Also, it's nice to know how long someone has left until password expiration, not just have them guess how long ago they got the warning about changing it.
Odd, I get a popup bubble from the tooltray stating something like "Your password expires in xx days, you should consider changing it soon," and I stay logged in months at a time on my main PC, just locking the screen.
-----signature-----
WoW - Lightbringer server For the HORDE!!!
|
Link to this post
|
Recty
Posts:
????
Registered:
????
Extended Info (if available)
Real Post Cnt: 0
User ID: 0
|
Subject:
Windows 7 password expiration question
|
Mine, for instance, expires 03/03/2012. 3 more days... yet I only saw the popup when I logged on Monday (I restart over the weekend and do a full log on process every Monday morning) and havent seen it since.
-----signature-----
|
Link to this post
|
Balor_Gafdan
Title: Gun Toting Conservative
Posts:
27,802
Registered:
Dec 20, '01
Extended Info (if available)
Real Post Cnt: 27,282
User ID: 563,478
|
Subject:
Windows 7 password expiration question
|
Recty posted:
Balor_Gafdan posted: With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on. Am I missing something with the initial question?
Yes... we dont require nightly restarts or log offs here, we just lock the PCs after 30 minutes of inactivity, so some users were not seeing their prompts at login since they just restart monthly or if they are experiencing problems. Also, it's nice to know how long someone has left until password expiration, not just have them guess how long ago they got the warning about changing it.
Ahhh, I didn't see the part about not requiring nightly restarts or log offs. Gotcha. See, now it makes sense.
-----signature-----
"The constitutions of most of our States assert that all power is inherent in the people; that... it is their right and duty to be at all times armed." Rolab - PT Warhammer
|
Link to this post
|
Balor_Gafdan
Title: Gun Toting Conservative
Posts:
27,802
Registered:
Dec 20, '01
Extended Info (if available)
Real Post Cnt: 27,282
User ID: 563,478
|
Subject:
Windows 7 password expiration question
|
Lannai posted:
Balor_Gafdan posted: With Group policy, there's no need for an extra script as at the 7 day mark that you've set, the user will get a pop up upon log on. Am I missing something with the initial question?
He just wanted to know EXACTLY when it was going to expire. I don't think you missed anything...the OP was very clear about what he wanted to do.
Which is what the group policy setting does. However, by asking for more information he was able to clarify WHY he wanted a script to do something that's built into a Group Policy environment.
-----signature-----
"The constitutions of most of our States assert that all power is inherent in the people; that... it is their right and duty to be at all times armed." Rolab - PT Warhammer
|
Link to this post
|
Balor_Gafdan
Title: Gun Toting Conservative
Posts:
27,802
Registered:
Dec 20, '01
Extended Info (if available)
Real Post Cnt: 27,282
User ID: 563,478
|
Subject:
Windows 7 password expiration question
|
Recty posted: Mine, for instance, expires 03/03/2012. 3 more days... yet I only saw the popup when I logged on Monday (I restart over the weekend and do a full log on process every Monday morning) and havent seen it since.
Do a Group Policy result wizard on your machine and see if the policy governing password policy is running or erroring out. Gpresult /r on the local machine won't give you the detail you need to see if it "is" erroring out. That being said, the script that queries the variable will work, so you should be good to go.
-----signature-----
"The constitutions of most of our States assert that all power is inherent in the people; that... it is their right and duty to be at all times armed." Rolab - PT Warhammer
|
Link to this post
|