Solaris Naming Administration Guide

Creating New Contexts

The fncreate command is used to create contexts.


fncreate -t context [-f file] [-o] [-r reference] [-s] [-v] [-D] name
Table 20-5 fncreate Command Options

Option 

Description 

-t context

Create context of type context. Context types can be: org, hostname, host, username, user, service, fs, site, nsid, and generic.

-f file

Use an input file to list users and hosts for whom to create contexts. 

-r reference

Type of reference. The -r reference option can only be used with -t generic.

name

A composite name 

-o

Create only the context identified by name.

-s

Overwrite (supersede) any existing binding. If -s is not used, fncreate will fail if name is already bound.

-D

Display information about each context and corresponding tables, directories, and files as it is created. 

-v

Verbose. Display information about each context as it is displayed. 

For example:

To create a context and subcontexts for the root organization:


# fncreate -t org org//

To create a context, and subcontexts, for the host deneb:


# fncreate -t host host/deneb

To create a context, service and file subcontexts, and then add a calendar binding for the user sisulu:


# fncreate -t user user/sisulu
# fnbind -r user/sisulu onc_calendar onc_cal_str sisulu@deneb

To create a site context for the sales organization:


# fncreate -t site org/sales/site/

The site context supports a hierarchal namespace, with dot-separated right-to-left names, which allows sites to be partitioned by their geographical coverage relationships. For example, to create a site context alameda and a site subcontext bldg-6.alameda for it:


# fncreate -t site org/sales/site/alameda
# fncreate -t site org/sales/site/bldg-6.alameda