You are not logged in.
Pages: 1
Having got the message "/etc/sudoers installed as /etc/sudoers.pacnew" when updating sudo, I (without thinking) renamed /etc/sudoers, and then tried to rename /etc/sudoers.pacnew, but I now get the error:
sudo: unable to stat /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting
sudo: error initializing audit plugin sudoers_audit
Can I get round this by using su, or will this mess up ownership?
Last edited by Flapper (2020-07-25 23:10:04)
Offline
If you can login as root, do so, restore your old sudoers file and run visudo.
The update is a change on the last line, the includes, that it now uses @ instead of #
If you can’t because the root user has no password you are locked out...
Do you have a pendrive with archiso in hand?
Offline
Log in as root. Reinstall sudo.
Offline
Can I get round this by using su
Of course. Why would it mess up ownership? In the future, use "pacdiff" (or equivalent) rather than manually renaming files.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Renamed it back to sudoers by using su, then edited with visudo. Marking as solved.
Offline
Log in as root. Reinstall sudo.
I'm mind-boggled that you think reinstalling sudo will solve the problem of incorrect configuration files that no longer have custom settings.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
GeorgeJP wrote:Log in as root. Reinstall sudo.
I'm mind-boggled that you think reinstalling sudo will solve the problem of incorrect configuration files that no longer have custom settings.
Maybe I get it wrong.
Reinstalling sudo will solve missing file /etc/sudoers.
Custom settings should be saved in files in /etc/sudoers.d folder.
Offline
Unfortunately we don't live in a shouldland and the file conflict suggests that /etc/sudoers saw custom changes.
Online
Pages: 1