Authentication on settings.js doesn't work

Hello everyone,

I have developed an application in Node Red to which I was able to assign an administrator username and password to access the nodes I created, and another one for the dashboard. However, I want to upload this project to oracle cloud to be able to access at any time and place. To do this I created a VM and installed Node Red on it. Everything works fine, but when I modify the settings.js file, to create the username and password that I had in my local project, this modification does not work, and no matter how many times I use different browsers or incognito mode, it never asks me for authentication.

Can anyone help me?

Thanks in advance.

Have you restarted Node-RED after making the changes to settings.js?

Have you checked you are editing the same settings.js file that Node-RED is using? Node-RED logs the full path to the file it is using when it starts up.

Hi @knolleary

Yes to both questions. I have retarted Node-RED after making those changes. First of all, I stop Node-RED execution, make the changes, then I restarted it.

The settings.js path is the same that I edited. I thought that it was the problem but it didn't. Even I created aother settings.js file and tried to start up with this file, but i didn't work.

Edit:

I tried again, and I saw that my settings.js file is here: /home/nodered/.node-red/settings.js but I can't get in there, I got this error: -bash: cd: /home/nodered/.node-red/: Permission denied

Someone can help me with this?

Thank you!

Are you logged in as the user nodered?

Hi @Colin

No, I didn't. I just installed it on my VM, tried to modify my settings.js. Then I saw that my settings file path was inside of nodered folder which I cannot access because that error in my last comment. Where or how I have to login? Could you tell me how to do it please?

Thank you. Regards

How did you install node-red on the VM? Presumably that it where it got installed as that user.

I installed it manually using this command: bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/rpm/update-nodejs-and-nodered).

When it asked me to create the directory under nodered user, I said yes. Could it be the problem?.

Guys, finally I could make it.

I reinstalled Node Red on my VM. Then I changed the user to root, and installed nodered again. Then I modified my settings.js, restarted and woolaa I worked.

Thank you for your help, time and patience. Greetings.

That is almost certainly a bad plan. The install script will, by default, install it to run as the user logged on when you run the installer.

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