Net (command) explained

net
Developer:Microsoft, IBM, ReactOS Contributors, Greentea OS Contributors
Operating System:MS-Net, DOS, OS/2, Windows, ReactOS, eComStation, ArcaOS, Greentea OS
Platform:Cross-platform
Genre:Command
License:MS-Net, OS/2, Windows, eComStation, ArcaOS: Proprietary commercial software
ReactOS: GNU General Public License
Greentea OS: GNU Lesser General Public License

In computing, net is a command in IBM OS/2 (including eComStation and ArcaOS), Microsoft Windows, ReactOS and Greentea OS used to manage and configure the operating system from the command-line. It is also part of the IBM PC Network Program for DOS.[1]

Overview

The command is primarily used to manage network resources.[2] It is an external command implemented as net.exe.[3] 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,[4] Windows CE 5.0[5] and Windows Embedded CE 6.0,[6] it is available as an external command stored in . This version only supports the use and view sub-commands.

net sub-commands
NameDescriptionDOS supportOS/2 supportWindows supportReactOS supportRemarks
accessManage access[7]
accountsChange Netlogon service role and manage maximum user logon time, password expiration time and other account settings[8] [9] [10]
adminRun administrative command on a remote server
aliasManage aliases currently defined in the domain
appManage information about application definitions
appparmOS/2 Warp 4.5 and later only
auditList and clear contents of the network audit log of the server
commList information about queues for shared serial devices
computerAdd or delete computer from domain database[11] [12] [13]
configDisplay NetBIOS configuration information[14]
continueContinue paused services[15]
copyCopy and append files locally and remotely
dasdManage and display directory limits
deviceList statuses of shared serial devices and stop current use of a device
diagRun the Microsoft Network Diagnostic program
errorList and clear network error log
fileList files opened by remote computers[16]
forwardRoute incoming messages and cancel forwarding
groupAdd, display, or modify global groups in domains[17] [18] [19]
helpDisplay syntax[20]
helpmsgDisplay information on error messages[21]
init
localgroupAdd, display, or modify local groups[22] [23] [24]
logStart/stop saving messages to a file/printer and display information about forwarding the current message log
logoff
logon
moveMove files locally and remotely
nameList or manage NetBIOS names
passwordChange passwords on a server or in a domain
pausePause services[25]
printDisplay printer queue information or print job information, or control print jobs[26] [27] [28] Deprecated in Windows 7 and Windows Server 2008 R2
riplmachOS/2 Warp 4.5 and later only
riplmclasOS/2 Warp 4.5 and later only
run
sendSend messages to other users or computers
separatorControl whether or not a separator page is printed at the beginning of a print file
sessionManage server computer connections[29] [30]
shareManage shared resources[31] [32] [33]
startStart services[34]
statisticsDisplay and clear list of usage statistics for a workstation[35]
statusList information about current network shares and server definition settings
stopStop services[36]
timeDisplay remote computer's current time or sync time with remote computer
useConnect/disconnect computer to/from shared resources, or display information about computer connections[37] [38] [39]
userAdd or modify user accounts, or display user account information[40] [41] [42]
verDisplay information about workgroup redirector
viewDisplay list of domains, computers, or resources shared by specified computers[43] [44]
whoList uses who are logged on current or remote domains, display user logon information, and list users with sessions to a specific server

Example

The net use command has several network-related functions.

Connecting network drive and printer

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

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

See also

Further reading

External links

Notes and References

  1. https://archive.org/details/bitsavers_ibmpccommugram1.019856361559IBMPCNetworkProgram1.0_12755008 IBM PC Network Program 1.0 Users Guide
  2. https://ss64.com/nt/net.html Net - Services, File/Print shares, Permissions - Windows CMD - SS64.com
  3. https://www.computerhope.com/nethlp.htm MS-DOS and Windows command line net command
  4. Web site: net (Windows CE .NET 4.2). docs.microsoft.com.
  5. Web site: net (Windows CE 5.0). docs.microsoft.com.
  6. Web site: net (Windows Embedded CE 6.0). docs.microsoft.com.
  7. https://www.robvanderwoude.com/net.php Batch files - The NET command
  8. http://www.thenetworkencyclopedia.com/entry/net-commands/ net commands in The Network Encyclopedia
  9. Web site: Net services commands.
  10. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  11. Web site: Net computer.
  12. Web site: Net computer.
  13. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  14. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  15. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  16. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  17. Web site: Net group.
  18. Web site: Net group.
  19. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  20. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  21. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  22. Web site: Net localgroup.
  23. Web site: Net localgroup.
  24. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  25. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  26. Web site: Net print.
  27. Web site: Net print.
  28. Web site: Net print. 3 February 2023 .
  29. Web site: Net session.
  30. Web site: Net session.
  31. Web site: Net share.
  32. Web site: Net share.
  33. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  34. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  35. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  36. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  37. Web site: Net use.
  38. Web site: Net use.
  39. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  40. Web site: Net user.
  41. Web site: Net user.
  42. Web site: Reactos/Reactos. GitHub. 3 November 2021.
  43. Web site: Net view.
  44. Web site: Net view.