Net (command)
In computing,
net
is a command in IBM OS/2, Microsoft Windows, ReactOS and eComStation used to manage and configure the operating system from the command-line. It is also part of the IBM PC Network Program for DOS.Overview
The command is primarily used to manage network resources. It is an external command implemented asnet.exe
. When used in a batch file, the /Y
or /N
switches can be used to unconditionally answer Yes or No to questions returned by the command. The net
command has several sub-commands that can differ from one implementation or operating system version to another.On Windows CE.NET 4.2, Windows CE 5.0 and Windows Embedded CE 6.0, it is available as an external command stored in. This version only supports the use and view sub-commands.
Name | Description | DOS support | OS/2 support | Windows support | ReactOS support | Remarks |
access | Manage access | |||||
accounts | Change Netlogon service role and manage maximum user logon time, password expiration time and other account settings | |||||
admin | Run administrative command on a remote server | |||||
alias | Manage aliases currently defined in the domain | |||||
app | Manage information about application definitions | |||||
appparm | OS/2 Warp 4.5 and eComStation only | |||||
audit | List and clear contents of the network audit log of the server | |||||
comm | List information about queues for shared serial devices | |||||
computer | Add or delete computer from domain database | |||||
config | Display NetBIOS configuration information | |||||
continue | Continue paused services | |||||
copy | Copy and append files locally and remotely | |||||
dasd | Manage and display directory limits | |||||
device | List statuses of shared serial devices and stop current use of a device | |||||
diag | Run the Microsoft Network Diagnostic program | |||||
error | List and clear network error log | |||||
file | List files opened by remote computers | |||||
forward | Route incoming messages and cancel forwarding | |||||
group | Add, display, or modify global groups in domains | |||||
help | Display syntax | |||||
helpmsg | Display information on error messages | |||||
init | ||||||
localgroup | Add, display, or modify local groups | |||||
log | Start/stop saving messages to a file/printer and display information about forwarding the current message log | |||||
logoff | ||||||
logon | ||||||
move | Move files locally and remotely | |||||
name | List or manage NetBIOS names | |||||
password | Change passwords on a server or in a domain | |||||
pause | Pause services | |||||
Display printer queue information or print job information, or control print jobs | Deprecated in Windows 7 and Windows Server 2008 R2 | |||||
riplmach | OS/2 Warp 4.5 and eComStation only | |||||
riplmclas | OS/2 Warp 4.5 and eComStation only | |||||
run | ||||||
send | Send messages to other users or computers | |||||
separator | Control whether or not a separator page is printed at the beginning of a print file | |||||
session | Manage server computer connections | |||||
share | Manage shared resources | |||||
start | Start services | |||||
statistics | Display and clear list of usage statistics for a workstation | |||||
status | List information about current network shares and server definition settings | |||||
stop | Stop services | |||||
time | Display remote computer's current time or sync time with remote computer | |||||
use | Connect/disconnect computer to/from shared resources, or display information about computer connections | |||||
user | Add or modify user accounts, or display user account information | |||||
ver | Display information about workgroup redirector | |||||
view | Display list of domains, computers, or resources shared by specified computers | |||||
who | List uses who are logged on current or remote domains, display user logon information, and list users with sessions to a specific server |
Example
Thenet use
command has several network-related functions.Connecting network drive and printer
net use
can control mounting drive shares and connecting shared printers in a network environment. This command makes use of the SMB and the NetBIOS protocol on port 139 or 445. The basic Windows XP configuration enables this functionality by default. Thus users can connect to and disconnect from shared resources such as computers, printers and drives.net use
can display a list of network-connection information on shared resources.Null session connections
net use
also connects to the IPC$. This is the so-called null session connection, which allows unauthenticated users.The basic syntax for connecting anonymously is:
net use \\IP address\IPC$ "" /u:""
For example, typing at the command prompt:
net use \\192.168.1.101\IPC$ "" /u:""
attempts to connect to the share IPC$ of the network 192.168.1.101 as an anonymous user with blank password. If successfully connected to the target machine, a lot of information can be gathered such as shares, users, groups, registry keys and more. This would provide a hacker with a lot of information about a remote user. This has changed in Windows NT 4.0 SP6 already. In Windows 2000 "null session connections" could have been enabled after changes of the system-configuration.