On several ocassions I've needed to quickly edit the host file on my Mac but it was always a pain to do. Wanting to use a GUI text editor instead of the common command line editors in Terminal, I thought TextEdit would work just fine but I get the error as listed above. Much to my delight I found that TextWrangler handles this situation just fine and prompts for the administrator password when saving. Sweet! To top it off, it's free.