Add sudoers passwordless centos7
It’s just my note to create passwordless sudoers user in centos7
Add User
# adduser username
Create Password
# passwd username
Set password prompts:
Changing password for user username.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Use usermod
to add new user to wheel
group
# usermod -aG wheel username
Create sudoers file for user
# echo 'username ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/username
Comments