Net (command)
| Company type | Software utility |
|---|---|
| Industry | Computer software |
| Products | Network administration command-line tool |
In the realm of computing, the net command serves as a tool for managing and configuring network resources through the command line interface on IBM OS/2 (including eComStation and ArcaOS), Microsoft Windows, and ReactOS platforms. Additionally, it forms part of the IBM PC Network Program designed for DOS environments.
Overview
Distributed as net.exe, this utility administers network components via a variety of sub-commands, which differ depending on the operating system version. Within batch scripts, the switches /Y or /N facilitate automatic handling of prompt responses.
On Windows CE editions (.NET 4.2, 5.0, Embedded CE 6.0), the functionality of net.exe is limited exclusively to the use and view sub-commands.
| Name | Description | DOS support | OS/2 support | Windows support | ReactOS support | Remarks |
|---|---|---|---|---|---|---|
| access | Controls access permissions | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| accounts | Manages Netlogon roles, user logon periods, and password policies | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows NT through Windows 10) | Yes (ReactOS 0.4.8) | |
| admin | Executes administrative commands on remote servers | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| alias | Handles domain alias configurations | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| app | Manages application definitions | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| appparm | Oversees application parameter settings | No | Yes (OS/2 Warp 4.5) | No | No | Applicable from OS/2 Warp 4.5 onwards |
| audit | Administers network audit logs | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| comm | Displays queues for shared serial devices | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| computer | Adds or removes computers in domain databases | No | No | Yes (Windows Server editions, NT through Windows 10) | Yes (ReactOS 0.4.8) | |
| config | Shows NetBIOS configuration details | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows 95 to Windows 10) | Yes (ReactOS 0.4.8) | |
| continue | Resumes paused services | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows NT through Windows 10) | Yes (ReactOS 0.4.8) | |
| copy | Copies and appends files locally or remotely | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| dasd | Manages and displays directory limits | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| device | Lists status of shared serial devices and halts usage | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| diag | Executes Microsoft Network Diagnostic utility | No | No | Yes (Windows 95, 98) | No | |
| error | Displays and clears network error logs | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| file | Lists files opened by remote clients | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows NT through Windows 10) | No (Not implemented in ReactOS) | |
| forward | Manages routing or cancellation of forwarding messages | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| group | Administers global groups within domains | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows Server editions through Windows 10) | Yes (ReactOS 0.4.8) | |
| help | Provides syntax guidance information | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows 95 to Windows 10) | Yes (ReactOS 0.4.8) | |
| helpmsg | Shows details about error messages | No | No | Yes (Windows NT through Windows 10) | Yes (ReactOS 0.4.8) | |
| init | Initializes network configurations | No | No | Yes (Windows 95, 98) | No | |
| localgroup | Manages local user groups | No | No | Yes (Windows Server editions through Windows 10) | Yes (ReactOS 0.4.8) | |
| log | Starts or stops message logging and displays forwarding data | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| logoff/logon | Commands for managing user sessions | No | No | Yes (Windows 95,98) | No | |
| move | Moves files both locally and remotely | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | No | No | |
| name | Manages NetBIOS names on the network | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows NT to XP) | No (Not implemented in ReactOS) | |
| password | Changes passwords on servers or domains | No | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows 95,98) | No | |
| pause | Temporarily halts services running on the network | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Yes (Windows NT through Windows 10) | Yes (ReactOS 0.4.8) | |
| Controls printer queues and job management | Yes (IBM PC Network Program) | Yes (IBM OS/2 LAN Server, OS/2 Warp 4.5) | Supported across multiple Windows versions; deprecated starting with Windows7 and Server2008 R2; Not implemented in ReactOS | |||
| riplmach/riplmclas | Commands to manage remote boot machines | Yes(OS/2 Warp4.5 only) | No | |||
| run | Executes commands on remote systems | Yes(IBM_OS_2_LAN_Server) and(OS_2_Warp_4_5) | No | |||
| send | Sends messages to users or computers | Yes(PC_Network_Program), Yes(OS_2_LAN_Server), Yes(Windows_NT_to_XP) | Unimplemented_in_ReactOS |
Example
The net use utility performs multiple roles within network operations.
Mapping network drives and printers
The net use command facilitates the mounting of shared drives—referred to as "mapping" in Microsoft terminology—and the connection of shared printers. It operates using the SMB and NetBIOS protocols over ports 139 or 445. By default, Windows XP supports this feature, enabling users to establish or terminate connections with shared devices such as computers, printers, and drives.
Additionally, this command provides details about active network connections to shared resources.
Anonymous (null session) connections
Using net use, it is possible to connect to the IPC$ (interprocess communication share) via a null session connection, which allows access without authentication. The standard syntax for establishing an anonymous connection is:
<syntaxhighlight lang=DOSbatch>
net use \\IP address\IPC$ "" /u:""
</syntaxhighlight>
For instance:
<syntaxhighlight lang=DOSbatch>
net use \\192.168.1.101\IPC$ "" /u:""
</syntaxhighlight>
This command attempts an unauthenticated connection to the IPC$ share on the device at 192.168.1.101 using a blank password. When successful, it can reveal sensitive information such as available shares, user accounts, groups, and registry keys—information that could be exploited by unauthorized parties. Restrictions on this behavior were introduced beginning with Windows NT 4.0 Service Pack 6 and can be configured in Windows 2000.
Comparable commands in other operating systems
- Novell NetWare
- map for assigning volumes (network drives) to drive letters
- capture for redirecting print queues to LPT ports
See also
Further reading
- David Moskowitz, David Kerr (1993). OS/2 2.1 Unleashed. Sams Publishing.
- William R. Stanek (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press.
- John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons.