I'm very new to using Terminal and anything like that and stupidly followed an article that uses Terminal with the SUDO command. The sudo command basically loaded a file which updated my /private/etc/hosts file. I opened the file and made sure it was just doing this and nothing else.
Nothing went wrong, but later on I read that this was a bit silly and that it has opened up my machine to all kinds of security attacks. First of all, I'd like this statement verified "open to security attacks". Have I really? If yes, what steps can be taken to resecure things. This is what I used in Terminal:
The Terminal Commands
sudo -s
[enter password]
sh updateOSXHostFile
The file:
echo "Do you wish to update your host file ?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "0.0.0.0 yahoo.com" >> /etc/hosts;
echo "0.0.0.0 www.yahoo.com" >> /etc/hosts;
break;;
No ) break;;
esac
done
Which successfully updated the hosts file to block access to specific sites.