0

I forgot my login password. So I booted into recovery mode and used passwd command to change the password. I can now login but I obviously didn't update my Gnome keyring password.

I know my old password close enough to brute force it if need be, but I can't figure out how to do this on the command line.

Is it possible to login to the Gnome keyring (Seahorse) on the command line? (Or something similar)?

My setup is Debian 9, Gnome 3.22.2.

0

There's this Python script, gkeyring, which allows for interacting with the GNOME keyring daemon.

A small Python tool for shell access to GNOME keyring. It provides simple querying for and creating of keyring items.

Usage

Example usage:

$ gkeyring.py --all

         List all keyring items in the default keyring.

$ gkeyring.py --id 12

         Get keyring item with ID 12 in default keyring.

$ gkeyring.py --name 'backup'

         Search for keyring item with name 'backup'. You can easily see item names e.g.
         in the overview of Seahorse application.

$ gkeyring.py -p account_name=my@jabber.org -i gajim=1 -1

         Search for keyring item with property 'account_name' with value 'my@jabber.org'
         and property 'gajim' with integer value '1'. Output only the secret(s).

$ gkeyring.py --type network -p server=my.com,protocol=ftp --output user,secret
         Search for network keyring item with 'server' and 'protocol' properties. Output
         property 'user' followed by item's secret.

$ gkeyring.py --set --name 'foo' -p bar=baz --keyring login

         Create a new item in keyring 'login' with name 'foo' and property 'bar'.

$ gkeyring.py --delete --id 12

         Delete a keyring item with ID 12.

$ gkeyring.py --lock --keyring login

         Lock keyring 'login'.
| improve this answer | |
0

All command line tools (including the one found in the other answer) are NOT able to interact with the password of the keyring itself, probably by design. You'll almost certainly have to look at the file format & code for "gnome-keyring-daemon" and roll your own. It's probably not too hard, but you may not have to go that far.

The closest tool I was able to find is called "seahorse" I have NO idea why it's called that instead of "gnome-keyring-manager" or something, but that is the gui for gnome keyring access.

It is a gui but I was able to guess my password in less than twenty tries, so didn't bother to discover if I could automate it via some form of X macro commands. (which is MUCH harder on linux than windows due to security concerns.)

Writing a bit of python to directly access the keyring file itself is probably easier. It's likely that it's flat out not possible using existing tools, and that by design. The gnome-keyring-daemon probably doesn't provide access to the keyrings directly. Which is to say that the "seahorse" GUI probably doesn't actually prompt for passwords and unlock things, but hands a request to the daemon, which then prompts the user directly.

But that's speculation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.