Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I do understand this is a common problem. I have read and tried most of the suggestions but have not found a good solutions. Thus I am posting my question.

  1. Enter the correct password, the computer loops back to login screen
  2. Enter an incorrect password ubuntu responds incorrect passwords
  3. Pressed ctrl + alt + f1 the console can be accessed, but does't recognize common commands such as ls, cp, cat, more etc
  4. The following command was added /etc/profile file before the occurrence of the current scenario: PATH="...:/opt/qt/lib" (This was an error)
  5. echo command works
  6. Do an echo $PATH the response is "...:/opt/qt/lib"
  7. Currently /etc/profile looks something like the following
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi
PATH="...:/opt/qt/lib"   # This line is in error

So if /etc/profile file can be edited to remove the last line the problem might be solved.

Any suggestions how this can be achieved.

Thank you in advance

Following are some of the threads that have been referanced

share|improve this question
1  
Could you provide the output of /bin/ls -l ~ or /bin/ls -l /home/yourusername ? Please include files regarding bash (.bash*) and Xorg (.XAuthority for instance). –  John WH Smith Jun 27 at 1:07
    
Thanks for the hint. I did a sudo vi /etc/profile and removed the entry in error. I was able to login. Thank you again –  Mahendra Gunawardena Jun 27 at 1:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.