Man page - pg_md5(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_MD5(1) | pgpool-II 4.7.1 Documentation | PG_MD5(1) |
NAME
pg_md5 - produces encrypted password in md5
SYNOPSIS
pg_md5 [option...] -p
pg_md5 [option...] password
DESCRIPTION
pg_md5 produces encrypted password in md5.
OPTIONS
-p
--prompt
-m
--md5auth
-u your_username
--username=your_username
-f config_file
--config-file=config_file
-i input_file
--input-file=input_file
EXAMPLE
The following are examples to encrypt your password into md5 hash format for pcp.conf.
$ pg_md5 -p password: [your password]
or
$ pg_md5 [your password] acbd18db4cc2f85cedef654fccc4a4d8
pg_md5 can also be used for adding an entry of user name and md5 encrypted password to pool_passwd authentication file.
$ pg_md5 -m -f /path/to/pgpool.conf -u username -p password: [your password] $ cat /path/to/pool_passwd username:md55a231fcdb710d73268c4f44283487ba2
To avoid password prompt or password in command parameter, pg_md5 can read user name:password pairs from file. It will add all user names and md5 hashed password to pool_passwd authentication file.
$ cat users.txt username1:secretpassword1 username2:secretpassword2 $ pg_md5 -m -f /path/to/pgpool.conf -i users.txt trying to read username:password pairs from file users.txt $ cat /path/to/pool_passwd username1:md533314126ba0b187df1e37f5ce6a489a8 username2:md58ae92c6e1d6a48d80e2583fe715e2b36
To just display the md5 hashed string, not adding an entry to pool_passwd, pass a string concatenating password and user name. For example, if password is "password" and user name is "user", the output would be:
$ pg_md5 passworduser 4d45974e13472b5a0be3533de4666414
Please note that the actual entry to be inserted into pool_passwd should have "md5" on top of the result string. That is: "md54d45974e13472b5a0be3533de4666414".
| 2023 | pgpool-II 4.7.1 |