Home Folder not mapping
Ran into a weird issue the other day when migrating some users’ home folders from one Windows server to another. After moving the data, some users complained of their their home folder not mapping. In our case, the home drive is mapped to the H:\. This is done via a native Windows Server 2008 R2 Active Directory account. Most users were fine, it was just a select few that were having troubles and no matter how many times they rebooted, the home folder would not map. They were able to map it manually.
For a while, I struggled to wonder why wasn’t the H:\ mapping? A brief search on the Internet turned up many folks complaining of this issue but only when using group policy to map home drives. But this wasn’t the case since we were using AD to map the home drives. A quick comparison of the accounts that were mapping the home folders successfully as opposed to those who were not, turned up one difference. The users who were having a problem were running a login script. Ah ha!
I took a look at the login script and noticed the very first line of the script:
NET USE * /DELETE /Y
The first thing the login script did was to delete all drive mappings, then map several other network drives (not the home folder). At first glance I thought that this should be no problem, however, we then began to questions the order of events during the logon process. It seems that the logon process looks to AD and maps a home folder (if configured) BEFORE it runs a logon script! Therefore, what was happening was that the H:\ drive was being mapped first, then the login script was deleting the mapped drive! Duh!
The solution to the problem was to REM out the NET USE * /DELETE /Y line from the login.bat script or just completely remove the logon script from the AD account. We didn’t need it anyway as these were older legacy accounts migrated from another domain.
In case you are interested, below is the order of events when a user logs on to an Active Directory network:
1. Network starts. Remote Procedure Call System Service (RPCSS) and Multiple Universal Naming Convention Provider (MUP) start.
2. An ordered list of Group Policy objects is obtained for the computer if the Group Policy object has changed.
3. If the list of Group Policy objects has not changed, no processing is done.
4. Computer policy is applied.
5. Home Drive is mapped if one is configured in Active Directory.
6. Logon and Startup scripts run.
7. The CTRL-ALT-DEL screen appears for the user to log on.
To be honest, I felt a little silly that I spent any time on this. Sometimes it takes a few pair of eyes or talking it out with your co-workers for the old light bulb to turn on. I hope this helps someone one out there. If so, go ahead and share your “light bulb” experience with us. We’d love to hear about it!
References
Microsoft (Logon Order of Events)
I know this is old, but how can a home folder be mapped before the user entered his info ? This seems incorrect
When a user logs into their computer using their Active Directory credentials, they ARE entering their information. Therefore you can map a network drive via the user’s AD account or you can use group policy. Please let me know if this answers your concern. Thank you.