Difference between revisions of "Net use"
From MohidWiki
Line 4: | Line 4: | ||
Simply choose an available logical drive letter (like ''L:''), a valid UNC path (like ''\\opendap.mohid.com\opendap''), and a valid username on the target machine as well as on the local machine (like ''datamover''). | Simply choose an available logical drive letter (like ''L:''), a valid UNC path (like ''\\opendap.mohid.com\opendap''), and a valid username on the target machine as well as on the local machine (like ''datamover''). | ||
> net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover | > net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover | ||
+ | |||
+ | If you want to logon with another username, then you need first to stop all active logons using the following syntax: | ||
+ | > net use L: /delete | ||
+ | |||
+ | Otherwise, you will get the following error: | ||
+ | System error 1219 has occurred. | ||
+ | |||
+ | Multiple connections to a server or shared resource by the same user, using more | ||
+ | than one user name, are not allowed. Disconnect all previous connections to the | ||
+ | server or shared resource and try again. | ||
==External References== | ==External References== |
Revision as of 12:40, 14 April 2009
Net use allows to map network drives programatically. In particular it can help to network with windows NT shares AND linux samba shares.
Quick start
Simply choose an available logical drive letter (like L:), a valid UNC path (like \\opendap.mohid.com\opendap), and a valid username on the target machine as well as on the local machine (like datamover).
> net use L: \\opendap.mohid.com\opendap password_of_datamover /user:MARETEC\datamover
If you want to logon with another username, then you need first to stop all active logons using the following syntax:
> net use L: /delete
Otherwise, you will get the following error:
System error 1219 has occurred. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.