You are not logged in.
I am trying to set up openconnect with netctl as described in the wiki. However, the authentication is not working.
I see the following error message in the log:
Apr 13 18:35:16 laptop su[26486]: (to stupidus) root on none
Apr 13 18:35:16 laptop su[26486]: pam_unix(su:session): session opened for user stupidus by (uid=0)
Apr 13 18:35:16 laptop network[26480]: gpg: decryption failed: No secret key
Apr 13 18:35:16 laptop su[26486]: pam_unix(su:session): session closed for user stupidus
pass is setup correctly on my system. When I execute the "PASSWORD=..." line from the script manually in the terminal, it works. However, when I run netctl, it won't ask me for the gpg password. Could it be a problem with su when called from netctl?
BTW, I believe there is also an error in the "ExecUpPost" line. It should be "--user=${REMOTE_USERNAME}" instead of "--user=${USERNAME}", shouldn't it?
Last edited by stupidus (2016-04-15 11:28:41)
Offline
After a discussion with the author of the script in the wiki, it became clear, that gpg-agents needs to have the passphrase cached in order for it to work.
As I am using netmenu, I modified the netmenu script in the following way (it is also necessary to set default-key in the gpg.conf):
if [ -n "$CONNECT" ]; then
echo "test" | gpg -as > /dev/null
sleep 1
echo $CONNECT | netctldcli
fi
Offline