callback(8)

๐Ÿฆ‹ callback(8) โ€” the mgetty+callback girlie's guide to calling people back ๐Ÿ’…

okay so bestie, welcome to callback(8) from the mgetty+callback manual โ€” this is the little program that literally calls you back and then hands you a login prompt like a supportive bestie holding the door open. let's get into it โœจ


๐ŸŒธ NAME ๐ŸŒธ

callback โ€” call a user back, presenting a login prompt. that's it, that's the vibe ๐ŸŽ€


๐Ÿงš SYNOPSIS ๐Ÿงš

callback [-x<debuglevel>] [-V] [-l<modemlines>] [-m<initstring>]
[-s<speed>] [-d] [-S] [phone-number]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so what it does: it calls the phone number you give it (and if you don't give one on the command line, it'll literally ask the user for one, no cap), and if a CONNECT gets established, it hands control over to mgetty(8) so the user gets a login name prompt. iconic behavior honestly ๐Ÿ‘‘

callback is used for various purposes, and they're both kinda great:

  • security โ€” make sure your users are who they pretend to be by calling a well-known phone number. identity check, but make it dial-up ๐Ÿ”ฅ
  • cost savings โ€” make your company call you back. your wallet says thank you ๐Ÿ’ธ

you can call callback directly from the command line (but heads up, you must be root to do this, otherwise callback can't signal mgetty), or you can call it from mgetty's login.config. see the login.config file shipped with mgetty for an example ๐Ÿซถ


โœจ OPTIONS โœจ

  • -x <debug level> โ€” use the given level of verbosity for logging. 0 means no logging, 5 is really noisy. pick your chaos level ๐Ÿ—ฃ๏ธ
  • -V โ€” print version number and quit. short and sweet, we love a quick exit ๐Ÿ’จ
  • -d โ€” do not go into the background. this is helpful for debugging. main character stays on screen ๐ŸŽฌ
  • -l <modem lines> โ€” use the given modem lines. multiple lines can be separated by :, as with sendfax(8). example: callback -l tty1a:tty2a ๐Ÿ˜Œ
  • -m <init sequence> โ€” set the modem initialization sequence (as usual: expect send expect ...). this can do nearly everything, as long as it leaves the modem command responses on (that is, no ATQ1 here!) and switches the modem to data mode (AT+FCLASS=0) if it is used in data/fax mode. yes that's a lot of power, use it responsibly bestie ๐Ÿซ 
  • -s <speed> โ€” this is the bit rate that should be used for the machine-modem connection. usually you'll set this via the speed <nnnn> option in callback.config. so like, you can set it here, but the config file is the usual spot ๐Ÿ’ซ
  • -S โ€” use the line where callback is started from for dialing out. callback can make use of multiple modem lines, and with this option, you can force it to use just one modem โ€” the one where a call comes in. one modem, one mission ๐ŸŽฏ

๐ŸŽ€ CONFIG FILE ๐ŸŽ€

callback will read all its configuration at run-time from a file, usually called /etc/mgetty+sendfax/callback.config. see the documentation in the mgetty.info manual for details. it's giving "the config file is the whole personality" ngl ๐Ÿ“„


๐Ÿ’€ DIAGNOSTICS ๐Ÿ’€

in most cases, callback can't print any error messages to the console, and honestly it's not being dramatic โ€” it must detach itself immediately from the terminal, in case someone wants to be called back on the modem line he called in. so like... nothing to print messages to ๐Ÿ˜ญ

because of this, all callback errors are logged to a protocol file (the extent of the data written is controlled by the -x option), especially including the reason why a call was not made, or what exactly failed. so if something's broken, go read the log, iykyk ๐Ÿ”

just two messages are printed on stdout, and those are self-explaining: a call from a non-root user, and an invalid option. that's the whole stdout budget ๐Ÿ’…


๐Ÿ”ฎ INTERNALS ๐Ÿ”ฎ

how does it work? okay so this is a bit tricky, because of the way init(8) handles the utmp(5) file. you can't just have any program ask the user for a login name, and then start a "login shell" โ€” it won't work (this is for the same reason mgetty(8) has to be started from /etc/inittab). the system said no ๐Ÿšซ

so, mgetty has to do the "asking for login name". but the author did not want to have all that dialout code in mgetty, bloating it even more. fair, honestly, keep your services lean โœจ

the way it works is this: callback dials out on a modem device. it will only take a modem device that has a mgetty watching over it (!). when the connection is established (CONNECT), callback will send a signal SIGUSR1 to mgetty, which, in turn, will send the same signal back to signal "i got your signal". callback then exits, and mgetty takes over the existing connection, prompts the user for a login name, and forks off /bin/login. a whole relay race, and they ate ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ

conclusion: this will not work with mgetty versions before February 04, 1996 (no support for this signalling), and if it doesn't work for you, please send me BOTH the mgetty and the callback log file, otherwise it's very hard to find the bugs. both files or it doesn't count ๐Ÿซถ


๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

  • callback is "alpha" code, not very stable right now. she's still in her experimental era ๐Ÿ˜ฌ
  • callback is fairly dumb concerning retries. no thoughts, head empty ๐Ÿง 
  • callback must be run as root. non-negotiable, sorry babe ๐Ÿ‘‘
  • Most of the documentation consists of "reading the source". the source is the documentation, iykyk ๐Ÿ“–

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

mgetty(8), ct(1)


๐Ÿ’œ AUTHOR ๐Ÿ’œ

callback is Copyright (C) 1993-1996 by Gert Doering, <gert@greenie.muc.de>. legend behavior, we stan ๐Ÿซก


and that's the whole page, bestie! โœจ this little cutie came from the mgetty+callback manual, callback(8), dated 27 Oct 93, brought to you by greenie ๐Ÿ’– go forth and get called back ๐Ÿฆ‹๐ŸŽ€

๐Ÿ“ฆ where this page comes from