version 1.0.1, a recent version can be obtained from http://www.viket.net/acua/autoppp.html
Kliment Toshkov <sag@viket.net>
last modified 16.12.2000, 14:17 EET
I am using ACUA 3.00 with pppd 2.3.11 and mgetty 1.1.14. At the time the tests were done, ACUA version 2.10 was used, then upgraded to ACUA 3.00. Many thanks to Robert Davidson for his patience and writing of acua_login_debug especially for me.
This howto applies to any version of linux you may be using. Here I use RedHat Linux 6.2 for base, with many tweaks and manually installed packages. First and most important, you need to have properly installed and working linux. =)
The point of this document is not telling you how to install and run properly any part of the software needed. I will assume you have it already installed and running ok.
Ensure that you have AutoPPP support compiled in mgetty. If not, go through README.mgetty and compile with -DAUTO_PPP. Then insert the following into /etc/mgetty+sendfax/login.config:
/AutoPPP/ - a_ppp /usr/sbin/pppd auth -chap +pap login modem crtscts lock
At this point, we have configured mgetty to automagically recognise LCP configure request and start pppd. Otherwise, /bin/login is executed.
There are a lot of files, used to configure pppd. I suggest you first read man pppd. Remember that pppd should be suid root to run. Then open /etc/ppp/options and insert the following:
62.176.81.4: this should be the ethernet IP address of the machine running pppds (note the semicolon at the end of IP) modem specifies that modem control lines should be used lock do old style UUCP locking login use /etc/passwd to log the user instead of /etc/ppp/pap-secrets noauth do not require authorization by default (useful when logging in with terminal window) ms-dns 62.176.81.1 I guess, you are serving MS Windows clients, so put your DNS address here. You may specify multiple DNS addreses. Also, if you are a linux user, giving pppd the option usepeerdns enables it to use the DNS specified. mru 576 maximum receive unit, 576 is suitable for slow async connections mtu 576 maximum transmit unit, 576 is suitable for slow async connections
Second step, let's create the files that tell pppd which IP address belongs to a given tty (this is called dynamic IP addressing). If you are using ttyS16 through ttyS25 for dialin access (like I do), then the following should be fine for you: create /etc/ppp/options.ttyS16, /etc/ppp/options.ttyS17, etc, and then put this into each of them depending on it's name and desired IP address given to appropriate ttySxx:
filename: contains: options.ttyS16 :62.176.81.17 - this is the IP address for that tty options.ttyS17 :62.176.81.18 - note the semicolon before IP address etc. etc.
Step three, Robbie suggests using /etc/ppp/ip-up to run acua_login, but I have better idea: open (create it if doesn't exists) /etc/ppp/auth-up and put inside:
#!/bin/bash
/usr/sbin/acua_login $2 < $4 || kill -HUP $PPID
If something goes wrong, you might replace acua_login with acua_login_debug and look carefully in your system log, there should be a message there that tells you why the user was not allowed to login. The message will most likely be in /var/log/syslog or /var/log/messages if using RedHat Linux.
Finally, it's good to teach pppd to authorize users against /etc/passwd (or shadow, if installed). Open /etc/ppp/pap-secrets and insert this:
* * "" *
If you have ACUA running fine, there is nothing additional to configure.
Let's say, you want to let users log in with a terminal window. All you need is to create /usr/local/bin/ppp and put inside:
#!/bin/bash TTY=`tty`
case $TTY in
/dev/ttyS16) NO=17;;
/dev/ttyS17) NO=18;;
/dev/ttyS18) NO=19;;
/dev/ttyS19) NO=20;;
/dev/ttyS20) NO=21;;
/dev/ttyS21) NO=22;;
/dev/ttyS22) NO=23;;
/dev/ttyS23) NO=24;;
/dev/ttyS0) NO=25;;
/dev/ttyS1) NO=26;;
/dev/pts*) NO=147;;
*) echo Improper connection; logout;;
esac
USERIP=62.176.81.$NO
stty -echo
/usr/sbin/acua_login || logout
echo Press F7 now...
/usr/sbin/pppd 62.176.81.4:$USERIP crtscts lock ms-dns 62.176.81.1 modem mru 576 mtu 576
logout
Edit /etc/passwd and put this file as shell for appropriate users:
viket:x:728:728::/home/viket:/usr/local/bin/ppp
It took me a lot of time to get the above configuration running. I have done all properly, but there were bugs in pppd which slowed me down.
First, be sure to recompile pppd so
it supports your shadow libs.
Second, remember that /etc/ppp/pap-secrets should
be configured to allow every user to get in.
Third, at the stage if running pppd a
user called a_ppp should appear in w
or who output. After pppd
has authorized the user properly, it should change the utmp entry to the proper
username. If not, acua_login will not
allow the user login, and this is a sign that you need to recompile your pppd
program. It is generally only Red Hat that is affected by this problem.
Kliment Toshkov <sag@viket.net>