Okay, so here’s what happened… I’ve been trying to get a game to work in Linux originally intended for Windows. I’m not going to go into too many specific details. Suffice it to say I had to use the sudo caja command to access the contents of one of the folders I needed copy some specific files to in order to get things working. During the process I created 2 temporary folders.
I later discovered that I did not need these folders. I emptied one folder and sent it to trash. The other, contains an older version of a file I no longer need. Now they appear to be stuck in my trash and will not leave when I try to empty it. When I try to delete them individually I get told there’s a was an error deleting them, but It will not say what there error is. I have tried installing other file managers to see if I’d have better luck, (pcmanfm, Thunar) and get the same result. I’ve tried to send them back to the folder they were originally created in, but they will not go there, even after I altered the folder’s permissions.
Anyone have any ideas on how to fix this? It doesn’t really affect the overall operation of my system, but it is a bit annoying to have these things stuck in limbo like this!
Thanks in advance for all your help!
Try this:
sudo rm -rf ~/.local/share/Trash/*
Thanks for the tip, sadly this what happens!
Not sure what to try next…
Sorry my Terminal skills are sorely lacking, I’m a much more visual person!
If you have any ideas don’t be bashful about sharing.
kernelpanic@Kernel-Panic2:~$ sudo rm -rf ~/.local/share/Trash/*
sudo: error in /etc/sudo.conf, line 0 while loading plugin “sudoers_policy”
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
That’s very odd:
Try the following command, just to see if you can use the sudo command, per se:
sudo apt-get update
and report back on here what happens
kernelpanic@Kernel-Panic2:~$ sudo apt-get update
sudo: error in /etc/sudo.conf, line 0 while loading plugin “sudoers_policy”
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
I think I’m screwed…
This and anything else I try with sudo gives this or a similar response.
I was messing around with permissions in order to try and fix this, and now I’m not sure how to reset this to default.
Had a problem like this years ago and solved by re-installing Linux, which is a major pain in the posterior!
Thank you for you help thus far, if you have any other bright ideas, you know where to find me!
Run the following command and report back
ls -la /usr/lib/sudo/sudoers.so
It should look like this
-rw-r--r-- 1 root root 354592 Jan 17 2018 /usr/lib/sudo/sudoers.so
kernelpanic@Kernel-Panic2:~$ ls -la /usr/lib/sudo/sudoers.so
-rw-rw-r-- 1 root root 354592 Jan 17 2018 /usr/lib/sudo/sudoers.so
Okay… For those, (Like me!) who don’t speak Terminal fluently, what does this mean, in a nutshell?
Your /usr/lib/sudo/sudoers.so
has been tampered with, as it seems, and now has the wrong privileges. This looks serious to me…
What’s the output of sudo ufw status verbose
?
kernelpanic@Kernel-Panic2:~$ sudo ufw status verbose
sudo: error in /etc/sudo.conf, line 0 while loading plugin “sudoers_policy”
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
So… What are my options?
I just spent a lot of time backing up my system, do you think I need to to wipe and reinstall?
Try logging as root:
sudo su
Then do the following:
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
This should re-establish the correct privileges.
kernelpanic@Kernel-Panic2:~$ sudo su
sudo: error in /etc/sudo.conf, line 0 while loading plugin “sudoers_policy”
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
I still think I’m screwed…
I do appreciate the help though! I hope this give you another idea for me to try.
I do sometimes wish I were more Terminal savvy, but I relate more to the visual side of things.
The command line has become less esoteric to me over the years, but it still manages to confuse me sometimes!
All hope is not lost @Kernel_Panic
@Apollonius code will restore the correct permissions to sudoers.so
However, since you can no longer use sudo to become root on your system, you will have to do so from a live-dvd or a live-usb, which ever you used to install Ubuntu-Mate.
-
When booting into a live session, pick "Try Ubuntu-Mate before installing"
-
Once to boot process is complete, open Caja (file manager) and navigate to /usr/lib/sudo/ on your computers hard drive.
-
Then right click and select "Open Terminal from here"
-
Then in the terminal enter
sudo chmod 644 sudoers.so
-
Followed by
sudo chown -R root:root sudoers.so
After all that reboot into your regular system, open a terminal, and enter sudo su
If all went well, you should be prompted for a password, which means sudoers.so has the correct permissions and sudo is now working again.
If your going to continue to use Linux, you will eventually need to brush up on your terminal skills. This idea people have today that the command line is no longer needed in Linux is just not true.
http://linuxcommand.org/ is a very good place to start.
Once you have some basic command skills mastered, I think you will find that Linux is a much more versatile operating system than you realized.
Thank you Steve!
I’ll give this a try tomorrow when I have some more time! I’ll let you know how it goes!
As far as the terminal goes, you are absolutely right, I should try to become more proficient. I’ve bookmarked that site you linked me and have added it to my list of things to check out this weekend. Thank again for all you help thus far, and again I’ll let you know how things go!
An alternate to starting a live session would be recovery mode, it features a root shell.
-
Hold SHIFT while booting, this menu should appear:
-
Choose "Advanced Options" and pick the latest kernel.
-
A list of options will appear, choose "root - Drop to shell".
-
Since the system is in read-only mode, you'll need to remount the disk as read/write:
mount -o remount,rw /
Then you're ready try the commands above. The sudo
part should be omitted, as you are already the superuser (root).
When done:
reboot
Good News Everyone…
I have followed Steven’s procedure, using an Ubuntu MATE Thumb drive I prepared using Etcher,
and thing are now back to Normal!
Thanks to stevecook172001, I also now have an empty Trash folder!
I want to thank all of you for your help and advice!
I’ve learned a lot from this experience and I think I’m on the road to learning more.
Thank you again!
This is the fun and thrill of using Linux- you run into a problem and then “actually” fix it on your own by giving a bunch of commands to your system; and after it’s been fixed, ah, that feeling never gets old, never will…
Hello, there is no GUI-approach for emptying the trash using the Trash icon. It needs to have a right-click | Empty Trash.
In Caja, emptying trash can be accomplished from File | Empty Trash menu.