登錄用戶密碼破解
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”)
splashimage=(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的第一個扇面啓動