net (command)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

net
Developer(s)IBM, Microsoft, ReactOS Contributors
Operating systemOS/2, Windows, ReactOS
TypeCommand
LicenseIBM OS/2, Microsoft Windows: Proprietary commercial software
ReactOS: GNU General Public License

In computing, net is a command in IBM OS/2, Microsoft Windows, and ReactOS used to manage and configure the operating system from the command-line.

Overview[edit]

The command is primarily used to manage network resources.[1] It is an external command implemented as net.exe.[2] 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.[1] The net command has several sub-commands that can differ from one implementation or operating system version to another.

net sub-commands
Name Description OS/2 support Windows support ReactOS support Remarks
access Manage access IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
accounts Change Netlogon service role and manage maximum user logon time, password expiration time and other account settings IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[6]
admin Run administrative command on a remote server IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
alias Manage aliases currently defined in the domain IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
app Manage information about application definitions IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
appparm OS/2 Warp 4.5[3] No No OS/2 Warp 4.5 and eComStation only
audit List and clear contents of the network audit log of the server IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
comm List information about queues for shared serial devices IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
computer Add or delete computer from domain database No Windows Server 2000, Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 R2, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][7][8] ReactOS 0.4.8[9]
config Display NetBIOS configuration information IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[10]
continue Continue paused services IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[11]
copy Copy and append files locally and remotely IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
dasd Manage and display directory limits IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
device List statuses of shared serial devices and stop current use of a device IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
diag Run the Microsoft Network Diagnostic program No Windows 95, Windows 98[4] No
error List and clear network error log IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
file List files opened by remote computers IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] Unimplemented[12]
forward Route incomming messages and cancel forwarding IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
group Add, display, or modify global groups in domains IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2000, Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 R2, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][13][14] ReactOS 0.4.8[15]
help Display syntax IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[16]
helpmsg Display information on error messages No Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[17]
init No Windows 95, Windows 98[4] No
localgroup Add, display, or modify local groups No Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][18][19] ReactOS 0.4.8[20]
log Start/stop saving messages to a file/printer and display information about forwarding the current message log IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
logoff No Windows 95, Windows 98[4] No
logon No Windows 95, Windows 98[4] No
move Move files locally and remotely IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
name List or manage NetBIOS names IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP[4][5] Unimplemented[12]
password Change passwords on a server or in a domain IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98[4] No
pause Pause services IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[21]
print Display printer queue information or print job information, or control print jobs IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2008, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server (Semi-Annual Channel), Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 8[4][5][22][23][24] Unimplemented[12] Deprecated in Windows 7 and Windows Server 2008 R2
riplmach OS/2 Warp 4.5[3] No No OS/2 Warp 4.5 and eComStation only
riplmclas OS/2 Warp 4.5[3] No No OS/2 Warp 4.5 and eComStation only
run IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
send Send messages to other users or computers IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP[4][5] Unimplemented[12]
session Manage server computer connections IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2003, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 7 with SP1, Windows 8, Windows 10[4][5][2][25][26] Unimplemented[12]
share Manage shared resources IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][27][28] ReactOS 0.4.8[29]
start Start services IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[30]
statistics Display and clear list of usage statistics for a workstation IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[31]
status List information about current network shares and server definition settings IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No
stop Stop services IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] ReactOS 0.4.8[32]
time Display remote computer's current time or sync time with remote computer IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5] Unimplemented[12]
use Connect/disconnect computer to/from shared resources, or display information about computer connections IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][33][34] ReactOS 0.4.8[35]
user Add or modify user accounts, or display user account information IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2008, Windows Server 2012, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][36][37] ReactOS 0.4.8[38]
ver Display information about workgroup redirector No Windows 95, Windows 98[4] No
view Display list of domains, computers, or resources shared by specified computers IBM OS/2 LAN Server, OS/2 Warp 4.5[3] Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10[4][2][5][39][40] Unimplemented[12]
who List uses who are logged on current or remote domains, display user logon information, and list users with sessions to a specific server IBM OS/2 LAN Server, OS/2 Warp 4.5[3] No No

Example[edit]

The net use command has several network-related functions.

Connecting network drive and printer[edit]

net use can control mounting ("mapping" in Microsoft terminology) drive shares and connecting shared printers in a network environment. This command makes use of the SMB (server message block) 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[edit]

net use also connects to the IPC$ (interprocess communication share). 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.

Similar commands in other OSes[edit]

See also[edit]

References[edit]

  1. ^ a b https://ss64.com/nt/net.html
  2. ^ a b c d e f g h i j k l m n o p q r s t https://www.computerhope.com/nethlp.htm
  3. ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am https://www.robvanderwoude.com/net.php
  4. ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab http://www.thenetworkencyclopedia.com/entry/net-commands/
  5. ^ a b c d e f g h i j k l m n o p q r s t u v https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490949%28v%3dtechnet.10%29
  6. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdAccounts.c
  7. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc730899(v%3dws.10)
  8. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc730899(v%3dws.11)
  9. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdComputer.c
  10. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdConfig.c
  11. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdContinue.c
  12. ^ a b c d e f g https://github.com/reactos/reactos/blob/master/base/applications/network/net/main.c
  13. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc754051(v%3dws.10)
  14. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc754051(v%3dws.11)
  15. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdGroup.c
  16. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdHelp.c
  17. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdHelpMsg.c
  18. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725622(v%3dws.10)
  19. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc725622(v%3dws.11)
  20. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdLocalGroup.c
  21. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdPause.c
  22. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc772297(v%3dws.10)
  23. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc772297(v%3dws.11)
  24. ^ https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/net-print
  25. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/hh750729(v%3dws.10)
  26. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh750729(v%3dws.11)
  27. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/hh750728(v%3dws.10)
  28. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh750728(v%3dws.11)
  29. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdShare.c
  30. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdStart.c
  31. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdStatistics.c
  32. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdStop.c
  33. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/gg651155(v%3dws.10)
  34. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/gg651155(v%3dws.11)
  35. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdUse.c
  36. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc771865(v%3dws.10)
  37. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc771865(v%3dws.11)
  38. ^ https://github.com/reactos/reactos/blob/master/base/applications/network/net/cmdUser.c
  39. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/hh875576(v%3dws.10)
  40. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh875576(v%3dws.11)

Further reading[edit]

  • Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623.
  • John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0470165799.

External links[edit]