My Favorite Net Commands
networknewz.com


03.12.01
In this issue I would like to discuss some useful utilities based on the NET commands of Windows. Learn how to map a network drive from the command line or even send a message to a machine. The latter is especially fun for surprising a buddy. Read on and remember, questions / comments / suggestions are always welcome.

Jay Fougere
NetworkNewz Editor



NET commands are commands that use the NetBIOS protocol in Windows. They are a simple and easy way to utilize network resources and, in some instances, can make certain tasks easier than if you had used a GUI (Graphical User Interface). Keep in mind that NetBIOS is a non-routable protocol and thus you will not be able to use these commands with machines on subnets other than your own (without special configurations that are beyond the scope of this article).

I would like to begin by saying that this is not a comprehensive discussion on NET commands. This is simply an overview of some of my favorites and how to use them. Net commands will vary depending on the particular version of Windows you are using and the role of the computer that you are using them on. For instance, Domain Controllers will be able to use some commands that a member of a workgroup or client computer in a domain will not. The commands I will be discussing should work on all versions of Windows.


- Enhance Employee Productivity
- Optimize Network Bandwidth
- Reduce Legal Liability
Just click here


For a complete list of NET commands simply type NET HELP at the command prompt. For additional information on individual commands simply type NET "command" HELP where "command" is the command of your choice. To make a text file of the output of these help commands (which can then be printed so that you have a nice hardcopy) remember to use ">filename.txt" after your "help" command. Check out "Keep Pinging Your Nodes" for a refresher on using ">filename.txt"

NET VIEW is the first command that I will discuss. It will allow you to see the names of computers on your subnet that you will be able to share resources on (provided that you have the correct permissions, of course). If you type NET VIEW [hostname] you will get a list of shared resources on that particular machine. Keep in mind that administrative shares may be present but will not show up with NET VIEW. Administrative shares are shares that only an administrator will have access to. These shares are hidden (not only from NET VIEW but in Network Neighborhood as well) by following the share name with "$".

Signup FREE for NetworkNewz
Text HTML
Enter your email address below

Click for more info about ads

Now that you see the machines around you, what can you do with them? One of the most useful things that I know to do is to map a network drive. This is only possible on Windows machines that have file and print sharing enabled in properties of the "Local Area Connection". If you are unsure if file and print sharing is enabled, right click My Network Places or Network Neighborhood and select properties. Right click Local Area Connection and select properties and then check to see if file and print sharing is enabled here.

When you map a network drive, it will allow you to share files back and forth (again, according to permissions) with another machine on the network by creating a "virtual drive" on your own machine. This is accomplished with the NET USE command. Simply type NET USE X: \\COMPUTER\SHARE where X: is an available drive letter (You can use all 26 letters in the alphabet as long as you do not already have a drive using that letter. In other words, using C: is a bad idea because you will most likely already be using that letter by default.

COMPUTER is the name of the computer on which you will be sharing a resource, and SHARE, which is just what it says it is. This is where administrative shares come into play. If you do not see a SHARE to a drive that you are reasonably certain should be available, try mapping to C$ (assuming that the drive that you want to map to is C: and that you have administrative privileges). Once you see "THE COMMAND COMPLETED SUCCESSFULLY" simply switch to the drive letter that you mapped to (X:) and you will have access to some or all of the files on that drive depending on your permissions.

I do not see much practical use for the last command I would like to discuss, but it is fun. It is NET SEND and what it will do is send a message to a machine on the network. A small pop-up window will appear on the screen of the target machine. The syntax of the command is NET SEND [hostname] MESSAGE where MESSAGE is the message you want to send. Play with this one, it is fun.

Have fun with these and remember, we have only touched the tip of the iceberg with these commands. Use NET HELP to explore other useful NET tools.

Before I go I would like to point out an error in my last article, "The Scent of a Password" In reference to promiscous scanners, I used the term "subnet" rather loosely. Let me quote Robert Webb, who is an expert in this field. "You referred to capturing data based on a subnet. However this is only the case if the entire subnet also shares a common collision domain (i.e. connected via hubs). If there are any switches or bridges within the given subnet, the analyzer will only see broadcast and multicast traffic from across those devices." Thank you again Robert. For those readers that need services relating to protocol analysis, I suggest you check out Robert's site, www.webnetcomm.com.

iEntry.com | More Issues | Sign-Up | Comments | Send this page to a Friend | Advertise | Links | Printable Version

ezined.com
 ©2001 iEntry Inc. All Rights Reserved