Ubuntu: Can't log in although password is correct


Im fairly new to ubuntu so bear with me on this. I was doing an assignment for my CSCI 323 class that required Manually adding a new user and my problem came about after I followed these instructions:

[ Step 5 - Set owner/group for the home directory. Make joe the owner and group ID of the directory. Use the chown and chgrp commands to set this, if necessary (if you need help with these commands, try the man pages). Hint: try using the command "chown joe:joe joe" to change the owner and group on the users home directory with one command.

Next, set the permissions for the directory. I won't go into details on binary or octal numbers here, but you'll want to set the permissions so that the owner as read, write, and execute permissions and group and world has no permissions. Do this with the following command:

chmod 700 ]

I thought I did it correctly, but upon logging out and trying to log back in, I found that I could not log into any account anymore. Whenever I enter my password, the screen flashes black and shows some code for half a second and returns. I tried logging in via Ctrl+Alt+F2 but my password is incorrect for my admin account but it DOES allow me to get on the Demo account I made. I have a feeling I screwed up with the group ID and owner.

Any help would be much appreciated.


To set the owner (-R for recursive):

sudo chown -R joe:joe /home/joe  

To set the permissions:

sudo chmod -R 700 /home/joe  

To change password:

sudo passwd joe  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »