命令行大全

nisdefaults

rose1 发表于 2020-10-18 05:15浏览次数:

在Solaris操作系统上,nisdefaults命令显示NIS +缺省值。

查看英文版

目录:

1 nisdefaults 运行系统环境

2 nisdefaults 说明

3 nisdefaults 语法

4 nisdefaults 例子

nisdefaults 运行系统环境

Linux

nisdefaults 说明

在参阅nisdefaults实用程序输出是通过调用NIS +本地名称函数返回的默认值。没有指定任何选项,所有默认设置都将以详细格式打印。使用options时,只有该选项以适合shell 脚本的简洁形式显示。请参见下面的示例。
The nisdefaults utility prints the default values that are returned by calls to the NIS+ local name functions. With no options specified, all defaults will be printed in a verbose format. With options, only that option is displayed in a terse form suitable for shell scripts. See the example below.

查看英文版

查看中文版

nisdefaults 语法

nisdefaults [-adghprstv]

选件

-a 以简洁的格式打印所有默认设置。
-d 打印默认域名。
-g 打印默认的组名。
-h 打印默认主机名。
-p 打印默认的主体名称。
-r 打印将用于创建新对象的默认访问权限。
-s 打印默认目录搜索路径。
-t 打印默认生存时间值。
-v 以详细格式打印默认值。这会将标识字符串添加到输出中。

环境

nisdefaults使用以下环境变量:

NIS_DEFAULTS 包含默认字符串的变量,它将覆盖NIS +标准默认值。默认字符串是一系列用冒号分隔的标记。这些标记表示用于通用对象属性的默认值。合法令牌是:

ttl=时间 令牌为创建的对象设置默认生存时间。时间值以nischttl命令定义的格式指定。默认值为12小时。
所有者=ownername 指定NIS +主体所有者名称应拥有创建对象的令牌。该值的默认值为执行命令的主体。
group=groupname 用于指定组groupname应该是所创建对象的组所有者的令牌。默认值为NULL。
access=rights 令牌,用于指定要为创建的对象授予的访问权限集。值权限以nischmod命令定义的格式指定。默认值为:
----rmcdr---r---
NIS_GROUP 包含本地NIS +组名称的变量。如果名称不完全限定,则会将默认域附加到该名称。
NIS_PATH 覆盖默认NIS +目录搜索路径的变量。它包含以' : '(冒号)字符分隔的目录的有序列表。' $ '(美元符号)字符被特殊对待。以“ $ ”结尾的目录名称附加了默认域,并且“ $ ”本身被默认域和全局根之间的目录列表替换,该目录至少深两个级别。缺省NIS +目录搜索路径为' $ '。有关更多详细信息,
请参阅NIS +中的“名称扩展”小节。
nisdefaults [-adghprstv]

Options

-a Print all defaults in a terse format.
-d Print the default domain name.
-g Print the default group name.
-h Print the default hostname.
-p Print the default principal name.
-r Print the default access rights with which new objects will be created.
-s Print the default directory search path.
-t Print the default time to live value.
-v Print the defaults in a verbose format. This prepends an identifying string to the output.

Environment

nisdefaults makes use of the following environment variables:

NIS_DEFAULTS Variable that contains a defaults string that will override the NIS+ standard defaults. The defaults string is a series of tokens separated by colons. These tokens represent the default values to be used for the generic object properties. Legal tokens are:

ttl=time Token that sets the default time to live for objects that are created. The value time is specified in the format as defined by the nischttl command. The default value is 12 hours.
owner=ownername Token that specifies that the NIS+ principal ownername should own created objects. The default for this value is the principal who is executing the command.
group=groupname Token that specifies that the group groupname should be the group owner for created objects. The default is NULL.
access=rights Token that specifies the set of access rights that are to be granted for created objects. The value rights is specified in the format as defined by the nischmod command. The default value is:

----rmcdr---r---
NIS_GROUP Variable that contains the name of the local NIS+ group. If the name is not fully qualified, the default domain will be appended to it.
NIS_PATH Variable that overrides the default NIS+ directory search path. It contains an ordered list of directories separated by ':' (colon) characters. The '$' (dollar sign) character is treated specially. Directory names that end in '$' have the default domain appended to them, and a '$' by itself is replaced by the list of directories between the default domain and the global root that are at least two levels deep. The default NIS+ directory search path is '$'.

Refer to the Name Expansion subsection in NIS+ for more details.

查看英文版

查看中文版

nisdefaults 例子

nisdefaults

显示默认的NIS值。输出将类似于以下示例:

Principal Name : example.computerhope.com.
Domain Name    : computerhope.com.
Host Name      : example.computerhope.com.
Group Name     :
Access Rights  : ----rmcdr---r---
Time to live   : 12:00:00
Search Path    : computerhope.com.
nisdefaults

Display default NIS values. Output will appear similar to the following example:

Principal Name : example.computerhope.com.
Domain Name    : computerhope.com.
Host Name      : example.computerhope.com.
Group Name     :
Access Rights  : ----rmcdr---r---
Time to live   : 12:00:00
Search Path    : computerhope.com.

查看英文版

查看中文版