Skip to content

Instantly share code, notes, and snippets.

@fr34k8
Forked from anuaimi/gist:4074714
Created September 28, 2015 14:58
Show Gist options
  • Save fr34k8/77a3c1e7e4ad387db250 to your computer and use it in GitHub Desktop.
Save fr34k8/77a3c1e7e4ad387db250 to your computer and use it in GitHub Desktop.
using augeas to add user to sudoers
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/user ubuntu
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/host ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command/runas_user ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command/tag NOPASSWD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment