The onpassword utility
Use the onpassword utility to encrypt and decrypt a password file. Connection Manager and Enterprise Replication utilities require a password file to connect to database servers over an untrusted network.
Syntax
Element | Purpose | Key Considerations |
---|---|---|
-k | Specifies the password key. | |
-e | Encrypts an ASCII text file | The password information is encrypted to $INFORMIXDIR/etc/passwd_file |
-d | Decrypts the specified encrypted password file. | The passwd_file is decrypted to $INFORMIXDIR/etc/output_file_name. |
output_file_name | The name of the file that is output by the decryption process. | An encrypted password file that is created on one type of platform is not supported on a different type of platform. You must run the onpassword utility on each type of platform, and use the same text file and encryption key. |
encryption_key | The encryption key used to encrypt and decrypt password information. | The encryption key can be any sequence of numbers
or letters up to 24 bytes in length. To use an encryption key that
includes spaces, enclose the encryption key in quotation marks. For
example:
|
text_file | The ASCII text file that contains user password information. | The onpassword utility uses
the following default location:
|
Usage
Only users logged in as user informix have permission to run the onpassword utility.
Example 1: Encrypting a password file
To
encrypt tmp/my_passwords.txt with my_secret_encryption_key,
run the following command:
onpassword -k my_secret_encryption_key -e my_passwords.txt
The
password information is encrypted into $INFORMIXDIR/etc/passwd_file.Example 2: Decrypting an encrypted password file
To
decrypt $INFORMIXDIR/etc/passwd_file with my_secret_encryption_key,
run the following command:
onpassword -k my_secret_encryption_key -d my_passwords.txt
The
password information is decrypted to $INFORMIXDIR/etc/my_passwords.txt.