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.

This morning, I started up to find all sorts of disk errors going on on boot, so I started up the Live CD and fsck'd my Linux partition. This fixed a whole lot of stuff, so I then rebooted.

All's well and the boot goes fine, except instead of my automatic login to desktop, I'm at the default login screen. I can see my normal username, except my password now doesn't work (showing in a split second Authentication Failed or something similar then returning to the user list). Clicking Automatic Login on the menu just flashes nothing and returns to the user list.

Trying to login through tty doesn't work either.

Does anyone know how I could fix this and login as my normal user again?

share|improve this question
    
I think I may have found the problem, seems /etc/shadow was renamed to /etc/shadow- for some reason. Fixing that I could run passwd with chroot from the LiveCD and change my password. I'll see if it helps on reboot. –  shrodes Mar 22 '11 at 2:24
    
Yep, this solved my problem. Need to look into why /etc/shadow was renamed... –  shrodes Mar 22 '11 at 2:33
add comment

2 Answers 2

up vote 2 down vote accepted

OP answered:

I think I may have found the problem, seems /etc/shadow was renamed to /etc/shadow- for some reason. Fixing that I could run passwd with chroot from the LiveCD and change my password. I'll see if it helps on reboot.

share|improve this answer
    
Whoops, I should know better than to not mark this answered. Thanks. –  shrodes Apr 17 '12 at 6:08
add comment

Well I'm glad you fixed it but it wasn't renamed. /etc/shadow- is a backup of /etc/shadow.

/etc/shadow is a fairly critical file on any system so it does make sense to keep a copy around. In this case it looks as if it was deleted or irreparably damaged by something. It may have been a malicious attack to try and cripple your system or it may have just been a hiccough in the system.

But you did the right thing. I'd perhaps consider running a virus scan and fsck the disk to check it's all fine.

share|improve this answer
    
Another backup of /etc/shadow is put in /var/backup/shadow.bak. –  Lekensteyn May 27 '11 at 17:29
add comment

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.