English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to logon to a network machine, I have the ID and password, in DOS, I am using the NET USE command.

Then, it asks for the username and password, which I know and I enter and authenticate.

Now I need to automate by using Batch, passing the username and password in thebatch, so that, user doesn't have to put in the authentication.

2007-06-17 23:16:03 · 0 answers · asked by Anonymous in Computers & Internet Computer Networking

0 answers

There are a couple of different parameters you can use with the "net use" command to connect to a network machine depending on what you need.

The most basic is to create an authenticated connection and pass the "user" and "password" via the commandline.

[Note: all of my commandline examples should be entered on one line. Yahoo Answers wraps some of them to multiple lines.]

net use \\targetmachinename /user:username password

This assumes that the username is recognized by the target system. You didn't specify if you're on a domain or workgroup; or, if you're using domain/workgroup accounts or local accounts. Any of these considerations will slightly alter the commandline.

For instance, with domain authentication you must specify the domain name in the /user: switch,

[one line]
net use \\targetmachinename /user:domain\username password

Another option: You could map a drive to a share on the target system or the target domain

[one line]
net use * \\targetmachinename\sharename /user:username password

The (*) maps the next available drive letter to the taget sharename. You can change the asterisk to a specific drive letter, if you choose.

[one line]
net use s: \\targetmachinename\sharename /user:username password


Domain authentication.
[one line]
net use * \\targetmachinename\sharename /user:domain\username password

There are additional items you might want to consider, like a persistent connection, meaning the connection will be remembered even if the computer is rebooted.

For more options, check "net use /?"

2007-06-18 00:34:53 · answer #1 · answered by Kevin 7 · 6 0

Net Use Command Password

2016-10-14 00:41:56 · answer #2 · answered by decaneo 4 · 0 0

fedest.com, questions and answers