pg_enc

Name

pg_enc --  AES256 password encryption utility

Synopsis

pg_enc [option...] -p

pg_enc [option...] password

Description

pg_enc AES256 password encryption utility.

Options

-k KEY_FILE
--key-file=KEY_FILE

Set the path to the encryption key file. Default is the .pgpoolkey file located in the users home directory, which can be overridden by the environment variable PGPOOLKEYFILE.

-K ENCRYPTION_KEY
--enc-key=ENCRYPTION_KEY

Encryption key to be used for encrypting database passwords.

-f CONFIG_FILE
--config-file=CONFIG_FILE

Specifies the pgpool.conf file.

-p
--prompt

Prompt for database password using standard input.

-P
--prompt-for-key

Prompt for encryption key using standard input.

-m
--update-pass

Create encrypted password entry in the pool_passwd file.

-u your_username
--username=your_username

Creates the pool_passwd entry for the database user called your_username.

-h
--help

Prints the help for pg_enc.

Note: If you are providing the password as an argument to pg_enc and the password contains a "$" character, you must escape it.

For example, if you want to use "ABC$123" as password,

pg_enc -m -f /path/to/pgpool.conf -u username ABC\$123
      

Example

Here is an example output:

    pg_enc -p
    db password: [your password]
   

or

   ./pg_enc foo
   trying to read key from file /home/pgpool/.pgpoolkey

   jglid1QRgiCl/vfhHUDyVA==
   pool_passwd string: AESjglid1QRgiCl/vfhHUDyVA==
  

pg_enc can be used for pool_passwd passwords with:

    pg_enc -m -f /path/to/pgpool.conf -u username -p
    db password: [your password]
   

which will add an entry for username with the password given.