From 1e03fc180b610b61182b73d029a536be56fec30a Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 22 Mar 2022 20:12:05 -0400 Subject: [PATCH] Updated Upgrading or Merging Archives (markdown) --- Upgrading-or-Merging-Archives.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Upgrading-or-Merging-Archives.md b/Upgrading-or-Merging-Archives.md index 1a9615f..9114ddf 100644 --- a/Upgrading-or-Merging-Archives.md +++ b/Upgrading-or-Merging-Archives.md @@ -92,7 +92,20 @@ archivebox init # run init to upgrade the collection to the latest versio If you need to automate changes to the ArchiveBox DB (for example adding a User from an Ansible script), you can modify the SQLite3 DB directly. -**As an example, here's how to add a user row manually:** +```bash +cd ~/archivebox # cd into your archivebox collection dir +sqlite3 index.sqlite3 # open the db with sqlite3 shell +``` + +#### Example: Modifying an existing user's email + +```sql +UPDATE auth_user +SET email = 'someNewEmail@example.com', is_superuser = 1 +WHERE username = 'someUsernameHere'; +``` + +#### Example: Adding a new user with a hashed password 1. First, generate the hashed password in a Python shell using Django's `make_password` function.