Re: Printer permission

From: Corrado Lorefice (corrado.lorefice@phoenixspa.it)
Date: 09/13/02


From: "Corrado Lorefice" <corrado.lorefice@phoenixspa.it>
Date: Fri, 13 Sep 2002 07:13:06 -0700


Unfortunately you suggestion work only with files, not for
printer, other ideas ?
bye

>-----Original Message-----
>Once you register the adssecurity.dll you can use the
SecurityDescriptor to set permissions.
>
>While the following applies to a file... I imagine you
can substitute 'FILE' (LINE7) for 'PRINTER'...
>
>Const ADS_RIGHT_GENERIC_READ = &H80000000
>Const ADS_RIGHT_GENERIC_EXECUTE = &H20000000
>Const ADS_ACETYPE_ACCESS_ALLOWED = 0
>
>Set sec = CreateObject("ADsSecurity")
>
>Set sd = sec.GetSecurityDescriptor
("file://c:\public\specs")
>Set dacl = sd.DiscretionaryAcl
>
>'-- Show the ACEs in the DACL ----
>For Each ace In dacl
> wscript.echo ace.Trustee
> wscript.echo ace.AccessMask
> wscript.echo ace.AceType
>Next
>
>Set ace = CreateObject("AccessControlEntry")
>ace.Trustee = "ARCADIABAY\jsmith"
>ace.AccessMask = ADS_RIGHT_GENERIC_READ Or
ADS_RIGHT_GENERIC_EXECUTE
>ace.AceType = ADS_ACETYPE_ACCESS_ALLOWED
>
>dacl.AddAce ace
>sd.DiscretionaryAcl = dacl
>sec.SetSecurityDescriptor sd
>"Corrado Lorefice" <corrado.lorefice@phoenixspa.it> wrote
in message news:b28d01c254ce$f94ca0a0
$36ef2ecf@tkmsftngxa12...
>> How can i modify printer security permission from a vb
>> script or create a security descriptor from vb (haven't
>> found example anywhere) ?
>>
>> thanx
>> corrado
>



Relevant Pages

  • Strange behavior when setting ACL on NTFS Folder
    ... ACE entry on it, using the right-click properties Explorer UI. ... I create a "patient" folder under acltest using the first pasted ... actually write them out into whatever Security mechanism NTFS ... 'Specified User or Group was NOT found in the existing DACL. ...
    (microsoft.public.win32.programmer.wmi)
  • Strange behavior when setting ACL on NTFS Folder
    ... ACE entry on it, using the right-click properties Explorer UI. ... I create a "patient" folder under acltest using the first pasted ... actually write them out into whatever Security mechanism NTFS ... 'Specified User or Group was NOT found in the existing DACL. ...
    (microsoft.public.scripting.vbscript)
  • Re: Printer permission
    ... Once you register the adssecurity.dll you can use the SecurityDescriptor to set permissions. ... Const ADS_RIGHT_GENERIC_EXECUTE = &H20000000 ... For Each ace In dacl ... > script or create a security descriptor from vb (haven't ...
    (microsoft.public.win2000.security)
  • Re: Customizable security in NTFS? Needs to be extensible & dynamic
    ... immediate access to the folder for the user. ... implementation is used when computing effective access rights. ... user a member of a group results in the user becoming "security ... ACEs to a DACL on NTFS] can be assigned dynamically in the file system on ...
    (microsoft.public.development.device.drivers)
  • Re: AD Schema extension and ACLing
    ... The security stuff is hard. ... ACL the objects using that CAR. ... you have to decide how to apply this ACE that uses the CAR. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)