I have already tried the root solution on the GBU thing, but it ask for the password: "Give root password for maintenance (or press control-D to continue)" Do you guys know any other way to recover it?
I use ubuntu 17.04
I have already tried the root solution on the GBU thing, but it ask for the password: "Give root password for maintenance (or press control-D to continue)" Do you guys know any other way to recover it?
I use ubuntu 17.04
Your password for using sudo is your account password. There is no separate sudo password. Your account needs to have sudo privileges. The account you set up for yourself when you installed Ubuntu will have been given sudo privileges.
If you don't remember your account password you will need to reset it which will require you to boot from a Live CD or into a special recovery mode, depending on which instructions you follow.
Some instructions for this are at: How do I reset a lost administrative password?
Based on thormasrutter link and the need to have such a wonderful solution here on AskUbuntu, here are the steps:
Alternative method when mounting root filesystem in rw
doesn't work.
Choose the regular boot kernel that you use (typically just the default one), and then use the "e" key to choose to edit that boot option.:
Now just hit the down arrow key over to the "kernel" option, and then use the "e" key to switch to edit mode for the kernel option:
You'll first be presented with a screen that looks very similar to this one:
You'll want to remove the ro quiet splash
part with the backspace key, and then add this onto the end:
rw init=/bin/bash
Once you hit enter after adjusting the kernel line, you'll need to use the B key to choose to boot with that option:
At this point the system should boot up very quickly to a command prompt. You can use the following command to reset your password:
passwd <username>
After changing your password, use the following commands to reboot your system. (The sync command makes sure to write out data to the disk before rebooting).
sync
reboot –f
Note:
I found that the –f parameter was necessary to get the reboot command to work for some reason. You could always hardware reset instead, but make sure to use the sync command first.