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 file pool_passwd. this is the pool_passwd pipeline bestie πŸ’…
  • -u your_username, --username=your_username β€” when you're producing a md5 authentication password, this creates the pool_passwd entry for your_username. so like, whose entry is this? yours, queen πŸ‘‘
  • -f config_file, --config-file=config_file β€” specify the path to the pgpool.conf configuration 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 into pool_passwd should have md5 on top of the result string. that is: "md54d45974e13472b5a0be3533de4666414". the md5 prefix 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