fncreate(1M) manual page
Table of Contents
fncreate - Create an FNS context
fncreate -t context_type
[ -f input_file ] [ -o ] [ -r reference_type ] [ -s ] [ -v ] [ -D ] composite_name
SUNWfns
fncreate creates an FNS context of type
context_type, where a context_type must be one of org, hostname, host,
username, user, service, fs, site, nsid, or generic. It takes as the last
argument a composite name for the context to be created. In addition to
creating the context named, fncreate also creates subcontexts of the
named context using FNS Policies of what types of contexts should be bound
in those contexts. See fns_policies(5)
.
fncreate creates NIS+ tables and
directories in the NIS+ hierarchy. See fns(5)
for more information on the
necessary NIS+ credentials and the use of the environment variable NIS_GROUP
when using fncreate and other FNS commands.
- -t org
- Create organization
context, and default subcontexts, for an existing NIS+ domain. composite_name
is of the form org/domain/ where domain is an NIS+ domain name. An empty
domain name indicates the creation of the organization context for the
root NIS+ domain; otherwise, the domain name names the corresponding NIS+
domain. domain can be either the fully-qualified NIS+ domain name -- dot (’.’)
terminated -- or the NIS+ domain name named relative to the NIS+ root domain.
- For example, the following creates the root organization context and
- its
subcontexts for the NIS+ root domain Wiz.COM:
- eg% fncreate -t org org//
- The same
thing could have been achieved using the following command:
- eg% fncreate -t org org/Wiz.COM./
- Typically, this is the first FNS context created.
- To create the organization
context for a subdomain of Wiz.COM., execute
- either of the following commands:
- eg% fncreate -t org org/sales/
- or
- eg% fncreate -t org org/sales.Wiz.COM./
- Note that
if the corresponding NIS+ domain does not exist,
- fncreate fails. See nissetup(1M)
for setting up a NIS+ domain.
- A
- ctx_dir directory is created under the
directory of the organization named. Its immediate subcontexts host, user
and service and their subcontexts, including a context for every host entry
in the corresponding hosts.org_dir NIS+ table and every user entry in the
passwd.org_dir NIS+ table, are created unless the option -o is specified.
Bindings for these subcontexts are recorded under the organization context.
- -t hostname
- Create a hostname context in which atomic host names can be
bound, and bind the reference of the context to composite_name. If the
suffix of composite_name is host/, the hostname context created is also
bound to the composite name with this suffix replaced by _host/, and vice
versa (i.e. if a composite name with a _host/ suffix was supplied, a binding
would be created for host/ ). Also create a host context for every host
entry in the corresponding hosts.org_dir NIS+ table unless either options
-o or -f is specified.
eg% fncreate -t hostname org/sales/host/
Typically, a hostname
context need not be created explicitly since it is created by default,
as a subcontext under org.
- -t host
- Create a host context for a specific host,
and its service and fs subcontexts, and bind the reference of the context
to composite_name. For example, the following creates a host context and
service and fs subcontexts for host sylvan.
eg% fncreate -t host org/sales/host/sylvan/
- -t username
- Create a username context in which atomic user names can be
bound, and bind the reference of the context to composite_name. If the
suffix of composite_name is user/, the username context created is also
bound to the composite name with this suffix replaced by _user/, and vice
versa. Also create a user context for every user entry in the corresponding
passwd.org_dir NIS+ table unless either the options -o or -f is specified.
eg% fncreate -t username org/sales/user/
Typically, a username context need
not be created explicitly since it is created by default, as a subcontext
under org.
- -t user
- Create a user context for a specific user, and its service
and fs subcontexts, and bind the reference of the context to composite_name.
For example, the following creates a user context and service and fs subcontexts
for user jsmith.
eg% fncreate -t user org/sales/user/jsmith/
- -t service
- Create
a service context in which slash-separated left-to-right service names can
be bound, and bind the reference of the context to composite_name. If
the suffix of composite_name is service/, the service context created is
also bound to the composite name with this suffix replaced by _service/,
and vice versa. Typically, a service context need not be created explicitly
since it is created by default, as a subcontext under org, host, or user
contexts.
- -t fs
- Create a file system context for a user or host, and bind
the reference of the context to composite_name. The composite name must
be the name of a host or a user, with either fs/ or _fs/ appended to
it. If the suffix of composite_name is fs/, the file system context created
is also bound to the composite name with this suffix replaced by _fs/,
and vice versa.
- Typically, a file system context need not be created
- explicitly
since it is created by default, as a subcontext of a user or host context.
- The file system context of a user is the
- user’s home directory as stored
in the NIS+
table passwd.org_dir. The file system context of a host is
the set of NFS
file systems that the host exports.
- Use the
- fncreate_fs(1M)
command to create file system contexts for organizations and sites, or
to create file system contexts other than the defaults for users and hosts.
- -t site
- Create a site context in which dot-separated right-to-left site names
can be bound, and a service subcontext, and bind the reference of the context
to composite_name. If the suffix of composite_name is site/, the hostname
context created is also bound to the composite name with this suffix replaced
by _site/, and vice versa. Typically, a site context is created at the same
level as the org context and is used for creating a geographical namespace
that complements the organizational namespace of an enterprise.
- -t nsid
- Create
a context in which namespace identifiers can be bound. This context has
a flat namespace, in which only atomic names can be bound. An example of
such a context is the context to which the name site/east/ is bound. This
context can have the following bindings: site/east/host, site/east/user,
and site/east/service.
- -t generic
- Create a generic context in which slash-separated
left-to-right names can be bound, and bind the reference of the context
to composite_name. The option -r can be used to specify the reference type
to be associated with the context. If the -r option is omitted, the reference
type used is the reference type of the parent context if the parent context
is a generic context; otherwise, the reference type is onc_fn_generic.
- -f
- Create a context for every user or host listed in input_file. This option
is only applicable when used with the -t username or -t hostname options.
The format of the file is an atomic user name or host name per line. This
option is used to create contexts for a subset of the users/hosts found
in the corresponding NIS+ passwd.org_dir or hosts.org_dir tables, respectively.
If this option is omitted, fncreate creates a context for every user/host
found in the corresponding NIS+ passwd.org_dir or hosts.org_dir tables,
respectively.
- -o
- Only the context named by composite_name is created; no
subcontexts are created. When this option is omitted, subcontexts are created
according to the FNS Policies for the type of the new object.
- -r
- Use reference_type
as the reference type of the generic context being created. This option
can only be used with the -t generic option.
- -s
- Create the context and bind
it in to supercede any existing binding associated with composite_name.
If this option is omitted, fncreate fails if composite_name is already
bound.
- -v
- Information about the creation of a context is displayed as each
context is created.
- -D
- Information about the creation of a context, and corresponding
NIS+ directories and tables, is displayed as each context is created.
- This command returns 0 if it is successful. It returns 1 if it is
not successful.
The following examples illustrate creation of a host context in
the root organization and a user context in a sub-organization.
Create a
context, and subcontexts, for the root organization:
eg% fncreate -t org org//
It causes the following commands to be invoked automatically: eg% fncreate -t service org//service/
eg% fncreate -t hostname org//host/
eg% fncreate -t username org//user/
Create a
context, and subcontexts, for host sylvan:
eg% fncreate -t host org//host/sylvan/
It causes the following commands to be invoked automatically: eg% fncreate -t service
org//host/sylvan/service/
eg% fncreate -t fs org//host/sylvan/fs/
Create a context, and subcontexts,
associated with a sub-organization dct: eg% fncreate -t org org/dct/
It causes
the following commands to be invoked automatically: eg% fncreate -t service org/dct/service/
eg% fncreate -t hostname org/dct/host/
eg% fncreate -t username org/dct/user/
Create
a context, and subcontexts, for user msmith:
eg% fncreate -t user org/dct/user/msmith/
It causes the following command to be invoked automatically: eg% fncreate
-t service org/dct/user/msmith/service/
eg% fncreate -t fs org/dct/user/msmith/fs/
The following examples create
service contexts:
eg% fncreate -t service org/dct/service/fax
eg% fncreate -t
service org/dct/service/fax/classA
fncheck(1M)
, fncreate_fs(1M)
,
fndestroy(1M)
, nis(1)
, nissetup(1M)
, xfn(3N)
, fns(5)
, fns_policies(5)
,
fns_references(5)
Table of Contents