Can I grab the current user's login password?

Asked by David Rahrer

Perhaps I am missing this, or maybe it's not possible. I need to provide my password securely to the startup script for a program (Transmission) on Ubuntu Karmic. So if I am logged in as "foo" is there a way to get foo's password using gkeyring? If so, how? I'm in unfamiliar territory but I've been able to test gkeyring to retrieve other passwords, but there doesn't even appear to be a visible entry in Gnome Keyring (Seahorse?) for this.

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
gkeyring Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kamil Páral (kamil.paral) said :
#1

You can extract only those password that are stored inside Gnome Keyring (and therefore visible in Seahorse). If Transmission stores the password otherwise, then you can't retrieve it from Gnome Keyring (naturally).

If you need to provide a password in a shell script to an application that doesn't use Gnome Keyring, and you want to have it stored securely (not in the shell script itself), then you can use gkeyring to create a new keyring item, store the password there, and retrieve it again using gkeyring.

Example:
$ ./gkeyring.py --set -n transmission -p transmission=1
$ ./gkeyring.py -p transmission=1 -1

Of course you must have your desktop started to use gkeyring, it can't be used before login.

Can you help with this problem?

Provide an answer of your own, or ask David Rahrer for more information if necessary.

To post a message you must log in.