0

I am using Ubuntu 14.04 (On VM Player) but unable to login suddenly. I am entering the correct password, because if I enter wrong password it gives password error message, and not otherwise. It just stays on the login screen - no error nothing. I have restarted VM Player and VM a few times, etc

Adding more details My orginal issue was my program not finding JAVA_HOME even though it is there.

1. Originally I had setup PATH in etc/environemnt.

$ sudo service dse start
**Java executable not found (hint: set JAVA_HOME)**
@ubuntu:~/Downloads$ echo $JAVA_HOME
/opt/jdk1.8.0_111
@ubuntu:~/Downloads$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Java exists as above

2. Then I setup PATH .bashrc (this also did not work) export JAVA_HOME= /opt/jdk1.8.0_111 export PATH= $PATH:$JAVA_HOME/bin

  1. Added path to .profile (same as above) now removed from .bashrc and etc/environemnt After this my login issues have started.

The original hypothesis was there maybe multiple java versions causing conflicts but that may not be true:

~$ sudo update-alternatives --config java
update-alternatives: error: no alternatives for java

Thx

Sam-T
  • 173
  • 3
  • 13

3 Answers3

0

Remove path variable from /etc/environment, .bashrc and .profile.

Now add following line only in /etc/environment as, PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin‌:/usr/games:/usr/loc‌​al/games:/opt/jdk1.8‌​.0_111/bin"

Undo whatever you added in .bashrc and .profile file.

Rahul
  • 1,683
0

This login issue was resolved (thanks to many) by recovering the .profile by /bin/cp /etc/skel/.profile . And fixing the typo in it (had a missing quote in PATH).

terdon
  • 104,119
Sam-T
  • 173
  • 3
  • 13
0

For PATH problem for running my command I did:

sudo env PATH="$PATH" service dse start

Environment variables when run with 'sudo'

Sam-T
  • 173
  • 3
  • 13