User Tools

Site Tools


linux:security:keyring:gnome-keyring

gnome-keyring


Description

The Gnome Keyring stores secrets, passwords, keys, certificates and makes them available to applications. It is integrated with the user's login so their secret storage can be unlocked when the user logins to the session.


Manage

seahorse

You can manage gnome-keyring entries by installing the seahorse package.

  • Install seahorse:
    sudo apt install seahorse

secret-tool

See secret-tool for more info.

{attribute} {value} references key:value pairs stored under the Advanced section of an Entry.

  • Create entry:
    secret-tool store --label='My Label' {attribute} {value} {attribute2} {value2} [...]
  • Retrieve an entry:
    secret-tool lookup {attribute} {value} {attribute2} {value2} [...]

keyring

See keyring for more info.

Python

  • Create an entry:
    import keyring
    keyring.set_password("system", "username", "password")
  • Retrieve a password:
    import keyring
    keyring.get_password("system", "username")

cli

  • Create an entry:
    keyring set SERVICE USERNAME
  • Retrieve an entry:
    keyring get SERVICE USERNAME
  • Delete an entry:
    keyring del SERVICE USERNAME

Reset

  • Resetting everything (delete all passwords and start new keyring):
    rm ~/.local/share/keyrings/login.keyring

Reuse

Using the same keyring (resetting keyring password but keeping old passwords in keyring):

  • Change directories:
    cd ~/.local/share/keyrings/
  • Rename the existing keyring:
    mv login.keyring login.keyring.backup
  • Create a new keyring file from Gnome Keyring with the name login
  • Replace the new keyring file with the backup of the old keyring file
    mv login.keyring.backup login.keyring      

linux/security/keyring/gnome-keyring.txt · Last modified: by chuck