Com Sci 501
System Administration in Linux

[back] Department of Computer Science
[] The University of Chicago

Local Documentation

Installing and Configuring Crucial Applications

Answering Dialins with Mgetty

The level of independence is increasing with each installation. These notes are written from memory, and are intended as general information, not precise instructions. Mgetty is relatively easy to configure. The main point of this project step is to allow us to call up your computer at the end of the course, when I discuss project work with each of you. The hardest part of the mgetty configuration is testing it.

Install the mgetty package

Mgetty is in a Debian package on your CD, and it is very easy to install it with dselect. Install mgetty-docs also. If you want to experiment with extra functionality, you may choose to install mgetty-fax and/or mgetty-voice, but they shouldn't be needed for answering dialins.

Read the documentation

The stuff in /usr/doc/mgetty is pretty good.

Configure mgetty

The Mgetty package adds lines to /etc/inittab, causing mgetty to run all the time. But, these lines are disabled by comment marks. Edit /etc/inittab so that the line s0:23:respawn:/sbin/mgetty ttyS0 is no longer a comment. You may need to change the number of the ttySn. Don't forget to check in each file with RCS before you edit.

Run mgetty

You can start mgetty by rebooting. But, until things are tested, I recommend that you start it manually. You should be able to figure this out from the line in inittab above, and from looking at man mgetty.

Fix PPP dialout with pon

When you start mgetty, it puts your modem into a different state suitable for detecting incoming calls. Many external modems will flash one of their display lights. Your pon script for starting PPP with an outgoing call is probably broken as a result. The documentation in /usr/doc/mgetty explains the problem pretty well. You just need to initialize the modem whenever you start PPP as a dialout. For most modems, ATZ does the trick, and the modem answers with OK. So, I changed the dialout line of my /etc/ppp.chatscript to "" ATZ OK ATDT4001618. Something similar will probably work for you.

When you edit /etc/ppp.chatscript, you'll probably mess up the group ownership and permissions. So, fix them with chgrp and chmod. Make sure that you can dial out with mgetty running, before you worry about answering dialins.

Don't reconfigure your modem

If you know a bit about modems, you might think of reconfiguring your modem for automatic answering. Don't do it. That's what mgetty is doing in software, and auto-answer mode on the modem will mess it up.

Test dialin/login

This is the hard part. You need another phone line, and another computer with a modem. You probably don't have one, so you'll have to co-ordinate with someone else in the class in order to test dialing in.

Set up an account for your dialin buddy. Start mgetty, and do not dial out. Type finger from time to time to see whether your buddy has logged in succesfully.

To dial your computer, and observe the results, your dialin buddy could reconfigure her dialout PPP system with your phone number, and use pon. But, for testing and debugging, it's probably better to use a program that allows direct interaction with the modem. Minicom is such a program, and it comes in a Debian package on your CD. The only tricky thing about minicom (which I attribute to a poor user interface design) is that the only way to specify the device name for your modem's serial line (/dev/ttySn) is in the configuration file /etc/minirc.dfl. After I edited that file, I noticed the advice to use minicom -s, instead of direct editing. It's probably best to follow that advice, but check in /etc/minirc.dfl with RCS anyway.

Optional: dialin with PPP

Accepting a dialed-in PPP connection should be trivial. Mgetty is already set up to do that. But, to use the connection, you need to configure your network. We'll discuss that later, and leave this part optional, at least for now. If you want to look ahead, check out man ifconfig. To test dialed-in PPP, your dialin buddy needs to reconfigure her dialed-out PPP, which also requires some thought. Get the basic idea from /usr/bin/pon.


Michael J. O'Donnell
Last modified: Wed Nov 12 12:21:08 CST