fncreate(1M)
NAME
fncreate - create an FNS context
SYNOPSIS
fncreate -t context_type [-Dosv] [-f input_file] [-
r reference_type] composite_name
DESCRIPTION
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, composite_name, for the con-
text to be created. In addition to creating the context
named, fncreate also creates subcontexts of the named con-
text using FNS Policies of what types of contexts should be
bound in those contexts. See fns_policies(5).
fncreate discovers which naming service is in use and
creates contexts in the appropriate naming service. When FNS
is being initially set up, it will by default create con-
texts for NIS+. This default can be changed by the use of
fnselect(1M) to explicitly select a naming service.
When using FNS for a NIS+ environment, fncreate creates NIS+
tables and directories in the NIS+ hierarchy. See
fns_nis+(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.
When using FNS for a NIS environment, fncreate creates NIS
maps and hence must be executed as superuser on the NIS mas-
ter of the FNS-related maps. See fns_nis(5) for more
information specific to the use of FNS in a NIS environment.
When using FNS for an environment that uses /etc files for
its naming information, fncreate creates files in the
/var/fn directory. See fns_files(5) for more information
specific to the use of FNS for files.
OPTIONS
The following options are supported:
-D Information about the creation of a context, and
corresponding NIS+ directories and tables, or NIS
maps, or files entry, is displayed as each context is
created.
-f input_file
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
passwd or hosts database of the naming service (that
is, for NIS+ these are the 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 passwd or hosts
database.
-o Only the context named by composite_name is created;
no subcontexts are created. When this option is omit-
ted, subcontexts are created according to the FNS Pol-
icies for the type of the new object.
-t context_type
The following are valid entries for context_type:
org Create organization context, and default subcon-
texts, for an existing NIS+ domain, NIS domain,
or /etc files environment.
For NIS+, composite_name is of the form
org/domain/ where domain is a NIS+ domain. An
empty domain name indicates the creation of the
organization context for the root NIS+ domain;
otherwise, the domain name names the correspond-
ing NIS+ domain. domain can be either the
fully-qualified NIS+ domain name - dot ('.')-
terminated - or the NIS+ domain name named rela-
tive 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 sub-
domain of Wiz.COM., execute either of the fol-
lowing 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 direc-
tory of the organization named.
For NIS or an /etc files environment, domain
should be NULL (empty) because NIS and /etc
files do not support a hierarchy namespace of
domains. For example, the following command
creates the organization context for the NIS or
/etc files environment:
eg% fncreate -t org org//
For NIS+, NIS, and /etc files, creating the
organization context also creates the
organization's immediate subcontexts host, user,
and service and their subcontexts. This
includes a context for every host entry in the
corresponding hosts database of the naming ser-
vice (that is, hosts.org_dir NIS+ table, or
hosts NIS map, or /etc/hosts file), and a con-
text for every user entry in the passwd database
of the naming service (that is, passwd.org_dir
NIS+ table, or passwd NIS map, or /etc/passwd
file) unless the option -o is specified. Bind-
ings for these subcontexts are recorded under
the organization context.
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 the
reverse (that is, 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
database of the naming service (hosts.org_dir
NIS+ table, or hosts NIS map, or /etc/hosts
file), unless either option -o or -f is
specified. The following example creates host
contexts for all hosts in the sales organiza-
tion:
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.
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/
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 the
reverse. Also create a user context for every
user entry in the corresponding passwd database
of the naming service (that is, passwd.org_dir
NIS+ table, or passwd NIS map, or /etc/passwd
file), unless either the option - o or -f is
specified. The following example creates user-
name contexts for all users in the sales organi-
zation:
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.
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/
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 the reverse. Typi-
cally, a service context need not be created
explicitly since it is created by default, as a
subcontext under org, host, or user contexts.
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 the reverse.
Typically, a file system context need not be
created explicitly since it is created by
default, as a subcontext of a user or host con-
text.
The file system context of a user is the user's
home directory as stored in the passwd database
of the naming service (that is, in NIS+ table
passwd.org_dir, or passwd NIS map, or
/etc/passwd file). 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.
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 the
reverse. Typically, a site context is created at
the same level as the org context and is used
for creating a geographical namespace that com-
plements the organizational namespace of an
enterprise.
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 con-
text 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.
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 gen-
eric context; otherwise, the reference type is
onc_fn_generic.
-r reference_type
Use reference_type as the reference type of the gen-
eric context being created. This option can be used
only 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.
OPERANDS
The following operand is supported:
composite_name
An FNS named object.
EXAMPLES
Example 1: Creating A Host Context
This example illustrates the creation of a host context in
the root organization and a user context in a sub-
organization.
The following command creates a context, and subcontexts,
for the root organization:
% fncreate -t org org//
It causes the following commands to be invoked automati-
cally:
% fncreate -t service org//service/
% fncreate -t hostname org//host/
% fncreate -t username org//user/
The following command creates a context, and subcontexts,
for host sylvan:
% fncreate -t host org//host/sylvan/
It causes the following commands to be invoked automati-
cally:
% fncreate -t service org//host/sylvan/service/
eg% fncreate -t fs org//host/sylvan/fs/
The following command creates a context, and subcontexts,
associated with a sub-organization dct:
% fncreate -t org org/dct/
It causes the following commands to be invoked automati-
cally:
% fncreate -t service org/dct/service/
% fncreate -t hostname org/dct/host/
% fncreate -t username org/dct/user/
The following command creates a context, and subcontexts,
for user msmith:
% fncreate -t user org/dct/user/msmith/
It causes the following commands to be invoked automati-
cally:
% fncreate -t service org/dct/user/msmith/service/
% fncreate -t fs org/dct/user/msmith/fs/
The following commands create service contexts:
% fncreate -t service org/dct/service/fax
% fncreate -t service org/dct/service/fax/classA
EXIT STATUS
0 Operation was successful.
1 Operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWfns |
|_____________________________|_____________________________|
SEE ALSO
nis(1), fncheck(1M), fncreate_fs(1M), fndestroy(1M),
fnselect(1M), nissetup(1M), xfn(3XFN), attributes(5),
fns(5), fns_files(5), fns_nis(5), fns_nis+(5),
fns_policies(5), fns_references(5)
Man(1) output converted with
man2html