3/30/2018 4:28 PM | |
Posts: 439 Rating: (109) |
Hello, Here is the way I found to add a password to Node-RED. https://nodered.org/docs/security https://nodered.org/docs/node-red-admin Ctrl+C to stop the command. Use the following command to install npm install -g node-red-admin Now use the following command to create a password hash. node-red-admin hash-pw Enter your password and press Enter. Note you will not see any * when you enter your password, so take your time! Select the password hash and ctrl+c to copy it and paste it in a notepad for later. Using WinSCP, go to/home/root/.node-red/folder and open setting.js The lines 101 to 112 will look like this: Defaut user: adminDefault password: password (as you can see it is hashed) Remove the forward slashes for the lines 105 to 112, like this: Copy the created hash and paste it in line 109 of setting.js. Save (it may take some time...) and reboot. You can now login via admin user and the password you just create. You can create many users, it is an array of users. You can create user with "read only" rights by replacing permissions: "*" by permissions: "read". Log out using top right icon. Have a good day! Best regards, Hugo |
Last edited by: HugoD at: 3/30/2018 4:49:47 PM |
|
This contribution was helpful to3 thankful Users |
8/6/2019 3:54 PM | |
Joined: 4/11/2013 Last visit: 8/12/2024 Posts: 56 Rating: (3) |
Nice handout! But did you implement this and try it also in image v2_4_0? I tried this but the password is not accepted when I start and want to login in Node Red. (Yes, the password is correct...). My build: [snip] Attachmentbuild.txt (919 Downloads) |
Last edited by: joshuatreenl at: 08/06/2019 20:50:27Last edited by: Jen_Moderator at: 08/07/2019 10:32:04Added build info as an attachment. |
|
8/7/2019 10:14 PM | |
Joined: 4/11/2013 Last visit: 8/12/2024 Posts: 56 Rating: (3) |
Update Install node-red-admin (previous version: npm install -g node-red-admin@0.1.3 See attachement build.txt (contains errors) Unfortunately the password is not accepted. I start node-red in debug mode (see the same attachement). Maybe the lines: 7 Aug 19:48:08 - [debug] red/runtime/nodes/credentials.load : no user key present Any suggestions? Attachmentbuild node-red-admin@0.1.3.TXT (1130 Downloads) |
6/21/2021 5:08 PM | |
Joined: 4/28/2015 Last visit: 11/5/2024 Posts: 3345 Rating: (379)
|
Hi, somehow this way does not work with the image V2.6 (see here). You need to use another way to hash the password:
Best regards! |
Not working for IOT2050 support anymore from March 1st, 2024. |
|
12/20/2023 5:54 PM | |
Joined: 9/29/2023 Last visit: 7/17/2024 Posts: 3 Rating: (0) |
what can i do if my iot2040 has the version 3.1? |
Follow us on