0

I was wondering if there was a way to edit the host file using a "throwaway" password.

I want to prevent myself from entering certain websites, but OS X doesn't not have a good alternative for Cold Turkey like on Windows.

So basically this is the plan. Edit host → use random forgettable password (e.g., jahdkjsdlbjabsdajsdkljahsdjbksnzcxcjhiueik) → prevent access to those sites.

2 Answers 2

0

What you're asking for is not easy to do. But why would you want to hack this yourself if there are applications that do this? There are many alternatives to Cold Turkey for OS X, but SelfControl seems like the most useful.

SelfControl is a free and open-source application for Mac OS X (10.5 or above) that lets you block your own access to distracting websites, your mail servers, or anything else on the Internet. Just set a period of time to block for, add sites to your blacklist, and click "Start." Until that timer expires, you will be unable to access those sites--even if you restart your computer or delete the application.

1
  • I've tried SelfControl, but I need something longer. Maybe even permanent.
    – ajs
    Apr 13, 2014 at 17:32
0

I love SelfControl and personally advise against modifying the hosts file unless absolutely necessary. I ran into some unexpected errors in the past when trying to limit what sites users were allowed on and found it much easier to just use a web proxy. Example, we didn't want users on Facebook in the office. At first it seemed like a great idea to modify their hosts file to prevent this from ever happening (small office), until we realized blocking the entire facebook.com domain and having it resolve to 127.0.01 made lots of other browser activities pretty nightmarish (think of how many pages have facebook like buttons, and stuff like that).

That was just one small example but there are quite a few chrome extensions you can use to accomplish what I think you're trying to do.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .