No announcement yet.

User Home dir over Domain Trusts

  • Filter
  • Time
  • Show
Clear All
new posts

  • User Home dir over Domain Trusts

    I have two domains. A one way trust is established between them where DomainA trusts DomainB. I have a workstation in DomainA that users from DomainB log in to. The problem I'm having is that the user's home directory doesn't want to work. In their profile in DomainB the path is set to \\DomainBServer\users\%username%. Permissions allow the user to get to their folder (ie I can map a drive to \\DomainBServer\users\jdoe) but if I try to run a the command "net use h: /home" I get the error message "The user's home director could not be determined."
    Any idea how to get this to work? Or is there a command or script I can run to accomplish this when the user logs into the workstation in DomainA?
    I know about the system variables HOMEDRIVE, HOMEPATH and HOMESHARE but attempts to manipulate those values didn't help either.
    I have a program which is working in DomainA that is trying to read an .INI file from the homedir\windows directory (ie \\DomainAServer\users\jdoe\windows\pgm.ini) and even if I set the system variables to point somewhere else, it still hits the file in homedir\windows like it's reading AD for the value or something.
    But that program fails when a user from DomainB logs into the workstation in DomainA because it can't read the homedir value from AD (I think).
    Any help is greatly appreciated.

  • #2
    Re: User Home dir over Domain Trusts

    have you considered using redirected folders via group policy?

    I dunno how this would go across a trusted domain though.

    you need to put a Pause in your logon-script, so you can determine which logon script is being mapped - put in an echo and a pause, then you can have it say "echo This is a DomainA Logon Script"

    then maybe instead of just trying to map "net use H: /home" use the full path in the logon script..
    Please do show your appreciation to those who assist you by leaving Rep Point


    • #3
      Re: User Home dir over Domain Trusts


      how about if you do rdp to domainA workstation, from Domain B and use map drives option.

      i need to do it in lab env to fully understand what you are saying
      Thanks & Regards

      MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
      Sr. Wintel Eng. (Investment Bank)
      Independent IT Consultant and Architect

      Show your appreciation for my help by giving reputation points


      • #4
        Re: User Home dir over Domain Trusts

        Both good ideas but they don't get at the root of my problem.
        The application that I need to run on the PC in DomainA (or actually a Terminal server but I'm trying to keep it simple) seems to be asking AD for the location of my home dir and then tries to access the INI file there. When I log in to the PC with a user from DomainA, everything works fine(regardless of wheter I have a drive mapped to the home dir or not - must be using the UNC path). When I log into the PC with a user from DomainB it doesn't work. As a diagnostic test, while logged in as a user from domainA, I went to a command line and entered: net use h: /home - which worked fine. When I logged into the PC with a user from DomainB and did the same command, I got the error "The user's home director could not be determined". So I think if I can get that resolved, then my program should work.

        I'm thinking the application may be doing something like you can do in VB - cmd.CommandText = "<LDAP://" & BASE_OU & ">;(&(objectCategory=person)(objectClass=user));sa mAccountName,homeDrive,homeDirectory,distinguished Name;subtree"
        and then uses the values from "homeDirectory".


        • #5
          Re: User Home dir over Domain Trusts

          I resolved my issue - when all else fails it's DNS!
          I discovered that if I tried to map a drive to the home dir specified in the user profile in DomainB while logged into a workstation in DomainA, I could only do it with the FQDN - \\serverB.domainB.local\users instead of \\serverB\users. So when I added an A record so I could resolve both serverB.domainB.local and serverB to the same IP address, everything started working fine. The net use H: /home command still gives the same error but the mapping in the user's profile is working now so the H: drive is getting mapped at login and all is good.

          Thanks for the help - hopefully this can help someone else too.