Terminal: sudo nano /etc/hosts Mac: "Sorry, try again." after correct Admin password

I'm trying to get a website permanently blocked on my Mac. After looking up how to do that, I followed the steps exactly as they said in the Terminal. After every input of my correct password, it says: "Sorry, try again."

I tried every password possible, most importantly the admins password but it still doesn't work.

MacBook Air 13″, macOS 15.2

Posted on Jan 16, 2025 4:52 AM

Reply
4 replies

Jan 16, 2025 5:40 AM in response to DMaksimovich

You can't just use any password. You can only use your user account password with an account that is in the Administrators group. If your user account is a standard account, then it won't work. Instead, you would need to "su admin" into your Administrator account and then use "sudo" from there.


All that being said, you can't block websites with a hosts file and shouldn't try. It's a long story, but a futile endeavour.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal: sudo nano /etc/hosts Mac: "Sorry, try again." after correct Admin password

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.