Hey all,
Per my job requirements I need to tie myself via the /etc/hosts file to check sites on specific servers. The reason for this is multiple mirrored web servers. As root on linux this is easy. Become root and edit the /etc/hosts file. On OSX you need to enable root account first.
E.G. of tying to server for webpage.
Code:
192.168.1.1 www.sitename.com
Without root/sudo access you will get:
Code:
-- INSERT -- W10: Warning: Changing a readonly file
Follow these steps to use the root account.
NOTE!!!!! root is dangerous. You can use sudo vi /etc/hosts
Code:
1. From the Apple menu choose System Preferences....
From the View menu choose Accounts.
2. Click on the lock and authenticate with an administrator account.
3. Click Login Options....
4. Click the "Edit..." button at the bottom right
5. Click the "Open Directory Utility..." button.
6. Click the lock in the Directory Utility window.
7. Enter an administrator account name and password, then click OK.
8. Choose Enable Root User from the Edit menu.
9. Enter the root password you wish to use in both the Password and Verify fields, then click OK.
You can now edit you /etc/hosts file as root as well as perform other root tasks on BSD/OSX.
HTH,
jaysunn