# Running as non-root user: Service wrapper has changed

**URL:** <https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863>\
**Category:** Elasticsearch\
**Created:** [May 25, 2012, 11:56am UTC](https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863 "2012-05-25T11:56:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 25, 2012, 11:56am UTC](https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863/1 "2012-05-25T11:56:35Z")

</div>

Hi all

Just to let you know that if you are using the service wrapper and  
running elasticsearch as a non-root user, eg using the instructions on  
[http://www.elasticsearch.org/tutorials/2011/02/22/running-elasticsearch-as-a-non-root-user.html](http://www.elasticsearch.org/tutorials/2011/02/22/running-elasticsearch-as-a-non-root-user.html)  
then you need to make a change to your user.

The new version of the service wrapper now requires your elasticsearch  
user to have a shell specified.

Previously, the tutorial above said to create your user as:

useradd -d $ES\_HOME elasticsearch

This creates the user with the shell set to /bin/false.

I've now changed this to:

```
useradd -d $ES_HOME -s /bin/sh elasticsearch

```

You can change this for an existing user with:

```
usermod -s /bin/bash elasticsearch

```

clint

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 25, 2012, 4:25pm UTC](https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863/2 "2012-05-25T16:25:02Z")

</div>

Thanks Clint for the update.

David

> -----Message d'origine-----  
> De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] De la part de Clinton Gormley  
> Envoyé : vendredi 25 mai 2012 13:57  
> À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> Objet : Running as non-root user: Service wrapper has changed
> 
> Hi all
> 
> Just to let you know that if you are using the service wrapper and  
> running elasticsearch as a non-root user, eg using the instructions on  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/tutorials/2011/02/22/running-)  
> elasticsearch-as-a-non-root-user.html  
> then you need to make a change to your user.
> 
> The new version of the service wrapper now requires your elasticsearch  
> user to have a shell specified.
> 
> Previously, the tutorial above said to create your user as:
> 
> useradd -d $ES\_HOME elasticsearch
> 
> This creates the user with the shell set to /bin/false.
> 
> I've now changed this to:
> 
> ```
> useradd -d $ES_HOME -s /bin/sh elasticsearch
> 
> ```
> 
> You can change this for an existing user with:
> 
> ```
> usermod -s /bin/bash elasticsearch
> 
> ```
> 
> clint

---

<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, 3:27am UTC](https://discuss.elastic.co/t/running-as-non-root-user-service-wrapper-has-changed/7863/3 "2017-07-06T03:27:05Z")

</div>


