登录用户密码破解
liunx怎么进入单用户模式
1、开机读秒时按任意键进入GRUB菜单
2、再按“e”键进入下一菜单
3、选中kernel /vmlinuz-2.6.18-53.e15 ro root=LABEL=/ rhgb quiet
4、grub edit>kernel /vmlinuz-2.6.18-53.e15 ro root=LABEL=/ rhgb quiet single
在后面追加 single或1
5、按“b”键 引导系统
[root@localhost ~]#passwd newpassword
若不能更改,则按以下方法:
[root@localhost ~]#getenforce ---查看selinux状态
enforcing
[root@localhost ~]#setenforce 0 ---更改为允许(permissive)
如果硬盘上的MBR被更动过,可以用
[root@localhost ~]#/sbin/grub-install /dev/[hda | sda]来重安装grub。
[root@localhost ~]#cat /boot/grub/grub.conf --Grub配置文件
default=0 #默认启动第几个”tile”(0表示第一个”title”)
timeout=5 #时间延迟(5秒后自动启动第一个”title”)
splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz #GRUB启动菜单背景界面
hiddenmenu #隐藏菜单选项
title Red Hat Enterprise Linux Server (2.6.18-53.el5) #菜单中的系统标题
root (hd0,0) #指定根设备(hd0,0 第一个磁盘的第一个分区)
kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vgsrv-root #指定内核文件与挂载根设备
Initrd /initramfs-2.6.32-71.el6.x86_64.img #指定初始化内存镜像盘
title windows
#另一个操作系统的标题
rootnoverify (hd0,1) #操作系统存放在hd0,1上,不要在grub里mount
chainloader +1
#从hd0,1的第一个扇面启动
转载于:https://blog.51cto.com/sunsiroo8/885787