Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mapping Network Drives Across Domains

Posted on 2008-10-14
6
Medium Priority
?
271 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 2000 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
Make the most of your online learning experience.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

715 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