New on LowEndTalk? Please Register and read our Community Rules.
Help With Reseting Kimsufi root password.
Hi
I am at my wits' end here.i want to reset the password for a kimsufi server but i keep getting this error when i do chroot /mnt /usr/bin/bash
chroot failed to run command ‘/bin/bash’ no such file or directory
I am following this tutorial from ovh here
https://docs.ovh.com/gb/en/dedicated/root-password/#step-4-change-the-root-password
What could be the problem?
Comments
Type 'which bash' on your shell prompt, excluding the apostrophes, and post the output.
The command is only "chroot /mnt", not "chroot /mnt /usr/bin/bash", after you've mounted the hdd.
Easy option if you have another account on the box: append a line to the sudoers file (assuming you have sudo installed) then reboot - you can then sudo to root using your normal users password.
the output is
/bin/bash
i then didchroot /mnt /bin/bash
it gave me the same error also doingchroot /mnt
give the same error.what could be the problem?Out of a hunch here, but did you mount your hard drive properly? When I create chroots, this issue does happen when I forget to copy over the required library files, so perhaps that's the issue.
Would you mind typing 'ls /mnt'?
I usually do the following
mkdir /mnt
mount /dev/sda /mnt
chroot /mnt
What Rescue mode are you using?
Am using rescue64-pro
the output for ls /mnt is
https://i.imgur.com/7RzE5ED.png
You need to mount your drive first before you can check the data in it. ReserveHost gave you sample command already.
I have run the commands provided by @ReserveHost here's the output.What am i doing wrong?the partition
/dev/sda1
is the one with the asterisk when i runfdisk -l
https://i.imgur.com/8FAckoE.png
try mount /dev/sda not mount /dev/sda1
when i run
/dev/sda
i get this errorNTFS signature is missing.
Failed to mount '/dev/sda': Invalid argument
The device '/dev/sda' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
@eri
It's not really clear to me what you're trying to do
If you simply want to change your root password and you haven't forgotten the old password, you don't need to boot into rescue mode to change your root password
The error message
chroot failed to run command ‘/bin/bash’ no such file or directory
suggests that
bash
isn't available (installed) in rescue mode (are you sure thatbash
is available in rescue mode?)(I don't have a KS)
@eri
First, you need to mount your system partition onto
/mnt
. Can you do this successfully? If yes, what happens if you then try:chroot /mnt passwd
?