2016-03-23 06:27 AM
I am new to NetApp world and having basic scripting skills.
Here is the details :
Domain name : contoso.com (fake name)
Server name : SRVBKP
Shares names : \\SRVBKP\firstname_secondname
The current situation is a bit confusing, I read the documentation about cifs access share [-g] user rights and cifs access -delete share [-g] user, but as it’s a production server, this why I need your assistance to create a script that:
Any help is most welcome,
Many Thanks for your help
2016-03-23 11:56 PM - edited 2016-03-23 11:59 PM
You should probably look at the NetApp management SDK for these kind of activities. SDK is available at http://support.netapp.com for download. The commands and procedures would depend on the languagae that you use. Roughly, the workflow would look like :
1. Create a list of sharenames that you are targeting ( This is required so that you dont mess up with other existing shares)
2. Loop through each item in the list, and get the ACL on the share. This can have mutiple entries, so another nested loop is needed here
3. Loop through each ACE, and delete it
4. After finishing all entries in step3, create an ACE for the desired user (which is hopefully the same as the sharename)
5. repeat and finish loop1.
for the last item in your message, download the secedit tool from http://mysupport.netapp.com/NOW/download/tools/secedit/ and create a text file with the ACLs. You can then copy that file into the vol0/etc, and run "fsecurity apply <filepath>" to apply the DACLs on your qtrees/volumes.
2016-03-24 04:55 AM - edited 2016-03-24 04:56 AM
Thank you for your relevant reply. The workflow seems to be fine.
As said, scripting is not my favourite thing, so I need at least a starting code, concerning the language, I would prefer PowerShell cmdlets.
I know I must Get the NA Controller name, the concerned shares and so on, but I am really not skilled in scripting.