Administering the Kerberos Server

Removing Unused Space from the Database

 

 

Removing Unused Space from the Database

 

 

After long and continued use, the principal database on the primary

 

 

security server can grow large due to unused space. When you delete a

 

 

principal, the space that the record had occupied is not removed. Instead,

 

 

the space is reserved and marked as available. Therefore, after extensive

 

 

use, the database can grow very large. You can correct this by loading all

 

 

existing principals into a new database.

 

 

To create a new database and load existing records on the primary

 

 

security server, log on as a root user and complete the following steps:

Step

1.

Stop the services and daemons by executing the following command:

 

 

# /sbin/init.d/krbsrv stop

Step

2.

Make an archive of the principal.* files found on the primary security

 

 

server.

Step

3.

Dump the database by running the following command at the HP-UX

 

 

command prompt:

 

 

# /opt/krb5/admin/kdb_dump -f /tmp/filename

Step

4.

Delete the old database by running the following command at the HP-UX

 

 

command prompt:

 

 

# rm /opt/krb5/principal*

Step

5.

Create a new database using the same master password and encryption

 

 

type as when the database was originally created by executing the

 

 

following command:

 

 

# /opt/krb5/admin/kdb_create -s -e enctype

Step

6.

Load the dump file by running the following command at the HP-UX

 

 

command prompt:

 

 

# /opt/krb5/admin/kdb_load -f /tmp/filename

Step

7.

Restart the services and daemons by running the following command at

 

 

the HP-UX command prompt:

/sbin/init.d/krbsrv start

Chapter 8

239