When i first installed kde fedora linux 43 i enabled some alternate sources in software manager changing plasma kde to the workstation which i dont really like as much as plasma i tried changing it back using a guide like: Switching desktop environments :: Fedora Docs but it does not work and i get errors like
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: error initializing audit plugin sudoers_audit
for my computer type its
Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.17.9-300.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 à Intel® Core⢠i5-7300U CPU @ 2.60GHz
Memory: 36 GiB of RAM (35.1 GiB usable)
Graphics Processor: IntelĀ® HD Graphics 620
Manufacturer: LENOVO
Product Name: 20L8S0AC00
System Version: ThinkPad T480s
Any help would be very useful
Is this issue not fixable at all? would i need to re install my os again?
it seems your sudo configuration files are by your user account (uid 1000) instead of root (uid 0) for some reason. So to have root access you may try using āsuā and then changing the ownership of those files.
Iāve seen that for users who entered commands or ran scripts from the internet without understanding what the commands/scripts were doing. You may have many other files and directories with bad permissions. You could start by running ls -ln in the terminal to check for non-zero values in the 3rd or 4th column. Here, there are 2 non-zero 3rd column entries and both also have non-zero values for the 4th column. The awk program can used to check for non-zero values in a column:
I used this command but when trying to install things like switchdesktop like the tutorial said i still get the error
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: error initializing audit plugin sudoers_audit
i also added sudo when entering your command to have it work
i tried to use the first command you put and swapped su for sudo due to it giving me authentication failures despite putting the right password adding sudo did not work for me
If sudo is broken and you do not have a password set for your root account so that su will work, you will probably have to boot from a Live image on a USB stick to fix your system. There are some instructions for setting your root account password from a Live image here:
After you reset the root password for your system and boot back into your normal system, su should work as an alternative to sudo. From there, you should be able to fix your config files and get the normal sudo command working again.
You have been shown how to identify the files that are owned by someone other than root, and the files that are expected to be in that category.
You also have been shown how to set a root password so you can fix the ownership of the files you initially identified as a problem with using sudo.
first set a root password following the procedure above by booting with a live media.
once the root password has been set so you can use the su command and you have rebooted, then change ownership of /etc/sudoers, /etc/sudo.conf and /etc/sudoers.d with the command su -c 'chown root:root /etc/sudoers /etc/sudo.conf /etc/sudoers.d'. This will require the new password you just set for root.
Once step 2 is completed you should be able to use sudo as you did before.
Finally please run the command ls -ln /etc | awk '{if ($3 != 0 || $4 != 0) print $0}' and give us the results so we may assist with recovery from additional changes that may have been done to ownerships in /etc