Root password
-
I've very stupidly managed to change ownership of the
sudoers
file topi
meaning I no longer have access to sudo. I get the responsesudo: /etc/sudoers is owned by uid 1000, should be 0
. I've triedpkexec chown root:root /etc/sudoers /etc/sudoers.d -R
but of course I have not set up a password for root before. Could someone help me please? Thanks. -
@spud11 if you want to get more attention to your issue you should change the title to more show your issue.
-
IIRC there is no root password.
Single user mode won't help as it requires root password too, and you need to be root to edit /boot/cmdline.txt in order to remove this.
So you can :- use a windows computer to add init=/bin/sh at the end of cmdline.txt in the /boot (fat) partition of the SD card
- use a linux computer (live distro if you don't have one), then mount root partition of the SD card and change ownership of sudoers.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.