# adminAuth not working windows 7

**URL:** <https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509>\
**Category:** General\
**Created:** [7 January 2019 12:58 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509 "2019-01-07T12:58:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Protop](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Protop](https://discourse.nodered.org/u/Protop)\
**Post date:** [7 January 2019 12:58 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/1 "2019-01-07T12:58:42Z")

</div>

Hello

I have a problem with adminauth to set password for my node-red running on windows 7 ultimate 64-bit. I can get it working with my debian stretch.

Win7: node version v10.15.0 and npm version 6.4.1  
Debian: node version 8.12.0 and npm version 6.4.1

Is the newer node version causing this?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 January 2019 13:05 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/2 "2019-01-07T13:05:47Z")

</div>

Hi @Protop

the use of Node 10 is unlikely to have broken something in this area.

What exactly have you tried so far?

Nick

---

<div class="post-metadata">

**Author:** ![Protop](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Protop](https://discourse.nodered.org/u/Protop)\
**Post date:** [7 January 2019 13:10 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/3 "2019-01-07T13:10:40Z")

</div>

I have uncommented adminAuth in settings.js and entered a password generated with node-red-admin hash-pw. This works with my debian node-red and asks user credentials before i can use web editor but this doesn't work with my windows 7 node-red.

EDIT:

Node-red version in windows 7: v0.19.5  
Node-red version in debian: v0.19.3

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 January 2019 13:23 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/4 "2019-01-07T13:23:52Z")

</div>

When you say it doesn't work, do you mean that it lets you in without asking for a password, or it asks but won't accept it, or what?  
Post the node red startup log up to the point you try to login.

---

<div class="post-metadata">

**Author:** ![Protop](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Protop](https://discourse.nodered.org/u/Protop)\
**Post date:** [7 January 2019 13:26 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/5 "2019-01-07T13:26:28Z")

</div>

It lets me in without asking login credentials. Just goes straight in and i have never entered these credentials so the password shouldn't be saved anywhere in my browser and thus let me in without asking it.

I have also tried with another computer in LAN network and it doesn't either ask anything credentials to log in.

![kuva](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e8793657d98ce1a05a19d664bc93e8b2c94ab80a.png)

Can't provide you any log info from startup because it never ask the credentials.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [7 January 2019 13:38 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/6 "2019-01-07T13:38:17Z")

</div>

> [@knolleary](#):
>
> the use of Node 10 is unlikely to have broken something in this area.

Hi Nick, please correct me if I am wrong. The hash stored in settings.js for AdminAuth is based on bcrypt.js, right?

As per bcrypt github page it is necessary to use bcrypt.js version \>= 3 for node 10.

Node-RED is using bcrypt:"2.4.3", right ?

May this be the root cause of the issue ?

![r-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/856598eeae10502d8c91af64254c3704c4a614d6.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 January 2019 13:39 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/7 "2019-01-07T13:39:24Z")

</div>

> [@Protop](#):
>
> Can't provide you any log info from startup because it never ask the credentials.

I meant the node red log. Restart node red and copy/paste what you see in the terminal. It starts with a Welcome to node-RED message.

---

<div class="post-metadata">

**Author:** ![Protop](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Protop](https://discourse.nodered.org/u/Protop)\
**Post date:** [7 January 2019 13:40 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/8 "2019-01-07T13:40:52Z")

</div>

Here you go:

 ![kuva](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/41f687481e42ed789ec33c69ceedb315d007e5c7.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 January 2019 13:41 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/9 "2019-01-07T13:41:07Z")

</div>

Also - are you editing the correct settings.js file ? (the correct one is listed in the console during startup).

---

<div class="post-metadata">

**Author:** ![Protop](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@Protop](https://discourse.nodered.org/u/Protop)\
**Post date:** [7 January 2019 13:43 UTC](https://discourse.nodered.org/t/adminauth-not-working-windows-7/6509/10 "2019-01-07T13:43:41Z")

</div>

I think you have solved my issue. I was in the wrong place, i haven't modified this and will try now!

EDIT:

It works now! Thank you dceejay!

I am using nssm to start node-red and i am using C:\Users\USERNAME\AppData\Roaming\npm\ directory to start node-red. Then i thought the settings file is in C:\Users\USERNAME\AppData\Roaming\npm\node\_modules\node-red and edited it, which was wrong.
