Windows Server - Terminal Server Login Issues - Asked By Renee on 15-Jan-11 02:56 AM

Userinit issue - user logs into TS and gets blank screen.  User shows in TS manager as logged in, however, the userinit process holds at 13% usage and rarely releases.  I can run taskmgr and force Explorer to start, but userinit is still processing.  The problem occurs with established profiles and new profiles.  In some cases, if we wait 5 - 15 minutes, it will finally load and the problem seemingly goes away. I did install UPHClean and that helped tremendously - prior to that the problem (which suddenly occurred after 8 months of this box running) was more global, maxing the CPU, causing the system to practically halt, and preventing other users from logging in.  Since the problem still occurs intermittently, I really need to locate the cause and find a resolution.  Thoughts?

More Info - Running on Win2003R2SP2.  Once UPHClean service installed, no further errors in Event Log.  Currently running UserEnv debug logging to compare faltering logins with successful logins.  Hangs after intiating the userinit process - line reads: USERENV(2fe4.664) 19:21:08:909 LibMain: Process Name:  C:\WINDOWS\system32\userinit.exe
Ramu Soft replied to Renee on 17-Jan-11 04:46 AM
I faced this problem before and nailed it down to GPOs. Group Policy settings processing will be done in userinit.exe process and if this taking time means, GPOs are taking long time to process.

To troubleshoot this, take a user who has no GPOs(default GPO should be fine) and make the user login to the server through terminal services. If you don't see the issue, then definately some policy is taking more time. To troubleshoot that, you need to enable GPO logging.

See for the procedure to enable GPO debugging. Once the logs are created, you can use a tool called Policy Reporter( to analyze these logs. This tool will show which GPO is taking long time to process and because of what settings.

This helps you in resolve the problem. Looking at the symptoms, you seem to have configured a terminal services GPO which might the cause. You can check in that direction as well.

Hope this helps....
Give credit where it is due

Mike Manny replied to Renee on 18-Jan-11 08:21 AM
The two main reasons for long log on times like this are profile size and terminal servers that aren't pointing to your domain controllers. 

Please check you IP settings, and also what are your profile sizes like.  For example, we limit a profile where i am to 25mb's.   Our administrator accounts have no limit, and when people don't clean them up they grow huge and take forever to process logons.  Now, if you add to the fact that if it's a heavy used server, this can really slow down logons.  Things you can look at are via gp excluding folders, and folder redirection to cut down on these sizes.  You can also keep users from saving to the desktop (or strongly discourage)  clear out sun java cache, etc..

Renee replied to Ramu Soft on 18-Jan-11 12:13 PM
Thank you Ramu - I will be looking into this today.  It's just odd because I have not created any new GPO's since this server came online nearly a year ago.  The problem only began a couple of weeks ago and became progressively worse.  It seemed as though it was an I/O issue - like I might be losing a drive.  I checked for all the obvious and nothing - hence userenv logging.  I will give the GPO logging a whirl.
Renee replied to Mike Manny on 18-Jan-11 12:28 PM
Thanks Mike - I will look into this today.  The Terminal server has been online without issue for nearly a year.  It wasn't until a couple of weeks ago that we started having issues - as I mentioned to Ramu - the server was responding as though we had I/O issues like we were losing a drive.  Not only did the users have issues logging in, but while on remote console, I had issues maneuvering around the server doing simple tasks.  After I applied the UPHClean, much of the problem has gone away - just have a few users now still having issues logging in.  

Also - I did not mention in my initial comments - this TS is used to access a specific SQL database that houses data on a separate box.  The app runs local on TS and feeds data back to the other server.  I am running a script that automatically connects the user to the app so they never see the TS desktop and logs them off TS when the app is closed.

Having said all that - I will still look into your suggestion because anything is possible - plus you have me thinking - I do allow their drive mappings to follow them so they can save reports to their own location....hmmmmm
Mike Manny replied to Renee on 19-Jan-11 01:34 PM
We also have had this happen due to a Bad update of our anitvirus (kaspersky) stealing all the CPU. 
Mike Manny replied to Renee on 19-Jan-11 01:34 PM
We also have had this happen due to a Bad update of our anitvirus (kaspersky) stealing all the CPU. 
Mike Manny replied to Renee on 19-Jan-11 01:34 PM
We also have had this happen due to a Bad update of our anitvirus (kaspersky) stealing all the CPU.