On
machines that only accept incoming calls, pppd
does not need to be started at boot time, since pppd
is started when a PPP login occurs. Machines that both initiate
and receive calls must start pppd
at boot time, and must also prepare accounts for incoming connections.
User accounts must be created in the /etc/passwd
file for the system to be able to accept incoming calls.
When the local system receives a login, it does the following:
Verifies the password by comparing
it to the entry in the /etc/passwd
file.
If the login is successful, the Login
shell script is run. Login starts
pppd on the local system which
will communicate with the pppd
on the peer. The two pppd's
will negotiate and establish a PPP connection.
/etc/passwd |
 |
The following
is an example of an entry that would be made to lark's /etc/passwd
file:
Probin::105:42:Robin's PPP login:/etc/ppp:/etc/ppp/Login |
The '105' in the password entry is a unique user ID (uid)
for this PPP login. The '42' is the group ID (gid) associated with
the 'ppp' group in lark's /etc/group
file.
Create a password for robin's login:
# passwd Probin New password: some password Retype new password: some password # |
Login Shell Script |
 |
Note
that a PPP user's login shell script can be located anywhere and
named whatever you choose. For purposes of this illustration, the
login script will be /etc/ppp/Login.
Look carefully at the last line in the sample script shown
below. Notice that the word 'hostname' is surrounded by backquotes,
not regular quotes or apostrophes. `hostname`, with the backquotes,
tells the system to insert the output of the command hostname(1)
in this space in the pppd command
line. We recommend that you make sure backquotes are used by copying
this script from /etc/ppp/Login.ex,
rather than inserting them manually.
#!/bin/sh # PPP login shell example PATH=/usr/bin:/usr/etc:/etc:/bin PPPHOME=/etc/ppp export PATH PPPHOME mesg n stty -tostop exec pppd `hostname`:robin idle 150 |
hostname will return lark,
the current machine, and robin is the peer. The idle timer is set
to 150 seconds. Refer to the pppd(1)
man page for pppd command line
options.
Checking Permissions |
 |
Following the creation of the Login
shell script, make sure the script is executable with the following
command: