# 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: "*"
    }]
}
```

![](/files/-LzntN27fQ2-746detCj)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/termux/nodered-cun-qu-bao-hu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
