您的Windows 登录(Windows login)既是黑客的屏障,也是防止可能正在使用您的计算机的家人和同事(family and colleagues)的意外入侵、数据操纵和键盘意外滑动的防御。您的 Windows 登录可与Windows 操作系统(Windows operating)的其他安全功能以及您可能使用的任何第三方软件一起使用。
如果您忘记密码会怎样?你是怎么进入你的电脑的?如果您重新安装 Windows,您还将删除所有自定义设置和数据。所以你不想这样做。但是,还有其他方法可以重置您的密码。
使用 Ubuntu Live DVD(Use a Ubuntu Live DVD)
希望您有另一台具有管理员访问权限的计算机来完成重置密码的初始步骤,因为您无法访问有问题的计算机。
如果您还没有Ubuntu Desktop ,您需要做的第一件事是下载它。您可以从Ubuntu 官方网站( official Ubuntu website)免费下载。
安装 ISO Image DVD 刻录软件(Install ISO Image DVD Burning Software)
有多种刻录软件可供选择。出于本文的目的,我们将使用Brasero。无论您决定使用哪种软件,该过程都非常相似。
要安装ISO 映像( ISO image)刻录软件,请单击Ubuntu 桌面(Ubuntu desktop)左上角的(left-hand corner)活动(Activities)。在搜索框中输入brasero 。(brasero)
然后您将看到一个指向Ubuntu 软件安装程序(Ubuntu Software installer)的链接。要启动软件安装程序(software installer),请单击此链接。
接下来,您将看到并单击Brasero 摘要(Brasero summary)中的主要列表。然后点击安装(install)。
出现提示时输入您的root 密码(root password)并允许安装完成。完成后,单击启动按钮启动(Brasero)Brasero(Once)。
将 ISO 映像刻录到 DVD(Burn ISO Image To DVD)
当Brasero打开时,您将看到一些您可以执行的操作选项,例如:
您要选择最后一个选项Burn image。
现在您将看到一个弹出窗口,显示图像刻录设置(Image Burning Setup)选项。
单击“选择要写入的光盘映像(Select a disc image to write)”按钮并查找ISO 映像(ISO image)。如果您刚刚下载它,您会在“下载”文件夹(Downloads folder)中找到它。
对于选择要写入的光盘(Select a disc to write to),选择您要使用的光盘。如果您插入了空白DVD,它将显示在此位置。
下一步是单击刻录(Burn)开始将ISO 映像(ISO image)写入磁盘。
刻录过程(burning process)完成后,您现在将在DVD上获得(DVD)ISO 映像(ISO image)的副本。
取出磁盘,以便您可以使用它来引导需要重置Windows 密码(Windows password)的计算机。
创建密码重置磁盘(Create a Password Reset Disk)
返回被锁定的计算机,将DVD插入DVD 驱动器(DVD drive)。重新启动计算机并等待(computer and wait)欢迎窗口。
单击尝试 Ubuntu(Try Ubuntu)按钮。如果 DVD 在计算机中,大多数计算机将自动从DVD引导。(DVD)如果您的计算机没有DVD 驱动器(DVD drive),您可以将ISO 映像(ISO image)加载到USB拇指驱动器上。
但是,如果您的计算机没有从您制作的DVD自动启动,您可以在计算机首次启动时按住F12 键。(F12 key)然后,您将能够选择带有ISO 映像(ISO image)的驱动器。选择您的语言并(language and head)转到您的系统设置。
单击软件和更新(Software and Updates),然后选择社区维护的免费和开源软件。(Community-maintained free and open-source software.)
单击关闭(Close),然后在出现提示时重新加载您的存储库。
打开终端(Open Terminal)安装chntpw(一个用于编辑Windows 注册表的(Windows registry)Linux 工具(Linux tool))。为此,请在终端中输入以下命令行,然后按(command line)enter:
sudo apt-get install chntpw
浏览到Windows\System32\Config目录,右键单击任何空白区域并选择Open in Terminal。
(Enter)在命令行中(command line)输入以下内容:
chntpw -u user_name SAM
- 将用户名(user-name)字符串替换为您需要重置Windows 密码(Windows password)的帐户的用户名。
- 您将看到诸如提升用户(Promote User)和空白用户(Blank User)之类的选项。要删除密码:
- 输入数字 1 并回车
- 输入字母 q 然后输入
- 输入字母 y(letter y),然后再次单击 enter 以确认您的更改
- 取出磁盘并重新启动计算机。当您现在登录Windows时,您无需输入密码,因为您刚刚删除了密码。
如果您想重设密码( reset your password),现在可以在 Windows 中进行。
SystemRescueCD
Linux开源社区为用户提供了许多工具,以帮助您在忘记密码时重新进入锁定的计算机。
SystemRescueCd是一个多功能的实时Linux 发行版(Linux distribution),它使用户能够更改他们的Windows 密码(Windows password)。
首先从项目网站下载( project website)SystemRescueCd 映像(SystemRescueCd image)。
您可以使用任何工具将映像刻录到 CD、DVD或USB 驱动器(USB drive)。阅读如何在 Linux 中将 ISO 文件刻录到 USB 驱动器以( How to Burn an ISO File to a USB Drive in Linux)获取更多信息或参考(information or refer)上述过程。
首先将您的计算机引导至SystemRescueCd Live系统。使用fdisk(格式化磁盘)查找包含/etc 目录的目录。它通常位于您的根驱动器(root drive)(/) 上。
使用fdisk(fdisk)命令要非常(very)小心。如果您做错了,您将删除所有数据。如果您不是绝对肯定自己知道自己在做什么,请寻求帮助。
下图(image below)显示了清单 1 中的命令和输出(command and output)。
大小和分区类型表明(size and partition type show)/ /dev/sda5 目录是主分区。你必须挂载这个分区( mount this partition),所以首先创建一个目录作为挂载点( mount point)。
mkdir /mnt/bootdir
使用以下代码将Linux 分区(Linux partition)挂载到SystemRescueCd 分区(SystemRescueCd partition):
mount /dev/sda5 /mnt/bootdir
现在使用以下chroot命令:
chroot /mnt/system
要重置密码,请使用以下命令:
passwd <newpassword>
当您重新登录计算机时,您现在可以使用新密码使用root 帐户。(root account)
如果您因为忘记了Windows 密码(Windows password)而被锁定在系统之外,您无需再担心。上述两个过程为您提供了重新进入所需的密钥。
How To Use Linux To Reset a Windows Password
Your Windows login acts as a barrier for hackers as well as a defence against υnintended intrusion, data manipulation and the accidental swipe of the keyboard by family and colleagues who might be using your compυter. Your windows login works with оther security features of the Windows operating system and any third-party software you might use.
What happens if you forget your password? How do you get into your computer? If you reinstall Windows, you will also be erasing all your custom settings and data. So you don’t want to do this. However there are other ways to reset your password.
Use a Ubuntu Live DVD
Hopefully, you have another computer with admin access to complete the initial steps of resetting your password as you can’t access the machine in question.
The first thing you need to do is download Ubuntu Desktop if you don’t already have it. You can download it for free from the official Ubuntu website.
Install ISO Image DVD Burning Software
There are several burning software options to choose from. For the purposes of this article, we will use Brasero. The process is very similar no matter which software you decide to use.
To install the ISO image burning software, click on Activities in the top left-hand corner of your Ubuntu desktop. Type brasero into the search box.
You will then see a link to the Ubuntu Software installer. To start the software installer, click on this link.
Next, you will see and click on the main listing in the Brasero summary. Then click install.
Enter your root password when prompted and allow the installation to finish. Once complete, click the launch button to start Brasero.
Burn ISO Image To DVD
When Brasero opens, you will see a few options of what you can do, such as:
- Audio project
- Data project
- Video project
- Disc copy
- Burn image
You want to select the last option Burn image.
Now you will see a pop-up window showing you the Image Burning Setup options.
Click the button that says Select a disc image to write and look for the ISO image. If you just downloaded it, you will find it in your Downloads folder.
For Select a disc to write to, choose the one you want to use. If you have inserted a blank DVD, it will show up in this location.
The next step is to click Burn to start writing the ISO image to disk.
When the burning process is complete, you will now have a copy of your ISO image on the DVD.
Remove the disk so you can use it to boot the computer where you need to reset your Windows password.
Create a Password Reset Disk
Go back to the computer you are locked out of, and insert the DVD into your DVD drive. Restart your computer and wait for the welcome window.
Click on the Try Ubuntu button. Most computers will automatically boot from a DVD if it is in the computer. If your computer does not have a DVD drive, you can load the ISO image on a USB thumb drive instead.
However, if your computer does not automatically boot from the DVD you made, you can hold down the F12 key when your computer first starts. You will then be able to select the drive with the ISO image on it. Select your language and head over to your system settings.
Click on Software and Updates and then choose Community-maintained free and open-source software.
Click Close and then reload your repository when prompted.
Open Terminal to install chntpw (a Linux tool that is used to edit the Windows registry). To do this, input the following command line in terminal and then hit enter:
sudo apt-get install chntpw
Browse to the Windows\System32\Config directory, right-click on any blank space and choose Open in Terminal.
Enter the following on the command line:
chntpw -u user_name SAM
- Replace the user-name string with the username of the account where you need to reset the Windows password.
- You will see options such as Promote User and Blank User. To remove the password:
- Type the number 1 and hit enter
- Type the letter q and then enter
- Type the letter y, then click enter again to confirm your change
- Remove the disk and reboot your computer. When you log into Windows now, you won’t need to enter a password as you just removed it.
If you want to reset your password, you can do so now in Windows.
SystemRescueCd
The Linux open-source community provides users with many tools to help you get back into your locked computer if you forget your password.
SystemRescueCd is a multi-functional live Linux distribution that enables users to change their Windows password.
Start by downloading the SystemRescueCd image from the project website.
You can use any tool to burn the image to a CD, DVD, or USB drive. Read How to Burn an ISO File to a USB Drive in Linux for more information or refer to the process described above.
Start by booting your computer to the SystemRescueCd Live system. Use fdisk (format disk) to find the directory that contains the /etc directory. It is usually on your root drive (/).
Be very careful using the fdisk command. If you do it wrong, you will erase all of your data. Get assistance if you are not absolutely positive that you know what you are doing.
The image below shows the command and output in Listing 1.
The size and partition type show that the /dev/sda5 directory is the main partition. You have to mount this partition so start by first creating a directory that will be the mount point.
mkdir /mnt/bootdir
Use the following code to mount the Linux partition to your SystemRescueCd partition:
mount /dev/sda5 /mnt/bootdir
Now use the following chroot command:
chroot /mnt/system
To reset your password, use the command below:
passwd <newpassword>
When you log back into your computer, you will now be able to use the root account with your new password.
There is no need to worry anymore if you get locked out of your system because you have forgotten your Windows password. The two processes described above provide you with the keys you need to get back in.