Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I cannot login to the old username because it does not exist on the login screen. I cannot recreate the old username because I don't have root privileges. I have tried many methods of getting to root mode and none work. Is there any way of changing the new username to the old one?

I usually get this message:

sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: /usr/lib/sudo/ must be only be writable by owner
sudo: fatal error, unable to load plugins
share|improve this question
create a live cd or bootable usb key, start from that, mount the harddisk and fix the permissions –  noleti Jul 18 '14 at 11:48
possible duplicate of How do I reset a lost administrative password? –  NGRhodes Jul 18 '14 at 11:50
I only know Windows. I shall attempt to "fix the permissions" whatever that is! –  Jason Mamford Jul 18 '14 at 11:53
if that is the case: re-install 14.04. It probably will be easier to save those files you want saving to a USB stick and just re-install. –  Rinzwind Jul 18 '14 at 11:55
I booted up on the usb again but I am still not in root mode. I can't find ' permissions' –  Jason Mamford Jul 18 '14 at 12:06

1 Answer 1

Start by rebooting into recovery mode (covered on this question). Get up to the point where you're root.

After that look at stat /usr/lib/sudo/ I see:

Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)

By the looks of it, that won't ring true for you but not entirely sure what you've done. If the owner isn't root or the permissions are anything but 0644, we can fix that quickly:

chown root: /usr/lib/sudo/
chmod 0644 /usr/lib/sudo/

If that permissions/ownership is the only problem, that should fix it. Just run reboot to boot back into Ubuntu-proper.

If you nuked /usr completely (with a chmod -r ... /usr, for example), you need to restore ownerships to a lot more files. Thankfully, /usr is fairly rooty. You can restore the bulk of permissions with:

chown -r root /usr
chown daemon /usr/bin/at
chown libuuid /usr/sbin/uuidd

If you want to know how I got those two stragglers, I ran sudo find /usr -exec stat -c '%U %n' {} + | grep -v root on a cleanish system. If you have a recent backup, I'd suggest running that against your backup.

share|improve this answer
It's very difficult to do anything because it won't allow me to set the screen resolution correctly, so I can only see a quarter of the screen. –  Jason Mamford Jul 18 '14 at 12:10
Oh man, when it rains it pours! Right you could do this via a Live CD/USB (assuming you have one); just follow these instructions up to and including step 11. That should make you root on your install system which should put you in a position to fix things. –  Oli Jul 18 '14 at 12:15
@Oli I did the silly thing and ran sudo chown $USER -r /usr. Can you please explain what should be done? –  Tushar Apr 22 at 8:26
@Tushar Well that was silly. I've added an edit that should restore most of /usr to its rightful ownerships. You'll still need to start by rebooting into recovery mode though. –  Oli Apr 22 at 9:55
So, me or my hubbie must have done a similar silly thing on his Ubuntu machine as Tushar. Will probably want to do a reinstall, but need to backup some stuff first - but, I can't connect to internet or connect USB. Does anybody know what the ownership should be for /media or other things that affect how the USB works? The answer above doesn't seem to help me. –  Ingrid Sep 4 at 15:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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