Net Share

Started by digitalmetal, September 04, 2005, 05:40:03 PM

Previous topic - Next topic
HEllo,

I'm having a little trouble that I hope someone can help me with.  

When I use "NET SHARE" at my command prompt on my windows XP machine (exp. "Net Share Shared=c:\folder")  It set the fold to be shared, but when you try to connect to it remotely it will not allow you access.

But doing it through Windows Explorer it works fine.  

Thanks for you help

Are you saying that if you share via the command prompt no one can access but if you share via the GUI they can?

Also, are you trying to access the share from the local machine where the share resides when you say it works/doesnt work or from a remote machine.

In XP, at least Pro, never used Home but I would venture an educated guess that its the same, when you share a folder via the command prompt, the permissions set are "Everyone = Full", vice through the GUI where its "Everyone = Read". Therefore your issue should actually be reverse of what you described, unless...

Are you running Windows Firewall? I would check that first. Windows Firewall has ties into the GUI where it will allow connections to shared resources you set via the GUI, but I believe you can throw it for a loop using the command line which is where your problem may lie.

Try turning Windows Firewall off and see if it works. If not, post more info so we can better help point you to a resolve.
"A well known hacker is a good hacker, an unknown hacker is a great hacker..."

I don't care what your parents told you, you aren't special.
  • https://github.com/tazinator

I've disabled the firewall and it still is giveing me the same ERROR!!

\\192.168.1.100\folder is not accessible. You might not have permission to use this network resource.  Contact the administrator of this server to find out if you have access permissions.

Access is denied.


I've tried this on all 3 of the computers on my home network.  I've also downloaded some VB code, but the same results.  Shareing the same folder manually works fine.

My goal is to right a script that will enable the shareing of folds at some points through out the day, and disable them at others.

Take a look at the machine where you did the command line share and look to see if its actually shared and with what permissions by doing the following:

  • On the desktop, right-click on "My Computer" and select "Manage".
  • Under "Computer Management (Local)" expand "Shared Folders" and click on "Shares".
This will show you all the shares on the computer as well as manage them. Double click the share you created and look at the "Share Permissions" tab. If its blank, thats why its not working.

Also, check the permissions of the folder on the actual hard drive. If you arent on a domain network and the domain user you are trying to connect as doesnt have NTFS permissions to that folder, or if on a peer-to-peer and Everyone is not listed for the same, it will give you an access error like your getting.
"A well known hacker is a good hacker, an unknown hacker is a great hacker..."

I don't care what your parents told you, you aren't special.
  • https://github.com/tazinator



above is what I get.
the folder called "Vickie" is one I made in the GUI.
The Folder "new2" is one I made at the command prompt useing 'Net Share'

this test was done on my girlfriends network and I get the same results.  I can Access 'Vickie' from the other computers on the local network but I get the Error with the 'new2' folder.

At this screen I tried double clicking both of them, but nothing happens.

As far as the "domain network and the domain user"  I'm new to networking and I my sound stupid, (But you never lern if you don't ask) I don't know what that is exactly or how to check it.

September 15, 2005, 04:13:59 PM #5 Last Edit: September 15, 2005, 04:14:22 PM by digitalmetal
Sorry about that,  I knew but forgot.
anyway
this what I get.
the folder called "Vickie" is one I made in the GUI.
The Folder "new2" is one I made at the command prompt useing 'Net Share'

this test was done on my girlfriends network and I get the same results.  I can Access 'Vickie' from the other computers on the local network but I get the Error with the 'new2' folder.

At this screen I tried double clicking both of them, but nothing happens.

As far as the "domain network and the domain user"  I'm new to networking and I may sound stupid, (But you never lern if you don't ask) I don't know what that is exactly or how to check it.  


Thank you so much for your help.

I have found the answer to my problem.

it was xcacls.exe

use with net share

net share guest$=c:\
xcacls c:\*.* /c /t /e /g guests:frx


works grate

xcacls.exe does not come with windows xp but can be down loaded from microsoft. It's about '44.0 KB'

works like cacls.exe but has folder functions
much like xcopy vs. copy

Thanks to all.

From the sound of it then it was a permissions issue. From the looks of it your simply adding permissions for Guests to access the share. I may advise thats not a wise idea. You should have some sort of authentication in play even on a local network.

What probably happened was the XP machines werent properly authenticating username/password when accessing the share for some reason. Why this was, I cant be sure as I am more accustomed to working with Windows in a Domain environment rather than a peer to peer. I know that MS did some funky stuff with "Shared Documents" and other shared resources with XP Home and XP Pro in peer to peer mode which could be the culprit also.

At any rate you found a workaround which is good but id still be curious as to what was really preventing it from properly working before as it may creep up and haunt you later.
"A well known hacker is a good hacker, an unknown hacker is a great hacker..."

I don't care what your parents told you, you aren't special.
  • https://github.com/tazinator

Well I tested the "net share" command out on 4 different network with a total of 8 different computer I tried it on. And the only way you get it to work on any of then was to use xcacls.exe and after I'm done I can use xcacls to undo what I've done.  I don't plan on leaveing the computers open all the time.  I agree that that would be bad.  And I also unshare the folders with NET SHARE. So basicly I put every thing back the way I found it and the PC's I'm use these commands on... Well I'm not to worried about them.  I don't keep anything important on them.

SMF spam blocked by CleanTalk