Skip to content

Instantly share code, notes, and snippets.

@anuaimi
Created November 14, 2012 20:51
Show Gist options
  • Save anuaimi/4074714 to your computer and use it in GitHub Desktop.
Save anuaimi/4074714 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