Forgotten root password

 

You can try two ways:

 

First procedure

1. Insert installation DVD of ISPadmin and wait for command line to be displayed.

2. Mount system disk and switch to installation repair environment.

 

mount /dev/[hda1|sda1|md0] /hd
chroot /hd

 

3. And then change password as usual, i.e. enter it 2x.

 

passwd

 

4. Exit chroot environment and unmout disk

 

exit
umount /hd

 

5. Eject installation DVD and restart server

 

eject
reboot -f

 

Second procedure

Mount system partition and modify /etc/shadow and /etc/passwd so that root password is blank.

Enable booting from DVD drive on your computer and boot life Linux from DVD to graphical interface. Mount root of partition the password of which we are trying to recover. Search file:

 

/etc/passwd

 

Search row:

 

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

 

Delete letter x in it so that the row looks like this:

 

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

 

Leave remaining rows untouched and save file.

Another file to be modified is:

 

/etc/shadow

 

Search row starting with root

 

root:$2a$05$e7K5MayhjHODCvu6qFabq.H3QUucC0Osjas1SkbKnTlhacoW/mwFu:13528::::::

 

Remove all characters and leave this:

 

root:::: (word “root” and 4 colons)

 

Leave remaining rows untouched and save file.

Eject DVD and restart system. Then boot the system with forgotten password of root user. Log in as usual user and open terminal to enter

 

su

 

Now you are logged in as root and you can run this command

 

passwd

 

alert icon This command will define a new password for root user!

 

CONTACT

NET service solution, s.r.o.
Žerotínova 3056/81a
787 01 Šumperk
Czech Republic