Re: Looking for a VB Script to set share permissions

From: Brian W (brianw@gold_death_2_spam_rush.com)
Date: 02/21/03


From: "Brian W" <brianw@gold_death_2_spam_rush.com>
Date: Thu, 20 Feb 2003 20:15:15 -0800


I'd like to point out...

Also, C:\ is also shared as C$ already as read/write for Admins, and that
cannot be changed. Therefore sharing C:\ as anything is redundant and fairly
useless.

Good luck
Brian W

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:3E559765.AF867B15@hydro.com...
> kajaa wrote:
>
> > please write (or find) a VB Script sample to share the folder C:\, and
> > permit READONLY to Administrators,
>
> Hi
>
> See "Create a Network Share" in the section "Files and Folders" at TechNet
> Script Center
> http://www.microsoft.com/technet/scriptcenter
>
>
>
> To set rights on shares/folders (I recommend using the command line
utility
> SetACL for this):
>
> ===========================================================
> ADSI:
>
> You can use IADsSecurityUtility's SetSecurityDescriptor method to set the
> security descriptor on a specified file, file share, or registry key
object.
>
http://msdn.microsoft.com/library/en-us/netdir/adsi/iadssecurityutility_sets
ecuritydescriptor.asp
>
>
>
>
> ===========================================================
> WMI:
>
> Platform SDK: Windows Management Instrumentation
> SetSecurityDescriptor Method in Class Win32_LogicalShareSecuritySetting
>
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/setsecuritydescriptor_met
hod_in_class_win32_logicalsharesecuritysetting.asp
>
>
>
>
> From: [MS] Tim Chen (timchen2000@hotmail.com)
> Subject: Re: Folder Security
> Newsgroups: microsoft.public.win32.programmer.wmi
> Date: 2002-06-13 13:06:05 PST
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3d08f9d7%24
1%40news.microsoft.com
>
>
>
>
> From: Max L. Vaughn (maxvonline@microsoft.com)
> Subject: RE: Add User to sharefolder
> Newsgroups: microsoft.public.platformsdk.adsi
> Date: 2001-11-16 14:01:51 PST
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=ejzoroubBHA
.253%40cppssbbsa01.microsoft.com
>
>
>
>
>
> ===========================================================
> Command line, you can shell out from a vbscript with e.g. the Run method
>
> SETACL at http://www.helge.mynetcologne.de/setacl/ , a nice freeware
> app that adds a lot to cacls and xcacls.
>
> SetACL can set permissions on:
>
> Local or remote directories
> Local or remote files
> Local or remote printers
> Local or remote registry keys
> Local or remote Win32 services
> Local or remote network shares
>
> Be sure to add permissions, and not replace them.
>
> From the "Windows NT/2000 FAQ" site at http://www.windows2000faq.com/
>
> Q. How can I modify share permissions from the command line?
> http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14459
>
> Q. How do I create a network share?
> http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14842
>
>
>
>
> --
> torgeir
> Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and a ONLINE version of the 1328 page
> Scripting Guide: http://www.microsoft.com/technet/scriptcenter
>
>



Relevant Pages

  • Re: Looking for a VB Script to set share permissions
    ... security descriptor on a specified file, file share, or registry key object. ... SetSecurityDescriptor Method in Class Win32_LogicalShareSecuritySetting ... Local or remote directories ... Administration scripting examples and a ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Script needed: Users with Remote Access permissions on a server
    ... Remote Access permissions on a server? ... I need to query a particular server or list of servers. ... Microsoft MVP Scripting and ADSI ...
    (microsoft.public.scripting.vbscript)
  • Re: XCACLS causes error in permissions
    ... explorer reports an error on the permissions. ... > [Xcacls should be the same as cacls, with the exception of an added ... Local or remote directories ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.security_admin)
  • Re: XCACLS causes error in permissions
    ... explorer reports an error on the permissions. ... > [Xcacls should be the same as cacls, with the exception of an added ... Local or remote directories ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.win2000.security)
  • Re: Printer Admin Object
    ... Thanks but what I'm looking for is info on the printer admin object on the ... > and ports on local and remote computers. ... > Add and delete a local or remote printer. ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)