ONTAP Discussions

Bulk Change share permissions using CLI

emollonb2s
7,444 Views

Hi everyone I just created a bunch of shares using CLI using copy and paste like this

 

cifs share create -vserver CPTSVFIGUFS1 -share-name ana.henriques -path /volDatos/Users/ana.henriques

 

but all of them are on this Everyone / Full Control and i want to change all to NT AUTHORITY\Authenticated Users but not using the web service, i want to use the CLI because there are a lot of shares to change.

 

CPTSVFIGUFS1   ana.henriques /volDatos/Users/  oplocks    -        Everyone / Full Control
                             ana.henriques     browsable
                                                      changenotify

 

There is anyone who can help me with this, i just tried this sentence

CPTSVFIGUCTRL0::> vserver cifs share access-control modify -user-or-group "NT AUTHORITY\Authenticated" -share ana.henriques  -permission Full_Control

Error: command failed: Failed to modify ACE on CIFS share ana.henriques when the ACE on this share/user combination doesn't exists.  Need to create one first.

 

But i go this error

 

OR

 

CPTSVFIGUCTRL0::> vserver cifs share access-control create -share ana.henriques -user-group-type windows -user-or-group  "NT AUTHORITY\Authenticated" -permission Full_Control

Error: command failed: Failed to resolve the security identifier (SID) for the account named "NT AUTHORITY\Authenticated". Reason: Bad user 'Authenticated' or domain 'NT
       AUTHORITY'.

 

So i'm stuck at this point.

 

Any help?

 

Kind regards.

1 ACCEPTED SOLUTION

emollonb2s
7,437 Views

I can respond myselve, just adding Users at the end of the sentence 😞 my fault

 

vserver cifs share access-control create -share andreia.neto -user-group-type windows -user-or-group  "NT AUTHORITY\Authenticated Users" -permission Full_Control

 

It's solved!!

 

View solution in original post

1 REPLY 1

emollonb2s
7,438 Views

I can respond myselve, just adding Users at the end of the sentence 😞 my fault

 

vserver cifs share access-control create -share andreia.neto -user-group-type windows -user-or-group  "NT AUTHORITY\Authenticated Users" -permission Full_Control

 

It's solved!!

 

Public