From the book Essential Windows NT System Administration by AEleen Frisch. (ISBN: 1565922743). Copyright Ó1999 by O’Reilly & Associates, Inc. Reprinted by permission from the publisher.

About System Administration

Like all truly satisfying pursuits, system administration requires both breadth and depth of expertise. I’ll invoke a popular metaphor and say that successful system administration involves more than wearing a lot of different hats; you also need to know which one to wear to perform a particular task or solve a particular problem and, equally important, what else you will need to get the job done right. Whatever challenges and frustrations the tremendous variety inherent in system administration may bring, it also keeps the workday interesting.

First-rate system administrators bring three kinds of strengths to their job:

Technical expertise

This includes both a knowledge of the tools and procedures required to keep the system and network operating efficiently and a detailed-enough understanding of how the system’s various components work to address the problems that will arise.

While Windows NT is frequently marketed as an operating system that requires little or no system administration, this is an ideal honored more in the breach than in reality. Well designed system administration tools can go a long way toward making Windows NT systems management easy and painless under normal circumstances—and some of the Windows NT tools come reasonably close to this goal—but realistically, you can expect the unexpected to occur all too frequently.

The bottom line is that someone has to know how things really work: it should be you.

Problem solving skills

System administrators are distinguished from ordinary users, power users, and operators in that they know what to do when things go wrong. While all these classes of users are comfortable using the system under normal circumstances, only system administrators have to know what to do when things are anything but normal. This doesn’t mean you have to know the solution instantly for every problem you encounter. Sometimes you will, but more often what you bring to the situation is a strategy for figuring out what has gone wrong and the tools for fixing it once you have done so.

Ordinary users of Windows NT systems and their associated networks are like ordinary automobile drivers; they know how to start and operate the car, how to add gasoline and when to take it in for periodic preventive maintenance. Power users also know how to change their own oil and spark plugs, when to add water to the radiator, and what to do if the battery dies or a tire goes flat. Operators are like automotive technicians who can carry out a variety of standard procedures—changing the oil and lubricating the engine, checking and replacing the brake pads, and the like—as well as diagnosing and repairing simple problems (e.g., the car won’t start because the alternator has failed and needs to be replaced). System administrators are like master mechanics—the only ones who can perform complex operations and diagnose and repair major problems; they can trace the car’s tendency to die in cold weather to a carburetor that needs to be rebuilt, and they can go on to rebuild it themselves. They are capable of doing so because they understand how the car’s engine works at a deep enough level to track down the specific points of trouble when a problem arises.

If the automotive metaphor doesn’t resonate with you, consider this one. Ordinary users are like cooks who can use a bread machine to make a loaf of fresh bread. Power users can use the machine to make several different varie-ties of bread, and they know how to use the machine to prepare dough for later baking in a normal oven. Operators can also make exotic kinds of bread, including ones requiring significant variations to the standard method of using the machine, and they can adapt recipes to it using the instructions provided with the appliance as a guide. System administrators are like the people who design the procedures for using the bread machine. Because they know what baking bread involves in detail, not only can they create recipes that work well in the bread machine, but they can devise procedures for adapting arbitrary bread recipes for use in the machine, and they can formulate troubleshooting strategies for use when the machine’s final product doesn’t turn out perfectly.

People skills

Successful system administrators are continually aware that computers are used by people and organizations and that managing them cannot be extricated from this social context. System administration often involves a tension between authority and responsibility on the one hand and service and cooperation on the other. The extremes seem easier to maintain than any middle ground; fascistic dictators who rule “their network” with an iron hand, unhindered by the needs of users, find their opposite in the harried system managers who jump from one user request to the next, in continual interrupt mode.

The trick is to find a balance between being accessible to users and their needs, and sometimes even their mere wants, while maintaining your authority and sticking to the policies put into place for the overall system welfare. The goal is to provide an environment where users can get what they need to do done, in as easy and efficient a manner as possible, given the constraints of security, other users’ needs, the inherent capabilities of the system, and the realities and constraints of the human community in which all of them are located.

To put it more concretely, the key to successful, productive system administration is knowing when to address a shortage of disk space on a file server with a command that deletes the 500+ MB of scratch files created in several random directories by one of the system’s users and when to walk over to her desk and talk with her face-to-face. The first approach displays technical finesse as well as administrative brute force, and both are certainly appropriate—even vital—at times. At other times, a simpler, less aggressive approach will work better to resolve your system’s disk shortage problems as well as the user’s confusion. It’s also important to remember that there are some problems no Windows NT command can address.

This book provides the information you need in all three of these areas. Even if you’re not a full-time system administrator, you’ll find that developing these three areas will also serve you well in whatever your primary area of endeavor may be.

The System Administrator’s Job

Sometimes it seems that there are as many system administrator job descriptions as there are people doing the job. Although things aren’t really quite that random, I find it most helpful to describe system administration in terms of broad, general areas of responsibility:

Exactly what each of these areas entails is something that varies a great deal among computer installations, as does the relative amount of emphasis placed on the various areas of responsibility, and of course both change over time. This book covers each of them in detail in an effort to prepare you for whatever you may face, now and in the future.

About Windows NT

O brave new world that has such people in it!
‘Tis new to thee.

Miranda and Prospero The Tempest V.i.183-84

Windows NT is a 32-bit, microkernel-based, preemptive multitasking operating system providing privileged and unprivileged execution modes and compatibility with some legacy programs designed for DOS/Windows 3.1 systems and, to a lesser extent, OS/2 systems and POSIX-compliant systems.

What does this all mean and why should you care? Let’s look at each bit of the preceding description individually:

The opposite of preemptive multitasking is a scheduling method known as cooperative multitasking (the scheme used by both Windows and MacOS). This scheme gives a running process complete control of the system until it voluntarily gives up control. It is designed for an environment like that of a traditional PC with a single user, where switching between tasks occurs as the user desires. Such an approach seldom works well when a computer system is required to perform multiple tasks simultaneously.

All other processes needing to access any portion of protected memory may do so only via services provided by the operating system; they can never access protected memory directly. The operating system also has the ability to grant or refuse access as appropriate for system integrity, which means that it is very difficult for an application program to corrupt system memory and thereby cause a system failure.

Some mechanism for restricting application access to system memory (and the memory used by other processes) is a key component of all modern operating systems. Users familiar with traditional personal computer environments such as DOS, Windows 3.1, Windows 95, and Macintosh System 7 and System 8 will realize at once that protected memory is a significant enhancement to the way things work on those systems.

While these Windows NT features are important and beneficial, they are not as new and groundbreaking as its marketing tends to imply. In reality, they are essential parts of any viable, high performance operating system designed to address current computing requirements.

The NT acronym is officially translated as “New Technology,”[4] but what is really new about Windows NT is its bringing of real operating system functionality combined with a familiar look-and-feel (user interface) into the traditional personal computer world. It is also helpful to remember that Windows NT is a very young operating system, still developing and evolving, so we shouldn’t be surprised when it experiences a few growing pains (and inflicts a few others on its users).

[4] There are other legends about the origin of the name “Windows NT.” My favorite takes note of the fact that Microsoft CEO Bill Gates hired David N. Cutler away from Digital Equipment Corp. in 1988 to design a new operating system. Cutler had managed the development of the RSX-11 and VAX/VMS operating systems for Digital. If you increment each of the letters in the string “VMS,” you get “WNT.” Compare this to the apocryphal legend of the origin of the computer’s name in the film 2001: A Space Odyssey : HAL can be formed by decrementing each of the letters in the string “IBM.” Windows NT does have many design features in common with VMS, including multiple execution modes, similarity in some filesystem data structures, access control lists, the user rights (privileges) facility, and compatibility subsystems for running applications from the company’s previous operating system.

The Windows NT Architecture

Figure 1-1 illustrates the structure of the Windows NT operating system. It is separated into two sections: the upper section containing components that run in user mode and the lower section containing those that run in kernel mode. The heart of the Windows NT operating system consists of the modules running in kernel mode. Although you’ll see it referred to by several names, including the “Executive Services” and the “NT Executive,” in more common usage, it is simply the operating system kernel.

Figure 1-1   Idealized Windows NT operating system architecture

Most interactions with the computer hardware take place via the Hardware Abstraction Layer (HAL), although some device drivers also directly access the hardware. Isolating hardware access into a separate module allows most of the Windows NT operating system to remain independent of any particular computer architecture, thereby simplifying its ability to support multiple computer platforms and multiprocessor systems (at least in theory).

The core of the Windows NT kernel is the microkernel, which oversees the workings of all of the other modules, and handles communications between them and the HAL. The other components of the kernel each have a single specific area of responsibility:

All of these components provide system services: system-level operations and functions available to ordinary (user mode) processes to carry out common tasks.

The components in the upper part of Figure 1-1 all execute in user mode; they can access system resources and memory only via the limited set of unprivileged interfaces provided as system services. Some operating system components run in user mode.

The Win32 Subsystem provides processes with the standard application programming interface (API): a set of standard library subroutines used to perform operations, access resources, and otherwise request system services. All application programs (depicted as ovals in the diagram) eventually interact with this operating system component. 32-bit native Windows NT programs, such as Word 7 and the various Windows NT commands, communicate directly with the Win32 Subsystem.

Compatibility with programs designed for other environments comes via a series of secondary API subsystems. For example, supported POSIX commands communicate with the POSIX subsystem, which in turn interfaces to the Win32 subsystem; supported OS/2 commands are similarly handled by the OS/2 Subsystem.[5]

[5] At least, this is the official position taken by the Microsoft documentation. In some cases, such subsystems make calls to the kernel directly.

DOS and Windows 16-bit applications are handled by a series of nested subsystems (culminating as always with the Win32 Subsystem). The NT Virtual DOS Machine (NTVDM) provides a DOS-compatible environment for DOS programs. 16-bit Windows applications, such as the Write word processing utility provided with Windows 3.1, communicate first with a subsystem designed to handle such applications’ 16-bit system calls; these calls are converted to the 32-bit calls used by Windows NT in a subsystem called Windows on Win32 (WOW). These applications also require a NTVDM environment because they also depend on DOS services.

The Windows NT login procedure uses a separate security subsystem in an analogous manner in order to authenticate users at login time.

Implications of the Windows NT design

The “client-server” design philosophy pervades the entire Windows NT environment, from the operating system itself to the simplest tool that it provides; you will need to be aware of it as you learn about administering Windows NT systems. These are its most important implications:

Windows NT Variations

Windows NT is packaged and sold in two main formats: a server version and a workstation version.[6] The two products are designed for systems with different functions within a network. Workstations are designed to be used primarily by a single user, although they can optionally share their resources with other systems. Servers are designed to provide resources and services to a collection of systems (workstations and possibly other servers) linked together by a local area network; they can provide computing resources and facilities (e.g., database services), disk space, access to printers, networking-related services (e.g., hostname resolution), and the like.

[6] At press time, Microsoft has recently introduced the Enterprise Edition of Windows NT Server which includes built-in clustering support and facilities for running distributed applications.

Windows NT groups computers into collections known as domains, each overseen by a special server system—the primary domain controller (PDC)--possibly assisted by one or more backup domain controllers (also servers).[7] These servers are responsible for user authentication and other related activities. We consider Windows NT domains and domain controllers in more detail in Chapter 3 and Chapter 8.

The same kernel is used for both versions of the Windows NT product; it is configured somewhat differently for the two environments. The most important differences are the following:

[7] Windows NT systems may also be part of workgroups, but domains are the native Windows NT facility for organizing groups of computers.

For more detailed information about the differences between the Windows NT server and workstation products, consult the works on this topic listed in Appendix B.

Service packs and hot fixes

Major releases of Windows NT products are distributed on CD-ROM. Minor releases between major versions are called service packs. They are updates that must be applied to the basic operating system. Within a major release, service packs are numbered sequentially. Successive service packs are cumulative and include all of the changes from the earlier ones for the same major release.

Warning   You probably don’t want to be the first on your block to install a new service pack as soon as it becomes available. I prefer to wait a bit and monitor the Windows NT-related newsgroups in order to allow any problems with it to be identified and solved (in other words, I let other people troubleshoot it for me). Even when you do decide to install a service pack, it is prudent to do so on a test system first, rather than on a critical production system (people who venture beyond the rim of known space should not be surprised if they encounter shadows).

Service packs may be downloaded [8] from the Microsoft FTP site from the directory ftp://ftp.microsoft.com/bussys/winnt/winnt-public/fixes/country/nt40 ; country is the appropriate subdirectory corresponding to the various language-specific versions of the product (use usa as the country for the United States). The actual files to download are located in a subdirectory of nt40, whose name varies but is generally intuitive. For example, the files for Service Pack 3 for the U.S. version are located in the subdirectory ussp3, which in turn contains the subdirectories alpha and i386 that hold the actual service pack files for the corresponding architecture. Thus, the required file for the Intel platform for Service Pack 3 is .../fixes/usa/nt40/ussp3/i386/nt4sp3_i.exe.

[8] Service packs may also be ordered on CD-ROM from Microsoft. The North American version of the latest service pack can be ordered by telephoning (800) 370-8758, faxing (716) 873-0906, or writing to Microsoft NT Service Pack 3, P.O. Box 1095, Buffalo, NY 14240-1095.

Once the download operation has completed, run the executable, from either the command line or the Start menu, or by double-clicking on its icon. This unpacks it to a new subdirectory of C:\Temp (assuming that C: is the system disk) and automatically starts the program Update. Run the executable from the command line with the /X option to unpack it without installing it; you can then run Update manually when desired. Once the service pack is installed, the system must be rebooted.

It’s prudent to allow the installation process to create an uninstall directory; that way, you can back out the service pack’s changes to the system if problems appear.

Note   Service packs must be reapplied if you add new hardware to the system, install new software (such as a new service or network protocol), or restore a backup created before updating the system.

You can determine the current operating system version via the Version tab in the Windows NT Diagnostics administrative tool (it can be accessed from the Start menu via the path Programs->Administrative Tools (Common)->Windows NT Diagnostics). It is illustrated in Figure 1-2.

Figure 1-2   Windows NT version information

Microsoft also supplies hot fixes to correct specific problems that are corrected between service packs; hot fixes are usually minor patches to the operating system. In general, you should only install hot fixes that address problems your system is actually experiencing; this caution is necessary because full regression testing is not always completed before a hot fix is released.

Hot fixes may also be downloaded from the Microsoft FTP site. For example, hot fixes to Service Pack 3 are located in subdirectories ftp.microsoft.com/bussys/winnt/winnt-public/fixes/country/nt40/hotfixes-postSP3. The ReadMe.Txt file located in each directory explains the purpose of the hot fix and the procedure for obtaining and installing it. Most hot fixes are delivered as self-installing executables, which you can activate by double-clicking on their icon (or running them from the command line). They may also be unpacked without installing by invoking them with the /x option. You can then run the HotFix utility included in the archive to install them at a later time.

Older versions of the HotFix utility may also be invoked with its /Full option (abbreviate to /F), to list the hot fixes that have been installed on a Windows NT system. It also lists the hot fixes installed on a remote system if you include a system name in the command, as in this example that produces a detailed listing of the hot fixes installed on the server vala:

C:\> hotfix \\vala /F

Use the /? option to HotFix to determine if it supports this option.

Administrative Tools

Windows NT provides four classes of administrative tools:

Control panel applets

These utilities are accessed via the Start->Settings->Control Panel menu path or from the Control Panel folder under My Computer (some may also be reached in other ways). They are generally designed to display and modify system configuration settings. These programs typically use tabs to divide the settings they control into several groups.

Administrative wizards

On server systems, these programs provide automated, step-by-step procedures for performing common administrative tasks such as adding new users and setting permissions on files and directories. They are accessed via the Start->Programs->Administrative Tools (Common)->Administrative Wizards menu path or the wizmgr command.

Graphical administrative tools

These tools are found on the Start->Programs->Administrative Tools (Common) menu. Each is designed to manage a specific system or domain component or subsystem.

Command-line tools

Some of the functionality found in the preceding classes is duplicated in Windows NT commands. These commands may be entered directly into the Start->Run... dialog box or via a command window (you can open one by specifying cmd to Start->Run...).

The following subsections introduce the various tools available for administering Windows NT. These tools will be discussed in more detail as they come up in the subsequent chapters of this book (where we will also consider other additional useful programs and utilities beyond those provided with standard Windows NT).

Most tools must be run from an account with Administrator privileges. We discuss the Administrator account in detail in Chapter 3.

Control Panel Applets

Control panel applets allow you to view and modify the configuration of the local system. These are the most important control panel applets from a system administration perspective:

Date/Time     View or set the system date, time, and time zone.

Licensing     Manage licenses on the local system. On a server, it also allows you to change the Windows NT licensing mode (from per-server to per-seat).

Network    Add, configure, and remove network adapters, protocols, services, and computer identification and the relationships among them.

Ports    View and modify the settings for serial ports and add new ports.

Printers     A shortcut to the Printers folder, from which you can add, remove, and manage printers and print queues, manipulate print jobs, and configure the printing subsystem.

Regional Settings    Specify how dates, times, numbers, and currency are displayed and sorted.

SCSI Adapters    Add and remove SCSI adapters and display the properties of SCSI devices.

Server    Monitor the system’s client usage and shared resources.

Services    Configure and manipulate server processes (including their automatic startup at boot-time).

System    Display various system characteristics and settings and specify some startup, shutdown, user environment, and performance-related system parameters.

Tape Devices    Manage the system’s tape drives.

UPS    Manage system interaction with an uninterruptible power supply.

In addition, while the Accessibility Options, Display, Keyboard, Mouse, Multimedia, and Sounds applets are primarily useful for configuring and customizing the associated subsystems for your personal use, they occasionally have administrative uses as well.

Administrative Wizards

The administrative wizards are included on Windows NT server systems. These automated procedures for common administrative tasks can generally be used on either the local computer or on a remote computer (one of the first questions you are asked is the system or domain context under which you want to perform the action). They proceed as a series of dialog boxes requesting the information required to complete the desired action.

There are eight administrative wizards, whose names are generally self-explanatory: Add User Accounts, Group Management, Managing File and Folder Access, Add Printer, Add/Remove Programs, Install New Modem, Network Client Administration (allows you to set up the system as a server for subsequent network installations of Windows NT), and License Compliance (checks a domain for unlicensed products).

Standard Graphical Administrative Utilities

Table 1-1 summarizes the GUI-based system administration tools provided by Windows NT. Each entry lists the name of the utility (which appears on the Start->Programs->Administrative Tools (Common) menu in most cases), the command executable name (by which it may be accessed from the Run menu), and a brief description of its purpose. The “type” column in the table indicates whether each tool is provided by default on server systems (code letter S) and workstation systems (code letter W); the code letters CT indicate a server program that may be installed on a Windows NT workstation as part of a collection of client tools (discussed in a moment).

Table 1-1   Windows NT Administrative Tools

 

Tool

 

Backup

DHCP Manager

Disk Administrator

DNS Manager

Event Viewer

License Manager

Network Client Administrator

Network Monitor

Performance Monitor

Registry Editor

Remote Access Administrator

Remote Boot Manager

Server Manager

System Policy Editorsystem access.

Task Manager

User Manager

User Manager for Domains

Windows NT Diagnostics

WINS Manager

Command

 

ntbackup

dhcpadmn

windisk

dnsadmin

eventvwr

llsmgr       

ncadmin

netmon

perfmon

regedt32

rasadmin

rplmgr

srvmgr

poledit


taskmgr

musrmgr

usrmgr

winmsd

winsadmn

Purpose

 

Backup and restore files.

Control the TCP/IP Dynamic Host Configuration Protocol service.

Manage disks and disk partitions.

Control the TCP/IP Domain Name Service.

Monitor hardware, security, and application-related system status messages and errors.
Manage software licensing for one or more domains.

Prepare system to provide network-based installation services and administration tools.
Monitor and record network activity.

Monitor, analyze, and record system usage data relevant to performance optimization.
View and modify settings in the system registry.

Manage Remote Access Services (dial-up networking).

Configure remote booting services.

Manage shared resources and services; promote/demote domain controllers.

Create and modify system policies, specifying allowed user actions.


View and manipulate processes.

Create and modify local (system-specific) user accounts.

Create and modify domain user accounts.

View system characteristics and current settings.

Manage the Windows Internet Naming Service facility.

Most of these tools can be used to configure either the local system or a specific remote system (the latter is usually specified via an option named Select Computer or Select Server or something similar on the application’s left-most menu). The Windows NT Server distribution CD contains versions of many of the server tools that may be installed on Windows NT Workstation and Windows 95 systems to enable you to perform system administration tasks on servers remotely.

These programs are installed on a workstation system by executing the Setup.Bat command in the \Clients\Srvtools\WinNT directory on the Windows NT Server distribution CD at the target workstation. The tools will be copied into the C:\WinNT\System32 directory on the workstation. If you want the items to appear in the Administrative Tools (Common) menu, create shortcuts for each of the executables in the C:\WinNT\System32\Profiles\All Users\Start Menu\Pro-grams\Administrative Tools (Common) directory (the quickest way is to drag their icons from the System32 subdirectory to the destination directory; you can rename the shortcuts to their canonical names if you want).

On Windows 95 systems, the procedure is only slightly more involved:

This procedure installs the administrative tools into the \Srvtools directory on the disk containing the Windows 95 directory.

Other Sources of Administrative Tools

There are three other important sources of administrative tools for Windows NT:

The contents of the Resource Kits and the locations of major software repositories are both given in Appendix B.

Introducing the Windows NT Registry

The Windows NT registry is a central database of configuration settings.[9] It serves to replace the scores of initialization (.Ini ) files found on Windows systems. Although Windows 95 contains a similar facility, the Windows NT registry uses a different format and is much more complex.

[9] Readers familiar with AIX will note that the registry performs a function analogous to AIX’s Object Data Manager database.

The registry is stored in a series of binary files usually located in the directory C:\WinNT\System32\Config. Logically, the registry is a collection of named keys and their values. Registry keys form the structure of the registry, and are organized hierarchically; locations within the registry are referred to using a syntax analogous to subdirectory pathnames. Values are terminal nodes in the registry tree containing actual system settings (known as data). Put most simply, keys are like directories and values are like files, with data corresponding to file contents.[10] A subtree of keys and values stored together in a single file is known as a hive.

[10] Well, this is almost true. Occasionally, keys have values named “<No Name>” (which have data types and data as usual). In these cases, the value is referred to simply by the key name.

The registry is composed of series of five tree-structured groups of keys, each headed by a root key: [11]

[11] Hives need not correspond to root keys. A subtree headed by a root key may be stored as one or more hives. This list also ignores the HKEY_DYN_DATA pseudokey (accessible by programs).

You will typically access keys only within the HKEY_USERS and HKEY_LOCAL_MACHINE trees.

Registry key values have one of 11 data types. Here are those you’re likely to encounter:

The other defined data types are:

Using the Registry Editor

Ideally, you shouldn’t have to worry about the system registry or modify the values of any of its settings. However, as of the current version of Windows NT, this ideal is far from achievable; there are many system features that are accessible in no other way. While it is a bad idea to make random, experimental, or gratuitous changes to the registry, from time to time you will need to modify registry entries for a variety of reasons: to change the way the system functions, to correct a problem, to add or modify keys or values to enable additional system features.

Windows NT provides a utility known as the Registry Editor for accessing and modifying the registry: regedt32.[12] By default, neither an icon for this tool nor an entry in the Administrative Tools (Common) menu is present, but you can always create them. The Registry Editor is a powerful tool that requires care when used. Microsoft’s standard message about it (see the following Warning) is worth paying attention to.

[12] The Windows 95 utility, RegEdit, is also included. It has a more powerful searching facility than the Windows NT utility.

Note   “Using Registry Editor incorrectly can cause serious, systemwide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.” [Microsoft Corp.]

Prudent use of the Registry Editor involves several activities:

Figure 1-3 illustrates the process for changing an existing registry value: you select the window for the desired root key in the Registry Editor and then navigate to the desired key by selecting successive items in the left side of the browsing window. The values and associated data stored at the current location appear in the right side of the window; values and data are separated by colons.[13]

[13] If your window is missing one of these sections, select View->Tree and Data.

Figure 1-3   Using the Windows NT Registry Editor

To modify a value, double-click on its entry in the right side of the browsing window. A dialog box appears containing the current setting, which you can modify as necessary (note that the value’s data type is indicated in the dialog box’s titlebar). For example, the illustration changes the HKEY_USERS\ DEFAULT\Desktop\ScreenSaveTimeOut value from 60 to 10 (seconds in this case). Once you click OK to close the dialog box, the change is made immediately. Use the Cancel button to abandon any changes.

The Registry Editor may also be used to add new keys and values to the registry via these two options on its Edit menu:

Edit->Add Key

Adds to the structure of the registry only, by creating a new subkey of the current key. The Registry Editor prompts you for the name of the new key.

Edit->Add Value

Adds a value (a terminal leaf) to the current key in the registry. The Registry Editor prompts you for the value name, its data type, and the desired data setting.

Registry keys have owners and access permissions just like files and directories do. We’ll consider them in Chapter 10.

The Registry Editor is an easy way to change the value of a particular registry setting (or to add a new one). Sometimes, though, you will want to find a registry component whose name you don’t know. The Resource Kit provides the scanreg utility for searching registry key names, value names, and value data for strings; it is a command line utility with the following syntax:

scanreg -s string  scope-options  [other-options]

One or more options specifying the items to be searched must be included: -k says to scan key names, -v searches value names, and -d scans the data. For example, the following command searches all key and value names for the string “cd”:

C:\ > scanreg -s cd -kv
Key   : “\Software\Microsoft\Multimedia\Audio\WaveFormats”
Value : “CD Quality”

End of search: 1 matching string(s) found.

The Resource Kit includes a help file that documents registry keys and values. The file is named RegEntry.Hlp, and it may be searched using the normal Help facility methods.

Tips and Tricks for the Windows NT User Interface

We’ll end our discussion of system administration tools with a brief consideration of some power tips for the Windows NT user interface, the sorts of things that take a while to figure out or stumble across on your own.

Know your desktop

In general, WIN-x selects the desktop items whose names begin with the specified letter, when that key combination is not already defined. Once an item is selected, pressing ENTER opens it, and ALT-ENTER opens its Properties.

Browsing

 

Working with files and directories

 

Using and customizing the command window

The Windows NT Filesystem

Windows NT uses a substantially more compact filesystem[15] tree for its system files than many other operating systems. It includes the following directories at the top level of the system disk (usually C:):

[15] Here, we use the term filesystem to refer to the aggregate of all of the disk partitions—the entities that get assigned drive letters—and the entire directory trees that they hold, in other words, everything under C:\, D:\, and so on for every partition on the system. This same term is also used to refer to a formatted disk partition, as in “the Disk Administrator is used to create a filesystem on the new partition” or “The NTFS filesystem type has many advantages over the FAT filesystem.” Which use of the term “filesystem” is meant will always be clear from the context.

\Program Files    Subdirectories hold some Windows NT executables. Application programs often install files under this directory by default.

\Temp    Scratch directory used for temporary files.

\WinNT    Top-level directory for the Windows NT system files. The built-in environment variable %SystemRoot% points to the drive and directory at the top of the Windows NT file tree; its usual value is thus C:\WinNT.[16]

[16] I haven’t worried about this distinction in previous sections. However, we will use the canonical terminology from this point on.

These are the most important subdirectories of %SystemRoot%:

Profiles    User profiles subdirectories (user profiles specify the user’s Windows NT environment).

System32    Windows NT command executables, dynamic link library files (DLLs), and some configuration files.

System32 \Config    Registry files, event logs, and user accounts database.

System32 \Drivers    Device drivers.

System32 \Spool    Print spooling subsystem files.

System32 \Repl    Directory replication service (a facility for automatically synchronizing the filesystems of several computer systems) top-level directory.

Fonts    TrueType and other font files.

Repair    Files required for creating an emergency repair disk.

Help    Windows NT help files.

System    Windows 95 files are located here (and in %SystemRoot% itself) if it is also installed on the computer. This directory is also used by some legacy 16-bit applications.

Windows NT Network File Naming Conventions

Windows NT uses a notation for specifying the location of network files and directories known as the uniform naming convention (UNC).[17] Within a Windows NT domain, the full pathname for a file may be given as:

[17] Sometimes referred to as the universal naming convention.

\\host\share_name\[directory\...\directory]\file.ext

Host is the name of the system where the file resides, and share_name is the name by which a specific directory location on that host is made available as a network resource. These two items are followed by a path to the file from that point. You will see this notation, and subsets of it, throughout the rest of this book.

Never Forget That It’s a PC

When I started as a system administrator, no one I knew ever dared to open up one of the computers and start messing with things inside (although many of us would have liked to). New peripheral devices were attached to the outside of the computer, and all hardware maintenance was handled by the computer vendor’s field service technicians.

Managing Windows NT systems is nothing like this.[18] Working with the computer hardware is a large part of the job, and getting familiar with the inside of the chassis is an essential part of becoming a proficient system administrator. People coming from other PC-based environments will be aware of this already. However, some UNIX system administrators and people coming from environments dominated by mainframes will have a bit of adjusting to do.

[18] Except perhaps on high-end Alpha servers.

While many Windows NT system administrators are capable of building computers from their basic components (motherboard, disk drives, power supply, and so on), it is not necessary to go this far if you don’t want to. In practical terms, what you need to be able to do is to add new components—most often, new devices and their required controllers—to the system unit of a Windows NT computer and reconfigure existing components as required for compatibility with the new items. We’ll discuss the specifics of adding various peripherals and their controllers at many points later in the book. For now, we will consider the hardware characteristics of generic PC devices of which you need to be aware.

Devices use several parameters for communicating with the computer’s CPU:

Interrupt request numbers (IRQs)    A series of standard signals used by devices to request attention from the CPU. In general, only one device should be assigned to each IRQ.

I/O port addresses    Sections of system memory used by devices. I/O address ranges must be uniquely assigned and must not overlap.

DMA channels    Allow devices to communicate directly with memory without using the CPU. Each DMA channel should be assigned to one device. Some devices consume two or more DMA channels (e.g., sound cards).

System memory addresses    These correspond to sections of system memory above the canonical DOS 640-KB limit and are used occasionally by devices requiring more system memory. System memory address ranges must be uniquely assigned and must not overlap.

Windows NT has no “Plug-n-Play” capability at present, so most devices must be configured manually. IRQ conflicts are the most common problem you will encounter, followed by I/O address conflicts. Table 1-2 lists common IRQ assignments.

Table 1-2   Common IRQ Assignments

 

IRQ  Common Use

 

0        System timer

1        Keyboard

2        Cascade: switch over to 2nd IRQ controller

3        COM2, COM4 (2nd and 4th serial ports)

4        COM1, COM3 (1st and 3rd serial ports)

5        LPT2 (2nd parallel port)

6        Floppy disk controller

7        LPT1 (1st parallel port)

8        Real-time clock

9        Redirected IRQ2

12      PS/2 mouse port

13      Math coprocessor error signal

14      IDE hard disk controller

Thus, IRQs 10, 11, and 15 are generally available for you to assign to new devices. It is also possible to reassign the IRQs for serial and parallel ports the system is not using, provided that you disable the port in the system’s (power-on) hardware setup program first. If your system contains only SCSI disks (including the CD-ROM drive), then IRQ 14 is also available.

Network cards often use IRQ 10 or IRQ 3. SCSI adapters often use IRQ 11.

Note   It’s a good idea to keep records of the hardware settings for important computer systems.

The Windows NT Diagnostics (winmsd) administrative tool’s Resources panel can be used to determine most settings in use on the current system. Use the buttons at the bottom of the panel to select the setting type to examine. Figure 1-4 shows a typical IRQ listing. Not all standard system IRQs are included in the listing, but the display is still useful for determining the assignments of devices that have been added to the system. This system has a network card using IRQ 3 and a SCSI controller using IRQ 10.

Figure 1-4   System IRQ setting display in the Windows NT diagnostics tool

On Intel systems, I often find it helpful to test and configure new devices by booting the computer with a DOS diskette prior to attempting to install them under Windows NT. The diagnostic and configuration programs provided with many devices by their manufacturers generally run only in the DOS environment. I’ve also learned the hard way to make sure that a new device actually works before telling Windows NT about it. You can probably guess how: I spent what seemed like hours trying to debug the Windows NT settings for a device that turned out to be just plain broken; nonfunctioning new devices are many times more common in the PC world than they are for larger computer systems.

Other tabs in the diagnostics utility display additional useful information about the system. For example, the System tab lists the processor type and BIOS revision dates, the Memory tab displays the amount of physical memory on the system and statistics about current memory usage, and the Drives tab lists system and network disk resources.

Use the utility’s Print button to print out some or all of this system configuration information or to save it to a text file (you will be prompted for the desired destination).

Windows NT also provides a hardware detection facility known as NTHQ (for NT Hardware Query). NTHQ is included on the Windows NT distribution CD in the directory \Support\HQTool. In order to use this facility, complete the following steps:

Once NTHQ comes up, you can use it to determine the settings of all hardware devices on the system, to determine any parameter conflicts and to perform some limited functionality testing.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided “as -is”, without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation.  Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.  All prices for products mentioned in this document are subject to change without notice.