User:AlexJago/BeleniosAdmin

General setup
As of July 2022, we're running a systemd-nspawn unit, reverse-proxied through nginx like sensible people. It's a repacked version of the official squashfs release (to have the PPAU logo).

The remainder of the config is all in /srv/belenios/main/belenios/{ocsigenserver.conf.in, password_db.csv}

TLDR: admin authentication is by backend-enabled password only.

Logo swap

 * 1) unsquashfs
 * 2) mv path/to/ppau_logo.png path/to/squashfs-root/home/belenios/belenios/_run/usr/share/belenios-server/logo.png
 * 3) mksquashfs

Adding a new admin
Admin passwords have the format username,salt,sha256sum where the last field can be generated with echo -n "$salt$pass" | sha256sum (or similar command - on Mac, use shasum -a 256 instead).

Credential generation script for Debian-type systems

 * 1) !/bin/bash

read -p "Choose a voting system username: " uname

read -p "Choose a password: " PASS

SALT=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 32) fin=$(echo -n "$SALT$PASS" | sha256sum | cut -d ' ' -f 1)

echo "" echo "Please send the following line: " echo "$uname,$SALT,$fin"