Create Network Shares via Windows 2000 Command Prompt

This guide explains how Microsoft Windows 2000 creates network file shares using the command prompt. It details the exact command syntax, the underlying execution process within the operating system, and the methods used to configure and verify shared resources.

The Core Command: NET SHARE

In Windows 2000, creating a network share from the command prompt relies entirely on the built-in net share utility. This utility interacts directly with the operating system's file-sharing architecture.

Basic Syntax

To create a standard folder share, use the following syntax:

net share <ShareName>=<DriveLetter>:\<FolderPath> [/REMARK:"Description"] [/USERS:number | /UNLIMITED]
  • <ShareName>: The public name visible to other devices across the local network.
  • <DriveLetter>:\<FolderPath>: The absolute local path to the target folder (e.g., C:\Data).
  • /REMARK:"Description": An optional comment describing the folder.
  • /USERS:number: Restricts the maximum number of simultaneous connections.
  • /UNLIMITED: Permits the maximum number of network connections supported by the Windows 2000 edition (Windows 2000 Professional limits inbound connections to 10; Windows 2000 Server supports unlimited connections based on licensing).

Example Execution

To share a directory named Reports located on the C: drive with a custom description:

net share Reports=C:\Reports /REMARK:"Monthly Financial Reports" /UNLIMITED

To create a hidden administrative share, append a dollar sign ($) to the share name:

net share PrivateData$=C:\Confidential

How Windows 2000 Executes the Request

When a user executes the net share command, Windows 2000 performs the following internal sequence:

  1. Privilege Validation: The command interpreter verifies that the executing account belongs to the local Administrators or Power Users group. Standard users are denied permission to create shares.
  2. API Call (NetShareAdd): The command-line tool net.exe invokes the Win32 network management function NetShareAdd.
  3. Server Service Processing: The request is routed via Remote Procedure Call (RPC) to the Server Service (LanmanServer, running inside services.exe).
  4. Registry Storage: The Server Service saves the share configuration in the Windows Registry under the following key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
    Each share is recorded as a REG_MULTI_SZ value containing the local path, remark, and configuration flags, ensuring the share persists across system reboots.
  5. SMB Listener Registration: The Server Service binds the directory to the Server Message Block (SMB/CIFS) protocol handlers. Windows 2000 exposes the share directly over TCP port 445 (direct-hosted SMB) and TCP port 139 (NetBIOS over TCP/IP).

Managing Permissions

By default in Windows 2000, creating a share via net share assigns the Everyone group Full Control at the share-level layer. Security enforcement relies on two layers:

  • Share Permissions: In native Windows 2000, the net share command does not feature the /GRANT parameter (which was introduced in Windows Server 2003). Modifying share-level Access Control Lists (ACLs) from the command line requires Resource Kit utilities such as RMTSHARE.
  • NTFS Permissions: File-level access is governed by the underlying NTFS permissions. Administrators configure these using the native cacls command to restrict user access regardless of the permissive default share settings:
    cacls C:\Reports /G Administrators:F "Authenticated Users":R

Verification and Deletion

To list all active shares on the local machine:

net share

To view the properties and configuration of a single share:

net share Reports

To delete an existing share and terminate network access to the folder:

net share Reports /DELETE