Run pre-commit
This commit is contained in:
parent
ce666086f1
commit
85bbd261a9
@ -28,28 +28,33 @@ Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following p
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"homepage": {
|
"homepage": {
|
||||||
"description": "Homepage widget",
|
"description": "Homepage widget",
|
||||||
"read": {
|
"read": {
|
||||||
"ubus": {
|
"ubus": {
|
||||||
"network.interface.wan": ["status"],
|
"network.interface.wan": ["status"],
|
||||||
"network.interface.lan": ["status"],
|
"network.interface.lan": ["status"],
|
||||||
"network.device": ["status"],
|
"network.device": ["status"],
|
||||||
"system": ["info"]
|
"system": ["info"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a `crypt(5)` password hash using the following command in the OpenWRT shell:
|
Create a `crypt(5)` password hash using the following command in the OpenWRT shell:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
uhttpd -m "<somepassphrase>"
|
uhttpd -m "<somepassphrase>"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then add a user that will use the ACL and hashed password in `/etc/config/rpcd`:
|
Then add a user that will use the ACL and hashed password in `/etc/config/rpcd`:
|
||||||
|
|
||||||
```
|
```
|
||||||
config login
|
config login
|
||||||
option username 'homepage'
|
option username 'homepage'
|
||||||
option password '<hashedpassword>'
|
option password '<hashedpassword>'
|
||||||
list read homepage
|
list read homepage
|
||||||
```
|
```
|
||||||
|
|
||||||
This username and password will be used in Homepage's services.yaml to grant access.
|
This username and password will be used in Homepage's services.yaml to grant access.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user