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" /UNLIMITEDTo create a hidden administrative share, append a dollar sign
($) to the share name:
net share PrivateData$=C:\ConfidentialHow Windows 2000 Executes the Request
When a user executes the net share command, Windows 2000
performs the following internal sequence:
- 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.
- API Call (
NetShareAdd): The command-line toolnet.exeinvokes the Win32 network management functionNetShareAdd. - Server Service Processing: The request is routed
via Remote Procedure Call (RPC) to the Server Service
(
LanmanServer, running insideservices.exe). - Registry Storage: The Server Service saves the
share configuration in the Windows Registry under the following key:
Each share is recorded as aHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\SharesREG_MULTI_SZvalue containing the local path, remark, and configuration flags, ensuring the share persists across system reboots. - 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 sharecommand does not feature the/GRANTparameter (which was introduced in Windows Server 2003). Modifying share-level Access Control Lists (ACLs) from the command line requires Resource Kit utilities such asRMTSHARE. - NTFS Permissions: File-level access is governed by
the underlying NTFS permissions. Administrators configure these using
the native
caclscommand 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 shareTo view the properties and configuration of a single share:
net share ReportsTo delete an existing share and terminate network access to the folder:
net share Reports /DELETE