Jump to content

Recommended Posts

Posted

I'm messing about with a virtual network I've created to learn my MCSE exams on.

 

I want to automate network drive mapping on the domain workstations. I can do this from the workstation using the dialogue in My Computer but can't seem to get the net use command to do the same thing - I need to get that command line right so I can write the script.

 

My domain is headquarters.nozzacorp and the server share is Share Folders on Server1

 

why won't net use z: \\server1\share folders work?

Posted

I think i know why.

 

If the path has a space in it you will need to put " in.

 

for example

 

net use z: \\server\shared foldder - wont work

net use z: "\\server\shared folder" - will work

 

net use z: \\server\sharedfoldder - will work

net use z: "\\server\sharedfoldder" - will work

Posted

Sorry!

 

"unknown user name or bad password"

 

I'm logged on the workstation (well to the domain) as a domain admin account I created.

Posted

Yeah - FN GM's suggestion is the correct one. Just tried it myself!

 

Did think that in the beginning lol but wanted to see the error msg just in case :getmecoat: lol!

Posted (edited)

If it is bad username and password, try clicking "Conntec using a different username and password" and then type in administrator credentials and then see if that connects. [scrap that forgot it was a script]

 

If FN's Suggestion dont work

Edited by EduTech
Posted

Heh yeah it was the quotes thing. I don't remember reading that in the book. It didn't appear to work initially but I also had to drop the \ off the end of the share name.

 

Thanks

Posted
Also don't use Z drive for mapping drives as thats the temp letter windows uses to map when logging on. Found that out to my cost a long while ago it doesn't like Z drives (this was back when 2003 and XP were new out so may be fixed by now) but when you logon windows maps a Z drive to the sysvol folder for pulling and running scripts, files etc and then disconnects it before you actually get to windows to see it.
Posted
Also don't use Z drive for mapping drives as thats the temp letter windows uses to map when logging on. Found that out to my cost a long while ago it doesn't like Z drives (this was back when 2003 and XP were new out so may be fixed by now) but when you logon windows maps a Z drive to the sysvol folder for pulling and running scripts, files etc and then disconnects it before you actually get to windows to see it.

 

We use Z drive without any problems, might have slightly changed.

Posted
why won't net use z: \\server1\share folders work?

 

Nozza,

 

You correctly diagnosed that the "\\server1\share folders" was your mistake, but you may also want to add to your diagnostics the use of the IP address instead of the netbios name.

Eg \\server1\sharename = \\192.168.xx.xx\sharename

 

Keberos authentication and the SPN attributes of AD can run into difficulties when trying to connect to available shares on your AD hosts from non AD aware hosts or vice versa.

 

You may find that a connect can be made using IP but not when using Netbios share names!

 

I recently uncovered this when trying to access an AD resource from a workgroup machine, the share was visible when browsing the lan but access was denied when trying to connect.

A packet capture revealed that there was an SPN mismatch.

 

ADUC had the target server object still registered as "Server1" because the machine account had not been deleted when the machine was changed back to a workgroup name of "server1"

 

Only after finding the orphaned object in AD and deleting the defective machine account/SPN did the share resume correctly!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...