Microsoft KB Archive/320043

= HOW TO: Assign a Home Directory to a User =

Article ID: 320043

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q320043





IN THIS TASK
SUMMARY Assign a Home Directory to a Domain User Assign a Home Directory to a Local User Specify a Home Directory For a Terminal Server Assign a Home Directory to a User from the Command Line Assign a Home Directory to a User By Using a Logon Script
 * Create a Logon Script
 * Assign a Logon Script to a Profile



SUMMARY
This step-by-step article describes how to assign a home directory to a user by using the Active Directory Users and Computers MMC, the Computer Management MMC, a logon script, or the command line.

Home directories and My Documents make it easier for an administrator to back up user files and manage user accounts by collecting many or all of a user's files in one location. If you assign a home directory to a user, you can store user's data in a central location on a server, and make backup and recovery of data easier and more reliable.

If no home directory is assigned, the computer assigns the default local home directory to the user account (\Users\Default on the user's local drive where Windows 2000 is installed as an upgrade, or the root directory where Windows 2000 is installed as the initial version). The home directory can use the same location as the My Documents folder.

When you are using Windows 2000 Terminal Services, the user profile is the default home directory.

back to the top

Assign a Home Directory to a Domain User
NOTE: To specify a network path for the home directory, you must first create the network share and set permissions that allow the user access. You can do this with Shared Folders in Computer Management on the server computer.

To assign a home directory to a domain user:
 * 1) Click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
 * 2) In the Details pane, right-click the applicable user account, and then click Properties.
 * 3) In the Properties dialog box, click the Profile tab.
 * 4) Under Home folder, type the directory information.

back to the top

Assign a Home Directory to a Local User
To assign a home directory to a domain user:  Click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Computer Management. In the console tree, click Users in Local Users and Groups. Click the user account that you want to work with. Click Action, and then click Properties. Click the Profile tab, click Connect, and then specify a drive letter. In the To box, type a path. <ul> You can use a network path, such as:

\\server\users\tester

</li> Or a local path, such as:

c:\users\tester

</li> You can substitute %username% for the last subdirectory in the path, such as:

\\server\users\%username%

</li></ul> </li></ol>

NOTE: If no home directory is assigned, the computer assigns the default local home directory to the user account. This is \USERS\DEFAULT on the user's local drive where Windows 2000 is installed as an upgrade, or the root folder where Windows 2000 is installed as the initial version.

back to the top

Specify a Home Directory For a Terminal Server
In Windows 2000, you can specify a home directory for a terminal server. Each user on a terminal server should have a unique home directory. This ensures that program information is stored separately for each user in the multi-user environment.

NOTE: If you specify only the home directory for Windows 2000, that home directory is used for both Windows 2000 and Terminal Services.

To specify a home directory for a Terminal server: <ol> Complete one of the following procedures: <ul> For a domain user account: <ol style="list-style-type: lower-alpha;"> Start Active Directory Users and Computers. To do so, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.</li> In the console tree, expand the domain node, and then click the folder in which users are located.</li> Double-click the user whose home directory you want to change.</li></ol> </li> For a local user account: <ol style="list-style-type: lower-alpha;"> Open Computer Management (Local). To do so, click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Computer Management.)</li> In the console tree, click Users.</li> Double-click the user whose home directory you want to change.</li></ol> </li></ul> </li> Click the Terminal Services Profile tab, and then complete either of the following procedures: <ul> If the Terminal Services home directory is on the local server, click Local path, and then type the path to the profile. For example, c:\users\tester$ .</li> If the Terminal Services home directory is on a network share, click Connect, select a drive to connect, and then type the network path. For example, \\server\tester$ .</li></ul> </li> Click Apply.</li></ol>

For additional informationabout user profile and home directory behavior with Terminal Services, click the article number below to view the article in the Microsoft Knowledge Base:

246132 User Profile and Home Directory Behavior with Terminal Services

back to the top

Assign a Home Directory to a User from the Command Line
You can use the net user command to assign a home directory to a user from the command line. For example, at the command line, type net user tester /homedir:\\server\tester$, and then press ENTER to assign the tester$ hidden shared folder on the server that is named &quot;server&quot; to the user Tester.

back to the top

Assign a Home Directory to a User By Using a Logon Script
You can automate user account creation and home directory assignment. You can use the net user command to create local user accounts in configuration scripts.

Create a Logon Script
The following example creates a user that is named tester, with comment, password expiration, home directory, and profile path configured: NET USER tester /add /comment:&quot;Example Account for User&quot; /expires:never /homedir:\\zippy\%username%$ /profilepath:\\zippy\profile back to the top

Assign a Logon Script to a Profile
To assign a logon script to a profile: <ol> <li>Click Start, point to Settings, and then click Control Panel.</li> <li>Double-click Administrative Tools, and then double-click Computer Management.</li> <li>In the console tree, in Local Users and Groups, and then click Users.</li> <li>Click the user account that you want to work with.</li> <li>Click Action, and then click Properties.</li> <li>Click the Profile tab, and then type the file name of the script in the Logon script box.

NOTE: If the logon script is stored in a subdirectory of the domain controller's logon script path (sysvol\domainname\scripts), precede the file name with that relative path, such as: <ul> <li>clerks.bat

-or-</li> <li>admins\admin_name.cmd</li></ul>

For local accounts, the logon script path is systemroot\system32\repl\import\scripts.</li></ol>

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

271657 Scripted Home Directory Paths Require That Folders Exist

back to the top

Keywords: kbhowto kbhowtomaster kbnetwork KB320043

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.