I wanted to write a script to add some tools to my VPS or VMS and I write something like that
# Edit sudoers
echo -e "${GREEN}Configure sudoers...${NOCOLOR}"
echo
echo '# Allow user to use sudo without passwd' >> /etc/sudoers
echo '$USER ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
this script run as Sudo and i test echo $USER in Sudo is the user name, not root I mean I'm kind of new so I did not know that and write this but when I test it I'm getting error permission error i don't know what to do I did some search but can't find anything