nischttl (更改NIS +对象的生存时间值)

rose1 发表于 2020-10-17 02:06

在Solaris操作系统上,nischttl命令更改NIS +对象的生存时间值。



1 nischttl 运行系统环境

2 nischttl 说明

3 nischttl 语法

4 nischttl 例子

nischttl 运行系统环境


nischttl 说明

nischttl将NIS +对象或名称指定的条目的生存时间值(“ ttl ”)更改为time。使用索引名称指定条目。



如果主NIS +服务器未运行,则该命令将失败。




nischttl changes the time-to-live value ("ttl") of the NIS+ objects or entries specified by name to time. Entries are specified using indexed names (see nismatch).

The time-to-live value is used by object caches to expire objects within the cache. When an object is read into the cache, this value is added to the current time in seconds yielding the time when the cached object would expire. The object may be returned from the cache until the current time is earlier than the calculated expiration time. When the expiration time has been reached, the object will be flushed from the cache.

The time-to-live time may be specified in seconds or in days, hours, minutes, seconds format. The latter format uses a suffix letter of dhm, or s to identify the units of time. See the examples below for usage.

The command will fail if the master NIS+ server is not running.

Setting a high ttl value allows objects to stay persistent in caches for a longer period of time and can improve performance. However, when an object changes, in the worst case, the number of seconds in this attribute must pass before that change is visible to all clients. Setting a ttl value of 0 means that the object should not be cached at all.

A high ttl value is a week, a low value is less than a minute. Password entries should have ttl values of about 12 hours (easily allows one password change per day), entries in the RPC table can have ttl values of several weeks (this information is effectively unchanging).

Only directory and group objects are cached.



nischttl 语法

nischttl [-AfLP] time name...


-A 修改串联 路径中与name中指定的搜索条件匹配的所有表。此选项暗含-P开关。
-f 强制执行操作,如果操作失败,则静默失败。
-L 跟踪链接并更改链接对象或条目的生存时间,而不是链接本身的生存时间。
-P 遵循命名表中的串联路径。仅当名称是索引名称或还指定了-L开关并且命名对象是指向条目的链接时,此选项才有意义。


如果设置了NIS_PATH 环境变量,并且NIS +名称不完全限定,则将搜索指定的每个目录,直到找到对象为止。

nischttl [-AfLP] time name...


-A Modify all tables in the concatenation path that match the search criterion specified in name. This option implies the -P switch.
-f Force the operation and fail silently if it does not succeed.
-L Follow links and change the time-to-live of the linked object or entries rather than the time-to-live of the link itself.
-P Follow the concatenation path within a named table. This option only makes sense when either name is an indexed name or the -L switch is also specified and the named object is a link pointing to entries.


If the NIS_PATH environment variable is set, and the NIS+ name is not fully qualified, each directory specified will be searched until the object is found. See nisdefaults.



nischttl 例子

nischttl 1d12h object

将NIS +对象对象的生存时间设置为36小时(1天,12小时)。

nischttl 129600 object

将NIS +对象对象的生存时间设置为129600秒(一个半天)。

nischttl 1h30m '[uid=99],passwd.org_dir'


nischttl 1d12h object

Set the time-to-live of NIS+ object object to 36 hours (1 day, 12 hours).

nischttl 129600 object

Set the time-to-live of NIS+ object object to 129600 seconds (one and a half days).

nischttl 1h30m '[uid=99],passwd.org_dir'

Change the time-to-live of a password entry to 90 minutes.




newalias | newform | newgrp | niscat | nischmod | nischown | nisdefaults | nl | nohup | nroff | nice |