Solaris Naming Administration Guide

Updating Public Keys

The public keys of NIS+ servers are stored in several locations throughout the namespace. When new credential information is created for the server, a new key pair is generated and stored in the cred table. However, namespace directory objects still have copies of the server's old public key. The nisupdkeys command is used to update those directory object copies.

The nisupdkeys Command

If a new keypair is generated because the old key pair has been compromised or the password used to encrypt the private key is forgotten, the nisupdkeys can be used to update the old public key in the directory objects.

The nisupdkeys command can:

However, nisupdkeys cannot update the NIS_COLD_START files on the principal workstations. To update their copies of a server's keys, NIS+ clients should run the nisclient command. Or, if the NIS+ cache manager is running and more than one server is available in the coldstart file, the principals can wait until the time-to-live expires on the directory object. When that happens, the cache manager automatically updates the cold-start file. The default time-to-live is 12 hours.

To use the nisupdkeys command, you must have modify rights to the NIS+ directory object.

Updating Public Keys Arguments and Examples

The nisupdkeys command is located in /usr/lib/nis. The nisupdkeys command uses the following arguments (for a complete description of the nisupdkeys command and a full list of all its arguments, see the nisupdkeys man page):

Table 8-4 nisupdkeys Arguments

Argument 

Effect 

(no argument) 

Updates all keys of servers for current domain 

directoryname

Updates the keys of the directory object for the named directory. 

-H servername

Updates the keys of the named server for the current domain directory object. A fully qualified host name can be used to update the keys of servers in other domains. 

-s -H servername

Updates the keys of all the directory objects served by the named server. 

-C

Clears the keys. 

Table 8-5gives an example of updating a public key:

Table 8-5 Updating a Public Key: Command Examples

Tasks 

Commands 

Update all keys of all servers of the current domain (doc.com).

rootmaster# /usr/lib/nis/nisupdkeys

Fetch Public key for server rootmaster.doc.com. 

netname='unix.rootmaster@doc.com'

Updating rootmaster.doc.com.'s public key.  

Public key: public-key

Update keys of all servers supporting the sales.doc.com domain directory object.

salesmaster# nisupdkeys sales.doc.com(

Screen notices not shown) 

Update keys for a server named master7 in all the directories that store them.

rootmaster# nisupdkeys -H master7

Clear the keys stored by the sales.doc.com directory object.

rootmaster# nisupdkeys -C sales.doc.com

Clear the keys for the current domain directory object for the server named master7.

rootmaster# nisupdkeys -C -H master7

Updating IP Addresses

If you change a server's IP address, or add additional addresses, you need to run nisupdkeys to update NIS+ address information.

To update the IP addresses of one or more servers, use the nisupdkeys command -a option.

To update the IP addresses of servers of a given domain


rootmaster# nisupdkeys -a domain

To update the IP address of a particular server


rootmaster# nisupdkeys -a -H server