> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/nodered-cun-qu-bao-hu.md).

# Node-Red存取保護

su**do npm install -g** --unsafe-perm **node-red-admin**<br>

\
\
\
**產生 password hash**\
**要生成合適的密碼hash，可以使用node-red-admin命令行工具**\
**node-red-admin hash-pw**

```
node-red-admin hash-pw 
Password: 
```

**node-red-admin list**

```
cd ~/.node-red/
nano settings.js
adminAuth: {
    type: "credentials",
    users: [{
        username: "admin",
        password: "hash過的密碼",
        permissions: "*"
    }]
}
```

![](https://529150212-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lh81JtaIQ84bwQqz_Wh%2F-LzntE6TydGkTY6WO0OM%2F-LzntN27fQ2-746detCj%2Fimage.png?alt=media\&token=c8b50f3a-297f-41af-9849-081a3642aed3)

<br>
