systemd makes it easy: https://systemd.io/CREDENTIALS/