[SOLVED] Systemd starts gpg-agent mysteriously and does not end it with the last login session
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Systemd starts gpg-agent mysteriously and does not end it with the last login session
I am running an up to date arch linux 3.14.4 box with systemd 212-3 and gnupg 2.0.22. I do not know how long this perticular problem has been going on but I was troubleshooting something else with a new test user and found out after I logged out and back into my regular user that my test user session did not fully close because gpg-agent was running. I have been trying to figure out for days what is causing it. I log in through a tty and gpg-agent is already started so X isnt starting it. So i searched through my bash files both system files and local user and found no reference to gpg-agent. I disabled /etc/profile.d/gpg-agent.sh thinking that might be the problem however that did not work. Since it was a process that was started right after logind I disabled all my daemons, rebooted, and logged into root and gpg-agent still was started. I restarted again into emergency mode this time to see if it would load and it didnt. So something must load into multi-user mode that does not into emergency. How ever I can not figure out what that something is.
So I am looking for maybe a lead in the right direction or a solution to fix this problem. The onlything close to a solution.
I found via google was adding pgrep gpg-agent|kill to .bash_logout which feels alittle to hackerish like ducktaping a problem instead of fixing it.
The onlything close to a solution. I found via google was adding pgrep gpg-agent|kill to .bash_logout which feels alittle to hackerish like ducktaping a problem instead of fixing it.
You're right about that.
Quote:
Originally Posted by Alpha90
(..) So something must load into multi-user mode that does not into emergency. How ever I can not figure out what that something is.
Couple of things to try: check its PPID and "walk the chain" of processes back. Find its PID and run a 'cat -v /proc/$PID/cmdline'. That could reveal switches to 'grep -r' directories for. (Not running Arch but so far stuff in /etc/kde/env and file /usr/bin/keychain matches and none of the systemd stuff.)
Checking the PPID was a good idea and thank you for telling me how to do that but in this case it did not help the PPID is 1. Checking the switches just lead to an env file that listed tmp directories where socket are.
Actually I figured it out. my bash profile was sourcing an shell file that had 644 permissions but somehow was executed anyway. Moving the script got rid of the problem but I still am not sure why gpg-agent did not close when my last login session ended.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.