Microsoft KB Archive/320043

From BetaArchive Wiki

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


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:

  1. Click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Computer Management.
  2. In the console tree, click Users in Local Users and Groups.
  3. Click the user account that you want to work with.
  4. Click Action, and then click Properties.
  5. Click the Profile tab, click Connect, and then specify a drive letter.
  6. In the To box, type a path.
    • You can use a network path, such as:

      \\server\users\tester

    • Or a local path, such as:

      c:\users\tester

    • You can substitute %username% for the last subdirectory in the path, such as:

      \\server\users\%username%

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:

  1. Complete one of the following procedures:
    • For a domain user account:
      1. 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.
      2. In the console tree, expand the domain node, and then click the folder in which users are located.
      3. Double-click the user whose home directory you want to change.
    • For a local user account:
      1. 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.)
      2. In the console tree, click Users.
      3. Double-click the user whose home directory you want to change.
  2. Click the Terminal Services Profile tab, and then complete either of the following procedures:
    • 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$.
    • 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$.
  3. Click Apply.

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 "server" 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:"Example Account for User"
/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:

  1. Click Start, point to Settings, and then click Control Panel.
  2. Double-click Administrative Tools, and then double-click Computer Management.
  3. In the console tree, in Local Users and Groups, and then click Users.
  4. Click the user account that you want to work with.
  5. Click Action, and then click Properties.
  6. 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:
    • clerks.bat

      -or-
    • admins\admin_name.cmd
    For local accounts, the logon script path is systemroot\system32\repl\import\scripts.

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