Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem with login. Its in a cycle login with password correct - > login -> login with password correct -> login.

I've seen a few threads about this matter but none helped.

I do ctrl+Alt+f2, when i log in it shows me two errors:

-bash: /home/imight/.profile: line 19 unexpected EOF while looking for matching
-bash: /home/imight/.profile: line 22: syntax error: unexpected end of file
share|improve this question

The message basically says that there is something wrong with the file .profile in your home directory. You will either have to correct this error or to remove the file.

So use a Live CD or USB and boot from that. When the system is up, use "Try Ubuntu" and open the hard drive. You'll find it normally in the sidebar or you can open a terminal and enter ls /media. Your mounted hard drive lives there. Navigate to home/imight. The whole path is /media/SOMETHING/home/imight, where SOMETHING depends on the layout of your drive. The best option is to rename the file .profile to some other name. But you can also open the file and see if you can find the error. Once you've spotted it you might be able to correct it.

After you renamed the file or corrected it you can reboot into your system. Now you'll be able to login.

share|improve this answer

Try removing the .profile file and logging in again.

share|improve this answer
how do i do that? can i erase .profile file? – imight Feb 27 '13 at 19:58
try ls -l ~imight/.profile to check the ownership of the file and use rm command accordingly to remove it. – Arush Salil Feb 27 '13 at 20:04
Rather than removing .profile, it's better to rename it. For example: cd ~imight && mv .profile .profile.old Then no information is lost and the file can be restored later. – Eliah Kagan Feb 27 '13 at 22:33

Your Answer


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.