本文共 1050 字,大约阅读时间需要 3 分钟。
下载驱动让linux挂载windows磁盘
https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
安装
tar -xvf ntfs-3g_ntfsprogs-2017.3.23.tgzcd ntfs-3g_ntfsprogs-2017.3.23./configuremakemake install
下载chntpw
https://pkgs.org/download/chntpwwget http://li.nux.ro/download/nux/dextop/el7/x86_64//chntpw-0.99.6-22.110511.el7.nux.x86_64.rpmyum -y install ./hntpw-0.99.6-22.110511.el7.nux.x86_64.rpm
挂载windows的系统盘
默认第二个分区才是C盘mkdir /winmount -t ntfs-3g /dev/xvdb2 /win
备份SAM文件
cd /win/Windows/System32/config/cp SAM{,.bak}
清除Windows密码
chntpw SAMUser Edit Menu: 1 - Clear (blank) user password 2 - Edit (set new) user password (careful with this on XP or Vista) 3 - Promote user (make user an administrator)(4 - Unlock and enable user account) [seems unlocked already] q - Quit editing user, back to user selectSelect: [q] > 1 # 1 清除密码Password cleared!Hives that have changed: # Name 0Write hive files? (y/n) [n] : y # y保存 0 - OK
将windows系统盘重新挂载回windows中即可
转载地址:http://qoasx.baihongyu.com/