2024-10-18 15:00:04 +00:00
|
|
|
#!/binb/ash
|
|
|
|
|
|
|
|
# Set the password you want to use
|
2024-10-25 18:23:41 +00:00
|
|
|
PASSWORD="boxuser"
|
|
|
|
DATABASE="/Users/stwhite/CODE/Boxes-App/boxes-api/data/boxes.db"
|
2024-10-18 15:00:04 +00:00
|
|
|
|
|
|
|
# Use htpasswd to create a bcrypt hash of the password
|
|
|
|
HASHED_PASSWORD=$(htpasswd -nbBC 10 "" "$PASSWORD" | tr -d ':\n')
|
|
|
|
|
|
|
|
# Create the user in the SQLite database
|
2024-10-25 18:23:41 +00:00
|
|
|
sqlite3 $DATABASE "INSERT INTO users (username, password, email) VALUES ('boxuser', '$HASHED_PASSWORD','boxuser@r8z.us')"
|