Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to set Node-RED username and password

Shulou Source: shulou.com Published: 2022-06-01 07:05:14 09月29日 Update

This article mainly explains "how to set Node-RED user name and password". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to set Node-RED username and password".

Step 1: find the settings.js file of node-red on your computer

Enter node-red on the system command line

The red box in the picture shows the directory where settings.js is located.

Go to this directory and right-click the application to open (NotePad is used here).

Step 2: modify the code

Find the code block in the figure, remove the previous code block and save it.

Then start node-red from the system command line

When you enter the page, you find that the login panel appears.

As you can see, the user name here is the admin in the previous code, but the password is not the password in the code. The password in the code is a ciphertext encrypted by the bcrypt algorithm, so we need to generate a ciphertext with our own plaintext password and paste it into the password in the code.

Step 3: to change the password to generate the appropriate password, you can use the node-red-admin command line tool in the system command line to enter the following instructions to install the tool: npm install-g-- unsafe-perm node-red-admin is installed enter the instruction: node-red-admin hash-pw will want to use the password input, and then the tool will print out the encrypted password that can be copied to the settings file. (note that when setting a password, the typed characters are not visible due to tool encryption.)

Paste the generated password into the password in the code, or you can change the user name and save it.

Step 4: log in to Node-RED to launch node-red from the system command line and enter the user name and password you just set in the browser to log in.

At this point, I believe you have a deeper understanding of "how to set Node-RED user name and password". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Passwords codes users usernames commands inputs tools systems encryption generation content ciphertext instructions files directories graphics learning appropriate practical deeper Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MariaDB macOS Linux Apple