Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Access Network share without mapping

05 Apr 2012   #1
michaeljc70

Win 7 Ultimate
 
 
Access Network share without mapping

I want to know if I can access a network share (for CMD line copy) that requires a username and password without mapping it.

The reason is for the purpose of copying backups. If I were to map the drive, any virus/malware could infect the share, defeating the purpose.

I know I can copy to the share if use the same account/passwords on both machines and just do xcopy \\pcname\\sharename\..... I was hoping to avoid creating/changing accounts on the machines.

I know I can map the drive using netuse and then kill it after the copy. This isn't perfect, but I guess if there is no other way, it will pass.


My System SpecsSystem Spec
.
05 Apr 2012   #2
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Hi,

I'm going to assume you want this to be automated, so you can do this mklink and fsutil commands. Create a task in task scheduler to run the following script.


@Echo Off
Rem MoveBackup.cmd
C:
CD\

Rem Allow following of symlink..
fsutil behaviour set symlinkevaluation L2R:1

Rem Establish the link
mklink /d backup \\machinename\sharename

CD backup
xcopy /s/e <backupsource> .
CD\
RD Test1

Rem Disallow following of symlink
fsutil behaviour set symlinkevaluation L2R:0

Notes:
By default symlink evaluation is off. L2R means Local 2 Remote. 1 is on, 0 is off

\\machinename\sharename must be discoverable and a share must have been previously created otherwise the mklink will create the link ok, but you will not be able to access the remote folder (network name not found).

If a machine and share are discoverable, then technically, they might be open to potential virus exploits anyway.

c:\backup must not exist when attempting to crate the link. mklink will complain "Cannot create a file when that file already exists"

There are 4 combinations of symlink evaluation: L2L, L2R, R2R and R2L. By default they are all off, as most people don't use symlinks and junctions. But you can turn them on and leave them on. The fsutil at the end of the above script is only needed if you are concerned about something attempting to establish a link to a remote share; Possible but unlikely.

<backupsource> is the location of your backup files that you want to place on the remote location. The dot after <backupsource> means "Here" and is optional. If omitted it is implied.

Deleting the symlink does not delete the contents of the remote location.

hth
Tanya
My System SpecsSystem Spec
05 Apr 2012   #3
michaeljc70

Win 7 Ultimate
 
 

I don't see how this would work as there is no user/pwd and the share is not accessible without it.
My System SpecsSystem Spec
.

05 Apr 2012   #4
kegobeer

Windows 7 Ultimate x64 SP1
 
 

My System SpecsSystem Spec
05 Apr 2012   #5
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Sorry, my bad.

I forget that my computer logs in to my remote machine at boot time, and I never have to provide the credentials because the connection is persistent.

I used a combination of credential managerment in contol panel and the netplwiz applet to accomplish this. From that point on, I never have to supply credentials to log in to the remote machine as I have already been authenticated at boot time.

Credentials manager, if you are not familiar with it, allows yet to set a login and password to a remote machine, or remote network location.

netplwiz allows you to by pass the login screen at boot time if there are multiple users on your machine. You can always log off, and swap users.

If you are required to provide credentials everytime you connect to the remote machine, then yes, I think you are right. You are going to have to use net use.
My System SpecsSystem Spec
05 Apr 2012   #6
michaeljc70

Win 7 Ultimate
 
 

Quote   Quote: Originally Posted by kegobeer View Post
If you read even the title or first sentence, it says without mapping a drive. I am not sure why people respond without even reading the question.
My System SpecsSystem Spec
05 Apr 2012   #7
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Quote   Quote: Originally Posted by michaeljc70 View Post
If you read even the title or first sentence, it says without mapping a drive. I am not sure why people respond without even reading the question.
I suspect it's because of the good nature of volunteers who do their best to help people. Sometimes people misread things, it doesn't diminish their desire to try and help a fellow person with a problem.

The solution I provided will work. If you create a persistent connection, and it will do it without having to map a drive. But I do understand if you have concerns about using persistent connections.

Also, I beleive that using task scheduler and running under and account that exists on both machines will also work, as long as the username and password on both machines are the same. (This is where one might use the netplwiz applet).

And of course, you always have third party backup suftware like Acronis, COmodo, Macrium and others that may accomplish the task.

I wish I could be of more help.

Edit justing thinking about this; Windows 7 backup will do this for you. Granted, Windows offering is not very good, but you can back up to a remote location; It asks for your credentials when you create the backup. There was not a lot of information in your original post with which to work. For example, you haven't said whether you want to do this attended or unatended, so I've just made assumptions.

Tanya
My System SpecsSystem Spec
06 Apr 2012   #8
michaeljc70

Win 7 Ultimate
 
 

I appreciate any reasonable effort to help. But when you just post a link to something that doesn't answer the question, you've wasted your time and mine. It seems pretty widespread online. I've had people ask me 12 questions and then say they know nothing about the topic!

I think as someone who asks a question, it is your responsibility to Google it and look for an answer on your own before posting. As a responder, it is your responsibility to read the question before posting. It is not a contest to respond to as many posts as you can regardless of if they are relevant or correct.
My System SpecsSystem Spec
06 Apr 2012   #9
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Quote   Quote: Originally Posted by michaeljc70 View Post
I appreciate any reasonable effort to help. But when you just post a link to something that doesn't answer the question, you've wasted your time and mine. It seems pretty widespread online. I've had people ask me 12 questions and then say they know nothing about the topic!

I think as someone who asks a question, it is your responsibility to Google it and look for an answer on your own before posting. As a responder, it is your responsibility to read the question before posting. It is not a contest to respond to as many posts as you can regardless of if they are relevant or correct.
Fair enough. I guess sometimes we just need to ignore the irrelevant posts without publicly embarrasing the responder.

There was not alot of information provided in your original post about how you're doing the backup, and the solutions offered would be based on what information you did provide.

I offered you 3 or 4 ways to accomplish the task. I have no way of knowing just how close to your needs they are because other than "copy without mapping" there is no more information to guide would-be responders.

Anyway, I think it's all moot now.

I wish you all the best in finding a solution that meets your needs.

Tanya
My System SpecsSystem Spec
06 Apr 2012   #10
michaeljc70

Win 7 Ultimate
 
 

It sounds like if I put the credentials in Credential Manager, I can do the copy. If a virus were to look at network locations though, it would also have access to the share which is what I was trying to avoid.

It seems like using the cmd line to map a drive, copy the backup, and then dropping the mapping is a better option. Yes, malware could get at that drive while mapped, but it would only be mapped for a short time.
My System SpecsSystem Spec
Reply

 Access Network share without mapping




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Cannot change network location to access Homegroup share
Hi, I have an Aspire X3960 (Win7 Prem 64bit) which is connected to the internet via cable. However when I tried to add it to the homegroup I created I noticed the LAN icon in the system tray had a red x against it. When I looked in cpanel at network and sharing centre no location is...
Network & Sharing
"Enter network password" when attempting to access XP share.
For some reason I can no longer access my XP shares from Windows 7 Home Premium. This was working for about 2 months (since I got this machine) but now everytime I attempt to access my XP files it asks for the network password (of course there is no such thing). Any ideas?
Network & Sharing
"Access Denied" to network share once moved to 7..but works on XP
We have a number of users that have lost access to the network share My Documents where everything they create is redirected and stored on a Sunfire server with the data on NFS volume. We are a Xen virtual shop running Server 2003. We've just built a Server 2008 that we are going to promote to...
Network & Sharing
Can't access network share
I have a few computers on the network and they have shared files.I can see their shares fine...they can't see mine. \\192.168.0.1 ->this doesn't work for them...they keep getting the error that they don't have permission to acess it. \\192.168.0.1\SharedFolder this works for them.They are mixed...
Network & Sharing
Losing access to network share
Howdy guys. I'm really stuck on this one, and I haven't been able to find an answer as of yet anywhere I've looked. I'll try to be as detailed as possible: I'm doing some work for a company who has 13 computers networked together. I just upgraded 3 of their computers to Windows 7 machines. One...
Network & Sharing
Problem with mapping network location - network printer
Hello! I added a printer to my network (hp c5180) via ethernet cable. But problem accords when I try to map a network location (card reader 5in1 or sth like that, is used to read SD, xD, ms cards used in cameras) from which I d like to copy images, files in explorer without extra software from...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:07.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App