oscar-stack/vagrant-norequiretty

Name: vagrant-norequiretty

Owner: oscar-stack

Description: A Vagrant Plugin that ensures requiretty is disabled

Created: 2016-03-29 03:49:13.0

Updated: 2018-05-11 05:15:48.0

Pushed: 2018-05-11 05:15:47.0

Homepage: null

Size: 16

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

vagrant-norequiretty

Build Status

A Vagrant plugin that disables requiretty on Linux guests. We've all seen it before. The dreaded “you must have a tty to run sudo” error:

following SSH command responded with a non-zero exit status.
ant assumes that this means the command failed!

rr from the command:

: sorry, you must have a tty to run sudo

Simply install this plugin and it will attempt to make that error disappear by hooking into the Vagrant startup sequence and sanitizing /etc/sudoers before other commands run.

To install, simply run:

vagrant plugin install vagrant-norequiretty

Everything else should start happening automagically?.

Synopsis

This error is caused by many VM templates and default installations requiring a TTY to use sudo due to concerns about echoing plaintext passwords in the clear. For many cases, this requirement is questionable:

Well, I know how to work around this.

But nobody has yet explained why I have to.

The problem is not that it's annoying, the problem is that it's annoying for no value. The case that it was supposed to handle is handled just fine without it.

So let me re-state the cons of this:

1) it adds no security 2) it breaks valid usage 3) it diverges from the upstream

I see no pros. Do you?

This Vagrant plugin hooks into startup actions for VirtualBox, vSphere, VMware Desktop, and OpenStack providers by running a sed command to purge the requiretty setting from /etc/sudoers before provisioners, synced folders and networking actions are executed.

Support for additional providers coming soon.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.