Solved

Can someone explain the net use command?

Posted on 2004-09-19
14
972 Views
Last Modified: 2008-02-01
Can someone explain the net use command?
0
Comment
Question by:neo881
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 1

Expert Comment

by:darkdrago
ID: 12099362
pulled from http://www.computerhope.com/nethlp.htm
basically it maps network resources on your computer so you can use them. If there was something specific you wanted to know just ask and I will go a bit more indepth.

Connects or disconnects your computer from a shared resource or displays information about your connections.
NET USE [drive: | *] [\\computer\directory [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]
NET USE [port:] [\\computer\printer [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]

NET USE drive: | \\computer\directory /DELETE [/YES]
NET USE port: | \\computer\printer /DELETE [/YES]
NET USE * /DELETE [/YES]

NET USE drive: | * /HOME



drive Specifies the drive letter you assign to a shared directory.
* Specifies the next available drive letter. If used with /DELETE, specifies to disconnect all of your connections.
port Specifies the parallel (LPT) port name you assign to a shared printer.
computer Specifies the name of the computer sharing the resource.
directory Specifies the name of the shared directory.
printer Specifies the name of the shared printer.
password Specifies the password for the shared resource, if any.
? Specifies that you want to be prompted for the password of the shared resource. You don't  need to use this option unless the password is optional.
/SAVEPW:NO Specifies that the password you type should not be saved in your password-list file. You need to retype the password the next time you connect to this resource.
/YES  Carries out the NET USE command without first prompting you to provide information or confirm actions.
/DELETE Breaks the specified connection to a shared
resource.
/NO Carries out the NET USE command, responding  with NO automatically when you are prompted to confirm actions.
/HOME Makes a connection to your HOME directory if one is specified in your LAN Manager or Windows NT user account.

To list all of your connections, type NET USE without options.
0
 

Author Comment

by:neo881
ID: 12099418
I am setting up a new Small Bussiness Server and trying to get to the share on the old NT4 server. trusts will not work. So I wanted to use this. Can I also use this for user settings?
0
 

Author Comment

by:neo881
ID: 12099421
And where do I run the command? From NT4 or from SBS2003?
0
 
LVL 1

Expert Comment

by:darkdrago
ID: 12099506
I would run it from the 2003 server since the net use command has more options then on nt.
You just have to run the command from the computer you want the share mounted on.
for something like this I believe the command would be
net use x: \\computername\share\ /user:somedomain\useraccount
I believe it should ask you for a password since you will be using a different account than the one you are currently logged onto
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12101007
Why do you say >trusts will not work?

Does the NT4 server is in another domain? is it part of the AD (makeing your AD a NTLM compatible)?

If you could give us more shed on what exactly you want to do and how your network architecture is constructed, we might be able to provide you up to a step-by-step guide...

Cyber
0
 
LVL 1

Expert Comment

by:PRDUBOIS
ID: 12101916
You run the command in a logon script. You should be able to setup a trust.
If not, make sure you have a user on each network with the same name and password.
0
 

Author Comment

by:neo881
ID: 12102483
I am setting up a new Small Bussiness Server from an exsisting NT4.0 PDC. It is a very small network with 12 users and two fileshares. There is also a call manager that ties into the phone system to track/time calls .  
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:neo881
ID: 12102503
sorry, for clarity.... theese are two seperate servers NT4.0 is in use currently and cannot sustain downtime, Whereas the NEW server is only attached to the network and not presently being used.
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12102644
So your network is going to be in mixed mode... but the same Domain while using the PDC as the primary Server (i.e. Windows 2003 Server) and the BDC will remain an NT 4.0; correct me if Im wrong;

In that case  darkdrago provided you with a propper answer; Just as simple as that.

Links:
The NET command and its possibilities explained:
http://www.robvanderwoude.com/net.html

One more nice detaled link:
http://www.ss64.com/nt/net.html

I hope thats enough; if you need more just tell us...

:)

Cyber
0
 
LVL 1

Expert Comment

by:PRDUBOIS
ID: 12102777
If you want to get to a trust on the old server:
Make accounts on both networks withe the same username and password.
Run the net use command on the new network to attach to a share on the old network
Include username and Password in the net use command.
Include /PERSISTENT:NO {drives will map if command is not run}
For help on command - From a command line type:
NET USE /?

Example:

net use p: \\usfp01\public /USER:Mydomain\mylogon mypassword /PERSISTENT:NO
net use t: \\usfp01\apps /USER:Mydomain\mylogon mypassword /PERSISTENT:NO
0
 
LVL 1

Expert Comment

by:PRDUBOIS
ID: 12102790
I ment get to a share on the old server, not a trust

sorry
0
 

Author Comment

by:neo881
ID: 12126969
Lets say that the NT4.0 PDC is named "APDC" The domain is "ADOM" And my Username is:  Tom and my password for this logon ID is: passcode. the share I want to connect to is named: DOM_share, and drive letter x is free.
Would the correct syntax to connect to this share be:

net use x: \\ADOM /USER:APDC\tom passcode /PERSISTANT :NO
0
 

Author Comment

by:neo881
ID: 12126998
OR THIS :

net use x: \\DOM_share /USER:ADOM\tom passcode /PERSISTANT :NO
0
 
LVL 1

Accepted Solution

by:
PRDUBOIS earned 500 total points
ID: 12127154
Close, you need \\PC name\share

net use x: \\APDC\DOM_share /USER:ADOM\tom passcode /PERSISTANT :NO
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now