checking how to reset sudo and root password on Ubuntu 21.04
Marco Fioretti
mfioretti at nexaima.net
Fri Oct 14 19:30:22 UTC 2022
On Fri, Oct 14, 2022 at 20:09, Robert Heller wrote:
At Fri, 14 Oct 2022 17:41:25 +0000 "Ubuntu user technical support,? not for general discussions" wrote:
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
Ubuntu does not (normally) set a root password and you cannot (normally) log
into root. (One does 'sudo su -l root' if one must have a root login shell.)
cannot do that, sorry if it was not clear:
#> sudo su -l root
sudo: /etc/sudo.conf is owned by uid 755, should be 0
sudo: /etc/sudo.conf is owned by uid 755, should be 0
sudo: /etc/sudoers is owned by uid 755, should be 0
sudo: no valid sudoers sources found, quitting
sudo: error initializing audit plugin sudoers_audit
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20221014/7e76fd55/attachment.html>
More information about the ubuntu-users
mailing list