Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Today I tried logging in in ubuntu but when I enter my password it keeps going to a black screen with text and then it gets me back to the login screen. When I press ctrl + alt + F1 I can login in the console. However when I start the console it says -bash: export: '/etc/profile' not a valid identifier. Also, it says the .Xauthorization filesize is 0. I have tried every solution I could find so far but nothig worked.


share|improve this question
up vote 0 down vote accepted

When logged into the console, please provide output from:

grep -nH export /etc/profile
grep -nH export ~/.profile
grep -nH export ~/.bashrc
grep -nH export ~/.bash_profile
grep -nH export /etc/bash.bashrc


Edit: Thanks for running the commands.

A problem appears on line 36 of /etc/profile:

/etc/profile:36:export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml source /etc/profile 

Remove the text at the end of line 36:

" source /etc/profile"

Well... actually lines 35 and 36 are twins. Just delete line 36.

Does that solve all of your problems, or does a problem persist?

This should remove the "not a valid identifier" error.

share|improve this answer
grep -nH export /etc/profile = /etc/profile:33:export JAVA_HOME /etc/profile:34:export PATH /etc/profile:35:export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml /etc/profile:36:export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml source /etc/profile grep -nH export ~/.profile = No output grep -nH export ~/.bashrc = No output grep -nH export ~/.bash_profile = grep: /home/finn/.bash_profile: No such file or directory grep -nH export /etc/bash.bashrc = No output – Finn Feb 26 '14 at 13:27
@Finn, thanks for the grep-output. See my edit: line 36 of /etc/profile has an extraneaous "source" command. – UnlimitedInfinity Feb 26 '14 at 13:37
I followed a tutorial on how to install metasploit on ubuntu 12.04 and it said I had to type sudo sh -c "echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml >> /etc/profile source /etc/profile" I'll try to remove line 36 however I don't know what command to use. – Finn Feb 26 '14 at 14:11
That tutorial should have had "source /etc/profile" on a second command line or at least have put a ; before "source". Use vi to edit the file. Copy it first! Or use an editor you are familiar with. – UnlimitedInfinity Feb 26 '14 at 14:24
Thank's for the help. just one last question, what should I copy and where? – Finn Feb 26 '14 at 14:27

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.