Node red admin login failed (running on hp2000)

Hello all. I've installed Node red (per the instructions here: Running on Raspberry Pi : Node-RED) and was going through how to secure it Securing Node-RED : 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 and (adminAuth) unable to login node-red but haven't come up with a solution. Any suggestions would be much appreciated.

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

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

` ```
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

pi@GlassPi:~/.node-red $ node-red admin hash-pw
Password: (type your chosen password here)

Paste the generated string into settings.js.

1 Like

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

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.

1 Like

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)?

A command line tool.
It's in the documentation

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

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