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:
1 parent
e8a3b439cd
commit
4356bc9012
8 files changed
+406
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user