share permissions and enumerating shares 
Author Message
 share permissions and enumerating shares

Hi

I am trying to find out how to enumerate shares on a computer and
finding out what permission is on the share (not the file and
directories underneath), but the share.

Can anyone tell me how to do this.  I know you can use net view
\\computername to enumerate the shares and pipe that into a text file,
but how about the permissions.

I also know that you can read the registry key
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Share
s] and get a number that changes when you add different groups to the
share permissions list but how do I resolve this to account names.

TIA

Bindu

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 17 Jan 2003 03:00:00 GMT  
 share permissions and enumerating shares

Hi,

 security is not implemented in WinNT Provider for NT V4 and the lanmanager
object. With help of the ADSI SDK you may handle permissions on files and
the regsitry.

 The only scripatblke way for shares is WMI. Download the SDK, it has a
sample for creating a share and apply permissions.

Hope, this helps.

Best regards,
Manfred Braun

(Private)
Lange Roetterstrasse 7
D68167 Mannheim
Germany


(Remove the anti-spam-underscore to mail me!)



Quote:
> Hi

> I am trying to find out how to enumerate shares on a computer and
> finding out what permission is on the share (not the file and
> directories underneath), but the share.

> Can anyone tell me how to do this.  I know you can use net view
> \\computername to enumerate the shares and pipe that into a text file,
> but how about the permissions.

> I also know that you can read the registry key
> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Share
> s] and get a number that changes when you add different groups to the
> share permissions list but how do I resolve this to account names.

> TIA

> Bindu

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Fri, 17 Jan 2003 03:00:00 GMT  
 share permissions and enumerating shares
by using the rmtshare utility from the ntresource kit you can see all
permissions for a share
cacls also used in conjuntion with this to get file/folder permissions

i've used this to recrate the shares on a temporay server

basically i piped the rmtshare output into a text file and then read it back
into via another script  for reapplication

this will get you group and user share permissions to a folder

cheers

Deon Lasini


Quote:
> Hi

> I am trying to find out how to enumerate shares on a computer and
> finding out what permission is on the share (not the file and
> directories underneath), but the share.

> Can anyone tell me how to do this.  I know you can use net view
> \\computername to enumerate the shares and pipe that into a text file,
> but how about the permissions.

> I also know that you can read the registry key
> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Share
> s] and get a number that changes when you add different groups to the
> share permissions list but how do I resolve this to account names.

> TIA

> Bindu

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sat, 18 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. enumerating shares and share permissions with vbscript

2. Enumerating Permission set on File Share

3. Again : Enumerate Permission Set on Network Share

4. Enumerating Permissions set on a File Share

5. List shares and share permissions?

6. Creating a share with share permissions

7. enumerating shared printers on remote print server

8. Enumerate Share Points Using AdsSecurity Object

9. Enumerate share folders for UNC

10. enumerating shares

11. enumerating shares

12. Consistant Issue: Enumerating Shares

 

 
Powered by phpBB® Forum Software