Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/sudoers.so 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 sudoers.so permissions –  noleti Jul 18 at 11:48
    
possible duplicate of How do I reset a lost administrative password? –  NGRhodes Jul 18 at 11:50
    
I only know Windows. I shall attempt to "fix the sudoers.so permissions" whatever that is! –  Jason Mamford Jul 18 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 at 11:55
    
I booted up on the usb again but I am still not in root mode. I can't find 'sudoers.so permissions' –  Jason Mamford Jul 18 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/sudoers.so. 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/sudoers.so
chmod 0644 /usr/lib/sudo/sudoers.so

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

If there are other issues (like you've somehow moved root to a different UID, run a chmod -r in /lib or something else silly like that), we can look at that when we get to it.

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 at 12:10
1  
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 at 12:15

Your Answer

 
discard

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.