I accidentally ran the command
sudo chown -R ubuntu:ubuntu .
while i was in the root directory.
Now every single files user and group has changed to the Ubuntu user and group. And none of the commands sudo
, pkexec
are working because permissions of /etc/sudoers.d file is incorrect. IS there any way I can recover. I cant login as root using password since it was not configured.
Is there any way I can fix this? logging in as root is sufficient for me to change the permissions back, as chown
command works only as root.
This matter is extremely urgent.
Thanks in advance.