Linux清除Windows密码

简介: 下载安装ntfs-3g下载驱动让linux挂载windows磁盘https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz安装tar -xvf ntfs-3g_ntfsprogs-2017.

下载安装ntfs-3g

  • 下载驱动让linux挂载windows磁盘

    https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
  • 安装

    tar -xvf ntfs-3g_ntfsprogs-2017.3.23.tgz
    cd ntfs-3g_ntfsprogs-2017.3.23
    ./configure
    make
    make install 

下载安装chntpw

  • 下载chntpw

    https://pkgs.org/download/chntpw
    wget http://li.nux.ro/download/nux/dextop/el7/x86_64//chntpw-0.99.6-22.110511.el7.nux.x86_64.rpm
    yum -y install ./hntpw-0.99.6-22.110511.el7.nux.x86_64.rpm

挂载windows磁盘

  • 挂载windows的系统盘
    默认第二个分区才是C盘

    mkdir /win
    mount -t  ntfs-3g /dev/xvdb2 /win
  • 备份SAM文件

    cd /win/Windows/System32/config/
    cp SAM{,.bak}
  • 清除Windows密码

    chntpw SAM
    User 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 select
    Select: [q] > 1                         # 1 清除密码
    Password cleared!
    Hives that have changed:
     #  Name
     0  <SAM>
    Write hive files? (y/n) [n] : y         # y保存
     0  <SAM> - OK
  • 将windows系统盘重新挂载回windows中即可

目录
相关文章
|
15天前
|
人工智能 Linux iOS开发
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
41 12
Burp Suite Professional 2025.2 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
|
27天前
|
安全 Linux 数据安全/隐私保护
linux root登陆,密码正确但,错误提示su: Authentication failure
通过系统化的排查和解决方案,可以有效应对 `su: Authentication failure` 问题,确保系统安全和用户权限的正确管理。
156 36
|
3天前
|
数据管理 Linux iOS开发
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
13 0
Splunk Enterprise 9.4.1 (macOS, Linux, Windows) 发布 - 机器数据管理和分析
|
6天前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
19 0
Metasploit Framework 6.4.49 (macOS, Linux, Windows) - 开源渗透测试框架
|
17天前
|
安全 网络安全 数据安全/隐私保护
Windows Server 2025 Active Directory 重置用户密码
密码重置是管理员日常任务之一,用户因忘记或多次输错密码导致账户锁定时需进行重置。本文介绍在Active Directory服务器上重置密码的三种方法。
|
3月前
|
安全 网络协议 Linux
telnet在windows和linux上的使用方法
Telnet是一个简单且强大的网络工具,广泛用于远程管理和网络诊断。尽管存在安全风险,但在受控环境中,Telnet仍然是一个非常有用的工具。通过本文的介绍,您应该能够在Windows和Linux系统上安装并使用Telnet进行各种网络操作。
229 18
|
3月前
|
安全 Ubuntu Linux
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
71 9
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
|
3月前
|
Ubuntu 网络协议 Linux
快速部署WSL(Windows Subsystem for Linux)
WSL提供了一种轻量级的方法,使开发者能够在Windows上无缝运行Linux环境。通过本文介绍的步骤,可以快速安装、配置和使用WSL,以满足开发和测试的需求。
254 8
|
3月前
|
自然语言处理 安全 Java
Nexpose 7.0.1 for Linux & Windows - 漏洞扫描
Nexpose 7.0.1 for Linux & Windows - 漏洞扫描
60 6
|
3月前
|
关系型数据库 MySQL Linux
MySQL数据库下载安装教程(Windows&Linux)
本文档详细介绍了MySQL的安装步骤,包括安装前的准备工作、下载安装包、Windows和Linux系统下的具体安装流程,以及如何配置MySQL服务、设置环境变量、启动服务和连接数据库等关键操作。