Map Network Drive across domain ... script & help needed

Guys ...

I am migrating a load of users into a new domain - but they need access to a share called 'cv' on a WORKGROUP called 'Domain' !

I would ultimately like a network drive to be mapped to this location and I assume I would script it ...

But i'm useless at these scripts and not even sure if it's possible ... if someone could write me the script (net use?) I would be appreciated ...

Let's say the users are on 'MyDomain' and need drive 'V:' mapped to a share on ..

'\\domain\fileserver1\cv' with creditials '\\domain\Administrator' and password of 'pw' ...

I hope this makes sense ...

S.S.
SpencerSteelAsked:
Who is Participating?
 
Pete LongTechnical ConsultantCommented:
These command can be executed from either command line, Batch File OR Login Scripts

This command maps a drive "Z:\" to a shared directory on a server called "Server1"

net use z: \\server1\sharename\

If you need permissions to use this network resource toy can also enter the username and password. (See Security Below)

net use z: \\server1\sharename\ /user:username password

The above commands will work until a user logs out or the machine is rebooted, to make the mapping permanent you need to use a "Persistent switch"

net use z: \\server1\sharename\ /user:username password /Y
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
If you have problems with Pete's version of:
net use z: \\server1\sharename\ /user:username password

Try
net use z: \\server1\sharename\ password /user:username

According to NET USE help:
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


Most commands can swap order of the functions in the command line - but a few don't and I've always done it password first.
0
 
SpencerSteelAuthor Commented:
OK ... this look all correct ... I think my problem lies elsewhere ... namely, I need to connect to

\\domain\server1\sharename

and DOMAIN itself wants a password - I don't think it likes anyone coming in from my domain ... if this server was on the same domain and I could browse to it easily, your method would be spot on ...

... the machine itself is an NT4 box with EVERYONE allowed (Share/Permissions) ... can't think what is obvious that I'm doing wrong.


I wonder if DFS would be better to provide credentials ?

S.S.

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Pete LongTechnical ConsultantCommented:
you dont need a domain in thew path as long as the PC can see server by itts name of <server1>

if not

net use v: \\123.123.123.123\share <password> /user:username@the_other_domain_name.com

where 123.123.123.123 is the IP address of server1
0
 
SpencerSteelAuthor Commented:
OK ... I can hear everyone muttering 'idiot' under their breath ... and I'm with you ... this all makes sense ... but I think the problem is no longer in the script ...

First of all, the error i'm getting back is basically 'The network name cannot be found' - which is true - it can't ... read on ...

1. As a Administrator from MyNewDomain, using Windows Explorer, I can browse to DOMAIN\Server1 ... but there it stops (no shares can be seen) and asks for Credentials, which I can provide as '\\DOMAIN\Administrator' & 'thepassword' ... then I can see all the shares I might like to connect to - as you would expect.

2. A 'normal' user from my domain does not get challenged at the DOMAIN level ... thus they will never 'see' the share.

So, my problem now isn't really one of scripting/mapping the drive ... it's showing the share from the old domain, so users on the new one can 'see' it.

I think.

I thinking that if the users could 'browse' to the CV folder, the mapping thing will be easy - as your scripts are bang on ... I'm just trying to wrap my head around what "Server1\cv" needs for it's shares to be browseable by users on the NewDomain ...

*cries*

S.S.
0
 
Pete LongTechnical ConsultantCommented:
>> I can hear everyone muttering 'idiot' under their breath

No one thinks that we are here to help :)

your on two domains that dont trust each other - that being said a computer on domain a cant see a computer on domainb (cause the domains use different DNS - DONT confuse internet DNS with NT Domain DNS - they just look similar :)

still assuming server1 is at 123.123.123.123

from the pc on the OTHER domain can you

ping 123.123.123.123

and get a response, if so

net use v: \\123.123.123.123\share <password> /user:username@the_other_domain_name.com

should get you on
0
 
Pete LongTechnical ConsultantCommented:
Ive just tried it on my home domain from a workgrouped PC and it worked?
0
 
SpencerSteelAuthor Commented:
I am an idiot ... and you are helping ... my statement above (2) was incorrect ... i *can* map - via windows XP - to the share from any user.

Therefore, my scripting must be wrong.

I will hand out points now - as you've all been helpful and get to work on this now !

Thanks so much,

S.S.

(facing manual mapping task, he fears.)
0
 
Pete LongTechnical ConsultantCommented:
<grin> It never stops it dont matter how much tech you know - theres allways something more complicated and more freaking scary LOL - thats why the experts here dont thing of posters as idiots (well there are a few but thats the eception to the rule mate)

keep us posted
0
 
SpencerSteelAuthor Commented:
ARGH !

NOTE THE SPACE BETWEEN THE DRIVE (z:) AND THE '\\'

*runs screaming*

OK - we are there - solved.

So sorry !!!!!!!

S.S.
0
 
Pete LongTechnical ConsultantCommented:
ThanQ - I'll stay subscribed in case it all explodes in balls of flames <grin>
0
 
Pete LongTechnical ConsultantCommented:
>>So sorry !!!!!!!

I can remember doing the same myself in the past - I'll lay good money you never make that mistake again - glad you are fixed, and thanks again

Pete
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.