Skip to content

Instantly share code, notes, and snippets.

@dungmanh88
Last active September 28, 2016 09:27
Show Gist options
  • Save dungmanh88/6153bbfa623528e49d8b7f4b084ebc57 to your computer and use it in GitHub Desktop.
Save dungmanh88/6153bbfa623528e49d8b7f4b084ebc57 to your computer and use it in GitHub Desktop.
Create sudo user with passwordless
useradd test
groupadd sudo_passwdless
gpasswd -a test sudo_passwdless
groups test
test : test sudo_passwdless
vi /etc/sudoers
%sudo_passwdless ALL=(ALL) NOPASSWD: ALL
passwd -l test
su - test
[test@network ~]$ sudo ls
@dungmanh88
Copy link
Author

remove user:
userdel -r test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment