checkpw(8)

πŸ’– checkpw β€” the manual page, bestie edition πŸ’–

okay so this is checkpw(8) from the System Manager's Manual, and honestly? she's a tiny little bouncer for your mail password. let's get into it 🫢


✨ NAME ✨

checkpw β€” checks password against the file ~/Maildir/.password

like. that's the whole job. she checks a password. against that one file. iconic behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

checkpw prog

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea. checkpw reads descriptor 3 through end of file, and then it closes descriptor 3. that's it. that's the move. and listen β€” there must be at most 512 bytes of data before end of file. so don't be sending her a novel, she has limits 😭

the info you hand her on descriptor 3 is, in order:

  • a login name terminated by \0
  • a password terminated by \0
  • a timestamp terminated by \0
  • and possibly more data after that

and here's the chill part: there are no other restrictions on the form of the login name, password, and timestamp. go off, format however you want ✨

now the exit codes, pay attention bestie:

  • if the password is unacceptable, checkpw exits 1
  • if checkpw is misused, it may instead exit 2
  • if there's a temporary problem checking the password, checkpw exits 111

and if the password is acceptable? she runs prog. that's it, you're in πŸ’–

prog consists of one or more arguments. one or more. not zero. she said what she said.


πŸ¦‹ Compatible tools πŸ¦‹

there are other tools that offer the same interface as checkpw. siblings! a whole little squad 🌈

not me forgetting to mention β€” note that these tools do not follow the getopt interface. optional features are controlled through (1) the tool name and (2) environment variables. no flags, no dashes, we're doing it the other way here πŸ’€

πŸŽ€ The password database πŸŽ€

checkpw checks the password against the content of the file Maildir/.password in the user's home directory corresponding to the login name.

and Maildir may be overridden through the environment variable $MAILDIR. so you can point her somewhere else if you need to. flexible queen πŸ’…


⭐ Process-state changes ⭐

before invoking prog, checkpw sets up $USER, $HOME, $SHELL, its supplementary groups, its gid, its uid, and its working directory.

so basically she does a full little glow-up on the environment before handing things off. main character energy, but for process state 🌸


πŸ“ FILES πŸ“

  • ~/Maildir/.password

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Gerrit Pape <pape@smarden.org>, for the Debian GNU/Linux system. thank you gerrit, we appreciate you fr fr 🫢


and that's the whole page bestie πŸ’œ this was checkpw(8) out of the System Manager's Manual β€” go check those passwords, stay hydrated, and remember: descriptor 3 closes whether you're ready or not 😭✨

πŸ“¦ where this page comes from