# Node red admin login failed (running on hp2000)

**URL:** <https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448>\
**Category:** General\
**Created:** [29 November 2022 13:21 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448 "2022-11-29T13:21:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nodeBoy816](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nodeBoy816](https://discourse.nodered.org/u/nodeBoy816)\
**Post date:** [29 November 2022 13:21 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/1 "2022-11-29T13:21:52Z")

</div>

Hello all. I've installed Node red (per the instructions here: [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)) and was going through how to secure it [Securing Node-RED : Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red) and have made a little progress, but ran into an issue with logging in. Initially I uncommented the adminAuth property and tried logging in using "admin" for the username and then copy/paste the password from the settings.js file. This resulted in getting a Login failed message. I've looked at a couple articles: [Node red admin login failed](https://discourse.nodered.org/t/node-red-admin-login-failed/52622) and [(adminAuth) unable to login node-red](https://discourse.nodered.org/t/adminauth-unable-to-login-node-red/7074?page=2) but haven't come up with a solution. Any suggestions would be much appreciated.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [29 November 2022 14:08 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/2 "2022-11-29T14:08:17Z")

</div>

Did you try logging in with username "admin" and password "password"?

The long "passwords" in settings.js are encrypted not literal password strings.

````auto
` ```
adminAuth: {
    type: "credentials",
    users: [
        {
            username: "admin",
            password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
            permissions: "*"
        },
        {
            username: "george",
            password: "$2b$08$wuAqPiKJlVN27eF5qJp.RuQYuy6ZYONW7a/UWYxDTtwKFCdB8F19y",
            permissions: "read"
        }
    ]
}

````

You can generate a new password hash using **node-red admin hash-pw**

```auto
pi@GlassPi:~/.node-red $ node-red admin hash-pw
Password: (type your chosen password here)
$2b$08$/xN7M5RwQjPrya9h59L.4ern/yq4BEktfUz/lTCApu0JmQYkITWZO

```

Paste the generated string into settings.js.

---

<div class="post-metadata">

**Author:** ![nodeBoy816](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nodeBoy816](https://discourse.nodered.org/u/nodeBoy816)\
**Post date:** [30 November 2022 13:48 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/3 "2022-11-30T13:48:24Z")

</div>

Bingo! That was it. I apparently was over-complicating it. Many thanks! Also, will look into using **node-red admin hash-pw**.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [30 November 2022 13:52 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/4 "2022-11-30T13:52:56Z")

</div>

Glad you solved it!

The latest version of the Raspberry Pi script offers the chance to set up access control at the end of the installation.

I've never tried it because the offer times out (after 1 minute?) and I'm never watching the install closely enough.

---

<div class="post-metadata">

**Author:** ![nodeBoy816](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nodeBoy816](https://discourse.nodered.org/u/nodeBoy816)\
**Post date:** [30 November 2022 14:07 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/5 "2022-11-30T14:07:27Z")

</div>

Cool! I'm actually running node-red on a laptop (debian), but if ever I move the "the real thing" with a Raspberry Pi hopefully I'll address access control options then! Also, I'm not quite clear on how to use node-red admin hash-pw. Is that something I plug into Terminal? Or Node-red (from terminal window)?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [30 November 2022 14:10 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/6 "2022-11-30T14:10:35Z")

</div>

A command line tool.  
It's in the [documentation](https://nodered.org/docs/user-guide/runtime/securing-node-red)

The Raspberry Pi script is intended to work on all Debian based Lini

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 December 2022 14:11 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed-running-on-hp2000/71448/7 "2022-12-14T14:11:33Z")

</div>

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