I added a user tomcat in the sudoers file like this :
tomcat ALL=(ALL) NOPASSWD:ALL
Then I noticed a problem. When I type :
sudo vim /etc/hosts
I can make my changes without any problem. But when I try this I get an error:
sudo echo "address host" >> /etc/hosts
-bash: /etc/hosts: Permission denied
Can someone explain to me why?