赞
踩
1.进入界面,按F2进入如下界面
注意:
在键盘上按e键进入如下界面
选择第二行再输入E
再按E 进入如下界面,
输入上图,single 以后,按确定键,回到如下界面
再按b就能启用单用户模式了,
如想设置单用户密码
需如下操作
用grub-md5-crypt生成加密密码
[root@localhost ~]# grub-md5-crypt
Password:
Retype password:
$1$Od7V6/$dhNeXIFU2PeQxJfbDH/yk.
进入如下文件,在文件中,加入如下字符串
[root@localhost ~]# vim /etc/grub.conf
password --md5 $1$Od7V6/$dhNeXIFU2PeQxJfbDH/yk.
[root@localhost ~]# vim /etc/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/sda5 # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz password --md5 $1$Od7V6/$dhNeXIFU2PeQxJfbDH/yk. hiddenmenu title CentOS (2.6.32-642.6.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-642.6.1.el6.x86_64 ro root=UUID=320ffbb8-7f0e-42da- ae4c-c8005a1ce9f4 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrh eb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-642.6.1.el6.x86_64.img title CentOS (2.6.32-573.26.1.el6.x86_64) root (hd0,0) @ "/etc/grub.conf" 26
输入刚才加密的密码
然后重复上面的操作,就能进入单用户
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。