# Allow the user to change his/her password for dashboard UI

**URL:** <https://discourse.nodered.org/t/allow-the-user-to-change-his-her-password-for-dashboard-ui/22214>\
**Category:** Dashboard\
**Created:** [24 February 2020 20:41 UTC](https://discourse.nodered.org/t/allow-the-user-to-change-his-her-password-for-dashboard-ui/22214 "2020-02-24T20:41:07Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [25 February 2020 10:44 UTC](https://discourse.nodered.org/t/allow-the-user-to-change-his-her-password-for-dashboard-ui/22214/11 "2020-02-25T10:44:22Z")

</div>

I would store that data in a JSON file alongside your settings.js and include it with `require`. You can easily generate valid JSON strings using the json node or `JSON.stringify()` from within a function node.

In your settings.js file, using a try/catch around it would be wise, so you can handle errors like invalid format or missing file. Use default values in that case, so Node-RED can start properly.

You'd have to restart your Node-RED process, of course.

Oh, and don't forget to create the proper password hash like the `node-red-admin hash-pw` command line tool does.  
Here's a pointer: [https://github.com/node-red/node-red-admin/blob/master/lib/commands/hash.js](https://github.com/node-red/node-red-admin/blob/master/lib/commands/hash.js)

---

_[View the full topic](https://discourse.nodered.org/t/allow-the-user-to-change-his-her-password-for-dashboard-ui/22214)._
