Saturday, September 24, 2016

reset password on windows 7/ windows 10 over network

1- following the link below to create live iso for reset windows os.

2- install necessary packages
$ sudo apt-get install pxelinux syslinux dnsmasq

3- create a directory to store all data
$ mkdir ~/resetpassword && cd ~/resetpassword

4- copy necessary file to our directory,
$ cp /usr/lib/PXELINUX/pxelinux.0 ~/resetpassword
$ cp /usr/lib/syslinux/modules/bios/*.c32 ~/resetpassword
$ cp /usr/lib/syslinux/memdisk ~/resetpassword

5- update boot menu
$ mkdir pxelinux.cfg

- create file ~/resetpassword/pxelinux.cfg/default with the following content

default menu.c32
prompt 0
timeout 300
menu title ########## PXE Boot Menu ##########
label 1
menu label ^1) reset password windows7/windows10
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
kernel memdisk iso raw
initrd resetpassword.iso
menu label ^2) reset password windows7/windows10

6- copy the iso that is produced in step 1 to directory ~/resetpassword with the name, resetpassword.iso

7- create bash script file to start our tftp and dhcp so we name it as with content below
ifconfig vmnet2 up
dnsmasq -i vmnet2 --dhcp-range=, \
    --dhcp-boot=pxelinux.0 \
    --enable-tftp --tftp-root=~/resetpassword -d -p0 -K --log-dhcp --bootp-dynamic

8- finally we run the script with the following command then start boot with network interface on the client that what to reset the password
$ sudo sh

- snapshot of reset password administrator on windows 7

No comments:

Post a Comment