JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Naming and Directory Services (NIS+)
search filter icon
search icon

Document Information

Preface

Part I About Naming and Directory Services

1.  Name Service Switch

Part II NIS+ Setup and Configuration

2.  NIS+: An Introduction

3.  NIS+ Setup Scripts

4.  Configuring NIS+ With Scripts

5.  Setting Up the NIS+ Root Domain

6.  Configuring NIS+ Clients

7.  Configuring NIS+ Servers

8.  Configuring an NIS+ Non-Root Domain

9.  Setting Up NIS+ Tables

Part III NIS+ Administration

10.  NIS+ Tables and Information

11.  NIS+ Security Overview

12.  Administering NIS+ Credentials

13.  Administering NIS+ Keys

14.  Administering Enhanced NIS+ Security Credentials

15.  Administering NIS+ Access Rights

16.  Administering NIS+ Passwords

17.  Administering NIS+ Groups

18.  Administering NIS+ Directories

NIS+ Directories

Using the niscat Command With NIS+ Directories

Listing the Object Properties of an NIS+ Directory

Using the nisls Command With Directories

Listing the Contents of an NIS+ Directory - Terse

Listing the Contents of an NIS+ Directory - Verbose

nismkdir Command

Creating an NIS+ Directory

Adding an NIS+ Replica to an Existing Directory

nisrmdir Command

Removing an NIS+ Directory

Disassociating a Replica From an NIS+ Directory

nisrm Command

Removing NIS+ Nondirectory Objects

rpc.nisd Daemon

Starting the rpc.nisd Daemon

Stopping the rpc.nisd Daemon

Changing rpc.nisd Syntax Options

nisinit Command

Three Methods to Initialize an NIS+ Client

Initializing the NIS+ Root Master Server

nis_cachemgr Daemon

Starting and Stopping the NIS+ Cache Manager

nisshowcache Command

Displaying the Contents of the NIS+ Cache

Pinging and Checkpointing in NIS+

nisping Command

Displaying When NIS+ Replicas Were Last Updated

Forcing a Ping in NIS+

Checkpointing an NIS+ Directory

nislog Command

Displaying the Contents of the NIS+ Transaction Log

nischttl Command

Changing the Time-to-Live of an NIS+ Object

Changing the Time-to-Live of an NIS+ Table Entry

19.  Administering NIS+ Tables

20.  NIS+ Server Use Customization

21.  NIS+ Backup and Restore

22.  Removing NIS+

23.  Information in NIS+ Tables

24.  NIS+ Troubleshooting

A.  NIS+ Error Messages

About NIS+ Error Messages

Common NIS+ Namespace Error Messages

B.  Updates to NIS+ During the Solaris 10 Release

Solaris 10 and NIS+

Glossary

Index

nischttl Command

The nischttl command changes the time-to-live value of objects or entries in the namespace. This time-to-live value is used by the cache manager to determine when to expire a cache entry. You can specify the time-to-live in total number of seconds or in a combination of days, hours, minutes, and seconds.

The time-to-live values you assign objects or entries should depend on the stability of the object. If an object is prone to frequent change, give it a low time-to-live value. If it is steady, give it a high one. A high time-to-live is a week; a low one is less than a minute. Password entries should have time-to-live values of about 12 hours to accommodate one password change per day. Entries in tables that don't change much, such as those in the RPC table, can have values of several weeks.

To change the time-to-live of an object, you must have modify rights to that object. To change the time-to-live of a table entry, you must have modify rights to the table, entry, or columns you wish to modify.

To display the current time-to-live value of an object or table entry, use the nisdefaults -t command, described in Chapter 15, Administering NIS+ Access Rights.

To change the time-to-live value of objects, use:

nischttl time-to-live object-name

or

nischttl [-L] time-to-live object-name

To change the time-to-live value of entries, use:

nischttl time-to-live \
 [column=value,...], \
 table-name

or

nischttl [-ALP] time-to-live \
 [column=value,...], \
 table-name

Where time-to-live is expressed as:

These values may be used in combination. For example, a TTL value of 4d3h2m1s would specify a time to live of four days, three hours, two minutes, and one second.

The following flags may also be used with the nischttl command.

Table 18-6 nischttl Syntax Options

Option
Purpose
A
All. Apply the change to all the entries that match the column=value specifications that you supply.
L
Links. Follow links and apply the change to the linked object rather than the link itself.
P
Path. Follow the path until there is one entry that satisfies the condition.

Changing the Time-to-Live of an NIS+ Object

To change the time-to-live of an object, type the nischttl command with the time-to-live value and the object-name. You can add the -L command to extend the change to linked objects.

nischttl -L time-to-live object-name

You can specify the time-to-live in seconds by typing the number of seconds. Or you can specify a combination of days, hours, minutes, and seconds by using the suffixes s, m, h, and d to indicate the number of seconds, minutes, days, and hours. For example:

client% nischttl 86400 sales.doc.com.
client% nischttl 24h sales.doc.com.
client% nischttl 2d1h1m1s sales.doc.com.

The first two commands change the time-to-live of the sales.doc.com. directory to 86,400 seconds, or 24 hours. The third command changes the time-to-live of all the entries in a hosts table to 2 days, 1 hour, 1 minute, and 1 second.

Changing the Time-to-Live of an NIS+ Table Entry

To change the time-to-live of entries, use the indexed entry format. You can use any of the options, -A, -L, or -P.

nischttl [-ALP] time-to-live \
 [column=value,...], \
 table-name

Note - C-shell users should use quotes to prevent the shell from interpreting the square brackets ([]) around the column value as a meta character.


These examples are similar to those above, but they change the value of table entries instead of objects:

client% nischttl 86400 '[uid=99],passwd.org_dir.doc.com.'
client% nischttl 24h `[uid=99],passwd.org_dir.doc.com.'
client% nischttl 2d1h1m1s `[name=fred],hosts.org_dir.doc.com.'