Options

Modifying hosts file - cant browse to new alias

KhattabKhattab Member Posts: 97 ■■□□□□□□□□
Hi All,

This should be a quick one.... not sure why it's happening, but here are the details:

On a win2k3 server (i also tried on XP - same thing happened), i changed my hosts file (c:\windows\system32\drivers\etc) to look like the following:

127.0.0.1 localhost
127.0.0.1 testing

I need to have the testing hostname in there so i can fool the server into doing something for me. Anyways, doing that - i can ping testing and it's fine. BUT....

If i try to browse to testing - i get prompted for a username and password. I tried typing in the local admin username and password and it doesnt work. Nothing i try seems to work with it....

Does anyone have any idea why this happens?

Thanks!

Comments

  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    When you say you "browse" to it, what do you mean?
    http://testing or \\testing or something else?

    As a side note, you can use anything in the 127 range, like 127.0.0.2 or whatever. Is this to keep people from accessing certain sites?
    All things are possible, only believe.
  • Options
    JDMurrayJDMurray Admin Posts: 13,034 Admin
    Change the 127.0.0.1 address of 'testing' to 0.0.0.0 to avoid being snagged by the local Web server service.
  • Options
    deneb829deneb829 Member Posts: 292
    sprkymrk wrote:

    As a side note, you can use anything in the 127 range, like 127.0.0.2 or whatever. Is this to keep people from accessing certain sites?

    I agree with this. I had to use 127.0.0.2 to get Remote Desktop to tunnel through SSH without trying to connect to the remote desktop service running on the local machine.
    There are only 10 types of people in this world - People who understand binary and people who do not.
  • Options
    KhattabKhattab Member Posts: 97 ■■□□□□□□□□
    Hi,

    sprkymrky - i tried using 127.0.02 but this made no difference... same thing happens. I also tried setting the IP address to 0.0.0.0 as suggested by jdmurray but this also didnt work.

    The reason i am doing this is because i have a certain application which i need to install - the license file for that application must reside on a network share with this particular name: \\server1\shareName

    The application works fine for PC's that are on the network - they all point to that particular share name for the license file. The problem however, is that i have some PC's that are not on the network - stand alone development boxes which need to install the application.

    I cant just copy the license file over to the standalone PC's and map a drive on the local machine because if i change either the serverName or the shareName then the license file will no longer work. So i thought i could set up an alias in the host file (of the stand alone pc's) with the name serverName and a share named shareName and place the license file in that directory, map to it and see if it works. Make sense?

    The problem is i cant seem to browse to it (\\testing) at all.... keeps asking for authentication and not sure what authentication it needs?
  • Options
    seuss_ssuesseuss_ssues Member Posts: 629
    Hmm i toyed with it on my xp machine.

    Only wants to allow me to login with the guest account. It doesnt give me the option to change the user. Could probably toy with the account policies and get it to work.

    What would be the issue with renaming the standalone computers with the name it requires and creating the share that the machine needs?
  • Options
    KhattabKhattab Member Posts: 97 ■■□□□□□□□□
    sseus... i think the reason that you can only log on using the guest account is probably because you have simple file sharing enabled.

    We could rename the stand alone machines to the serverName which is required... but the problem is that those stand alone machines have a whole range of software packages installed, including SQL and others which would mean there are days and days of registery changes which need to take place and i would LOVE to avoid that if possible.
  • Options
    sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    If you are using \\servername\sharename, then try using the lmhosts file, instead of the hosts file.

    When you tried the local username and password, did you try it with the following syntax?:

    computername\username

    That way it doesn't assume you are using a domain account. If you just typed the local administrator and password without the computer name in front followed by the backslash, it might assume you are using the domain administrator acount with the wrong password.

    Also, did you check your share permissions? Everyone should have "read" by default, but maybe it needs to write to the file as well... who knows. Then check your policies to make sure "access this computer from the network" or "deny access to this computer from the network" don't have something stopping you - although that is unlikely because that will generally pop up a message stating that you are not allowed to access this computer rather than prompt you for a user/pw.

    BTW - What kind of crappy software requires such a lame way to license it's product? Or are you doing this as a workaround to avoid purchasing additional licenses for your stand alone machines?
    All things are possible, only believe.
  • Options
    KhattabKhattab Member Posts: 97 ■■□□□□□□□□
    Hi,
    If you are using \\servername\sharename, then try using the lmhosts file, instead of the hosts file.
    Tried that and it didnt make any difference.
    When you tried the local username and password, did you try it with the following syntax?:

    computername\username
    I tried prefixing the username with the computer name to no avail. I also tried prefixing newAlias\username and it seem to think about it for a couple of secs before spitting it back at me asking me to try again.
    Also, did you check your share permissions? Everyone should have "read" by default, but maybe it needs to write to the file as well... who knows. Then check your policies to make sure "access this computer from the network" or "deny access to this computer from the network" don't have something stopping you
    I checked this also - all settings seem to be fine... i can access the share by doing \\localhost\sharename but not with the new alias that i add to the host file. Very strange.

    The software is some performance and attribution software that our company uses. Apparently, when the software gets licensed, they ask us for the path where the license file will be stored (e.g \\servername\sharename) and they use that to encrypt the file (or at least thats how i understand it). That prevents anyone from simply copying the license file and licensing their own instance.

    Maybe we'll try and purchase a copy of the license and tell them we will be storing the license file on \\localhost\shareName that way, we can copy the license file locally and use it without any complications - though i doubt the company will allow us to use such a license location.
Sign In or Register to comment.