Sudo no longer operational Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Toulon7559
Posts: 848
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Sudo no longer operational

Post 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)?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
jannl
Posts: 639
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Sudo no longer operational

Post 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.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sudo no longer operational

Post by waltervl »

I would just restart again from scratch but then with a more recent OS....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jvdz
Posts: 2210
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sudo no longer operational

Post by jvdz »

I think your /etc/sudoers file is wrong, so you need to check its content and change its security settings.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Toulon7559
Posts: 848
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Sudo no longer operational

Post 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' .....
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
User avatar
jvdz
Posts: 2210
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sudo no longer operational

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest