Man page - pg_enc(1)
Packages contas this manual
- pcp_stop_pgpool(1)
- pgpool_adm_pcp_attach_node(3)
- pcp_attach_node(1)
- pgpool_adm_pcp_node_count(3)
- pcp_recovery_node(1)
- pcp_log_rotate(1)
- pcp_detach_node(1)
- pcp_proc_info(1)
- pcp_node_info(1)
- pcp_common_options(1)
- pgpool_adm_pcp_pool_status(3)
- pg_enc(1)
- wd_cli(1)
- pgproto(1)
- pgpool_adm_pcp_health_check_stats(3)
- pcp_proc_count(1)
- pcp_watchdog_info(1)
- pcp_node_count(1)
- pcp_health_check_stats(1)
- pcp_reload_config(1)
- pcp_pool_status(1)
- pcp_invalidate_query_cache(1)
- pcp_promote_node(1)
- watchdog_setup(1)
- pgpool_setup(1)
- pgpool_adm_pcp_proc_info(3)
- pgpool_adm_pcp_node_info(3)
- pgpool_adm_pcp_detach_node(3)
- pg_md5(1)
- pgpool(8)
- pcp_stop_pgpool(1)
- pgpool_adm_pcp_attach_node(3)
- pcp_attach_node(1)
- pgpool_adm_pcp_node_count(3)
- pcp_recovery_node(1)
- pcp_log_rotate(1)
- pcp_detach_node(1)
- pcp_proc_info(1)
- pcp_node_info(1)
- pcp_common_options(1)
- pgpool_adm_pcp_pool_status(3)
- pg_enc(1)
- wd_cli(1)
- pgproto(1)
- pgpool_adm_pcp_health_check_stats(3)
- pcp_proc_count(1)
- pcp_watchdog_info(1)
- pcp_node_count(1)
- pcp_health_check_stats(1)
- pcp_reload_config(1)
- pcp_pool_status(1)
- pcp_invalidate_query_cache(1)
- pcp_promote_node(1)
- watchdog_setup(1)
- pgpool_setup(1)
- pgpool_adm_pcp_proc_info(3)
- pgpool_adm_pcp_node_info(3)
- pgpool_adm_pcp_detach_node(3)
- pg_md5(1)
- pgpool(8)
apt-get install pgpool2
apt-get install pgpool2
Manual
| PG_ENC(1) | pgpool-II 4.7.1 Documentation | PG_ENC(1) |
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
-K ENCRYPTION_KEY
--enc-key=ENCRYPTION_KEY
-f CONFIG_FILE
--config-file=CONFIG_FILE
-i INPUT_FILE
--input-file=INPUT_FILE
-p
--prompt
-P
--prompt-for-key
-m
--update-pass
-u your_username
--username=your_username
-h
--help
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.
To avoid password prompt or password in command parameter, pg_enc can read user name:password pairs from file. It will add all user names and encrypted password to pool_passwd authentication file.
$ cat users.txt
username1:secretpassword1
username2:secretpassword2
$ pg_enc -m -f /path/to/pgpool.conf -i users.txt
trying to read key from file /home/pgpool/.pgpoolkey
trying to read user:password pairs from file users.text
$ cat /path/to/pool_passwd
username1:AESrx5QdpGyW/+4CB80KWtwhg==
username2:AESUAdohy7nCUhWliRI9WiYQA==
| 2023 | pgpool-II 4.7.1 |