There is Windows Server 2003 machine which has many users to access. Each of them want to configure their own hosts file to redirect a hostname to certain IP address. (They are virtual machines with same hostname and different IP addresses owned by each user.)
C:\WINDOWS\system32\drivers\etc\hosts
Also, we cannot simply ask users to use IP address to connect because the hostname is configured and need to be used in an application. Can we have this user specific hosts file configured or any workaround?
Right-click to Run as administrator. Once in Notepad, go to File -> Open. Get to C:\Windows\System32\Drivers\etc and make sure to select All Files to find the hosts file. Now you can edit the hosts file.
Lock Hosts file to prevent hijacking To prevent Host file hijacks, you may navigate to it, right-click on it, select Properties and make it a Read-only file. This will lock down your Hosts file and prevent anyone or any malware from writing to it.
technically this is not possible...a simple programmatic work around could be to write a script and at user logon replace the file with whatever values you want. since most of the changes in the hosts file are read at runtime, you should be able to achieve the result you are expecting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With