sudo chown -R openhabian /etc was not so smart, I guess.
Why id did it? I added the samba srv config to share /etc
I wanted to be able to change the config files in /etc directly over the share (Visual Studio Code is great for editing config files), without opening the terminal an using the annoying nano editor.
I can’t do any sudo any more. I each time get the complaint:
sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin
So I should try to make root owner again of /etc/sudoers. How?
I could try to run as root, or just type “su”, but these users are, as far as I know, disabled op OpenHABIANPI.
Who can help me?
What I cannot do:
- I cannot do chown root /etc/sudoers (permissions denied)
- I cannot do “sudo chown root /etc/sudoers” (as I cannot sudo any more)
- I edited cmdline.txt, by adding init=/bin/sh and then boot in single user mode: the problem is then that the disk is in read-only mode (I cannot edit files). When doing
mount -o remount,rw /
I get an issue that the PARTUUID=2F93…b not found (that is afaik the equivalent of te non-boot partition on the sd-card).
I have no more inspiration…