This isn't a huge deal, because there's very little on the server (literally a file or two) that we actually need off of it. But we disabled root logins as a security measure and can't remember any of our other user passwords.
I'm assuming that there's nothing we can do at this point to get into the server? I'm sitting next to the box...
Update
Oops... actually, I need to export an SVN off of this server. So yeah, there's stuff I need.
Update
I should point out, we're on Debian Lenny
Booting in single user mode won't work for Debian and Ubuntu because you still have to enter the root password for maintenance mode.
Reboot your computer to get to the grub boot screen, press
e
to edit one of your Grub boot configurations and edit the line starting withkernel
. Appendinit=/bin/sh
and boot the modified configuration by pressingb
. When you arrived in your shell (without logging in this time) remount your file-system so it's in read/write mode:mount -o remount,rw /
. Now you can start changing passwords withpasswd
now :)...I will assume you are using Grub for you boot loader:
e
kernel
S
to the end of the lineEnter
thenb
Boot into your single user mode.You should be greeted with the root prompt
#
. From here:passwd
and reset the root passwordIt would be really helpful if you could post a few details about your system. Which distro? Which bootloader?
Good luck!
Well ... Your other option is:
/etc/shadow
(Delete everything between the first two colons in the root entry [see below])root
without a password.passwd
and reset theroot
password.From this:
To this:
More info can be found at the Arch Linux wiki.
Boot into runlevel 1. Pass
1
as an extra argument on the kernel line from the bootloader.If you have physical access to the server, you can always boot from a rescue disc, or even a liveCD and mount the old filesystem to copy the important stuff off.
ok, at boot time press esc to get the grub menu to appear ( just bang on esc key as it begins boot ) and then edit the menu line to a ' single' to the end of it. Or you can choose Rescue mode, this will also let you do recovery as well.
this will drop you in at a shell prompt, you can then change your password via passwd command or bring up network manually ( ifup eth0 ) and move the files off the machine from single user mode.
this is for redhat style os
capiche?