'\" t .\" Title: pg_md5 .\" Author: The Pgpool Global Development Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2023 .\" Manual: pgpool-II 4.3.7 Documentation .\" Source: pgpool-II 4.3.7 .\" Language: English .\" .TH "PG_MD5" "1" "2023" "pgpool-II 4.3.7" "pgpool-II 4.3.7 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pg_md5 \- produces encrypted password in md5 .SH "SYNOPSIS" .HP \w'\fBpg_md5\fR\ 'u \fBpg_md5\fR [\fIoption\fR...] \fI\-p\fR .HP \w'\fBpg_md5\fR\ 'u \fBpg_md5\fR [\fIoption\fR...] \fIpassword\fR .SH "DESCRIPTION" .PP \fBpg_md5\fR produces encrypted password in md5\&. .SH "OPTIONS" .PP .PP \fB\-p\fR .br \fB\-\-prompt\fR .RS 4 Prompt password using standard input\&. .RE .PP \fB\-m\fR .br \fB\-\-md5auth\fR .RS 4 Produce md5 authentication password to authentication file pool_passwd\&. .RE .PP \fB\-u \fR\fB\fIyour_username\fR\fR .br \fB\-\-username=\fR\fB\fIyour_username\fR\fR .RS 4 When producing a md5 authentication password, create the pool_passwd entry for your_username\&. .RE .PP \fB\-f \fR\fB\fIconfig_file\fR\fR .br \fB\-\-config\-file=\fR\fB\fIconfig_file\fR\fR .RS 4 Specify the path to the pgpool\&.conf configuration file\&. .RE .PP \fB\-i \fR\fB\fIinput_file\fR\fR .br \fB\-\-input\-file=\fR\fB\fIinput_file\fR\fR .RS 4 Specifies file containing user name and password pairs\&. .RE .SH "EXAMPLE" .PP The following are examples to encrypt your password into md5 hash format for pcp\&.conf\&. .sp .if n \{\ .RS 4 .\} .nf $ pg_md5 \-p password: [your password] .fi .if n \{\ .RE .\} .PP or .sp .if n \{\ .RS 4 .\} .nf $ pg_md5 [your password] acbd18db4cc2f85cedef654fccc4a4d8 .fi .if n \{\ .RE .\} .PP pg_md5 can also be used for adding an entry of user name and md5 encrypted password to pool_passwd authentication file\&. .sp .if n \{\ .RS 4 .\} .nf $ pg_md5 \-m \-f /path/to/pgpool\&.conf \-u username \-p password: [your password] $ cat /path/to/pool_passwd username:md55a231fcdb710d73268c4f44283487ba2 .fi .if n \{\ .RE .\} .sp 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\&. .sp .if n \{\ .RS 4 .\} .nf $ cat users\&.txt username1:secretpassword1 username2:secretpassword1 $ 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 .fi .if n \{\ .RE .\} .sp 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: .sp .if n \{\ .RS 4 .\} .nf $ pg_md5 passworduser 4d45974e13472b5a0be3533de4666414 .fi .if n \{\ .RE .\} .sp Please note that the actual entry to be inserted into pool_passwd should have "md5" on top of the result string\&. That is: "md54d45974e13472b5a0be3533de4666414"\&.