Hi,
Today i am working on my pc and i thought if i set password for single user mode then any one can’t entered inside.
First open terminal
if you are not login with root then login as a root
Note:- take backup of your grub.conf file becuase if something goes wrong then you can recove it.
[root@map007 ~]# cp /boot/grub/grub.conf /boot/grub/old.grub.conf
[root@map007 ~]# grub-md5-crypt
password:******
Retype password:******
$1$bDAVbCOBwY67c3liHQq5GCU0
it will print your password in md5 format.You have to just copy this md5 password and past into your grub.conf file.
[root@map007 ~]# vi /boot/grub/grub.conf
—————————————————————————
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.17-88.fc7)
password –md5 $1$bDAVbCOBwY67c3liHQq5GCU0
root (hd0,5)
kernel /vmlinuz-2.6.23.17-88.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.23.17-88.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd0,4)
chainloader +1
—————————————————————————-
You have successfully proctected your Grub.
To Make Single User Mode Password Protected, Copy that md5 encrypted password which was generated by grub-md5-crypt and paste it exact after splashimage line.
[root@map007 ~]# vi /boot/grub/grub.conf
—————————————————————————
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/grub/splash.xpm.gz
password –md5 $1$bDAVbCOBwY67c3liHQq5GCU0
hiddenmenu
title Fedora (2.6.23.17-88.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.23.17-88.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.23.17-88.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd0,4)
chainloader +1
—————————————————————————-
You have successfully proctected your single user mode.
******************************************************************************
Enjoy Linux !!!













Comments
Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!
Great your weblog appears. I like your original idea plus layout which is definitely really valuable for me in the job along with routine. Therefore give thanks to you for your posting, my recognize to read your post.