Hi, i made my very first big Linux mistake with a wrong chmod command and now can’t log in an lost my root rights. With anything regarding sudo Displays:
“sudo: /usr/bin/sudo muss dem Benutzer mit UID 0 gehören und das »setuid«-Bit gesetzt haben”
And the command “ls -l /usr/bin/sudo” Displays:
“-rwxr-xr-x 1 root root”
The os boots, but i can’t log in as my password is not accepted anymore. What can i do? Start recovery mode? If so how? I am beyond confused and really need help
I have been using Linux for nearly 30 years. Last week, whilst tidying up an old install, I accidentally deleted my /usr directory and not the one on the other drive. happens!
Option 1:
Depending on how much damage caused, it may be quicker to launch the install media and recover personal files and reinstall.
Option 2:
chroot in from the live media and try to reinstall misbehaving packages.
Option 3:
Does the su command work? Or did you clobber it as well? If it does try:
I added 'init=/bin/bash’ to my boot of EOS and can at least enter my system to some degree, but when i execute the command sudo, i get:
Sudo: /etc/sudo.conf is world writeable
Sudo: /etc/sudo.conf is world writeable
Sudo: /etc/sudoers is world writeable
Sudo: Error initializing audit Plugin sudoers_audit
Well, that is a big one… Is it even possible to do something about that? I don’t think so. You can still save your data with a live boot (for example), but the system itself probably is unusable now.
Yeah, there was nothing i could do, i reinstalled everything and got everything running like before now with absolutely no data loss, due to regular backups, i only lost a day of productivity; at least i learned how to not use chmod
Don’t be embarrassed we have all done our moment in the walk of shame, rather publicly or privately. As noted the best thing you can do at this point is to boot up with a live USB and backup your personal data and then reinstall.