Linux PPP FAQ: Authentication files

Previous Next Table of Contents

## 5. Authentication files

## 5.1 What goes into the /etc/ppp/pap-secrets file? Do you have a sample? Or, my ISP requires that I use PAP. How do I do that?

The PAP protocol is most often implemented as your user name and password. You need to include the name of the remote system, your account name, and the password. If the user on abbot wishes to call costello, the entry would be similar to the following.

> `

>     #account   remote    password     IP address list
>     abbott     *         firstbase

> `

To use PAP authentication with the simplest case, you should also include the \user\ option to specify which of the pap-secrets file entries is to be used. The option is explained in the pppd man page. However, the simplest for this example is:

user abbott

If your system needs to use PAP to authenticate itself with an ISP who requires that you use PAP then you need only do two things.

1. Add the entry to the /etc/ppp/pap-secrets file which lists your account name, an asterisk, and your password. If you have multiple accounts at different providers, each with the same name, then you would use the provider's name with in lieu of the asterisk and use the remotename option with pppd to specify the provider's name.
2. Use the 'user' option to pppd to specify the account name so that pppd knows which entry in the /etc/ppp/pap-secrets file is to be used.

That's all that you should do. Do NOT attempt to use the +pap, or +chap, or auth options. These will only cause your authentication sequence to fail since they all force the ISP to authenticate itself with you. Since most ISP's will not do this, and you have told pppd that the ISP must by using these options, then pppd will not permit the ISP to connect to you -- or, to put it in practical terms, you connect to the ISP.

## 5.2 What goes into the /etc/ppp/chap-secrets file? Do you have a sample?

The most common problem is that people don't recognize that CHAP deals with a pair of secrets. Both computers involved in the link must have both secrets to work.

For example, if abbot wants to talk to costello, then abbot\s file would have:

> `

>     #account   remote     password    IP address list
>     abbott     costello   firstbase
>     costello   abbott     who

> `

And costello\s file would have:

> `

>     #account   remote     password    IP address list
>     abbott     costello   firstbase
>     costello   abbott     who

> `

(Yes, it is the same data.)

The difference between abbott and costello would be the options that are used with pppd. The abbott system would have

> `

>     name abbott remotename costello

> `

while the costello system has just the opposite of

> `

>     name costello remotename abbott

> `

Previous Next Table of Contents