suddenly the sudo command doesnt work.
the statement
sudo openhabian-config
displays the error message:
/usr/bin/sudo must be owned by uid 0 and have the setupid…
That’s strange - did you change some configuration on Linux-side?
or blunt question: Do you have everything you configured saved, so you can just overwrite your system with a brand new installation and re-configure your system?
If you can I’d take a backup of the memory card now, unfortunately this is a fairly big issue and there’s a chance that you may have to reinstall your system. If you remember the commands you used before this issued occured, it may help. Relevant AskUbuntu thread.
I don’t think there’s a safe mode as such for raspbian. However, you might be able to fix this problem by connecting a screen and keyboard into your pi. relevant RasberryPi thread for “recovery options”.
First edit cmdline.txt the /boot partition on the memory-card. (You might have to use another computer)
Add a new line with init=/bin/bash at the end.
Place the card in the raspberry pi, and let it boot. You should see that you’re logged in as root.
Enter the command chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
To add to Ben’s advice: save you some headaches and time: save your configuration and restart new would be the best for you, I think.
If you’re only used files for configuration, just copy that files, a vanilla OH2 will read the config files in /etc/openhab2/<<all folders>> and rebuild exactly as it was