How to use UNC path correctly to share a folder on remote computer?

4

I would like to know if somebody knows the correct syntax for giving a folder a share on remote network machine's folder. Please write a syntax you know for sure that it's working.

This operation should be on CLI- command line I'm having an error messages when trying to use:

net use x: \\someNetworkPath\

I get errors like :system error 53 has occured The network path was not found

I must say that in windows I can acess this network path.

Important Note: I'm doing net use before because the Net share command do not know what is UNC Path as far as I know

CSharper

Posted 2013-05-08T20:04:09.140

Reputation: 141

Do you have permission to the remote machine? How do you authenticate to it? Do you have local login to the remote machine? a domain login? Does the remote system have a share with the name that you're trying to connect to? – snapshoe – 2013-05-08T20:14:09.560

1.I guess I have permission because through windows interface I can access it without any problem 2.I also do not see any credentials that I need to put in, but maybe it's doing it automatically 3.It don't have a name share I want to create one for it remotely. 4. Can you explain more about domain login I think it the type but not sure – CSharper – 2013-05-08T20:18:00.710

Answers

1

Try net help use for usage:

> net help use
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]

Then try

net use x: \\computername\sharename

snapshoe

Posted 2013-05-08T20:04:09.140

Reputation: 939

Thanks but I tried similar example as you wrote and didn't work – CSharper – 2013-05-08T20:11:40.187

0

Net Share is used to create a share on your machine

Net Use is used to connect to a remote share. Which I think is what you're asking. The correct syntax is:

net use * \\computername or IP\sharename

for instance:

net use * \\mycomputer\c$ -> this will connect to a share with the next available drive letter to a machine's hidden c:\ share.

net use x: \\mycomputer\music -> this will connect to a share called music on the remote computer named "mycomputer" and call it the x drive.

Both of those will use whatever user you are logged in as. You may have to give it the user name of the computer you are trying to connect to. So you would need to do:

net use * \\mycomputer\c$ /u:mycomputer\username

This will prompt you for a password of the user to the remote computer named "mycomputer"

It also sounds like you may want to create a share on a remote machine. You would have to use something like psexec if you want to do that.

Jason H

Posted 2013-05-08T20:04:09.140

Reputation: 434