Once Again connecting as non root user.

Mike Miller mtmiller at debian.org
Thu Jan 26 16:53:30 PST 2017


On Thu, Jan 26, 2017 at 16:52:06 -0500, harsh P wrote:
> 1) Is it feasible to use script with embedded user name, passowrd and
> VPN server address in the script and with quite option to launch
> openConnect?
> Any example script?  and how do I inform openconnect to use the script?

I think so, if I'm reading you correctly. Something like this?

  echo "$password" | openconnect --user="$username" --password-on-stdin "$gateway"

> 2) I am not getting past the error associated with the nonroot user
> mode connection here is the complete information.
> 
> I followed the documentation at
> 
> http://www.infradead.org/openconnect/nonroot.html
> 
> 
> sudo ip tuntap add vpn0 mode tun user ABC

Hmm, is "ABC" standing in for something else here? I think you want
"user smartcart" here. It should be the name of the local user that is
going to be running openconnect.

> [sudo] password for smartcart:
> user at smartcart-VirtualBox:~/BASE/build/bin$ whoami
> smartcart
> user at smartcart-VirtualBox:~/BASE/build/bin$ openconnect -b X.X.X.X

I think you are missing the --interface=IFNAME (or -i) option here. It
is mentioned on the page you referenced. If you created a tun device
named "vpn0" as you showed above, then you should add "--interface=vpn0"
to your openconnect command.

(I haven't tested any of this, just following the docs and the code.)

-- 
mike



More information about the openconnect-devel mailing list