Sudo not working any more

Yes but you’re not going to like it. And the permissions on the sodoers file is not something that just randomly happens which makes me question whether there isn’t something much more fundamental going on (SD care is wearing out) like you ran one of the nuclear destruction commands on Linux/Unix machines like recursively changing the ownership of all files under / or even just under /etc which is going to take way more than just fixing that one file to get the machine back up and running.

To fix sudo you’ll need to stop that machine, mount the SD card on another machine that can read ext4 file systems (Windows cannot without special software, many will use a VM running Linux to mount the file system). Then navigate to that folder and fix the ownership of the file to root:root (i.e. 0:0) and make sure the file permissions are -rwsr-xr-x.

Given that output from ls I’m going to guess you (or something) ran a chmod -r and chown -r from \ to set the permissions for frontail and now everything is owned by frontail with those permissions. If only that one file is owned by frontail, your SD card is wearing out or at the very least your file system is corrupted.

In either case the fastest solution will be to start up a new SD card and restore from a backup or mount the SD card to another machine and pull off it what you can. But you will have to pay attention to the ownership and permissions that those file need to be on the new machine. They can’t stay owned by frontail.

1 Like