Can't create esuser in shield

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

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.

Hi ,

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

BR,
Chen

You must set JAVA HOME in classpath as like below,

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

Hi ,

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

BR,
Chen

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

I still receive the same result.

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...

Still the same result

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

May be ES members might help you.

Thanks :slight_smile: