[Linux/Ubuntu]When running compiled binary with sudo an error shows up
nikolalukovic opened this issue · comments
This is the error I get when I try to run the binary with sudo
failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'
Now, I don't know enough about keyring to know where the issue exactly is. Is it the issue with gnome-keyring or this lib?
Also, is there anything I can do to mitigate this problem?
The reason I'm running the binary with sudo is since it's being used to connect to vpn, and I can't to that without sudo.
I wanted to keep the username/password pair in keyring for future vpn connections. Is that even possible?
Ubuntu: 21.04
Gnome: 3.38.5
Hi @nikolalukovic !
I would assume that you have to first unlock the keyring for root in your case.
How to do that? When I run my binary with sudo I don't even get the prompt to unlock it, this error pops up immediately.
And I apologize if I'm asking stupid questions, I just don't have enough experience in this field.
@nikolalukovic I don't know
For anyone who's as dumb as I am. The problem was that root
user didn't have a keyring at all. So I ran Seahorse as sudo and created a keyring called login
. That's it. Now everything works as it should.