Link to home
Start Free TrialLog in
Avatar of yuhs
yuhs

asked on

Need a script to map a Windows user to a Home folder

I want to use a global login script to map my Xp domain users to their existing home folders on our network.

The twist is that I do not want to map them using the Home folder path field in AD User and Computers, I want to perform this by placing a script in a Group Policy.  I've seen lots of sample scripts online, but they all seem to want to also create the folder, I just want to map them to it.

I thought a script like this might work but it doesn't, any ideas?

net user %username% /homedir:\\servername\%username%
ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you don't already have a users share then on your server you will have something like this


d:\
    users
       steve
       fred
       dave

Share the Users share giving it Everyone full control Share permissions.  You could call this Users$ so it does not appear when browsing the server (hidden share).

NTFS permissions for d:\users should be Everyone File Scan only.

You should then have suitable NTFS permissions for each user's home drives with only your Administrators groups, SYSTEM, and the specific users listed.  Then only that user can see the dir.

hth

Steve