How to change other windows user password and automating this using batch script?
|Hi geeks, do you know how to change a user account password in windows without knowing the old one? If you are having an administrator account on windows system with multiple user accounts and have forgotten passwords to one of those accounts and locked out, you are at the right place.
Today we are going to see how to change windows user account (of any user) password without knowing the old one. Windows won’t allow us to do this without knowing the old password even if we are having an administrator account.
Some of you might have forgotten the old password of the account that was kept ideal for a long time and may want to change it and most of us wants to know this, to mess up with schools and college system or to prank our friends. 😛
There are two general ways to do this,
- This can be done in cmd (command prompt).
- And can also be done with local user and group manager.
Windows allows us to change the password of any user through these two applications even if you don’t know the old password(but you need to be an administrator). But I’m not going to show you these two methods!! There are tons of tutorials online to show you those two ways, lets see something new.
If you have read my last post (i.e. How to create a Bootable pendrive?), you might be knowing that I’m a little lazy programmer who is bored of doing things manually. So I thought of automating this process and came up with another simple code for this.
You don’t need any compilers or IDKs to run this program, this is done in batch script and you just need a text editor (Notepad).
Okay let’s start with a simple two-step process :
- Open the notepad in your system and start writing the below code.
@echo off Title SummA pass Cracker color a net user echo Enter the user name to hack (case sensitive) set/p "usr=>" net user %usr% Summ@ cls echo echo e100 B8 13 00 CD 10 E4 40 88 C3 E4 40 88 C7 F6 E3 30 echo e110 DF 88 C1 BA C8 03 30 C0 EE BA DA 03 EC A8 08 75 echo e120 FB EC A8 08 74 FB BA C9 03 88 D8 EE 88 F8 EE 88 echo e130 C8 EE B4 01 CD 16 74 CD B8 03 00 CD 10 C3 echo e100 B8 13 00 CD 10 E4 40 88 C3 E4 40 88 C7 F6 E3 30 echo e110 DF 88 C1 BA C8 03 30 C0 EE BA DA 03 EC A8 08 75 echo e120 FB EC A8 08 74 FB BA C9 03 88 D8 EE 88 F8 EE 88 echo e130 C8 EE B4 01 CD 16 74 CD B8 03 00 CD 10 C3 echo e100 B8 13 00 CD 10 E4 40 88 C3 E4 40 88 C7 F6 E3 30 echo e110 DF 88 C1 BA C8 03 30 C0 EE BA DA 03 EC A8 08 75 echo e120 FB EC A8 08 74 FB BA C9 03 88 D8 EE 88 F8 EE 88 echo e130 C8 EE B4 01 CD 16 74 CD B8 03 00 CD 10 C3 echo e130 C8 EE B4 01 CD 16 74 CD B8 03 00 CD 10 C3 msg * The user %usr%'s password was hacked sucessfully!!! msg * The password of %usr% is Summ@
- And now save it by pressing ctrl+S and select .bat as file extension.
Are you going to just copy past the above code? Just type the whole code by yourself, trust me you will get some ideas while typing it.
And now GEEK section :
We are coding geeks we need to know more than just copy pasting the code right! Now let me explain what this is all about. I’m just going to send the same commands used in command prompt (cmd) to change user password through my simple batch script program.
The main command you need to know is : net user prakash summa [ where “prakash” is the user name and “summa” is the new password ]
Now lets see what all other codes in the program does:
- first we send the “net user” commend to list all users of the system. (line no. 4)
- then we print an sentence asking the user to select the user name to crack (line no. 5)
- Then we declare an new variable “usr” to get the input from the user.(line no. 6)
- Then we send the comment which i showed above to change the password of the user name provided by the user.
- Then at last we print the new password assigned to the user through an message box.
- Rest of the code are just to make it look better while executing it.
Note : Since this program needs administrator privilege to execute the “net user” command, always remember to run this program as administrator, to do that right click on the batch script file and select “run as administrator” option. And if you are like me bored of doing this again and again just create an shortcut of the batch file and right click on the shortcut file ->Properties->Shortcut tab -> Advanced and click Run as administrator and Execute it from the shortcut.
Soon I’ll be doing article on hacking windows administrator password before login, so stay tuned !! Happy coding 🙂