Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make net use script

Status
Not open for further replies.

WilkoB

Technical User
May 13, 2004
20
0
0
NL
I would like to write a little script that connects my windows Xp clients to a certain shared folder on a Win 200 Server

I have the following:

net use n: \\server\accounting

when I run this in a login.bat it ask me for a username and password.
How can I add this is the line so that it works automatically. For example user: Bill and password: Jones

 
It should be asking you for a username and password if you have everything set up right.

 
Make sure that the share permissions for \\server\accounting are set-up for Everyone to have full access to the share.

The security tab can then be used to limit access to what is INSIDE the share.

Good luck!
 
sorry, I wasn't very clear before. What I want is to add the username and password to the net use command

I don't want the users to add their username and passowrd, but it should be in the command itself

can anyone complete the above net use command with user Bill and password Jones

Thanks
 
net use n: \\server\accounting /USER:server\bill jones

PSC

Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo! --Mr. The Plague, from the movie "Hackers
 
As was already pointed out, what you should be doing is setting the permissions such that your users should not even get prompted for a user ID and password. Lock down the security so that authorized users can get into the share.

While you can code the user name as PSC has demonstrated, you can't also pass the password.

I would also invite you to take a look at my FAQ regarding login scripts. faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
net use n: \\server\accounting passwordhere /USER:domain\username

 
fdiskboy, this is for a login script. Unless you can think of a way to pull the password your solution would require all users to have the same password. Not a viable solution.

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top