add user with sudoer centos code example
Example 1: add user with sudoer centos
echo "username ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/username
Example 2: add user with sudoer centos
username ALL=(ALL) NOPASSWD:/usr/bin/du,/usr/bin/ping