Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Last active October 2, 2017 05:14
Show Gist options
  • Select an option

  • Save yusufhm/7095c6a4d4bbab61dd13 to your computer and use it in GitHub Desktop.

Select an option

Save yusufhm/7095c6a4d4bbab61dd13 to your computer and use it in GitHub Desktop.
ubuntu set up user sudo without password
#!/bin/bash
adduser yusuf
usermod -aG sudo yusuf
echo 'yusuf ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/custom && chmod 0440 /etc/sudoers.d/custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment