From 07c870fb71e67129ac36722655f33ae59b0ebfa4 Mon Sep 17 00:00:00 2001 From: candifloss Date: Sun, 6 Apr 2025 09:35:21 +0530 Subject: [PATCH] Add: add_user script Run `add_user.sh` in the extra/ directory to manually add an admin user. --- extra/add_user.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 extra/add_user.sh diff --git a/extra/add_user.sh b/extra/add_user.sh new file mode 100644 index 0000000..5f2360a --- /dev/null +++ b/extra/add_user.sh @@ -0,0 +1,16 @@ +#!/bin/bash +read -p "Username: " username +read -sp "Password: " password +echo + +hash=$(python3 -c " +from werkzeug.security import generate_password_hash; +print(generate_password_hash('$password')) +") + +mysql -uassetadmin -p1234 asset_test_db <