You are not logged in.

#1 2017-10-08 04:34:42

marco1475
Member
From: Baltimore, MD, USA
Registered: 2013-10-20
Posts: 4

gnome-keyring without Desktop Manager for systemd Services?

Hi,

I would like to run several scripts unattended that need to log into various online services without having to store the necessary passwords in plain text. The scripts are systemd .service files triggered by .timer files. Examples of the necessary logins are e-mail accounts used by msmtp or decoding LUKS-encrypted remote storage.

As an example I currently have /etc/msmtprc storing the e-mail password in plain text. The msmtp Wiki article suggests using gnome-keyring to avoid this, but my situation is a bit unusual, because:

  • I don't have a desktop manager. (I am running an HTPC which uses kodi-standalone-service (AUR) to auto-login as the kodi user and start Kodi.)

  • My actual user is not logged in most of the time. (I SSH in once in a while to check on things.)

  • The scripts are triggered by systemd and therefore don't run under my user (AFAIK).

This leave me with the following questions:

  1. Can I have gnome-keyring running without a desktop manager?

  2. Can I set up a gnome-keyring that will be accessible to the systemd-run services? (What user do they even run under?)

  3. How can I automatically start and unlock a gnome-keyring on boot that would be accessible to the systemd-run services?

  4. Is gnome-keyring even the right solution or is there a better way to allow systemd-run services to access encrypted credentials for logins?

Any clarification and help will be greatly appreciated!

Thanks,
Marek

Offline

Board footer

Powered by FluxBB