![]() |
||
The Crucial Blog - Archive 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 administration(1) Comment Filed under: Uncategorized by — aaron @ 2:39 pm |
Tag Cloud
server-administration
control panels
subversion
centos
joomla
hypervm
webmin
wordpress
yum
system administration
microsoft
fedora
cpanel
linux
vmware
ubuntu
ssh
firewall
windows 2008 server
lxlabs
fantastico
virtualization
servers
cisco
esxi
windows
ruby-on-rails
centos5
exchange
storage
security
php
vps
vds
virtual dedicated servers
apache
debian
XenServer
lxadmin
networking
mail
gentoo
raid
windows server
xen
|
|
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