Can't create esuser in shield


(Chen Ben Ezra) #1

Hi ,

I'm trying to create after installing shield , the error I receive:
Error: Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool
My ElasticSearch is 1.7 , Kibana 4.0.2 , Shield version 1.3.2.
I saw the problem in the forum


I changed my shield version to 1.3.2 and removed the other.

The command I'm using to create the user is:
bin/shield/esusers useradd chenb -p chenb -r admin

I still receive the same error.
Error: Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool

Can someone help me with this issue ?

BR,
Chen


(ganeshbabu) #2

There is a script in the ES bin folder named elasticsearch.in.sh. If you set this in the ES_INCLUDE variable it works. I did this before I ran the esusers command:

export ES_INCLUDE=`/elasticsearch/bin/elasticsearch.in.sh

Then I ran the command and it prompted for a password.


(Chen Ben Ezra) #3

Hi ,

Now the error I receive when I'm trying to create the user is:
You must set the ES_CLASSPATH var

BR,
Chen


(ganeshbabu) #4

You must set JAVA HOME in classpath as like below,

export ES_CLASSPATH=/usr/java/jdk1.8.0_60


(Chen Ben Ezra) #5

Hi ,

Now I receive the first message:
Error: Could not find or load main class org.elasticsearch.shield.authc.esusers.tool.ESUsersTool

BR,
Chen


(ganeshbabu) #6

First set ES class path and then you need to set ES_include


(Chen Ben Ezra) #7

I still receive the same result.


(ganeshbabu) #8

I think ES_INCLUDE is not setting properly and you should use "tilde" symbol before "/"

export ES_INCLUDE=**~/**elasticsearch/bin/elasticsearch.in.sh

Try it like this...


(Chen Ben Ezra) #9

Still the same result


(ganeshbabu) #10

This is how I did and It's worked for me.

May be ES members might help you.


(Chen Ben Ezra) #11

Thanks :slight_smile:


(system) #12