Network and Storage Protocols

add CIFS shares from CLI

pluckyduck
6,892 Views

I need to add several CIFS shares and I would prefer to do it via the CLI.  I can't figure out how to exclude "everyone" and specify certain domains/groups with the initial cifs share -add command.  For example, I want to create share1 with access for only domain1/group1, domain1/group2, & domain1/group3 and not have it open to everyone.  Can someone give me the exact syntax for that command?

1 REPLY 1

dennis_von_eulenburg
6,892 Views

Hey pluckyduck,

the reason, that you can't figure out how to exclude/include users with "cifs shares -add" is that you cannot do it in one step.

First you have to create the share: cifs shares -add share1 /vol/vol1

Second, remove everyone/fullC. : cifs access -delete share1 everyone

And the last one: cifs access share1 -g domain1\|group1 "Full Control"

Public