Solved

Mapping Network Drives Across Domains

Posted on 2008-10-14
6
215 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
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:idez_rsp
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Closing Comment

by:scadoosh
Comment Utility
Thank you so much, it works like a charm!!  
0
 

Author Comment

by:scadoosh
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now