Skip to content

gpsu owner reset

Give the owner back their access

Give gpsu’s owner back their access. It enables the owner’s account and gives it the admin role. It removes the owner’s authenticator app, passkeys, and recovery codes. The owner adds a new second factor at their next sign-in. It prints a one-time link that sets a new password. The link works for 24 hours. Using it signs out the owner’s other logins and tokens.

Run it on gpsu’s host with the startup settings gpsu serve uses. gpsu serve can keep running. The command changes only a database gpsu serve set up. It never creates or upgrades one.

Without an owner, set one up with the setup code in gpsu’s log.

Usage

gpsu owner reset [flags]

Examples

GPSU_PUBLIC_URL=https://gpsu.example.com GPSU_SEAL_KEY_FILE=/run/secrets/seal-key gpsu owner reset

Flags

FlagTypeDefaultDescription
--backup-dirstring/var/lib/gpsu/backupsdirectory the backups live in ($GPSU_BACKUP_DIR)
--listenstring:8080address of the web UI and the API ($GPSU_LISTEN)
--metrics-listenstring:9465address of /metrics and the health checks ($GPSU_METRICS_LISTEN)
--pprof-apiboolserve pprof to admins under the API ($GPSU_PPROF_API)
--pprof-listenstringaddress of pprof without sign-in, or none ($GPSU_PPROF_LISTEN)
--public-urlstringURL users reach gpsu at, such as https://gpsu.example.com ($GPSU_PUBLIC_URL)
--seal-key-filestringfile holding the seal key ($GPSU_SEAL_KEY_FILE)
--seal-key-vaultstringseal key’s key in Vault as [MOUNT:]PATH#KEY ($GPSU_SEAL_KEY_VAULT)
--seal-previous-key-filesstringcomma-separated files holding previous seal keys ($GPSU_SEAL_PREVIOUS_KEY_FILES)
--seal-previous-key-vaultstringcomma-separated previous seal keys’ keys in Vault ($GPSU_SEAL_PREVIOUS_KEY_VAULT)
--store-driverstringsqlitedatabase: sqlite or postgres ($GPSU_STORE_DRIVER)
--store-pathstringSQLite database file (default /var/lib/gpsu/gpsu.db) ($GPSU_STORE_PATH)
--store-uri-filestringfile holding the PostgreSQL connection URI ($GPSU_STORE_URI_FILE)
--store-uri-vaultstringPostgreSQL URI’s key in Vault as [MOUNT:]PATH#KEY ($GPSU_STORE_URI_VAULT)
--trusted-proxiesstringcomma-separated reverse proxies that name the client ($GPSU_TRUSTED_PROXIES)
--vault-addressstringVault’s URL, which turns Vault on ($GPSU_VAULT_ADDRESS)
--vault-allow-httpboolpermit an http:// Vault address ($GPSU_VAULT_ALLOW_HTTP)
--vault-auth-methodstringVault login: kubernetes, jwt, approle, or token ($GPSU_VAULT_AUTH_METHOD)
--vault-auth-mountstringwhere the auth method is mounted ($GPSU_VAULT_AUTH_MOUNT)
--vault-auth-rolestringrole Kubernetes and JWT auth log in as ($GPSU_VAULT_AUTH_ROLE)
--vault-ca-filestringPEM file of the only CA gpsu trusts for Vault ($GPSU_VAULT_CA_FILE)
--vault-namespacestringVault namespace ($GPSU_VAULT_NAMESPACE)
--vault-role-idstringAppRole’s role ID ($GPSU_VAULT_ROLE_ID)
--vault-secret-id-filestringfile holding AppRole’s secret ID ($GPSU_VAULT_SECRET_ID_FILE)
--vault-server-namestringname Vault’s certificate must show ($GPSU_VAULT_SERVER_NAME)
--vault-timeoutstringbound on each request to Vault ($GPSU_VAULT_TIMEOUT)
--vault-token-filestringfile holding the JWT or the Vault token ($GPSU_VAULT_TOKEN_FILE)