[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Network Share Permissions (Command)

Posted on 2006-06-14
7
Medium Priority
?
325 Views
Last Modified: 2010-08-05
Hi Everybody,

I want to make a batch file that shares and give some permissions to a folder. Right now I have:

net share C$ /delete
net share shared=C:\stuff_to_share /users:2

This effectively shares the folder c:\stuff_to_share, but it gives permissions to everybody (read only, since I'm in XP SP2), but I want to remove the Everybody permission and give specific access to some people.

Of course, it most be a command, not through the Windows GUI.

I looked the CACLS command, but it seems to affect only the local Access List, not the Shared ones.

Any advice is welcome. Thanks in advance.
0
Comment
Question by:favelill
  • 4
  • 2
7 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 16903198
Share permissions are a bit on the pointless side.  I ALMOST never set them - use NTFS (CACLS) that applies all the time.
0
 

Author Comment

by:favelill
ID: 16904000
I already review the CACLS (as noted above), but it seams to apply only the Local Access Control Lists. How do you use it to give Network Permissions?
0
 
LVL 97

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 16904555
As I said, Share permissions are a bit on the pointless side.  Use NTFS permissions.

Share permissions ONLY apply to a top level folder and then ONLY when accessed via the Network - NTFS permissions can be customized PER file/folder AND They DO apply even when logged on locally - share permissions do not.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 16904576
http://www.windowsitpro.com/Article/ArticleID/14459/14459.html?Ad=1

There are some links here for setting share permissions - but I can't say it enough - most admins DO NOT MODIFY the share permissions because they are pointless.

http://www.codecomments.com/archive299-2005-1-341762.html
0
 
LVL 24

Expert Comment

by:Kenneniah
ID: 16905992
"net share C$ /delete"
BTW that will ony delete the C$ share untill the computer is restarted. Windows automatically recreates it.

If for whatever reason you do want to remove the C$ share permanently, you need to also edit the registry.
http://www.petri.co.il/disable_administrative_shares.htm
0
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 16906393
> net share C$ /delete
Somehow I missed that

> Any advice is welcome. Thanks in advance.
DO NOT stop sharing the C$ share - this is an administrative that can be an invaluable resource in systems management.  Only admins can access it so your users don't have rights to it.

You CAN follow the link Kenneniah provided, but my advice is NOT TO DO THIS.

Maybe you have your reasons - but without knowing them, this is the BEST advice I can provide.

0
 
LVL 24

Expert Comment

by:Kenneniah
ID: 16906474
I agree that removing the C$ share is pointless. It's easy for any admistrator to get around anyway, as they can always use computer management among many other tools to connect and create a share anyway.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question