Skip to content

Instantly share code, notes, and snippets.

@CedricGatay
CedricGatay / install_vagrant_sudoers.sh
Last active August 29, 2015 13:55 — forked from GUI/install_vagrant_sudoers.sh
Script for placing sudoers.d files with syntax-checking, from https://gist.github.com/GUI/2864683, adapted to work with Vagrant 1.4.x under OS X / Linux
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# From https://gist.github.com/GUI/2864683, adapted to work
# with Vagrant 1.4.x under OS X / Linux
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers.XXX)
cat /etc/sudoers > $TMP
# Does not reedit file