Skip to content

Instantly share code, notes, and snippets.

Barys Biankouski benbor

  • Minsk
Block or report user

Report or block benbor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GUI
GUI / install_vagrant_sudoers.sh
Created Jun 3, 2012 — forked from beddari/install_vagrant_sudoers.sh
Allow Vagrant sudo-access without password for NFS-setup (for OS X)
View install_vagrant_sudoers.sh
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
@beddari
beddari / install_vagrant_sudoers.sh
Created Dec 13, 2011
Allow Vagrant sudo-access without password for NFS-setup
View install_vagrant_sudoers.sh
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
if [ -z "$1" ]; then
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp)
cat > $TMP <<EOF
Cmnd_Alias VAGRANT_EXPORTS_ADD = /bin/su root -c echo '*' >> /etc/exports
Cmnd_Alias VAGRANT_NFSD = /etc/init.d/nfs-kernel-server restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -e /*/ d -ibak /etc/exports
You can’t perform that action at this time.