Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

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 your 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 whenever the NIS server is not available.

Restrictions of the /etc/netgroup file  Top

Each line in the /etc/netgroup file can contain up to 4,096 characters. Make sure you stay within this constraint when adding entries to this file.

Format of a netgroup entry  Top

Each entry in the /etc/netgroup file contains the netgroup name and a member list. You can specify either of the following 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 rw, ro, and root options.

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 -rw=netgroup_name[:netgroup_name:...]

Example

The /etc/exports file contains the following entries:

/vol/vol0 -root=trusted-hosts,rw=trusted-hosts
/vol/vol0/home -rw=untrusted-hosts

Result

Hosts that belong to the trusted-hosts netgroup can mount the /vol/vol0 volume as read-write. The root user on any host which belongs to the trusted-hosts netgroup 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 Page (Alt-p) Next Page (Alt-n) Comments