Change Debian root password without CD
Posted: October 8, 2011 Filed under: System Administration Leave a comment »It Works for me for Debian. Follow at you own risk. More Risk more profit and loss
If you had installed Debian or any other GNU/Linux Machine after having all or any one of Green Label/MaximummICE/CarloRossi, most likely the chances are you have forgetten the root password. If you forget root password for any other reason still you can follow the steps to reset root password
- Reboot the machine (If people are accessing service then they would get disconnected)
- At the grub prompt press ‘E’ or ‘e’ to pass kernel perimeters
- Go to the line that starts with “Linux” and add “init=/bin/sh” (without quotes) at the end of the line
- Then hold ctrl and press x key to boot the machine
- It will take to you # prompt with root privileges.
- / is mount as read only so you have to mount it as read/write
#mount -n -o remount,rw /
7. #vi /etc/passwd
8. Go to the line that stats with “root” and remove “x” from the second column. Save the file and reboot the machine/server
9. At login prompt enter “root” as user and you are logged in (it wont ask you password)
10. To change password
#passwd
Enter new UNIX password:
Retype new UNIX password:
11. Of-course you can choose easy password to remember e.g. MagicMoments, SMIRNOFF, GoldenEagle, RedKnight, KingFisher But very easy for cracker to crack.So choose another one.
Have FUN !