centos7 add user to sudoers code example
Example 1: add user centos 7 sudo
useradd username
passwd username
Example 2: add user with sudoer centos
echo "username ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username
useradd username
passwd username
echo "username ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username