不管你相不相信,Linux的密码破解竟是如此地简单,真不知道Linus Torvalds是怎么想的。好了,废话不多说,让我们直接进入主题吧。
测试平台:Fedora (2.6.23-42fc8)
测试环境:本地
破解方法之一:本地光盘启动破解,设置root用户新密码
S1:用Fedora光盘启动系统。
S2:进入grub后选择Rescue installed System系统启动救援模式。
S3:语言OK、键盘类型OK、先不设置网络NO、continue,然后出现如下提示:
Rescue:Your system has been mounted under /mnt/sysimage Press
#chroot /mnt/sysimage
The system will reboot automatically when you exit for the shell.
S4:键入命令:
sh-3.2#chroot /mnt/sysimage
sh-3.2#passwd root
Changing passwrod for user root.
New UNIX password:
BAD PASSWORD:it is based on a dictionary word.
Retype new UNIX password:
passwd:all authentication tokens updated successfully.
sh-3.2#
S5:启动系统后键入新密码即可。
破解方法之二:无需工具徒手操作,清空root密码
S1:重新启动Fedora系统,进入grub,看到Fedora (2.6.23-42fc8)
提 示:Press Enter to boot the selected OS ,'e'to edit the commands before booting ,'a'to modify the kernel argument before booting or 'c'for a command-line.
按提示键入e编辑grub:(2.6.23-42fc8)
S2:出现grub:
root(hd0:0)
kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb
initrd /initrd-2.6.23.1-42.fc8.img
选择第二个grub键入e进行编辑,编辑后为:
kernel /vmlinuz-2.6.23.1-42.fc8 single ro root=/dev/VolGroup00/LogVol00 rhgb
也就是说再ro后加一个single,表示为单用户模式。
回车后键入b来启动这个单用户模式系统。
S3:键入命令:
sh-3.2#vi /etc/shadow
root:$1$WOQHn4mo$ysRTCnc2u35fzYRtsyHgy0:14140:0:99999:7:::
bin:*:14140:0:99999:7:::
………………………………
………………………………
选择vi编辑器的INSERT模式,修改以root开头的第一行,修改成:
root::14140:0:99999:7:::
也就是说,将这行的前两个冒号之间的内容Delete即可。
按wq!保存重启即可发现,进入XWindow登录界面后,输入root就进入了系统!