Local Account: Find Last Password Change
Solution 1
The 'net user' command line will do just that:
C:\Documents and Settings\adam>net user adam
User name adam
Full Name Your Momma
Comment
User's comment
Country code 000 (System Default)
Account active Yes
Account expires Never
Password last set 7/1/2009 10:32 AM
Password expires Never
Password changeable 7/1/2009 10:32 AM
Password required Yes
User may change password No
Workstations allowed All
Logon script
User profile
Home directory
Last logon 8/19/2009 3:24 PM
Logon hours allowed All
Local Group Memberships *Administrators *Debugger Users
*Users
Global Group memberships *None
The command completed successfully.
Solution 2
Assuming that we're talking about a local account on Windows Server, and not an Active Directory Domain user. Then open cmd.exe and enter the following command:
NET USER username
You'll get a dump of information about the account including the password last set information.
If you want to make it fancier and get back just that information you can pipe the output of net user to the find command:
NET USER username | find "Password last set"
Note for Active Directory accounts: If you're more interested in a domain account you can add the /domain switch to check for the same information. However, due to the distributed nature of AD you may not get the most accurate time from the DC you're asking. The most precise time is stored in the pwd-last-set attribute of the user account, but that requires some manipulation to make sense.
Solution 3
Use the "net user" command - for example "net user USERNAME" will display a list with all sorts of info, including password last set and password expiration.
Related videos on Youtube
![Hanna](https://i.stack.imgur.com/1m93a.jpg?s=256&g=1)
Hanna
Updated on September 17, 2022Comments
-
Hanna almost 2 years
Let's say I have a series of numbers like...
1 2 3 4 5 6 7 8 9 0
How could I step through each int, but stop when I reach a new line? I'm currently using
nextInt()
and I know thatnextLine()
will detect the new line, but I'm not sure how to piece that together. Is it best to take the entire line, and parse the string into separate ints? Or is there a more fluid method of doing this?For my example, I would want the program to store
1 2 3 4
,5 6 7 8
,9 0
all in their own separate array.For more clarification, I'm using the
java.util.Scanner
and I'm reading a text file.-
Jim Garrison about 13 years"More fluid" will depend on what you ultimately intend to do with the data and how much data there is. Add some more detail on what you're trying to do.
-
Mahendra Liya about 13 yearsDo you mean you want '1 2 3 4' in one array, '5 6 7 8' in other array and so on?
-
Hanna about 13 years@mahendraliya: Yes, exactly. That's what I meant :]
-
-
Hanna about 13 yearsThat is a fantastic idea. I would have never thought of that! So simple too!