I have two partitions on my sony laptop , 4 GB for OS and rest for /home dir ofcourse with some amount left for swap.

I have upgraded ubuntu 10.04 LTS to 12.04 LTS
In my 10.04 installation ,before upgrade, the userid was "sashank" which was the only user in which all my files were there ( in /home/sashank)

After upgrading, the user id I gave for administrator was "sherry". I could login with this id, However I added another user "sashank", though if I try to login with "sashank" am not able to go beyond login screen.

How can I login as sashank and have access to /home/sashank as before the upgrade?

1 Answer
1

Based on your comment, i think the problem is with the ownership of "sashank" home folder. In the ouput of ls -la /home "sashank" folder belongs to user "sherry".

The problem is that, when you create the first user of the system, usually it stays with the user id (uid) 1000 and creates a folder in "/home", corresponding to the home folder of the newly created user. So before you upgraded your system, sashank had uid 1000. After you upgraded, probably "sherry" became uid 1000. So when you created user "sashank" it got another uid (1001, for example), and when you try to login with him it has no permission to write on his home folder (it was already there, and now belongs to "sherry").

To fix this use this command: sudo chown -R sashank:sashank /home/sashank. It will change recursively the ownership of the home folder of "sashank" account. Then logout and try to login as sashank.