0

I have a VM running Ubuntu 18, on which I have both a normal user account and an admin account. Now I lost the password for the admin account and can’t update or install new software anymore. The VM is hosted in our facilities internal network. The VM can be accessed via ssh only, no GUI is installed. I know how to reboot a real machine or a VM in Virtual box in recovery mode to mount and reset Sudo password, but I have no idea how to do this for a remote VM. Anyone have an Idea? I would like to avoid having to set up a new Linux VM, it took forever to get all software for the analysis running together

3
  • I'm not sure what you mean by "sudo password", since sudo uses your own account password. Are you referring to the root password? Or do you have an entirely separate user account with sudo privileges, which is different from the user account you normally use?
    – patbarron
    Oct 5, 2020 at 16:22
  • Thanks for replying. Yes, i have only one account with sudo Privileges. All other users do not have sudo privileges
    – Sosolala
    Oct 6, 2020 at 6:46
  • From your description, it sounds like you will need to engage the help of your IT team (whoever owns the virtualization environment this is deployed on), because you'll need access to the system console to fix this (the way you would with fixing such problems on a VirtualBox VM as you mentioned you know how to do), and it sounds like you do not have access to the system console. Without console access, there is no way to do what you need to do - you'll need to get the VM booted in either recovery mode, or single-user mode, and reset the password from there.
    – patbarron
    Oct 6, 2020 at 15:30

1 Answer 1

0

You might just contact the hosting provider and ask them to reset the root password for you. That said, you should not need the root user's password (generally) with Ubuntu; you usually authenticate to sudo with your normal user's password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.