# Side effect of command "elasticsearch-users useradd"

**URL:** <https://discuss.elastic.co/t/side-effect-of-command-elasticsearch-users-useradd/307044>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 13, 2022, 2:23pm UTC](https://discuss.elastic.co/t/side-effect-of-command-elasticsearch-users-useradd/307044 "2022-06-13T14:23:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luok0](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@luok0](https://discuss.elastic.co/u/luok0)\
**Post date:** [June 13, 2022, 2:23pm UTC](https://discuss.elastic.co/t/side-effect-of-command-elasticsearch-users-useradd/307044/1 "2022-06-13T14:23:23Z")

</div>

We have a superuser named "admin1" in config/users file, what would happen to admin1 if we add a new superuser "admin2" through below command, will it cover the existing admin1 as the only superuser and make admin1 not valid any more?

Elasticsearch-users useradd admin2 -p xxoo -r superuser

Also do we have to restart Elasticsearch to take effect on the user adding?

---

<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 11, 2022, 2:23pm UTC](https://discuss.elastic.co/t/side-effect-of-command-elasticsearch-users-useradd/307044/2 "2022-07-11T14:23:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
