Re: Printer permission
From: Corrado Lorefice (corrado.lorefice@phoenixspa.it)
Date: 09/13/02
- Next message: David Arroyo: "SYSVOL share issue"
- Previous message: Jim Campau: "Re: Distinction between the Everbody group and the Users Group"
- In reply to: Allison: "Re: Printer permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
>
- Next message: David Arroyo: "SYSVOL share issue"
- Previous message: Jim Campau: "Re: Distinction between the Everbody group and the Users Group"
- In reply to: Allison: "Re: Printer permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|