Sudo nano etc/hosts can't save

Hi all,
Please help sorting my terminal, I'm having problem with my iTune evrytime I want to update or restore my ipad or iphone, it keep saying "this device isn't eligible for the requested build"
Now I tried to edit the etc/hosts using the Terminal, but suddenly all the script
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
127.0.0.1          localhost
255.255.255.255          broadcasthost
::1             localhost
fe80::1%lo0          localhost
#74.208.10.249 gs.apple.com
#127.0.0.1 gs.apple.com
are all gone i think i accidentally deleted it. so what i did was copy this from forum and paste it to terminal.
But i'm having problem to save it when I press ^O it goes like this:
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
127.0.0.1          localhost
255.255.255.255          broadcasthost
::1             localhost
fe80::1%lo0          localhost
#74.208.10.249 gs.apple.com
#127.0.0.1 gs.apple.com
File Name to Write: etc/hosts                                                  
^G Get Help         ^T To Files         M-M Mac Format      M-P Prepend
^C Cancel           M-D DOS Format      M-A Append          M-B Backup File
and I dont know how to save it. when I press ^X doesn't save at all.
Please Help me.
Thank you in advance.

Thanks.
What's this "sudo dscacheutil -flushcache"???
Why show this "when the system is booting.  Do not change this entry."????
Can i add what i want between 127.0.0.1 localhost and 255.255.255.255 broadcasthost?
Why is saying i can't change the file, why can i unprotect? Explain me.
Thanks in advance
Message was edited by: NunoPortugal

Similar Messages

  • IPod Nano 6th Gen can't save my run

    anyone can help me with this?
    i'm using iPod Nano 6th Gen with nike plus. everytime i hit end workout my ipod is rebooting itself and can't save my run however when i jack my ipod to my treadmill that problem doesn't occur. i try to ask for help to the nearest ibox in town but unfortunately they're not helping AT ALL!!! fyi the software is updated from time to time and currently using version 1.2PC and i have 13.3GB available
    so anyone has experienced this kinda problem please let me know how to fix this. thank you

    after i tapped on the end workout, it showed the apple logo. I waited for about 15-20 secs and it went back to the main screen with the icons
    then i checked my history go to workout totals and it showed the apple logo (again) and went back to the main screen (it means it's not recorded right?)
    thanks for helping

  • HT204408 How do you access the /private/etc/hosts file?

    My facetime keeps saying that "There was an error processing registration.." I've called apple support, they didn't know what else to do either, my last choice is looking through my files, especially the host file. Can anyone help?

    sudo nano /etc/hosts
    once your done
    ctrl+o then crtl+x

  • Asking for a password when trying to add an entry to /etc/hosts

    I am trying to add an entry to /etc/hosts using Terminal. When I type the command: sudo nano /etc/hosts it asks me for a password. I have never set a password so I have no idea what this would be. My admin pw is blank (I just hit enter) and this is not working. Is there a defaut password or how can I reset this? Thanks

    This would be your admin account password. You must set one.
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password, OS X Mountain Lion- Reset a login password,
         and OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself

  • Code for restoring default permissions to etc/hosts?

    Could someone help me with the proper code for setting the permissions on etc/hosts to their proper default setting?

    sudo chmod 644 /etc/hosts
    sudo chown root:wheel /etc/hosts
    Those are the settings on my iMac.
    If you use an editor such as
    sudo nano /etc/hosts
    you will most likely not have these problems.
    If you are a more experienced Unix user, then vim or emacs are good choices as well, but both of those editors have steep learning curves.
    Message was edited by: BobHarris

  • How to save etc/hosts

    Hi all,
    Please help sorting my terminal, I'm having problem with my iTune everytime I want to update or restore my ipad or iphone, it keep saying "this device isn't eligible for the requested build"
    Now I tried to edit the etc/hosts using the Terminal, but suddenly all the script
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1          localhost
    255.255.255.255          broadcasthost
    ::1             localhost
    fe80::1%lo0          localhost
    #74.208.10.249 gs.apple.com
    #127.0.0.1 gs.apple.com
    are all gone i think i accidentally deleted it. so what I did was I copy this from forum and paste it to terminal.
    But i'm having problem how to save it, when I press ^O it goes like this:
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1          localhost
    255.255.255.255          broadcasthost
    ::1             localhost
    fe80::1%lo0          localhost
    #74.208.10.249 gs.apple.com
    #127.0.0.1 gs.apple.com
    File Name to Write: etc/hosts                                                
    ^G Get Help         ^T To Files         M-M Mac Format      M-P Prepend
    ^C Cancel           M-D DOS Format      M-A Append          M-B Backup File
    and I dont know how to save it. when I press ^X doesn't save at all.
    Please Help me.
    Thank you in advance.

    Well lets make things easier, get out of Terminal by just Quiting it or Force Quit.
    Download the free TextWrangler here
    http://www.barebones.com/products/textwrangler/download.html
    Now under the File Menu >Open File by Name
    /etc/hosts
    It should look like this, if not then just copy and paste it in.
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1       localhost
    255.255.255.255 broadcasthost
    ::1             localhost
    fe80::1%lo0     localhost
    Now save it and give it your admin password and that's it. Easy as pie.
    Terminal's pico and vi editing programs have a lot to be desired, but serve the basic puposes.
    With Terminal you need to enter
    sudo pico /etc/hosts
    then enter your admin password to access a system file.
    It can only be done via a Admin account, however with TextWrangler not only is it much easier, you can also access system files from a Standard user account.
    the two lines
    #74.208.10.249 gs.apple.com
    #127.0.0.1 gs.apple.com
    You have there are "commented out" with the "#" symbol, basically your telling the computer to "ignore this line"
    Why you think messing with your /etc/hosts file is going to solve your primary issue with iTunes/iPad/iPhone is beyond me.
    Did you ever think that perhaps your two devices are too old for the "requested build"?

  • /etc/hosts site blocking

    In windows and linux I can block sites by adding the domain to /ect/hosts and pointing to loaclhost eg
    127.0.0.1 blockthis.com
    Anyone know how to get this to work in Tiger
    thanks

    Exactly the same in OS X. There is a hosts file located in the /etc/ directory. Open the Terminal application (Utilities folder) and at the prompt enter:
    sudo pico /etc/hosts
    You will be asked to authenticate with your admin password which will not be echoed.
    When the editor opens the files simply enter the sites you wish to block using the format you posted: 127.0.0.1 block.site.com.
    Enter each desired site on a separate line. When finished press CTRL-X. You will be prompted to save changes. Respond "y". You will be prompted again to save the filename, respond "y". Pico will quit. You can verify your changes by entering:
    cat /etc/hosts
    This will list the contents of the hosts file.
    Note that underlying OS X is a Unix operating system, so most anything you know how to do in Linix is done the same way in OS X, except that access must be through the Terminal application.

  • /etc/hosts Prank Gone Wrong, need help restoring files to original

    Some friends were messing around on my computer and playing a joke on me
    using the sudo pico /etc/hosts command they were able to send me from sites I wanted to visit, like facebook, to sites I didnt want to visit..
    what they wrote was:
    67.55.108.167 facebook.com
    67.55.108.167 www.facebook.com
    I have since deleted it but the every time I go to facebook from another sight I am still redirected. The odd part is that I can go to facebook, but only after ive been redirected. What I mean is, I try to go to facebook, get redirected, then try to go to facebook right away. If I do that it works fine. Also Safari is the only internet browser that is effected. Opera and Firefox are both un effected. I tried uninstalling and reinstalling safari as well as using the same command as they did, but in reverse. Still no luck. Any suggestion? Unfortunately they didnt back up the /etc/hosts before they edited it

    You might also want to flush your DNS cache
    dscacheutil -flushcache
    Also make that password change.
    Look in System Preferences -> Accounts to see if your friends added any new admin accounts or granted an existing account admin access.
    If they know how to create ssh-keygen keys, they could have deposited a key in your /private/var/root/.ssh/authorized_keys2 file.
    There are any number of additional tricks they could have done, if they had admin access. I'm just scratching the surface.
    If you do trust these friends, then most likely they just played with /etc/hosts. If they are the kind of friends that get malicious, I would consider the "nuke and pave" reinstall.

  • Unable to edit /etc/hosts with permission denied error

    [15:45:02][rabbie@sandnigga:~]# sudo cat /etc/hosts
    Password:
    cat: /etc/hosts: Permission denied
    [15:45:09][rabbie@sandnigga:~]#
    Basically that's my problem right there. I cant edit / view / change the hosts file on my macbook pro but I can delete it and create a new one. If I do delete it and create a new one, that new file then has the same problem only a few minutes later.
    Does anyone have any ideas ?
    I have also tried to change the ownership and permissions of the file:
    [15:45:09][rabbie@sandnigga:~]# ls -la /etc/hosts
    -rwxrwxrwx  1 root  wheel  290 18 Sep 20:38 /etc/hosts
    No luck.
    Thanks in advance for any help.

    Hey Bob,
    The hosts file is often edited and added to by network administrators as well as web developers to force your local computer to resolve DNS for sites whos DNS is not yet publicly available.
    I actually found the problem and root cause behind this. I installed BitDefender Antivirus on my MacBook Pro and the uninstall script did not successfully remove all settings / files. There were still some BitDefender files locking processes and files on my Mac and so I just ended up Wiping my drive and re-installing Mountain Lion.
    Thanks for your attempt to help anyway.

  • /etc/hosts in Snow Leopard: ping works, browsers don't?

    I've had success in the past using /etc/hosts to direct web browsers to a test server instead of the production server, but it's not working in OS X 10.6.7.
    I edit the hosts file:
    $ sudo vi /etc/hosts
    Add my entry:
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1   localhost dev.localhost
    255.255.255.255   broadcasthost
    ::1             localhost
    fe80::1%lo0 localhost
    111.111.111.111 server.com
    Flush the cache:
    $ dscacheutil -flushcache
    Test with ping:
    PING server.com (111.111.111.111): 56 data bytes
    64 bytes from 111.111.111.111: icmp_seq=0 ttl=46 time=220.423 ms
    64 bytes from 111.111.111.111: icmp_seq=1 ttl=46 time=242.509 ms
    All seems good, but when I load http://server.com in a browser (safari, firefox, chrome), I get the production server and not 111.111.111.111. What did I miss?

    Yep, thank you. It's not my server and is coughing up responses that somehow eventually kick me back over to the production content.
    I don't expect further help (I probably won't pursue it further myself), but just for grins here's an example telnet request:
    $ telnet server.com 80
    Trying 111.111.111.111...
    Connected to server.com.
    Escape character is '^]'.
    GET / HTTP/1.1
    Host: server.com
    Cache-Control: no-cache
    HTTP/1.1 200 OK
    Date: Wed, 06 Jul 2011 20:06:43 GMT
    Server: Apache
    Last-Modified: Thu, 24 Mar 2011 11:40:59 GMT
    ETag: "62206ad-6f-49f38f37ec8c0"
    Accept-Ranges: bytes
    Vary: Accept-Encoding
    Content-Type: text/html
    Content-Length: 111
    <html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=/cgi-sys/defaultwebpage.cgi"></head><body></body></html>
    Definitely not what I expect. Another request for /cgi-sys/defaultwebpage.cgi just gives a 404 page. Maybe the browser tries a real DNS lookup at that point.

  • VPN clinetside IP overlap - tweak /etc/hosts possible?

    Hi,
    Our internal IP range is 192.168.0.x
    We have remote users who VPN in from client offices, hotels, airports, etc. If the clientside local network address is also in the 192.168.0.x range, VPN does not work correctly due to the overlapping address ranges. This happens often enough to be a serious problem for our road warriors.
    Does anyone know whether /etc/hosts can be tweaked to be different for different Network Locations? Are there any other means to this end? If so we can create a VPN VLAN (say, 192.168.100.x) with our servers multihomed onto that VLAN smooth VPN access.
    Thanks,
    b.
    PS. Apologies for cross-posting in client & server.

    Buckster: this can't be done without some serious hacks, and even so, would probably still involve manual changes when switching to a new location, and probably reboots as well.
    Painful as it is, it will almost definitely be far easier to renumber your central office LAN (where the VPN server is). When I set up a LAN that I know might be VPN'd into in the future, I try to use an obscure range (i.e. 192.168.169.x, 10.30.50.x, 172.16.17.x, etc.) - that's unlikely to be used by the SOHO routers/firewalls commonly deployed in remote locations.
    MacBook Pro   Mac OS X (10.4.8)  

  • I have this message on Terminal. nano/private/etc/hosts: command not found. How can I fix it to get right?

    /etc/hosts ; exit;
    /etc/hosts: line 7: 127.0.0.1: command not found
    /etc/hosts: line 8: 255.255.255.255: command not found
    /etc/hosts: line 9: ::1: command not found
    logout

    What are you attempting to do?

  • Can't access to several sites because when I click a link, or I insert login and password and clickto enter, it just open a new tab, either blank or the same as the previous. i.e., can't save my changes on FB, can't look for a location on googlemaps, etc.

    I changed in about:config "network.protocol-handler.expose-all" setting it to "false" to allow me to use Sopcast player (which I added on "network.protocol-handler.app.sop"). But after that, every time I have to, i.e., look for a location on Googlemaps, when I entered it it just open a new tab with the same page I was in; every time I click on a link it doesn't redirect me, it open a new page; I can't save changes on Facebook because when I click on "save changes" it just open another FB home page in a new tab; same problem with opening my bank account, etc. Even here, I could not get in when I tried to login. Now I put back "true" on "network.protocol-handler.expose-all", but, of course, Sopcast doesn't work anymore. What can I do? I'm using Firefox 6.0.2 on Ubuntu 11.04. The Trubleshooting informations I attached here are those that gave me the problem, before I made the aforementioned changing going back to "true". Thank you

    I think I may have found the problem. It's embarrassing to find it minutes after posting the message yet I tried to solve it off and on for three days! My brother who is a 20 year Mac user has been trying to help me too. I guess it's true what they say... sometimes it's better to be lucky than good. LOL
    I turned off the parental controls. What I don't understand is that the no website restrictions box was checked. To me this means I should be able to go to any site I wanted. Can anyone explain why I couldn't got to a HTTPS page on a parental controlled account even though there were no restrictions placed on it?
    It's late and I need sleep. I'll leave this open for now until I have more time to test it.

  • When deleting iCloud account, how can I save the photo's & other apps etc that are stored in iCloud?

    I have recently changed my Apple ID as my email address has changed &amp; also changed my password.
    I posted a question yesterday about this &amp; have since discovered from further searching here, that I need to delete and set up a new iCloud account as my iPad keeps asking me to login in with my Apple ID showing my old email address (&amp; doesn't accept old (or new) password). Also, naturally, I can't back up with iCloud.
    When I go to delete iCloud account a message appears that my photo stream (&amp; presumably other stored apps etc?) will be deleted/ lost from my iPad too. I currently have no access to any other computer (when return home I have a windows lap top only). I am therefore very reluctant to delete my account in fear of loosing my photo's in particular.
    Can any one help with the above please? Would all my stored data (phot's, apps etc) actually be deleted from my iPad when deleting my iCloud account? If so how else can I save (later restore?) my iCloud stored data?
    Man thanks,
    NJohnR

    I do appreciate your, obviously experienced, help.
    When I went to change my details in the mail settings as you suggested, I was unable to do so. Yes- I could &amp; did add my new email details that I changed to in my Apple ID. however I was unable to change the primary email &amp; therefore iCloud still wouldn't recognise my new Apple ID &amp; kept asking for my details under my old/ original email address.
    Though I did search further after this in the iCloud web site &amp; found further very similar questions to mine where users were successful by deleting the iCloud account.
    So I went ahead &amp; did this. As soon as I had deleted the account it asked me to login to iCloud with my new email address in my Apple ID which worked fine - &amp; I have also retained all my data.
    Again, I appreciate your help &amp; time you spent in reading and answering my need for help.
    All the best,
    NJohnR

  • How can I save the settings of my iPhone 4 before resetting the phone in addition to saving the apps etc. by synchronisation with i-tunes

    How can I save the settings of my iPhone 4 before resetting the phone in addition to saving the apps etc. by synchronisation with i-tunes

    All the phone settings are save in the backup which is automatically created when you sync the phone.
    http://support.apple.com/kb/HT1766
    Please clarify what you mean by "resetting" the phone. When you reset the phone, no data is deleted.  Do you actually mean Restore the phone?  See the User Guide, Appendix B for the correct terminology,
    http://manuals.info.apple.com/en_US/iPhone_iOS4_User_Guide.pdf

Maybe you are looking for