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.
You can manage gnome-keyring entries by installing the seahorse package.
seahorse:sudo apt install seahorse
See secret-tool for more info.
{attribute} {value} references key:value pairs stored under the Advanced section of an Entry.
secret-tool store --label='My Label' {attribute} {value} {attribute2} {value2} [...]
secret-tool lookup {attribute} {value} {attribute2} {value2} [...]
See keyring for more info.
import keyring keyring.set_password("system", "username", "password")
import keyring keyring.get_password("system", "username")
keyring set SERVICE USERNAME
keyring get SERVICE USERNAME
keyring del SERVICE USERNAME
rm ~/.local/share/keyrings/login.keyring
Using the same keyring (resetting keyring password but keeping old passwords in keyring):
cd ~/.local/share/keyrings/
mv login.keyring login.keyring.backup
loginmv login.keyring.backup login.keyring