Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Ubuntu on my Samsung ARM Chromebook in chroot via crouton. I'm trying to run Cisco AnyConnect VPN in Ubuntu and ran into an issue. It installs but the daemon won't start. I found a description of the issue here:

So I found the shell script for AnyConnect in /etc/init.d but I'm not smart enough to figure out how to run these commands manually. I'm hoping someone can point me in the right direction.

Here are the contents of the vpnagentd_init file:

# chkconfig: 345 85 25
# description: vpnagentd is used for managing the cisco vpn client datapath.
# processname: vpnagentd

# Source function library.
if [ -e "/etc/init.d/functions" ]; then
  . /etc/init.d/functions


start() {
  # If TUN isn't supported by the kernel, try loading the module...
  /sbin/lsmod | grep tun > /dev/null
  if [ $? -ne 0 ]; then
    /sbin/modprobe tun > /dev/null 2> /dev/null
    if [ $? -ne 0 ]; then
      # check for /dev/net/tun
      [ -c "/dev/net/tun" ] || echo  Warning: Unable to verify that the tun/tap driver is loaded.  Contact your system administrator for assistance.

  echo -n $"Starting up Cisco VPN daemon "
  return $RETVAL

stop() {
  echo -n $"Shutting down Cisco VPN daemon "
  killall vpnagentd
  return $RETVAL

dostatus() {
  status vpnagentd

restart() {

# See how we were called.
case "$1" in
        echo $"Usage: vpnagent {start|stop|restart|status}"
        exit 1

exit $RETVAL
share|improve this question
Welcome to askubuntu. Possible duplicate – penreturns Mar 1 '13 at 1:49
up vote 1 down vote accepted

As an example, to run the 'start daemon' section, copy the contents of the file between "start(){" and "}" and put it in a text file startScript (as ane example). Use chmod+x startScript to make the script executable, then use ./startScript to run it. The same can be done for the stop and status sections if desired.

share|improve this answer
Thanks for your help! Unfortunately I got an error (Starting up Cisco VPN daemon ./vpnstart: line 12: /opt/cisco/vpn/bin/vpnagentd: cannot execute binary file) but that's beyond the scope of this question. I appreciate your help. – Splendor Mar 1 '13 at 3:48
No problem. Make sure you check permissions on the binary. You'll also likely need to run your startScript as root (using sudo ./startScript). – Nerdfest Mar 1 '13 at 4:16
@Splendor I had the same problem trying to run Anyconnect on my Raspberry Pi, which is also an ARM box. Seems the problem is the binaries, like vpnagentd, are compiled for Intel architecture. As far as I can tell Cisco doesn't provide source to compile or an ARM binary, so I'm looking for alternatives. Openconnect sounds promising, but I haven't tried it yet. – ben author Dec 17 '13 at 14:09
Openconnect did the trick. sudo apt-get install openconnect and then connect and I'm on my way. – ben author Dec 17 '13 at 14:22

I'll try to answer if it is just to run a shell script.

Open terminal Ctrl + Alt + T and type :

sudo nautilus

Give your password. Browse to location where that script present. Right click on the file. Goto properties--> Permissions. Give execute permissions by checking on "Allow executing file as a program".

Use cd directory_name to go to script location. And type sh to run the script. Hope it will help.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.