We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

How to change root password of server (Ubuntu 14.10) via OVH Rescue Kernel?


theatheist
16-06-2015, 17:06
Thanks this worked. Your help has been very much appreciated!

theatheist
16-06-2015, 16:55
Thanks.

This is what fdisk brings..

Code:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  4294967295  2147483647+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT

Disk /dev/md3: 7958.5 GB, 7958548185088 bytes
2 heads, 4 sectors/track, 1943004928 cylinders, total 15544039424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md2: 21.0 GB, 20970405888 bytes
2 heads, 4 sectors/track, 5119728 cylinders, total 40957824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

alvaroag
16-06-2015, 16:35
First you have to look for your root filesystem. If you are using RAID, it sould be md0 or md2. Let's asume it's md2. On the rescue system, run:

mount /dev/md2 /mnt
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount -t proc none /mnt/proc
chroot /mnt /bin/bash
passwd
# Now type your password, then enter, then password again, enter
exit
umount /mnt/dev /mnt/sys /mnt/proc /mnt
reboot
That should do.

theatheist
16-06-2015, 16:11
Hi,

As title says I'm trying to change root password of server via the Rescue kernel but not having any luck. Does anybody know the correct solution?

I seem to have lost access/root password isn't working so need to change it.

TIA