NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

[Fixed] Powershell & cDOT - "Incorrect credentials" error

matthewf
3,460 Views

I’m using the NetApp Powershell Toolkit to programmatically perform some tasks. After I establish a connection to my cluster using the admin credentials in Powershell, commands which are READ operations (Get-NcCifsShare) work fine, data comes back from the cluster without issue. However certain operations which WRITE (Add-NcCifsShare) return the following error:

Add-NcCifsShare : Incorrect credentials for ATL-PRD-NTAP.
At line:3 char:5
+ Add-NcCifsShare -Name $srcShare.ShareName -Path ("/" + $mirror.De ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (SVM_CIFS:NcController) [Add-NcCifsShare], NaAuthException
+ FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Cifs.AddNcCifsShare


Obviously my credentials are correct, because I’m able to return data.

I’m wondering if this may be a SECURITY ROLE or API PERMISSIONS error, although I’m using ADMIN (also tried VSADMIN and connecting directly to an SVM, same effect) and I see that admin user is assigned admin role, which has permissions of “default", which seems to include permissions for all commands.

Anyone see this? Anyone have ideas?

1 REPLY 1

matthewf
3,443 Views

FIXED

 

Sample of the command I was passing in:

 

Add-NcCifsShare -Name $name -Path ("/" + $name) -Comment "test share" -Controller $DestController -VserverContext $SVM

 

The issue was with the -Controller parameter. Removing it allows the command to run without an "incorrect credentials" error.

Public