You forget your root password and get locked out of your own box. What do you do? Typically, you would reboot into single user mode and change the password there.
When booting into single user mode you will not be prompted for the root password. This is something every attacker knows and prays on once he has gained physical access to you box. So what do you do?
Firstly, a good sys admin knows not to forget the root password. Login in as root is never a good idea so using sudo is always advised. This still leaves the single user mode vulnerable, to secure it you will have to append the following line “su:S:wait:/sbin/sulogin” to your “/etc/inittab” file. Now, every time you boot into single user mode you will be prompted for the root password.
See sample below,
# password protect single user mode
su:S:wait:/sbin/sulogin
PS: Always remember you password, if you can’t then write in down in a safe place.
Author comments are in a darker gray color for you to easily identify the posts author in the comments
The trick is to write the password down..200 times on a piece of paper by hand. Then burn that piece of paper, stir ashes with water and drink it.
If that doesn’t do it, nothing will.
Your site is very useful.
I am very happy.
ur site is very good
i m a newbie 2 linux
hope it ll help me much