PG_MD5(1)
β¨ PG_MD5 β¨
okay bestie, gather round, because today we're talking about pg_md5 from the pgpool-II manual (that's the manual name btw, it's giving pgpool-II, and she's on 4.7.2 π
).
πΈ NAME πΈ
pg_md5 β she produces encrypted passwords in md5. that's the whole job. that's the vibe. π
π SYNOPSIS π
pg_md5 [option...] -p
pg_md5 [option...] password
π¦ DESCRIPTION π¦
so like. pg_md5 produces encrypted password in md5. that's it, that's the girl. give her a password, she gives you the hash. no cap. β¨
π OPTIONS π
-p,--promptβ prompts you for the password using standard input. very demure, very interactive π«Ά-m,--md5authβ produces the md5 authentication password that goes into the authentication filepool_passwd. this is the pool_passwd pipeline bestie π-u your_username,--username=your_usernameβ when you're producing a md5 authentication password, this creates thepool_passwdentry foryour_username. so like, whose entry is this? yours, queen π-f config_file,--config-file=config_fileβ specify the path to thepgpool.confconfiguration file. you're telling her where the config lives πΊοΈ-i input_file,--input-file=input_fileβ specifies the file containing user name and password pairs. bulk mode activated, periodt β¨
π EXAMPLE π
here's how you encrypt your password into md5 hash format for pcp.conf. iconic behavior incoming:
$ pg_md5 -p
password: [your password]
or
$ pg_md5 [your password]
acbd18db4cc2f85cedef654fccc4a4d8
and guess what β pg_md5 can also be used for adding an entry of user name and md5 encrypted password to the pool_passwd authentication file. she's multidimensional fr fr:
$ pg_md5 -m -f /path/to/pgpool.conf -u username -p
password: [your password]
$ cat /path/to/pool_passwd
username:md55a231fcdb710d73268c4f44283487ba2
now, to avoid the password prompt or a password sitting right there in your command parameter (safety first bestie π), pg_md5 can read user name:password pairs from a file. it will add all user names and md5 hashed password to the pool_passwd authentication file. look:
$ 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
and if you just want to display the md5 hashed string β no entry added to pool_passwd, just the goods β pass a string that concatenates the password and the user name. for example, if the password is password and the user name is user, the output would be:
$ pg_md5 passworduser
4d45974e13472b5a0be3533de4666414
β οΈ okay important bestie, do NOT skip this: please note that the actual entry to be inserted intopool_passwdshould havemd5on top of the result string. that is:"md54d45974e13472b5a0be3533de4666414". themd5prefix is not optional, it's load-bearing π
and that's the whole page, no notes, you're basically a hashing professional now π§
this lil love letter came to you from pgpool-II 4.7.2, dated 2023 β mwah, go forth and hash responsibly πβ¨π
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms