I have been tryin to look for a long time now..I cant figure out how to code something that will do this:
List all the user accounts on the computer,
change passwords on the accounts
Printable View
I have been tryin to look for a long time now..I cant figure out how to code something that will do this:
List all the user accounts on the computer,
change passwords on the accounts
You can list accounts using the Win32_UserAccount WMI class through the System.Management namespace. Gigemboy's signature has some useful WMI stuff. That class doesn't offer a property or method to set the password though. This isn't a big shock really. I'd not be surprised to learn that Windows doesn't offer a way to programmatically change user passwords. Letting any old application do that could be a bit dangerous.
Nope, MS do provide a NetUserChangePassword API to change password's of user accounts. ;)
I agree that it's dangerous and I've always wondered why it exists at all.