OpenNebula – No tty present and no askpass program specified error

I’ve been reviewing my installation notes. If you can’t run a VM in OpenNebula and the log shows the following:

post: Command "sudo /usr/bin/ovs-vsctl set Port vnet0" failed.
post: sudo: no tty present and no askpass program specified

Check the following:

  • your oneadmin user has root privileges to run ovs-vsctl and ovs-ofctl commands
  • NOPASSWD is used so no password is asked when running the commands
  • The requiretty option is disabled in your sudoers file

Use visudo command as root to edit the sudoers file. Here is an extract of my file.

# Defaults requiretty

# Allow oneadmin to run some commands
oneadmin ALL = NOPASSWD: /sbin/iptables
oneadmin ALL = NOPASSWD: /sbin/ebtables
oneadmin ALL = NOPASSWD: /usr/local/bin/ovs-vsctl
oneadmin ALL = NOPASSWD: /usr/local/bin/ovs-ofctl

Bye

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s