Subscribe
Frequent Contributor
Accepted Solution

Share properties

Hello,

I'm working on a script that checks if ABE (Access-based enumeration) is properly set on a share.

For example:

1. I set ABE on a share:

filer> cifs shares -change dummy -accessbasedenum

2. I set "novscan" on a share:

filer>  cifs shares -change dummy -novscan

3. I check the settings:

filer> cifs shares dummy

Name         Mount Point                       Description

----         -----------                       -----------

dummy        /vol/voldummy

             ... virus scanning disabled

             ... access based enum supported

                        everyone / Full Control

=> everything's fine

Now, I want to collect the same data with a PS script:

$filer = connect-nacontroller nas-adf15 -rpc

$cifs_shares = Get-NaCifsShare -Share '*' -Controller $filer

Foreach ($cifs_share in $cifs_shares) {

  Write-Host $("****** " + $cifs_share.ShareName)

  Write-Host $("MountPoint           : " + $cifs_share.MountPoint)

  Write-Host $("Vscan enabled        : " + $cifs_share.IsVscan)

  Write-Host $("ABE enabled          : " + $cifs_share.IsAccessBasedEnum)

  Write-Host $("ABE specified        : " + $cifs_share.IsAccessBasedEnumSpecified)

}

Result:

****** dummy

MountPoint           : /vol/voldummy

Vscan enabled        : False

ABE enabled          :

ABE specified        : False

Why is variable "IsAccessBasedEnum" empty and "IsAccessBasedEnumSpecified" set to "False" please?

Thanking you in advance,

Kind regards,

Michel

Re: Share properties

Hi Michel,

  I tested exactly what you did and it works for me.  Here are some questions:

- What version of the Powershell toolkit are you running?  Get-NaToolkitVersion

- Does running this show ABE?  Get-NaCifsShare | FL *

- What about Invoke-Nassh "cifs shares dummy"?

According to your output, the system believes ABE is NOT set on your share.  Can you verify it didn't get unset before you tested with Powershell?

Frequent Contributor

Re: Share properties

Hello,

Thanks for your answer, I'm wondering why it worked for you :-(

FYI the controller is running 8.1.2P1 and I'm running Powershell on Win7

PS C:\> $host.version

Major  Minor  Build  Revision

-----  -----  -----  --------

2      0      -1     -1

Answers to your questions:

PS C:\Users\Public\Documents\PowerShell> Get-NaToolkitVersion

Major  Minor  Build  Revision

-----  -----  -----  --------

2      3      0      86

=> latest version

PS C:\Users\Public\Documents\PowerShell> Get-NaCifsShare -Controller $pfiler -Share "dummy" | FL *

Caching                            :

Description                        :

DirUmask                           :

FileUmask                          :

Forcegroup                         :

IsAccessBasedEnum                  :

IsBrowse                           :

IsNamespaceCachingAllowed          :

IsSymlinkStrictSecurity            :

IsVolOffline                       :

IsVscan                            : False

IsVscanread                        :

IsWidelink                         :

Maxusers                           :

MountPoint                         : /vol/voldummy

ShareName                          : dummy

Umask                              :

DirUmaskSpecified                  : False

FileUmaskSpecified                 : False

IsAccessBasedEnumSpecified         : False

IsBrowseSpecified                  : False

IsNamespaceCachingAllowedSpecified : False

IsSymlinkStrictSecuritySpecified   : False

IsVolOfflineSpecified              : False

IsVscanreadSpecified               : False

IsVscanSpecified                   : True

IsWidelinkSpecified                : False

MaxusersSpecified                  : False

UmaskSpecified                     : False

=> nothing relevant for ABE :-(

PS C:\Users\Public\Documents\PowerShell> Invoke-NaSsh -Controller $pfiler -Credential $NaCredential -command "cifs shares dummy"

Name         Mount Point                       Description

----         -----------                       -----------

dummy        /vol/voldummy

             ... virus scanning disabled

             ... access based enum supported

                        everyone / Full Control

filer> cifs shares dummy

Name         Mount Point                       Description

----         -----------                       -----------

dummy        /vol/voldummy

             ... virus scanning disabled

             ... access based enum supported

                        everyone / Full Control

=> either onvoke-nassh or the command itself show consistent results

Thanking you in advance,

Kind regards,

Michel

Re: Share properties

Hi... we are seeing the same issue... get-nacifsshare does not contain any info on ABE... DOT 8.1.2, PST 2.3 ... puzzled... did you find a solution?

Re: Share properties

Hi...

I encountered the same issue and investigated internally.

-> It's a bug in the PowerShell Toolkit that will be fixed in a future release.

(I can confirm that this issue is fixed in the current internal beta of PST 2.4... )

Regards,

Mike

Frequent Contributor

Re: Share properties

Good to know, thanks! :-)