Skip to content

Instantly share code, notes, and snippets.

@hsachdevah
Created April 1, 2014 12:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hsachdevah/9913320 to your computer and use it in GitHub Desktop.
# file /etc/sudoers.d/go
# preferably edit using visudo -f <file>
# allow the go user to run some commands using sudo. Need to specify full path to command.
Cmnd_Alias GO_SUDO_CMDS = /usr/sbin/vzctl, /bin/umount /mnt/vzdata/*/projectdata
# don't require a tty for running sudo
Defaults!GO_SUDO_CMDS !requiretty
# don't require password
go ALL=(ALL) NOPASSWD: GO_SUDO_CMDS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment