Node Red security password

this @Colin answer helped me to solve the problem and

also @Andrei suggested to check passwords using hash website given above helped me to check settings.js file password.

1 Like

I created password using node-red-admin hash-pw and put the generated code in adminAuth password field. I was successfully logged in the editor by the password once. But, after restarting the flow another time from fresh, the editor doesn't seek password. What additional settings should I so that the editor may seek password when i start node-red? Thanks in advance.

Hi @kumarsemal - there is no setting available for the runtime to forget about active logins when it is restarted.

You can force it by deleting the ~/.node-red/.sessions.json file before restarting NR.

I really struggled for more than 1 day to find the error of this password.
I discovered node-red's pw hash generates a different revision through Online tool to generate and check bcrypt hashed passwords..
I have typed the password I want into the terminal as shown in the tutorial image, the system returns a long string of results, I retype it in the settings.js file.
I changed the 'b' character to the 'a' character to match the revision. After that, I copy the replaced string into the website tool to check the password match again. If matched, then Ctrl + X, Y, Enter. Done.

Thanks for the discussion above and I've discovered more about this for those having the same difficulty as me.

1 Like

I'm struggling with this also.

I have nodered running on windows 10.

Updated the settings file, uncommented, ( adminAuth: {}) under C users .nodered.
Saved, restarted etc.
My local nodered is not asking for any log in.

Where am I going wrong? Is there another settings file perhaps?

Thanks

Which file (full path) did you edit

[info] Settings file : C:\Users\me.node-red\settings.js

And you have restarted node-red after editing the file?

If so post the changes you've made so we can check the syntax

yep restarted, rebooted, rechecked. everything done I could think of.

Now if I run 'node-red' from the command line it runs nodered and the credential pops up BUT most nodes are missing and I cannot download anything from the palette.

    adminAuth: {
       type: "credentials",
       users: [
	   {
           username: "admin",
           password: "$2......",
           permissions: "*"
       },
	    {
           username: "me",
           password: "$......",
           permissions: "*"
       }]
    },

Given you have started another thread in this topic, please stick to one or the other.

I suggest you use the other one as this thread is quite old.

https://discourse.nodered.org/t/adminauth-not-working-windows-10/52521/2