2023-11-25 16:08:54 +01:00
|
|
|
|
# Lacre administration
|
|
|
|
|
|
|
|
|
|
## Command-line tool
|
|
|
|
|
|
2023-11-26 18:29:09 +01:00
|
|
|
|
There's a little tool for administrators. As long as Lacre Python packages
|
2023-11-25 16:08:54 +01:00
|
|
|
|
are available via `PYTHONPATH`, you can use it like this:
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-11-26 18:29:09 +01:00
|
|
|
|
python -m lacre.admin -h
|
2023-11-25 16:08:54 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Of course `-h` displays some help.
|
|
|
|
|
|
2024-02-23 08:25:52 +01:00
|
|
|
|
**Note:** Help output includes information about the configuration file being
|
|
|
|
|
in use, which may be useful at times.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Initialising database schema
|
|
|
|
|
|
|
|
|
|
If you want to initialise Lacre's database (which is also used by the
|
|
|
|
|
frontend), run:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
python -m lacre.admin database -i
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2023-11-25 16:08:54 +01:00
|
|
|
|
## Inspecting key confirmation queue
|
|
|
|
|
|
|
|
|
|
To find out how many keys are waiting to be confirmed, run:
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-11-26 18:29:09 +01:00
|
|
|
|
python -m lacre.admin queue
|
2023-11-25 16:08:54 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Inspecting identities registered
|
|
|
|
|
|
|
|
|
|
To list all identities, run:
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-11-26 18:29:09 +01:00
|
|
|
|
python -m lacre.admin identities -a
|
2023-11-25 16:08:54 +01:00
|
|
|
|
```
|
|
|
|
|
|
2023-11-26 18:29:09 +01:00
|
|
|
|
To preview a particular identity, run:
|
2023-11-25 16:08:54 +01:00
|
|
|
|
|
|
|
|
|
```sh
|
2023-11-26 18:29:09 +01:00
|
|
|
|
python -m lacre.admin identities -e alice@example.com
|
2023-11-25 16:08:54 +01:00
|
|
|
|
```
|
2023-12-09 21:14:35 +01:00
|
|
|
|
|
|
|
|
|
## Importing identities from existing GnuPG keyring
|
|
|
|
|
|
|
|
|
|
If you already have a GnuPG keyring with your users' public keys or for some
|
|
|
|
|
reason Lacre's identity database needs to be re-populated with identities,
|
|
|
|
|
there's a command to do that:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
python -m lacre.admin import -d /path/to/gnupg/directory
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you want to just re-populate the database, Lacre can remove all identities
|
|
|
|
|
prior to importing keys -- just add `-r` flag.
|