# Authentication with SHIELD is not working on MAC

**URL:** <https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 15, 2015, 9:00pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736 "2015-06-15T21:00:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![divyapt](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@divyapt](https://discuss.elastic.co/u/divyapt)\
**Post date:** [June 15, 2015, 9:00pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/1 "2015-06-15T21:00:56Z")

</div>

Hi,  
I downloaded and extracted elasticsearch-1.5.2 on mac and installed the shield plugin, and followed the steps given at [https://www.elastic.co/guide/en/shield/current/quick-getting-started.html](https://www.elastic.co/guide/en/shield/current/quick-getting-started.html). But when i try curl -XGET '[http://localhost:9200/](http://localhost:9200/)' without giving uname/pwd it does not give me an error.

But i followed the same steps on Linux system, it works, it gave me the following error: {"error":"AuthenticationException[missing authentication token for REST request [/]]","status":401}

Are there additional steps to be followed on mac ?

Thanks,  
Divya

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2015, 10:49pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/2 "2015-06-15T22:49:55Z")

</div>

Try following the longer version, chances are you have missed [this bit](https://www.elastic.co/guide/en/shield/current/getting-started.html#_configuring_your_environment).

---

<div class="post-metadata">

**Author:** ![divyapt](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@divyapt](https://discuss.elastic.co/u/divyapt)\
**Post date:** [June 16, 2015, 6:39pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/3 "2015-06-16T18:39:48Z")

</div>

Followed all the steps in the longer version and added the following to the .bash\_profile:  
export ES\_HOME="/Users/Downloads/elasticsearch-1.5.2"  
export PATH=$PATH:$ES\_HOME/bin/shield  
export ES\_JAVA\_OPTS="-Des.path.conf=$ES\_HOME/config"  
And restarted ES service.

Still does not work.

Thanks,  
Divya

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [June 16, 2015, 7:01pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/4 "2015-06-16T19:01:15Z")

</div>

Hi Divya,

Can you confirm that there is not another instance of Elasticsearch already running on the machine? To do this, stop your Elasticsearch instance, and run the same request

```
curl -XGET 'http://localhost:9200/'

```

and if you get any response at all, there is another instance of ES already running.

---

<div class="post-metadata">

**Author:** ![divyapt](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@divyapt](https://discuss.elastic.co/u/divyapt)\
**Post date:** [June 16, 2015, 7:25pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/5 "2015-06-16T19:25:07Z")

</div>

Hi Steve,

My bad, yes, I got a response, but there was no ElasticSearch process listed when i list jps or when i grep for all java processes. Or i do not know if there was another way to check it, i restarted my system, It works now.

Thanks,  
Divya

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [June 16, 2015, 7:45pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/6 "2015-06-16T19:45:55Z")

</div>

I'm glad that solved the issue 😄 Thanks for letting us know!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:49pm UTC](https://discuss.elastic.co/t/authentication-with-shield-is-not-working-on-mac/2736/7 "2017-07-06T13:49:11Z")

</div>

Closed on July 6, 2017, 1:49pm UTC


