Library Table of Contents Index Previous Next Comments

How /etc/exports works

Exporting resources to netgroups from /etc/exports

About netgroups  Top

When exporting a resource, if you do not want to list names of individual hosts as targets, you can specify a predefined netgroup as the target.

You can create netgroups in the /etc/netgroup file on the filer or in the netgroup.byhost NIS map.

Relationship between /etc/netgroup and the netgroup.byhost map  Top

Information in the /etc/netgroup file is not linked to the netgroup.byhost NIS map. For example, the NIS master does not use the /etc/netgroup file as input for building the netgroup.byhost map. You can, however, copy the information from the NIS map to the /etc/netgroup file so that the filer can use the /etc/netgroup file at times when the NIS server is not available.

Restrictions on exporting to netgroups  Top

When exporting to netgroups, remember these restrictions:

Format of a netgroup entry  Top

Each entry in the /etc/netgroup file contains the netgroup name and a member list. You can specify one of these items in the member list:

Example of a netgroup file  Top

The following /etc/netgroup file contains three netgroups:

trusted-hosts (host1,,) (host2,,)
untrusted-hosts (host3,,) (host4,,) (host5,,)
all-hosts trusted-hosts untrusted-hosts

In an exports entry, you can specify the trusted-hosts, untrusted-hosts, or all-hosts netgroup as the export target with the access option.

Exporting a resource to a netgroup  Top

To export a resource to a netgroup, complete the following steps.

Step

Action

1

If...

Then...

You want the filer to use NIS for authenticating (PC)NFS users

Go to Step 2.

The filer is not an NIS client or you want to use different netgroup definitions from the ones specified in the netgroup.byhost map

Create the /etc/netgroup file, then go to Step 2.

2

Type the following entry in the /etc/exports file:

path_name -access=netgroup_name[:netgroup_name:...]
Example

The /etc/exports file contains the following entries:

/vol/vol0 -access=trusted-hosts,root=host1
/vol/vol0/home -access=untrusted-hosts
Result

Hosts that belong to the trusted-hosts netgroup can mount the /vol/vol0 volume as read-write. The root user on host1, which is a member of trusted-hosts, can access the /vol/vol0 volume as root. Hosts that belong to the untrusted-hosts netgroup can mount the /vol/vol0/home directory as read-write.

Library Table of Contents Index Previous Next Comments