Here is the process that FreeBSD follows to accept dialup logins. A
getty process, spawned by init, patiently waits to open the
assigned serial port (/dev/ttyd0, for our example). The
command ps ax might show this:
4850 ?? I 0:00.09 /usr/libexec/getty V19200 ttyd0
When a user dials the modem's line and the modems connect, the CD
line is asserted by the modem. The kernel notices that carrier has
been detected and completes getty's open of the port. getty
sends a login: prompt at the specified initial line speed.
getty watches to see if legitimate characters are received, and,
in a typical configuration, if it finds junk (probably due to the
modem's connection speed being different than getty's speed),
getty tries adjusting the line speeds until it receives
reasonable characters.
We hope getty finds the correct speed and the user sees a
login: prompt. After the user enters his/her login name,
getty executes /usr/bin/login, which completes the login
by asking for the user's password and then starting the user's shell.
Let's dive into the configuration...