There are occasions you want to boot in non-graphical mode ( in runlevel 3 ) for troubleshooting because the system fails to boot the usual way, X fails to start or some module it fails to load.
Here is how you do it when Grub is your boot loader:
At the grub boot menu press the E key. Next select the distro you want to boot and press the E key again. Now select the line with "kernel /boot/vmlinuz" and hit the E key one more time. Now type a space and the number 3 at the end of that line
Finally press the B key and your distro will boot in runlevel 3
When entering runlevel 1 you are not prompted to enter the root password you directly enter as the root. This can be vulnerable.
We can protect it by using two methods
1. You can force the root password to be entered in single-user mode by adding the following to /etc/inittab:
2. Protecting grub using a password
Login as root and execute 'grub' command in terminal/konsole. prompt will change to 'grub>'
execute md5crypt to generate password hash.
it will prompt you for password, enter the password which you are going to set for GRUB. it will display encrypted password hash.
note down encrypted password hash and exit grub mode:
You can also create md5 crypt password by using the command grub-md5-crypt to get the encrypted password.
edit /boot/grub/grub.conf file and insert encrypted password in between "splashimage" and "title" lines.
save edited file and reboot.
Here is how you do it when Grub is your boot loader:
At the grub boot menu press the E key. Next select the distro you want to boot and press the E key again. Now select the line with "kernel /boot/vmlinuz" and hit the E key one more time. Now type a space and the number 3 at the end of that line
Finally press the B key and your distro will boot in runlevel 3
When entering runlevel 1 you are not prompted to enter the root password you directly enter as the root. This can be vulnerable.
We can protect it by using two methods
1. You can force the root password to be entered in single-user mode by adding the following to /etc/inittab:
su:S:wait:/sbin/sulogin
2. Protecting grub using a password
Login as root and execute 'grub' command in terminal/konsole. prompt will change to 'grub>'
execute md5crypt to generate password hash.
Code:
grub> md5crypt
Code:
Password: ****** Encrypted: $1$jxcdN0$haseNMq1aiPf8FziuGJGZp0
Code:
grub> quit
edit /boot/grub/grub.conf file and insert encrypted password in between "splashimage" and "title" lines.
Code:
splashimage=(hd0,0)/boot/grub/splash.xpm.gz password --md5$1$jxcdN0$haseNMq1aiPf8FziuGJGZp0 title Fedora Core 6
No comments:
Post a Comment