实验目的:恢复忘记的root密码
实验环境:Red Hat Enterprise Linux 5
实验准备:忘记你的系统root密码
实验步骤:
1. 开机进入GRUB引导程序,选择附件模式“a”,添加内核命令行参数“1”,进入单用户模式。
2. #passwd {更改root密码}
Changing password for user root
New password :******
Retype new password :******
passwd :all authentication tokens updated successfully
3. #exit {退出单用户模式,重启主机}
实验总结:
1. 在单用户模式下,系统装载内核,运行rc.sysinit,然后让用户绕过所有认证进入根shell。所以此方法特别时候当发生丢失root密码,/etc/passwd文件被破坏等情况。
2. 为了保护root密码的安全,建议在GRUB引导程序实施密码保护。
阅读(295) | 评论(0) | 转发(0) |