Linux下去除windows密码

简介:

今天遇到一件囧事,长时间不进Windows环境结果把自己设置的密码给忘记了,于是便发了一条微博。热心朋友一大堆,给我推荐各种各样的方法,自己也到网上搜了一搜,原来在Linux下去除Windows的密码是那么简单。方法步骤如下:

一、安装工具chntpw

这个工具应该在各大发行版的官源里都存在(Linux对Windows的安全环境考虑真是没得说。==!)。直接用你的发行版里最常用的安装方式安装即可。

比如Archlinux– sudo pacman -S chntpw

二、使用工具

挂载windows系统分区盘,进入到 windows/system32/config中,就地打开终端,运行如下命令:

sudo chntpw SAM

会得到如下提示:

chntpw version 0.99.6 110511 , (c) Petter N Hagen
Hive name (from header): 
ROOT KEY at offset: 0×001020 * Subkey indexing type is: 666c 
File size 262144 [40000] bytes, containing 5 pages (+ 1 headerpage)
Used for data: 233/17736 blocks/bytes, unused: 16/2584 blocks/bytes.
* SAM policy limits:
Failed logins before lockout is: 0
Minimum password length : 0
Password history count : 0
| RID -|———- Username ————| Admin? |- Lock? –|
| 01f4 | Administrator | ADMIN | *BLANK* |
| 01f5 | Guest | | dis/lock |

———————> SYSKEY CHECK <———————–
SYSTEM SecureBoot : -1 -> Not Set (not installed, good!)
SAM AccountF : 0 -> off
SECURITY PolSecretEncryptionKey: -1 -> Not Set (OK if this is NT4)
Syskey not installed!

RID : 0500 [01f4]
Username: Administrator
fullname:
comment : ���:(�)��n7
homedir :

User is member of 1 groups:
00000220 = Administrators (which has 1 members)

Account bits: 0×0210 =
[ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. |
[ ] Temp. duplicate | [X] Normal account | [ ] NMS account |
[ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act |
[X] Pwd don’t expir | [ ] Auto lockout | [ ] (unknown 0×08) |
[ ] (unknown 0×10) | [ ] (unknown 0×20) | [ ] (unknown 0×40) |

Failed login count: 0, while max tries is: 0
Total login count: 81
** No NT MD4 hash found. This user probably has a BLANK password!
** No LANMAN hash found either. Sorry, cannot change. Try login with no password!

- – - – 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清除密码;选2重设密码;选3不知不觉提升用户权限,哈哈;选4启用或者关闭某个用户。我果然选1,重启进入Windows一路无阻!

 原文发布时间为:2013-05-29

本文来自云栖社区合作伙伴“Linux中国”


相关文章
|
12天前
|
安全 Linux 数据安全/隐私保护
linux root登陆,密码正确但,错误提示su: Authentication failure
通过系统化的排查和解决方案,可以有效应对 `su: Authentication failure` 问题,确保系统安全和用户权限的正确管理。
111 36
|
2天前
|
安全 网络安全 数据安全/隐私保护
Windows Server 2025 Active Directory 重置用户密码
密码重置是管理员日常任务之一,用户因忘记或多次输错密码导致账户锁定时需进行重置。本文介绍在Active Directory服务器上重置密码的三种方法。
|
2月前
|
安全 网络协议 Linux
telnet在windows和linux上的使用方法
Telnet是一个简单且强大的网络工具,广泛用于远程管理和网络诊断。尽管存在安全风险,但在受控环境中,Telnet仍然是一个非常有用的工具。通过本文的介绍,您应该能够在Windows和Linux系统上安装并使用Telnet进行各种网络操作。
190 18
|
2月前
|
安全 Ubuntu Linux
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
61 9
Metasploit Pro 4.22.6-2024111901 (Linux, Windows) - 专业渗透测试框架
|
4月前
|
Ubuntu 安全 Linux
|
2月前
|
Ubuntu 网络协议 Linux
快速部署WSL(Windows Subsystem for Linux)
WSL提供了一种轻量级的方法,使开发者能够在Windows上无缝运行Linux环境。通过本文介绍的步骤,可以快速安装、配置和使用WSL,以满足开发和测试的需求。
195 8
|
2月前
|
自然语言处理 安全 Java
Nexpose 7.0.1 for Linux & Windows - 漏洞扫描
Nexpose 7.0.1 for Linux & Windows - 漏洞扫描
57 6
|
2月前
|
关系型数据库 MySQL Linux
MySQL数据库下载安装教程(Windows&Linux)
本文档详细介绍了MySQL的安装步骤,包括安装前的准备工作、下载安装包、Windows和Linux系统下的具体安装流程,以及如何配置MySQL服务、设置环境变量、启动服务和连接数据库等关键操作。
|
3月前
|
NoSQL Linux PHP
如何在不同操作系统上安装 Redis 服务器,包括 Linux 和 Windows 的具体步骤
本文介绍了如何在不同操作系统上安装 Redis 服务器,包括 Linux 和 Windows 的具体步骤。接着,对比了两种常用的 PHP Redis 客户端扩展:PhpRedis 和 Predis,详细说明了它们的安装方法及优缺点。最后,提供了使用 PhpRedis 和 Predis 在 PHP 中连接 Redis 服务器及进行字符串、列表、集合和哈希等数据类型的基本操作示例。
137 4
|
4月前
|
人工智能 JavaScript 网络安全
ToB项目身份认证AD集成(三完):利用ldap.js实现与windows AD对接实现用户搜索、认证、密码修改等功能 - 以及针对中文转义问题的补丁方法
本文详细介绍了如何使用 `ldapjs` 库在 Node.js 中实现与 Windows AD 的交互,包括用户搜索、身份验证、密码修改和重置等功能。通过创建 `LdapService` 类,提供了与 AD 服务器通信的完整解决方案,同时解决了中文字段在 LDAP 操作中被转义的问题。
110 1