utmp_register(8)

✨ utmp_register β€” bestie's guide to the utmp/wtmp database πŸ’…

okay so this page lives in the hxtools manual set (that's section 8, the sysadmin-y one, iykyk), and it's genuinely one of the most useful little gremlins in there, no cap.


🌸 NAME 🌸

utmp_register β€” make entries in the utmp/wtmp database

like, it literally puts entries in the utmp/wtmp database. that's the whole job. and it ate.


πŸŽ€ SYNTAX πŸŽ€

look at her. so compact. so powerful. the flags are all bundled up at the front like a little friend group 🫢


✨ DESCRIPTION ✨

so here's the tea: utmp_register is a helper program for programs that do not want to do the UTMP/WTMP handling within themselves.

that's it. that's the pitch. your program doesn't wanna deal with all that bookkeeping? don't. hand it off. she's got it. main character energy fr fr πŸ’–


πŸ’œ OPTIONS πŸ’œ

  • -A β€” Add entry. adding things. we love to see it.
  • -D β€” Delete entry. removing things. also iconic, in a chaotic way.
  • -U β€” Perform operation on the utmp file. (the "U" stands for utmp, keep up bestie 😌)
  • -W β€” Perform operation on the wtmp file.
  • -e β€” Encode PID into the "ut_id" field. yes, into the ut_id field. that's the whole vibe.
  • -h host β€” Host field.
  • -l user β€” User field.
  • -t tty β€” TTY field.
  • -p pid β€” Unique ID 1
  • -s session β€” Unique ID 2.
  • -u file β€” Path to the utmp file, defaults to /var/run/utmp.
  • -w file β€” Path to wtmp file, defaults to /var/log/wtmp.

🚨 okay bestie, listen up, because this next bit is the plot twist: -A and -D can be specified together, and if you do that, an entry is added and instantly removed again (utmp), or a login of duration zero is recorded (wtmp). it's giving "blink and you'll miss it". it's giving "was she even there??" absolutely unhinged behaviour, but that's canon, not me making stuff up πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


that's the whole page, you're welcome, go forth and register some utmp entries responsibly 🌈

hxtools Β· dated 2008-02-06 Β· utmp_register(8) β€” and that's the sign-off, mwah, stan a well-documented sysadmin tool πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from