![]() |
||
The Crucial Blog February 17, 2008
Resetting lost root password in Debian serverIn Debian getting into just the single user mode may not allow you to reset the root password. It might prompt you with the following question ‘Give root password for maintenance (or Control-D to continue)’ . Don’t worry, reboot the server. (1) At grub boot screen, select the kernel and press ‘e’ to edit the entry. (2) Another list will show up. Scroll down and pick from the list something that looks like this (or something similar): kernel /vmlinuz-x.x.x-x.x ro root=/dev/abc/ (3) Type ‘e’ again to edit this line. Make sure that you press the space bar and add the following: init=/bin/bash (4) Then press enter. The line should look something like this then: kernel /vmlinuz-x.x.x-x.x ro root=/dev/abc/ init=/bin/bash (5) Press ‘b’ to boot. This will take you into a bash terminal. From there you’ll have to mount your hard drive and allow for read/write permissions. (6) mount -o remount,rw / You need to do this because / is currently mounted read-only and many disk partitions might have not been mounted yet. Or If you have to see the mount details. Type the command mount It should come up with something like, for /: /dev/abc (rw) It looks like it’s already set for read/write permissions, but it’s not (just try and reset the password with the passwd command and see what happens). To mount it again type the following command: mount -o remount,rw /dev/abc / (7) Now you should be able to change the root password by issuing the following command: passwd (8) After the password has been reset, type ‘reboot’ and reboot the server. The job is done Note: For LILO: (1) As the server reboots, you might have to hold in the “shift” key to see the lilo: prompt (depending on the setup) (2) At the lilo boot screen, as soon as ‘boot:’ appears enter: boot: Linux init=/bin/bash This causes the system to boot the kernel and run /bin/bash instead of its standard init. Follow the same procedure of remounting slash as with GRUB. Tags: debian, linux, system administrationFiled under: Uncategorized by — aaron @ 2:39 pm One Response to “Resetting lost root password in Debian server”Leave a Reply |
Tag Cloud
fedora
firewall
joomla
cpanel
mail
gentoo
subversion
server-administration
ruby-on-rails
virtual dedicated servers
raid
vps
XenServer
centos5
cisco
hypervm
apache
yum
php
security
microsoft
system administration
networking
windows server
windows 2008 server
xen
ssh
ubuntu
vds
exchange
wordpress
lxadmin
control panels
virtualization
esxi
centos
linux
webmin
vmware
debian
servers
fantastico
windows
lxlabs
storage
|
|
Quick Links: Debian Dedicated Servers, Direct Deposit Hosting, Unmetered Dedicated Servers, Virtual Dedicated Servers, Windows Server Management, High Traffic Web Hosting - Load Balanced Clusters, Windows 2008 Server Virtual Dedicated Servers
© Copyright 2003-2008
Crucial Paradigm
ABN 97 125 618 662
Thank you so very much for this!!!!