Forget passwords clears every stored admin password in one step

The reporter of #28 asked for a way to clear one or all of the stored admin
passwords. Del in the node picker forgets one. This adds the other: a
"Forget passwords" row in the Managed nodes section of the menu, behind the
red typed confirm (type FORGET), which names the nodes it will forget. It
also forgets the password of a node that is no longer a contact, which no
list shows. With nothing stored, it says so and asks nothing.

On the CLI it is `forget-admin-passwords --yes`: without --yes it is a usage
error, and with it the answer lists the nodes it forgot (NAME, LAST_LOGIN,
KEY). It exits 5 when nothing was stored, and works with no device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5.5 committed 2026-11-04 01:59:35 -05:00
1 parent e8a3b439cd
commit 4356bc9012
8 files changed
+406 -7

No files matched your search

+36
View File
@@ -1771,6 +1771,42 @@ is known to be something other than a repeater.
`regions` never holds the wildcard `*`. That is `unscoped`, because it names no region.
#### `meshterm forget-admin-passwords`
Forget all the admin passwords that MeshTerm remembers.
```
meshterm forget-admin-passwords --yes
```
| Option | What it does |
| --- | --- |
| `--yes` | **Required.** Confirm the deletion. Without it, the command is a usage error (`2`) and forgets nothing. |
```console
$ meshterm forget-admin-passwords --yes
NAME LAST_LOGIN KEY
Yagi-Repeater 2d a1b2c3d400000000000000000000000000000000000000000000000000000000
```
The command lists the nodes whose passwords it forgot, with the time of the last good
login to each node. It also forgets the password of a node that is not a contact any more.
After this command, a login to each node needs its password again: give it with
`--password`, or type it in the prompt of the menu. You cannot undo this command. The
command sends nothing, and it works with no device connected. It returns `5` when MeshTerm
remembered no password.
To forget the password of one node, press Del on that node in the node picker of the menu.
**`--json`** is an array, with one object for each node:
```json
[{"node":{"name":"Yagi-Repeater","key":"a1b2c3d400000000000000000000000000000000000000000000000000000000","hash":null,"type":null,"place":null,"self":false},"last_login_at":"2026-11-02T06:51:52Z"}]
```
`hash`, `type`, and `place` are `null`, because MeshTerm keeps only the name and the key
of a node with its password.
---
### MeshTerm itself
+2 -1
View File
@@ -55,9 +55,10 @@ This page lists each interactive screen with its scripted equivalent, where one
| Feature | What it does | Scripted |
| --- | --- | --- |
| **🗼 Repeater admin** | Set up remote repeaters and room servers over the mesh. First, log in with a remembered password or a password that MeshTerm asks for. A node does not answer a wrong password. Thus, when a remembered password gets no reply, MeshTerm offers to replace it, because the owner of the node possibly changed it. To forget a remembered password, press Del on its node in the node picker. Then use an editor in the style of Device config, which speaks the text CLI of the node. It includes the settings that only repeaters have (TX delay, airtime factor, and advert intervals). It also has one-shot actions and a remote command line with readline. A **Regions** page edits the region tree of the repeater: the regions for which it relays floods, and whether it relays unscoped floods. It also edits the home scope and the default scope. | `meshterm repeater-admin <node> <command…>` |
| **🗼 Repeater admin** | Set up remote repeaters and room servers over the mesh. First, log in with a remembered password or a password that MeshTerm asks for. A node does not answer a wrong password. Thus, when a remembered password gets no reply, MeshTerm offers to replace it, because the owner of the node possibly changed it. To forget a remembered password, press Del on its node in the node picker. To forget all of them, use **Forget passwords**. Then use an editor in the style of Device config, which speaks the text CLI of the node. It includes the settings that only repeaters have (TX delay, airtime factor, and advert intervals). It also has one-shot actions and a remote command line with readline. A **Regions** page edits the region tree of the repeater: the regions for which it relays floods, and whether it relays unscoped floods. It also edits the home scope and the default scope. | `meshterm repeater-admin <node> <command…>` |
| **🔖 Regions** | This is not a menu screen. The node page of a repeater lists the regions that the repeater carries. MeshTerm asks the repeater one time, without a login. The repeater answers only a neighbour, or a request over a known route. The packet viewer, the message paths, and the live feed show the region of a scoped flood. | `meshterm regions <node>` |
| **📶 TX optimize** | Sweep the transmit power of a remote node while you watch. The sweep has three steps: coarse, then refine, then verify. You see each level as it lands, and you decide whether to apply the best level. The scripted form applies the best level unless you tell it not to. | `meshterm tx-optimize --path … [--no-apply]` |
| **🗑 Forget passwords** | Forget the remembered admin password of each managed node in one step. This includes the password of a node that is not a contact any more. You cannot undo this step, so MeshTerm asks you to type FORGET first. Then the next login to each node asks for its password again. | `meshterm forget-admin-passwords --yes` |
## ⚙ This app: the program in front of you