I get to the login prompt and type in user and password. There's a message "Last logged in at bla bla.." and then I'm returned to the login prompt.
I can login as root, but I don't want to do that at all. I tried resetting the password for user (passwd <user>) and it's accepted, but I still can't login.
What file must I edit?
My guess would be the user doesn't have a valid shell listed as their default.
usermod -s /bin/bash user's_name
as root. You want to replace user's_name with the name of the user your having trouble loging in with.