Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help With Reseting Kimsufi root password.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Help With Reseting Kimsufi root password.

erieri Member

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.

  • erieri Member
    edited April 2020

    @FlamesRunner said:
    Type 'which bash' on your shell prompt, excluding the apostrophes, and post the output.

    the output is /bin/bash i then did chroot /mnt /bin/bash it gave me the same error also doing chroot /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?

  • erieri Member

    @ReserveHost said:
    I usually do the following

    mkdir /mnt
    mount /dev/sda /mnt
    chroot /mnt

    What Rescue mode are you using?

    Am using rescue64-pro

  • erieri Member
    edited April 2020

    @FlamesRunner said:
    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'?

    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.

  • erieri Member

    @jonesolutions said:

    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 run fdisk -l

    https://i.imgur.com/8FAckoE.png

  • try mount /dev/sda not mount /dev/sda1

  • erieri Member

    @OsirisBlack said:
    try mount /dev/sda not mount /dev/sda1

    when i run /dev/sda i get this error

    NTFS 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?

  • angstromangstrom Moderator
    edited April 2020

    @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 that bash is available in rescue mode?)

    (I don't have a KS)

  • angstromangstrom Moderator

    @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

    ?

Sign In or Register to comment.