0

Mistakenly I wanted to change the ownership or /usr and /etc and /home by

chown -R username

because I thought in this case, I won't see any error saying permission denied in installing softwares and etc, but by having done it, got an error meaning that sudo was ruined. I tried to solve it by using

chown -R root:root /usr/lib/sudo 

and but no luck then tried it after entering command in below

mount -o rw,remount / 

in ubuntu recovery, while it is now the only way I can communicate with my ubuntu using root shell prompt. then I got error in below:

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

none of having said commands, solved the problem. after trying to access to my account to get backup of my data to reinstall ubuntu, I faced with another bigger problem: I can't see my username account in log in screen. I see only guest session. while even logging into guest session it brings me back again in log in screen. I really don't know what to do. please if help if you know how to solve it. I can't use sudo at all and can't also apt.get update in recovery ubuntu screen.

10
  • possible duplicate of sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 – JoKeR Jun 27 '15 at 21:23
  • also askubuntu.com/questions/234603/… – JoKeR Jun 27 '15 at 21:24
  • @JoKeR I tried pkexec chown root /usr/lib/sudo/sudoers.so and got the error Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program /usr/lib/dbus-1.0/dbus-daemon-launch-helper: Success then I tried chown root /usr/lib/sudo/sudoers.so and ofcourse I wasn't able to do that before doing mount -rw -o remount/. after that I rebooted the laptop and still see guest session only. please help! – Majid Azimi Jun 27 '15 at 21:31
  • did you do that from root shell? – JoKeR Jun 27 '15 at 21:32
  • @JoKeR yes I restarted and went throught ubuntu recoverty and using root shell I did it. now that is the only way I can't enter the commands – Majid Azimi Jun 27 '15 at 21:34
0

Create a Ubutnu live cd, mount the drive Ubutnu is installed on and do chown -R root: /media/ubuntu/YourDriveName/etc. Repeat this but replace etc with usr. I think there is no reason the change the owners of /etc and /usr.

7
  • @JoKeR. I made the explanation more clear at least I think I did. the duplicated link didn't help having tried all solutions mentioned in that link – Majid Azimi Jun 27 '15 at 21:43
  • thanks I'm trying it and I'll let you know of the result. – Majid Azimi Jun 27 '15 at 21:43
  • I hope it helps. – Marton Jun 27 '15 at 21:49
  • I tried sudo chown -R root:root /media/ubuntu/4dc7958...../etc or also /usr. what should I do now? shall I now reboot it – Majid Azimi Jun 27 '15 at 21:55
  • Yes you should you could also change the owner of /home but that is less important. – Marton Jun 27 '15 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.