Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Silas1066

macrumors regular
Original poster
Nov 1, 2009
110
0
I need to use a hosts file because the Cisco AnyConnect VPN client won't allow me to resolve internal DNS names.

When I do a

sudo vi /private/etc/hosts

I get an "empty" hosts file. I try to edit anyway, but when I try to save I get

E166: Can't Open Linked File For Editing

wtf? Linked where?

any advice would be welcome.
 
I have already gone through dozens of pages of documentation -nothing has worked

If I do a ls -la in the /etc/ directory, I see

lrwxr-xr-x 1 root wheel 18 Jan 13 2010 hosts -> /etc/gasmask/hosts

there is some kind of link

but /etc/gasmask doesn't exist or cannot be accessed
 
In case things changed with Lion, I tried the usual way of editing the hosts file.

Code:
sudo nano /etc/hosts

and it worked as usual. Maybe something got borked on your particular install? Good luck tracking it down. "/etc/hosts" is supposed to be symlinked to "/private/etc/hosts"; if the latter for you is symlinked to something else, me wonders if there possibly be some malware afoot.
 
I have already gone through dozens of pages of documentation -nothing has worked

If I do a ls -la in the /etc/ directory, I see

lrwxr-xr-x 1 root wheel 18 Jan 13 2010 hosts -> /etc/gasmask/hosts

there is some kind of link

but /etc/gasmask doesn't exist or cannot be accessed

You obviously had installed "Gas Mask" at some point. Who know how you fix what that software did. Try contacting them:

http://code.google.com/p/gmask/

S-
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.