# Editing the /etc/hostconfig file



## Yellowbeard (Jun 18, 2004)

I am trying to turn of AUTOMOUNT by booting into single user mode and editing the hostcofig file, but I am getting a message when I try to save the file that says "Cannot open file for writing"

What am I doing wrong??


----------



## sonjay (Jun 18, 2004)

You can edit it using Terminal. Open terminal, type "cd /etc" (without the quotes), then type "sudo pico hostconfig" (without the quotes).

Make your edits and hit control-x, type "y" when it asks you to save changes, and hit return when it asks for the filename (it'll have "hostconfig" already there as the filename).


----------



## Darkshadow (Jun 19, 2004)

That's not what's wrong.  Pay attention to the prompt you get when you boot into single user mode - it's spits out a blurb about running /sbin/fsck -y to check the disk, then to issue the command /sbin/mount -uw /.  The second is the command you need - until you do that, the filesystem is _read only_, and not even the root user can write to it.

So until you do that, you won't be able to edit _any_ file.


----------



## sonjay (Jun 19, 2004)

You edit the file using the instructions I gave above without booting into single user mode. Perhaps I should have made that more clear.


----------

