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.

Active IQ Unified Manager Discussions

What is the best way to run a command as a specific user

mszafran
3,147 Views

I'm calling a workflow from rest.  (From VMware VCO)   When I call the workflow from the WFA portal,  the powershell is executed as the user who is running the service.  When I run the workflow via a REST call, I get errors.

 

re Permissions - BASE] ### Command 'Grant Share Permissions - BASE' ###
13:58:32.148 ERROR  [Grant Share Permissions - BASE] Command failed for Workflow 'Create a Clustered Data ONTAP Qtree CIFS Share - mszafran' with error : \\SVM_MSZAFRAN\qtreevco2: Access is denied.
13:58:32.152 INFO  [Grant Share Permissions - BASE] ***** Workflow Execution Failed *****

 

Here are the offending commands:


icacls \\$NetbiosServer\$ShareName /grant $DomainName\"$RWGroupName":"(OI)(CI)M"    
icacls \\$NetbiosServer\$ShareName /grant $DomainName\"$ROGroupName":"(OI)(CI)RX"
icacls \\$NetbiosServer\$ShareName /remove "Everyone"

 

 

What is best to do here?    Is there a powershell equivalent of sudo or something that is spiffy for this?

1 REPLY 1

mszafran
3,124 Views

Lesson Learned:   Make sure all the variables you want to get from the user that you need for the workflow to complete are marked mandatory.   I had a typo in one of the my really long and descriptive variable names.

Public