checking how to reset sudo and root password on Ubuntu 21.04
Marco Fioretti
mfioretti at nexaima.net
Fri Oct 14 17:41:25 UTC 2022
Greetings,
I recently recovered an Ubuntu 21.04 box I had set up back then, and then "leased" to a relative.
I will upgrade it asap to 22.04 LTS, BUT, for reasons not relevant here, while doing backups and
generally "cleaning up" that box:
1) I made a mistake, issuing a chown command in /, thus messing up, among other things,
ownership of critical files in /etc/, so now sudo does not work anymore
2) AND I forgot the root password, so I cannot just "su" and fix those ownerships manually
3) but again, I have to fix those ownerships and other stuff, and back up before upgrading.
I know I could boot a live distro and work from there but I have very slow connectivity right now,
AND I want to refresh my skills for these situations anyway, just to have more alternatives.
So, since I CANNOT risk to mess up that box even more, I would really appreciate a confirmation
that the root password reset procedure described here:
https://unixcop.com/how-to-reset-root-password-on-ubuntu-21-04/ (https://unixcop.com/how-to-reset-root-password-on-ubuntu-21-04/)
is 10% complete and correct for Ubuntu 21.04, and if there are better ways to reset a root password at the prompt, without using
a live distro.
TIA,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20221014/3ad12733/attachment.html>
More information about the ubuntu-users
mailing list