Configuring the User s Environment Settings


Configuring the User 's Environment Settings

User accounts can also have profiles, logon scripts, and home directories associated with them. To configure these optional settings, double-click a display name in Active Directory Users And Computers and then select the Profile tab, as shown in Figure 10-3. In the Profile tab you can set the following fields:

  • Profile Path

    The path to the user's profile. Profiles provide the environment settings for users. Each time a user logs on to a computer, that user's profile is used to determine desktop and control panel settings, the availability of menu options and applications, and more. Setting the profile path is covered later in this chapter in the section entitled "Managing User Profiles."

  • Logon Script

    The path to the user's logon script. Logon scripts are batch files that run whenever a user logs on. You use logon scripts to set commands that should be executed each time a user logs on. Chapter 4 , "Automating Administrative Tasks , Policies, and Procedures," discusses logon scripts in detail.

  • Home Folder

    The directory the user should use for storing files. Here, you assign a specific directory for the user's files as a local path on the user's system or a connected network drive. If the directory is available to the network, the user can access the directory from any computer on the network, and this is a definite advantage.

Figure 10-3. The Profile tab allows you to create a user profile. Profiles let you configure the network environment for a user.

graphics/f10ap03.jpg

System Environment Variables

System environment variables often come in handy when you're setting up the user's environment, especially when you work with logon scripts. You'll use environment variables to specify path information that can be dynamically assigned. The environment variables you'll use the most are the following:

  • %SystemRoot%

    The base directory for the operating system, such as C:\WINNT. Use it with the Profile tab of the user's Properties dialog box and logon scripts.

  • %UserName%

    The user account name, such as wrstanek. Use it with the Profile tab of the user's Properties dialog box and logon scripts.

  • %HomeDrive%

    The drive letter of the user's home directory followed by a colon character, such as C:. Use it with logon scripts.

  • %HomePath%

    The full path to the user's home directory on the respective home drive, such as \Users\Mkg\Georgej. Use it with logon scripts.

  • %Processor_Architecture%

    The processor architecture of the user's computer, such as x86. Use it with logon scripts.

Figure 10-4 shows how you might use environment variables when creating user accounts. Note that by using the %UserName% variable, you allow the system to determine the full path information on a user-by-user basis. If you use this technique, you can use the same path information for multiple users and all the users will have unique settings.

Figure 10-4. When you use the Profile tab, environment variables can save you typing, especially when you create an account based on another account.

graphics/f10ap04.jpg

Logon Scripts

Logon scripts set commands that should be executed each time a user logs on. You can use logon scripts to set the system time, network drive paths, network printers, and more. Although you can use logon scripts to execute onetime commands, you shouldn't use them to set environment variables. Any environment settings used by scripts aren't maintained for subsequent user processes. Also, you shouldn't use logon scripts to specify applications that should run at startup. You should set start ­up applications by placing the appropriate shortcuts in the user's Startup folder.

Normally, logon scripts contain Microsoft Windows commands. However, logon scripts can be

  • Windows Script Host files with the .vbs, .js, or other valid script extensions

  • Batch files with the .bat extension

  • Command files with the .cmd extension

  • Executable programs with the .exe extension

One user or many users can use a single logon script, and, as the administrator, you control which users use which scripts. As the name implies, logon scripts are accessed when users log on to their accounts. You can specify a logon script by completing the following steps:

  1. Access the user's Properties dialog box in Active Directory Users And Computers, and then choose the Profile tab.

  2. Type the path to the logon script in the Logon Script field. Be sure to set the full path to the logon script, such as \\Zeta\User_Logon\Eng.vbs.

Note

You can specify logon and logoff scripts using other techniques. For complete details, see the section of Chapter 4 entitled "User and Computer Script Management."


Creating logon scripts is easier than you might think, especially when you use the Windows command language. Just about any command you can type into a command prompt can be set to run in a logon script. The most common tasks you'll want logon scripts to handle are to set the default printers and network paths for users. You can set this information with the NET USE command. The following NET USE commands define a network printer and a network drive:

 net use lpt1: \zeta\deskjet 
 net use G: \gamma\corp\files 

If these commands were in the user's logon script, the user would have a network printer on LPT1 and a network drive on G.

Assigning Home Directories

Windows Server 2003 lets you assign a home directory for each user account. Users can store and retrieve their personal files in this directory. Many applications use the home directory as the default for File Open and Save As operations, which helps users find their resources easily. The command prompt also uses the home directory as the initial current directory.

Home directories can be located on a user's local hard disk drive or on a shared network drive. On a local drive, the directory is accessible only from a single workstation. On the other hand, shared network drives can be accessed from any computer on the network, which makes for a more versatile user environment.

Tip

Although users can share home directories, it's not a good idea. You'll usually want to provide each user with a unique home directory.


You don't need to create the user's home directory ahead of time. Active Directory Users And Computers automatically creates the directory for you. If there's a problem creating the directory, Active Directory Users And Computers will instruct you to create it manually.

To specify a local home directory, complete the following steps:

  1. Access the user's Properties dialog box in Active Directory Users And Computers, and then choose the Profile tab.

  2. Click the Local Path option button, and then type the path to the home directory in the associated field. Here's an example: C:\Home\%UserName% .

To specify a network home directory, complete the following steps:

  1. Access the user's Properties dialog box in Active Directory Users And Computers, and then choose the Profile tab.

  2. Select the Connect option in the Home Folder section, and then select a drive letter for the home directory. For consistency, you should use the same drive letter for all users. Also, be sure to select a drive letter that won't conflict with any currently configured physical or mapped drives. To avoid problems, you might want to use Z as the drive letter.

  3. Type the complete path to the home directory using the Universal Naming Convention (UNC) notation, such as: \\Gamma\User_Dirs\%UserName% . You include the server name in the drive path to ensure that the user can access the directory from any computer on the network.

Note

If you don't assign a home directory, Windows Server 2003 uses the default local home directory. On systems where the operating system is installed as an upgrade, this directory typically is \Users\Default. Otherwise, this directory is the root directory.




Microsoft Windows Server 2003 Administrator[ap]s Pocket Consultant
Microsoft Windows Server 2003 Administrator[ap]s Pocket Consultant
ISBN: 735622450
EAN: N/A
Year: 2003
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net