[OmniOS-discuss] Multiple root mappings of a NFS share
Michael Talbott
mtalbott at lji.org
Fri Aug 21 00:25:40 UTC 2015
Found the answer to my own question. I had to avoid the root_mapping option all together. Instead, I used the uidmap parameter in combination of ro/rw lists to make everything work the way I need. It's ugly, but it seems to fit my needs.
share -F nfs -p -o \
uidmap=\
0:0:@10.0.3.17\
~0:0:@10.0.3.45\
~0:0:@10.0.3.180\
~0:nobody:@10.0.100.0/24\
,rw=@10.0.100.0/24:@10.0.3.45:@10.0.3.17\
,ro=@10.0.3.180:@10.0.3.45\
/path2share
________________________
Michael Talbott
Systems Administrator
La Jolla Institute
> On Aug 20, 2015, at 3:10 PM, Michael Talbott <mtalbott at lji.org> wrote:
>
> Is it possible to share one directory with different root mappings to different clients? I know on my previous linux box it was easy to do but haven't found the equivalent on OmniOS.
>
> If there were a way to have the system append to a share via the share command, I could get all the functionality I want by using separate commands like so:
>
> #read/write. prevent root access from clients
>
> share -F nfs -p -o root_mapping=nobody,rw=@10.0.100.0 <mailto:rw=@10.0.100.0>/24,root=@10.0.100.0 <mailto:root=@10.0.100.0>/24 /path2share
>
> #read-only and map all to root
>
> share -F nfs -p -o root_mapping=root,ro=@10.0.3.180 <mailto:ro=@10.0.3.180>:@10.0.3.45,root=@10.0.3.180 <mailto:root=@10.0.3.180>:@10.0.3.45 /path2share
>
>
> But.. The second share command wipes out the first one :( So I try to combine them like so:
>
>
> #combined that gives me proper rw/ro and root mapped to nobody.. but, I want the ro client root users to map to root instead of nobody
>
> share -F nfs -p -o \
> root_mapping=nobody\
> ,root=@10.0.100.0 <mailto:root=@10.0.100.0>/24:@10.0.3.180:@10.0.3.45\
> ,rw=@10.0.100.0 <mailto:rw=@10.0.100.0>/24\
> ,ro=@10.0.3.180 <mailto:ro=@10.0.3.180>:@10.0.3.45\
> /path2share
>
> It seems I can only have one root_mapping option and get an error if I stick another one in there hoping it'll parse in order of appearance. Is there somehow a way to have multiple root_mapping options based on the host or network for any single nfs export? Or does anyone have an idea of a workaround for this sort of situation?
>
>
>
> ________________________
> Michael Talbott
> Systems Administrator
> La Jolla Institute
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20150820/75b2be1e/attachment-0001.html>
More information about the OmniOS-discuss
mailing list