# Solved: RDP session closes out immediately after login



## Swiper

ok, so now have a weird on
had some spyware on windows 2003 server (terminal server)
rebooted
now, can not remain connected to the server at all
as soon as i log in as any user, it logs in, i can see application (known one) running , as it should be and it immediately 
disconnects the session message comes up about closing the session
can not log in as regular rdp user , administrator or through console
connects, see desktop for about half second and them closes the connection out

any magically things i can try to get this going again

i don't have direct access to the server to log in locally
i can access the shares on the server and i can access hidden shares and remotely connect to the registry

any tips..............anyone !!


----------



## Swiper

So, had someone who was physically in front of the server trying to log in locally into the computer, and it does the exact same thing

press ctrl + alt + del
enter in administrator / password 
logs in for split second and then comes up with Closing network connection and 
then goes back to Press ctrl + alt +del screen again


----------



## Swiper

Ok, so got it working again

first since i was not at the location, i had to connect to the server from another PC on the same network the server was at.

I had to first go into regedit (on the computer) 
connect to network registry (in regedit , go to file, connect network registry )
then i had to go to:

*HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon*
look for 
*userinit *
double click on this, and the path I had in there was totally incorrect going to documents and settings.....
*userinit = C:\Windows\system32\userinit.exe, 
*exitted the registry
had someone physically at the office, power off the server and turn it back on
now can both log in locally and log in remotely through rdp

Hope this helps someone else 
this was caused by some spyware /malware/virus that was on server BTW


----------

