You are not logged in.
When performing updates I changed by mistake the owner of the sudoers file from root to my username. How can I change it back to root?
If I try to perform any operation on sudoers file I get the following error messages:
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: error initializing audit plugin sudoers_audit
EDIT: I solved the problem by booting from a rescue disk and changing permissions from there. I would still like to know if it is possible to change permissions without the use of a rescue disk.
Last edited by tethys (2024-10-20 12:39:24)
Offline
If you have set a root password, then just su to root, you can fix the ownership of the sudoers file from there.
Alternatively use pkexec/doas/etc. (if you have them).
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
Thank you WorMzy, it did not strike me to use su, and I have indeed a root pasword.
Offline