Re: Change Share and File Permissions (Take Ownership) when necessary. (env. NT4)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 07/13/04


Date: Wed, 14 Jul 2004 00:19:48 +0200

Yngve wrote:

> SHARE PERMISSIONS:
> ------------------
> But, the hard part perhaps. How do i reset the share permissions so that
> "Everyone" will have "Full Access"? We have the policy of setting all rights
> on the file level (which havenīt been done properly though as i am in this
> mess) so the only thing i want is to reset the permissions to be the above
> (as i will maintain security on the file level only instead).
Hi

Some options:

A)
You can use Microsoft's RMTShare.exe to set permission on a share:

Q. How can I modify share permissions from the command line?
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14459
RMTShare.exe: http://www.jsiinc.com/asp/reghacks.asp?tipnumb=6353

B)
SETACL (freeware) at http://setacl.sourceforge.net/ is also an option.
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

C)
You can set the security descriptor for the shares with WMI..

SetSecurityDescriptor
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/setsecuritydescriptor_method_in_class_win32_logicalsharesecuritysetting.asp

Here is a couple of examples on the SetSecurityDescriptor method in Class
Win32_LogicalShareSecuritySetting (disregard that they use
wbemscripting.swbemlocator instead of winmgmts:, the rest will be the same):

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?selm=ejzoroubBHA.253%40cppssbbsa01.microsoft.com

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?selm=3d08f9d7%241%40news.microsoft.com

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx


Relevant Pages

  • Re: RWW
    ... the only difference is the NTFS permissions on the ... In fact the metabase need password only when restore to local server. ... The problem may be caused by corrupt Remote virtual directory, ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Delegate Control... Reset Passwords
    ... Also, If I check the Security properties of an actual user account, I don't ... PCAdmins from the "Print Operators" group, ... that Read and Write permissions in pwdLastSet attribute. ... RESET USER PASSWORDS ...
    (microsoft.public.windows.server.active_directory)
  • Re: RWW - Local Policy connect to desktop issue
    ... particular user account, but I've got no idea what it could be after ... permissions as well as the replace permissions. ... I see is in the logon script. ... properties and enabled the Remote Desktop service. ...
    (microsoft.public.windows.server.sbs)
  • Re: Delegation - Password Reset - Access Denied
    ... If you go to properties of an AD object, select the security tab and click ... on advanced you should be on the permissions tab. ... WARNING - Any implicit permissions defined will be lost and reset back to ... Accounts in the OU and found that the BldgAdmins group was not listed. ...
    (microsoft.public.windows.server.active_directory)
  • Network share as a Publishing Point source
    ... Give the common user appropriate permissions on folders, ... publishing points, ... >original account would keep me from mapping a publishing ... >>>I tried setting up a remote share for WM9 Services, ...
    (microsoft.public.windowsmedia.server)