Page 1 of 1

Sudo no longer operational

Posted: Sunday 15 September 2024 18:44
by Toulon7559
Perhaps not the right place to ask, but rather desparate .....

After a failed installation of PHP on a 'naked' Raspberry (with Buster as O.S.), no longer able to run scripts applying sudo as enabler,
including the basic sudo reboot.

'Obviously' also some 'production' running on this Raspberry, and therefore very much desired to find an effective clean-up .....

Example

Code: Select all

pi@raspberrypi19:/ $ sudo apt-get update
sudo: /etc/sudoers kan door iedereen worden geschreven
sudo: geen geldige sudoers-bronnen gevonden, afsluiten
sudo: kan beleidsplug-in niet instellen
Access is possible by means of Putty_SSH and WinSCP.
Scripts etc. have been saved elsewhere.

Any hint for repair (other than fresh reinstall)?

Re: Sudo no longer operational

Posted: Monday 16 September 2024 10:11
by jannl
Why not use a more recent OS compared to Buster (which is EOL).

Besides that, check the 'chmod' settings of the sudoers file, as the error messages suggests.

Re: Sudo no longer operational

Posted: Monday 16 September 2024 10:49
by waltervl
I would just restart again from scratch but then with a more recent OS....

Re: Sudo no longer operational

Posted: Monday 16 September 2024 11:27
by jvdz
I think your /etc/sudoers file is wrong, so you need to check its content and change its security settings.

Re: Sudo no longer operational

Posted: Monday 16 September 2024 22:43
by Toulon7559
Certainly /etc/sudoers/ and it's contents is not correct, but situation is chicken-and-egg:
for the suggested change to attributes of the files in that folder it is necessary to apply sudo, but that is not available ......

Fortunately could copy/shift the 'production'-scripts to another, healthy Raspberry,
enabling to completely clean & refresh & update the victim-Raspberry without functional loss ........

Pragmatic solution => no further braincracking trying to 'repair' the victim-Raspberry.
Only have to find a way for installation of PHP without another 'accident' .....

Re: Sudo no longer operational

Posted: Tuesday 17 September 2024 16:49
by jvdz
Can't you just mount the sdcard or ssd drive that contains the /etc/sudoers file to another system and edit the file.