how to change root password in debian
Posted by hey on October 13th, 2008
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
coz debian takes the system security to one more level up and by default ask’s for the root password.
so the BIG QUESTION IS HOW TO proceed further
follow these steps
1) on grub-boot prompt.
press “e” to enter edit mode
2) then press downarrow to reach the line that starts with “kernel “
press “e” again
3) at the end of this line type in “init=/bin/sh” or “/bin/bash”
4) then press enter to make that change and press “b” to boot
in a few seconds you will be on your “#” prompt
5) only one step left
“mount -o remount rw /”
this step is necessary coz in this case root file system is mounted as read only.
6) finally type “passwd” and you get the screen to change the password
and then type in “init 6? or “reboot”
NOTE FOR TECHNICAL USERS
those who are looking for the technical details, the main work is the init command that we passed as an argument to kernel, it told kernel to specifically run the command specified in parameter instead of working on normal routine.
TRICK = if you have any program you wish to run instead of this then you can do that too using init command only.


October 13th, 2008 at 5:18 pm
As long as you ‘ve physical access to the Linux box, you can crack in to any Linux box irrespective of which flavor of Linux use. So i don’t really believe with you – Debian is special and you can’t easily crack in to it.
October 16th, 2008 at 7:07 am
I have found that the best way to change a root password on a NIX box is to:
– boot up with a “Live CD” such as KNOPPIX
– mount (rw) the partition that contains the /etc folder
– open the passwd file in a text editor of your choice
– find the line for the root user
– backspace over the field containing the encrypted password
– save the file
– remove the CD and reboot
Now you can login as root without a password ans run passwd to reset it.
KNOPPIX has many valuable uses. Get yours today at http://www.knoppix.net/
November 11th, 2008 at 2:32 am
- backspace over the field containing the encrypted password
I do not see a password. I see
and see no user names at all.
How can I change?
Installed Debian and con not log in as user or root, so do not no how to use passwd command, as I can not get to root terminal.
Thanks.
November 20th, 2008 at 3:50 pm
The file in question is “/etc/shadow” unless you explicitly disabled shadow passwords during installation.
January 1st, 2009 at 12:07 pm
What about if it’s a VPS (accessed by SSH?)
April 30th, 2009 at 7:47 pm
if u have ur user with sudo rights u can do a simple
sudo passwd root
im saying this cause whenever i install a system the first thing i do is give sudo permission