How to reset ovh vps root password

AnuAnu
edited July 13 in General

OVH comes with the new VPS not root,
Comes with Debain User Password

There I forgot the Debain User Password
How do I reset it?
Said this when I heard Ovh Support
'sudo su debian && passwd after mounting your partition using mount / dev / sdb2 / mnt and chroot. '

How to do it?

Tried this post but I could not do it https://docs.ovh.com/asia/en/dedicated/root-password/

Tagged:

Comments

  • Thanked by (2)Anu Not_Oles

    oribinal user from +62

  • edited July 13

    After the server is setup with an OS, you will receive an email containing root password

    From root user, you can change password of other users. 2nd option would be to check OVH panel. There must be some option to change root password. You can also use that to set it if you dont know root password. 3rd option would be to install new OS.

    Thanked by (1)Not_Oles
  • via VNC or Rescue, you can change any password you desire.

    Thanked by (2)Ganonk CamoYoshi
  • @Neoon said:
    via VNC or Rescue, you can change any password you desire.

    +1

    oribinal user from +62

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Anu said:
    OVH comes with the new VPS not root,
    Comes with Debain User Password

    There I forgot the Debain User Password
    How do I reset it?
    Said this when I heard Ovh Support
    'sudo su debian && passwd after mounting your partition using mount / dev / sdb2 / mnt and chroot. '

    How to do it?

    Tried this post but I could not do it https://docs.ovh.com/asia/en/dedicated/root-password/

    Hi @Anu!

    The password for user debian usually is in the email from OVH which says your server is set up and gives you instructions on how to connect. So, if you still have the email, then you should be able to find the password for user debian. @xowxenxirix already posted an image of such an email.

    There are programs called su and sudo which enable unprivileged users like debian to do things as the root superuser. Get it -- su is superuser and sudo is do as superuser.

    Sometimes, to make the system possibly more secure, systems are set up without any root password at all. That means nobody can log in as root. Instead, unprivileged users who are members of the sudo group can use the sudo command to do things just as though they were root.

    If you forgot debian's password and you also lost the access email which contains the password, you can start the console or rescue system, mount your disk with the mount command, chroot to the mounted disk, and change debian's password, all as suggested by OVH support. This procedure is pretty routine for anybody who has done it hundreds of times, but it's really tricky for a new user. :)

    So the easiest way is just to reinstall the server. :)

    Please remember that a user with sudo privileges is essentially equal to the root user.

    Please let us know how it goes. Good luck with your server! :)

    Thanked by (1)xowxenxirix

    Tom, not Oles. Happy New York City guy visiting in Mexico!
    Purveyor of Fast-as-Metal LXC and KVM VPSes!

  • @Not_Oles said:

    @Anu said:
    OVH comes with the new VPS not root,
    Comes with Debain User Password

    There I forgot the Debain User Password
    How do I reset it?
    Said this when I heard Ovh Support
    'sudo su debian && passwd after mounting your partition using mount / dev / sdb2 / mnt and chroot. '

    How to do it?

    Tried this post but I could not do it https://docs.ovh.com/asia/en/dedicated/root-password/

    Hi @Anu!

    The password for user debian usually is in the email from OVH which says your server is set up and gives you instructions on how to connect. So, if you still have the email, then you should be able to find the password for user debian. @xowxenxirix already posted an image of such an email.

    There are programs called su and sudo which enable unprivileged users like debian to do things as the root superuser. Get it -- su is superuser and sudo is do as superuser.

    Sometimes, to make the system possibly more secure, systems are set up without any root password at all. That means nobody can log in as root. Instead, unprivileged users who are members of the sudo group can use the sudo command to do things just as though they were root.

    If you forgot debian's password and you also lost the access email which contains the password, you can start the console or rescue system, mount your disk with the mount command, chroot to the mounted disk, and change debian's password, all as suggested by OVH support. This procedure is pretty routine for anybody who has done it hundreds of times, but it's really tricky for a new user. :)

    So the easiest way is just to reinstall the server. :)

    Please remember that a user with sudo privileges is essentially equal to the root user.

    Please let us know how it goes. Good luck with your server! :)

    I'm not sure but I dont think su is superuser, it's switch user

    Thanked by (1)mikho
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Hi @valkyrie Thanks for catching my mistake! 💛

    Here is an Ask Ubuntu page which calls su "substitute user." :) The page says, "Use the su (substitute user) command to get a root shell."

    The first line of the Debian 10 Linux man page also seems to use "substitute user." The first line says, "su - run a command with substitute user and group ID."

    Maybe "switch" and "substitute" make more sense than "super" since su can be used to change to another user who is not root.

    Thanks again! :)

    Thanked by (3)valkyrie mikho Anu

    Tom, not Oles. Happy New York City guy visiting in Mexico!
    Purveyor of Fast-as-Metal LXC and KVM VPSes!

  • flipsflips OG
    edited July 14

    If you have console access (VNC or whatever), just boot and set new password.
    The classical way is to boot with init=/bin/bash and remount the rootfs as read and write. Set new password, remount as read only and reboot.
    But the different distros usually have a fancier boot target these days (emergency/rescue or something), read the distro docs. :)

    Thanked by (1)Not_Oles
Sign In or Register to comment.