# Unable to log in after installation

**URL:** <https://discuss.elastic.co/t/unable-to-log-in-after-installation/297933>\
**Category:** Elasticsearch\
**Created:** [February 22, 2022, 4:50pm UTC](https://discuss.elastic.co/t/unable-to-log-in-after-installation/297933 "2022-02-22T16:50:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nestoter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nestoter/32/100760_2.png) [@Nestoter](https://discuss.elastic.co/u/Nestoter)\
**Post date:** [February 22, 2022, 4:50pm UTC](https://discuss.elastic.co/t/unable-to-log-in-after-installation/297933/1 "2022-02-22T16:50:23Z")

</div>

Hi,  
I'm installing Elastic following this: [https://www.elastic.co/guide/en/elasticsearch/reference/8.0/deb.html](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/deb.html)

Step 1. wget [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-amd64.deb](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-amd64.deb)

Step 2. sudo dpkg -i Elasticsearch-8.0.0-amd64.deb  
Output:

```auto
Selecting previously unselected package elasticsearch.
(Reading database ... 457979 files and directories currently installed.)
Preparing to unpack elasticsearch-8.0.0-amd64.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user...pam_tally2: /var/log/tallylog is either world writable or not a normal file
pam_tally2: Authentication error
useradd: failed to reset the tallylog entry of user "elasticsearch"
 OK
Unpacking elasticsearch (8.0.0) ...
Setting up elasticsearch (8.0.0) ...
--------------------------- Security autoconfiguration information ------------------------------

Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.

The generated password for the elastic built-in superuser is : Sua4s9VgbzX*cF1*Q_lz

If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.

You can complete the following actions at any time:

Reset the password of the elastic built-in superuser with 
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.

Generate an enrollment token for Kibana instances with 
 '/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.

Generate an enrollment token for Elasticsearch nodes with 
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.

-------------------------------------------------------------------------------------------------
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service

```

Step 3. bin/Elasticsearch

Step 4. In a browser, [https://localhost:9200](https://localhost:9200)

```auto
Username: elastic
Password: Sua4s9VgbzX*cF1*Q_lz

```

Error HTTP 401, in the console i see:

```auto
[2022-02-22T13:47:57,785][ERROR][o.e.x.s.a.e.ReservedRealm] [] failed to retrieve password hash for reserved user [elastic]
org.elasticsearch.action.UnavailableShardsException: at least one primary shard for the index [.security-7] is unavailable

```

Does anybody know what happened?

Thanks, Nestor.

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [February 22, 2022, 7:02pm UTC](https://discuss.elastic.co/t/unable-to-log-in-after-installation/297933/2 "2022-02-22T19:02:27Z")

</div>

Hi @Nestoter

It looks like elasticsearch didn’t start successfully after installation. What happens when you do

> [@Nestoter](#):
>
> Step 3. bin/Elasticsearch

what do you see in the output there ?

FWIW I suggest you run elastisearch via systemd as described in [Install Elasticsearch with Debian Package | Elasticsearch Guide [8.0] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/deb.html#deb-running-systemd)

---

<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:** [March 22, 2022, 7:02pm UTC](https://discuss.elastic.co/t/unable-to-log-in-after-installation/297933/3 "2022-03-22T19:02:37Z")

</div>

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