-2

I'm currently running into an issue where we changed over the name of a server (windows 2012). With the old name everything worked fine, after the name change it appears that the app pool identity is stuck with the old machine name in the machine account.

The site is using win auth to connect to our SQL server and provides an error:

LOGIN FAILED domainname\oldmachinename$  

I notice when I change the app pool identity, the error changes, so it seems to be stuck with the old computer name, even though it's updated in local server data and control panel system properties.

How can I force the new name to be seen as the machine account?

pkalinow
  • 1,619
  • 1
  • 17
  • 43
Milkman
  • 11
  • 3
  • The *real* problem is that instead of using a proper domain account for the application pool, you used the machine's account, thus allowing *anyone* from that machine to hit the database. The *real* fix is to use a domain account, not try to give access to a machine's account. What would happen for example, if you wanted to use two or more servers? Load balancing? Allow only *one* web site to accesss the database? – Panagiotis Kanavos Mar 31 '16 at 15:14
  • yeah i agree. Its a test server it'll never load balancing but My main ? was if anyone knew why or where the old host name is being stored or where it could be changed. Went through the registry updated the cache value to 0 on las control also set cahced machine name to the current value manually. wondering if there is somewhere similar for appool identities to store the server name – Milkman Mar 31 '16 at 17:37
  • What do caches and registries have to do with a *domain machine's account*? Making arbitrary changes will cause more problems, not fix the problem. This question isn't related to programming, much less applicatino pools. This should probably be asked in Serverfault, although I'm certain there *are* guides and scripts in Technet on how to remain a domain machine and deal with the machine's account. Serverfault would be the place to ask what to do if renaming is performed in the wrong way – Panagiotis Kanavos Apr 01 '16 at 07:00

1 Answers1

0

I would remove the machine from the domain, change the hostname, re-join it to the domain, and that should alleviate the incorrect hostname issue.