Sudo not possible

Hi,

since i backed up openhabian and reinstalled it, i can’t use sudo any more. No matter what i type in with sudo, i get the following message (example of apt update):

Sorry, user openhabian is not allowed to execute ‘/usr/bin/apt update’ as root on openHABianPi.

So i also can’t use visudo or edit sudoers to give openhabian rights.

Can anyone give me some hint on how to correct this?

Thank you.

Maybe there is some information that helps.
Maybe not.

See

https://playwithmyled.com/2012/10/change-raspberry-pi-lost-password/

for how to boot into single user mode. This gives you a root level terminal. From there you can run visudo and/or add openhab to the sudoers group or fix whatever you need to at the root level. Then remove the changes to cmdline.txt in the boot partition and reboot and you should be fixed.

However, this sounds a whole lot like something went wrong with the install and I’m not sure I would trust that something else isn’t wrong. If it were me, I’d reinstall.