有时候,我们会由于各种原因忘掉服务器密码,比如服务器太多太杂,或是直接被人黑掉了,其实想避免这个问题,我们可以制作密码重置盘,不过这不是我们这次讨论的重点,我们现在讨论的是怎么在遗忘的情况下把密码改掉。
我们来看一个画面

是不是很熟悉,我们注意一下左下角的那个圆圈,点开看看,注意下图的“屏幕键盘”,这个在我们的系统中有一个文件叫osk.exe,位于SYSTEM32下,这次我们就拿它来试试。

首先我们把08R2的光盘放到机器中,然后重启,从光驱启动,下图中我们选好语言后,点下一步,放心,我们不会把系统给重装。

在这里,我们点“修复计算机”,注意,不要点安装。

出来系统恢复选项,这里我们选择系统后,直接下一步

这里我们直接点“命令提示符”

如下图,第一步,我们先把osk.exe给备份了一下,放到了D:\由于我的系统中有那个100M的分区,所以我的系统区在这里就是D:\
第二步,我们把osk.exe执行删除操作
第三步,我们把cmd.exe复制一份到system32下并重命令成osk.exe
退出

这里我们选重新启动

下图中,我们已经对服务器进行了重启的操作,我们点左下角的那个圆圈。

我们勾上那个“屏幕键盘”,点确定

然后会出现以下画面,这里由于我们已经把真的osk换成了cmd.exe,所以出现的是cmd界面

这里就可以直接把密码改成我们想要的了,如下图

退出cmd,重新登录服务器,用我们刚改的密码,完美成功!

本文为东方瑞通李晓辉老师原创,李老师拥有六年以上的大型企业IT服务项目经验,是红帽认证讲师(RHCI)、腾讯云认证讲师(TCI)、阿里云认证讲师(ACI)、华为云服务认证讲师(HCSI)、微软认证高级工程师(MCSE)。多年来一直从事IT技术研究与培训教育行业,具备非常丰富的理论及教学经验。