Node red admin login failed

I am trying to follow this tutorial to create a login for node red.

From what I can gather node-red admin is built into node red so why would I need to install a package? I get an error when using the tutorial trying npm install -g --unsafe-perm node-red-admin

Anyways but in Linux terminal this command works:
node-red-admin hash-pw

To retrieve the hash and sudo nano ~/.node-red/settings.js following the tutorial to uncomment the correct lines on my end it looks like this:

    /** To password protect the Node-RED editor and admin API, the following
     * property can be used. See http://nodered.org/docs/security.html for details.
     */
    adminAuth: {
        type: "credentials",
        users: [{
            username: "ben",
            password: "supersecretP@$$word",
            permissions: "*"
        }]
    },

    /** The following property can be used to enable HTTPS
     * This property can be either an object, containing both a (private) key
     * and a (public) certificate, or a function that returns such an object.
     * See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
     * for details of its contents.
     */

And then thru nano writing the file and doing a sudo reboot I cant login with this username and password, any ideas to try?

image

Just double checking that you put the hash in the settings file not the actual password.

Thanks that was totally it...

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