PDA

View Full Version : Server Broken


alexillsley
4th April 2007, 00:03
----- expired ----

mlz
4th April 2007, 00:05
If you have access to the machine itself, boot into single user mode and fix your root account that way. If not.... UGH!

alexillsley
4th April 2007, 00:23
----- expired ----

mlz
4th April 2007, 00:36
First make sure your password is still in shadow.

If so you can add the following to the first line of /etc/passwd on many distributions:

root:x:0:0:root:/root:/bin/bash

alexillsley
4th April 2007, 00:44
----- expired ----

mlz
4th April 2007, 00:48
Most systems you type linux 1 at the boot prompt. What distro are you using?

Here's a link for how to get in using lilo or Grub:

http://aplawrence.com/Linux/lostlinuxpassword.html

till
4th April 2007, 10:16
I just went to hit save, and it said that the file was read only It wont let me change the permmsions on it

If you booted in knoppix, you must make sure that the harddisk is mounted in read/write mode. You can do this by right clicking on the harddisk icon on the desktop and select the read/write mode. Also make sure that you use a commandline editor to edit /etc/passwd, I've seen that some gnome and kde editiors say access forbidden to some system files to prevent them from being changed.

alexillsley
4th April 2007, 13:13
----- expired ----

alexillsley
4th April 2007, 14:15
----- expired ----

falko
4th April 2007, 15:20
Have you tried Knoppix?
Boot Knoppix, mount your hard disk read/write to /mnt (for example), then run
chroot /mnt
Then try passwd root
Or if that doesn't work, take a look at the useradd command.

alexillsley
4th April 2007, 15:31
It wont let me do that :confused:

root@Knoppix:/ramdisk/home/knoppix# chroot /mnt
chroot: cannot run command `/bin/bash': No such file or directory

By the way im on a raid disk so i have to hda2 and hdb2

alexillsley
4th April 2007, 22:20
Thanks anyway to everyone that helped:) , but i have just started rebuilding system so....