Access Multiple Password Keyrings

I am hoping to find out if it’s possible to create, use and access multiple keyring files using command line tools.

For example, all of my desktop computers would have a common Default keyring.
On specific machines I would like to add an Admin.keyring file in addition to the Default keyring.

Using seahorse, I am able to create the Admin keyring and add entries, but I am unable to search, retrieve or add entries to that file using secret-tool or python’s keyring utility. Using secret-tool to add an entry adds the entry to the Default keyring.

Admin.keyring does not unlock at login (even after checking the unlock at login option). Though if I choose Unlock from within seahorse, it will unlock without prompting for a password.

I checked the documentation for secret-tool and keyring and I didn’t see any options to specify a specific keyring file to use for queries.

I am currently running Debian Bullseye with i3wm without a display manager on these machines.
Here are the versions of the relevant packages:

  Installed: 3.36.0-1
  Candidate: 3.36.0-1

  Installed: 0.20.4-2
  Candidate: 0.20.4-2

  Installed: 22.0.1-1
  Candidate: 22.0.1-1

Does anyone have ideas on how to get this to work or if it’s even possible?


To do this with secret-tool: there’s an open issue about it in the libsecret repository.

If you just want a general solution, you can quite easily write a Python script: see for example Secret – 1: Python Examples

1 Like

The python documentation looks promising.
I was planning on using this keyring for Ansible playbooks so this may integrate nicely once I figure it out.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.