Odd issue with login script & home directory

Discussion in 'Software' started by zebulebu, Sep 1, 2008.

  1. zebulebu

    zebulebu Terabyte Poster

    3,748
    330
    187
    I've been working on a problem for a while now and its beginning to do my head in.

    We have a pretty standard setup for user logins/profiles as follows:

    2 x DCs
    User accounts in various OUs and members of various groups
    User's home directories mapped via their AD account - to a share with a root folder and an individual user folder underneath (e.g. \\<SERVER>\HOME\<USER>)
    General and department-specific shares mapped under a vbs login script, run under a GPO

    Intermittently - and this can happen to anyone, on any day, with no pattern either to the server they log on to, time of day, group membership or anything else - user's home directories (which, as stated above, are set under their account settings in their AD profile) are being mapped, but only to the root folder, not the correct subfolder (e.g. \\<SERVER>\HOME\)

    I suspect this is some sort of race condition, whereby the user account is not authenticated prior to the login script running, hence they can't map to specific drives. However, I can't set 'wait for network' and 'run login scripts synchronously' because, incorporated within the login script is a setting that runs our auditing software (detecting what is installed, machine specifics etc) and that takes three minutes or so to complete. As you can probably imagine, I can't have users waiting three minutes to log on!

    I've been reading this forum post which details exactly the same issue I am having, but haven't been able to come up with a fix for it yet. Anybody else come acrss something similar?
     
    Certifications: A few
    WIP: None - f*** 'em
  2. craigie

    craigie Terabyte Poster

    3,020
    174
    155
    Hi Zeb,

    We have not had this issue yet, however, it would be good to know what the cause of this is/was.
     
    Certifications: CCA | CCENT | CCNA | CCNA:S | HP APC | HP ASE | ITILv3 | MCP | MCDST | MCITP: EA | MCTS:Vista | MCTS:Exch '07 | MCSA 2003 | MCSA:M 2003 | MCSA 2008 | MCSE | VCP5-DT | VCP4-DCV | VCP5-DCV | VCAP5-DCA | VCAP5-DCD | VMTSP | VTSP 4 | VTSP 5
  3. hippy

    hippy Kilobyte Poster

    307
    5
    40
    Hi,

    I had a similar problem start to crop up before. I fixed it by just putting the home folder information into the log in script

    Dim objNetwork
    Set objNetwork = WScript.CreateObject("WScript.Network")

    strUsername = objNetwork.Username

    'Mapping User Directory

    objNetwork.MapNetworkDrive "H:", "\\*****\Users\" & strUsername, True

    Set objNetwork = Nothing

    WScript.Quit

    ^ rather chopped down version of my logon script.
     
  4. zebulebu

    zebulebu Terabyte Poster

    3,748
    330
    187
    Yes, that's what I'm considering Hip. Only problem is it means going through and stripping all the old user home directories out of the accounts in AD - not a partiuclarly onerous task in my lab, but a pain in the arris with 700-odd user accounts to wade through :biggrin

    Maybe I can script it...
     
    Certifications: A few
    WIP: None - f*** 'em
  5. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    If you highlight all the 700 accounts, right click on one and the select properties you can then edit the home drive and blank it out. That should change all the accounts in one go.

    Then hopefully the edited vb script should map the drive correctly. 8)

    Edit: Ive done this with roaming profiles before but I think it can be done with home drives as well.
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.