Results 1 to 8 of 8
  1. #1
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    NTFS share enumeration

    What <big>command-line tools</big> do people use for listing all the disk shares on a server or PC, and the share permissions for each? I need to be able to have the output (at least) as a flat file...

    I'm finding that a mixture of NET SHARE and SysInternals' ShareEnum does the job mostly, but unaccountably ShareEnum does not include the share name, and NET SHARE followed by NET SHARE <sharename> is a bit too tedious...

    All bright ideas gratefully received!

    Thanks

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: NTFS share enumeration

    John,

    Have a look at ShrFlgs <img src=/S/free.gif border=0 alt=free width=30 height=15>. Quite a number of other admin tools at the site. BTW, ShareEnum 1.6 appears to display the share name under the Share Path column on my XP Pro system.

    Joe
    Joe

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: NTFS share enumeration

    Joe

    Yes, you're probably correct about the sharename (as being part of the share path). Perhaps I was thrown by it only displaying a single sharename no matter how many additional sharenames have been used for the same point.

    ShrFlgs doesn't seem to say anything about share permissions, unless they're coded in what is shown as 'SDDL'...

    Thanks

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: NTFS share enumeration

    John

    I believe it is only one share name per line. All share names appear when I execute it.

    Joe
    Joe

  5. #5
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: NTFS share enumeration

    Joe

    I may not be making myself clear about ShareEnum?

    A specific directory F:UsersCommDev is being shared as both "CommDev" and (an earlier version, not by me) also as "Community Development". (I didn't have time at the time to track down where the longer sharename was being used, to get rid of it, and then forgot all about it until I found it again using NET SHARE!) As far as I remember from this morning, only one of the two sharenames is shown by ShareEnum. I will check again tomorrow...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  6. #6
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: NTFS share enumeration

    John,

    You are clear enough I believe. I have one share name per line but have multiple share names, each its own entry, for the same local path. Try sorting by share path.

    Joe
    Joe

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: NTFS share enumeration

    Joe

    Yes, you are entirely correct. The sharenames show correctly in ShareEnum

    I also came across SrvCheck from the Windows Server 2003 Resource Kit, which lists all the share paths and the permissions granted to each user or group -- better than NET USE, in fact, if you don't need to see hidden shares...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  8. #8
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,572
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: NTFS share enumeration

    John,

    Looks as though you've got something that ought to give you the information you were seeking. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Joe
    Joe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •