Solved

Mapping Network Drives Across Domains

Posted on 2008-10-14
6
262 Views
Last Modified: 2010-04-21
I need to write a script or cmd that will map a network drive from one domain to another in the same forest. Here is the scenario:

They have one userid and domain they log on to on a daily basis, computer is in that domain.
userid #1:  abcd1    domain:  abcd1
They need to get to a server share on another domain with a different user id and password.  
userid #2:  wxyz1  domain:  wxyz1
It maps just fine and their access has been set up, I just need a script that will log them on to this every day, as they are not logging into the computer with userid #2.  
I have used: "net use w: \\server ip address\share" which does map the drive, but I need it to ask them userid and password to authenticate with the correct user id.

So sorry if confusing.
0
Comment
Question by:scadoosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:idez_rsp
ID: 22711324
This may not be the answer you're looking for, but...  Your easiest solution is to use the same user/pass on both domains.  It eliminates a lot of confusion for the end users and also the need to reauthenticate.
Optionally you can establish a trust relationship with the other domain so that you can use the existing user credentials to access the share.
0
 

Author Comment

by:scadoosh
ID: 22711364
Yes, that would be easiest, but do you know that some companies and people just don't want to do what is easy?
0
 
LVL 1

Accepted Solution

by:
idez_rsp earned 500 total points
ID: 22711667
I understand exactly what you mean.  I've had to argue with users to use passwords at all.
Have you tried
NET USE X: \\SERVER\SHARE /USER:DOMAIN\USERNAME [password or * for prompt]
You can add it to the normal logon script.  To be a bit more secure though I would recomend using the * to prompt for password.  Rather than have it listed in plain text in the logon script in the NETLOGON share that everyone can see.
Optionally make a batch/cmd file that is in the users home directory and call it from the logon script.
logon.cmd  (last line)
call \\server\users\%username%\connect.cmd
 
connect.cmd
net use w: \\server ip address\share /u:wxyz1\wxyz1 password
If you pput the script in the users home folder only they (and admins) will have access and the attachment can be seemless.

 
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Closing Comment

by:scadoosh
ID: 31505870
Thank you so much, it works like a charm!!  
0
 

Author Comment

by:scadoosh
ID: 22715471
This should work for multiple users logging on to the same server, as long as the .cmd is edited for their user id, right?
0
 
LVL 1

Expert Comment

by:idez_rsp
ID: 22717045
Correct.  The only reason I suggest using the home directory is that scripts appear in clear text for anyone to see.

if you want to get fancy you can do an

if exist \\server\users\%USERNAME%\connect.cmd call \\server\users\%USERNAME%\connect.cmd

This would eliminate the line if the connect.cmd file doesn't exist in the users home directory.

This also assumes the user HAS a home directory set under the users profile settings and that you have the users folder shared as users..  
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

739 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