<chapter id="pppsvrconfig.auth-1"><title>Setting Up PPP Authentication
(Tasks)</title><highlights><itemizedlist><para>This chapter contains tasks
for setting up PPP authentication.
Subjects that are covered include
the following:</para><listitem><para><olink targetptr="pppsvrconfig.auth-2" remap="internal">Configuring
PAP Authentication</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.auth-5" remap="internal">Configuring
CHAP Authentication</olink></para>
</listitem>
</itemizedlist><para>The procedures show how to implement
authentication over a dial-up link
because dial-up links are more likely
to be configured for authentication
than leased-line links. You can configure
authentication over leased lines if
authentication is required by your
 corporate security policy. For leased-line
authentication,  use the tasks in
this chapter as guidelines.</para><para>If you want to use PPP authentication
but are not sure which protocol to
use, review the section <olink targetptr="pppsvrconfig.intro-13" remap="internal">Why
Use PPP Authentication?</olink>. More
detailed information about PPP authentication
is in the <olink targetdoc="refman1m" targetptr="pppd-1m" remap="external"><citerefentry><refentrytitle>pppd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page and in <olink targetptr="pppsvrconfig.reference-17" remap="internal">Authenticating
Callers on a Link</olink>.</para>
</highlights><sect1 id="pppsvrconfig.p2plink-19"><title>Configuring PPP Authentication
(Task Map)</title><para>This section contains task maps
to help you quickly access procedures
for PPP authentication.</para><table frame="all" pgwide="100" id="ppp.auth-tbl-60"><title>Task Map
for General PPP Authentication</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="22.00*"/><colspec colwidth="41.03*"/><colspec colwidth="37.97*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Configure PAP authentication</para>
</entry><entry><para>Use these procedures to enable
PAP authentication on a dial-in server
and a dial-out machine.</para>
</entry><entry><para><olink targetptr="ppp.auth-58" remap="internal">Setting
Up PAP Authentication (Task Maps)</olink></para>
</entry>
</row><row><entry><para>Configure CHAP authentication</para>
</entry><entry><para>Use these procedures to enable
CHAP authentication on a dial-in server
and a dial-out machine.</para>
</entry><entry><para><olink targetptr="ppp.auth-59" remap="internal">Setting
Up CHAP Authentication (Task Maps)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="pppsvrconfig.auth-2"><title>Configuring
PAP Authentication</title><para>The tasks
in this section explain how to implement
authentication on a PPP link by using
the Password Authentication Protocol
(PAP). The tasks use the example that
is shown in <olink targetptr="pppsvrconfig.p2plink-15" remap="internal">Examples
of PPP Authentication Configurations</olink> to
illustrate a working PAP scenario
for a dial-up link. Use the instructions
as the basis for implementing PAP
authentication at your site.</para><itemizedlist><para>Before you perform the
next procedures, you must have done
the following:</para><listitem><para>Set up and tested
the dial-up link between the dial-in
server and dial-out machines that
belong to trusted callers</para>
</listitem><listitem><para>Ideally, for dial-in
server authentication, obtained superuser
permission for the machine where the
network password database  is administered,
for example, in LDAP, NIS, or local
files</para>
</listitem><listitem><para>Obtained superuser
authority for the local machine, either
dial-in server or dial-out machine</para>
</listitem>
</itemizedlist><sect2 id="ppp.auth-58"><title>Setting
Up PAP Authentication (Task Maps)</title><para>Use the next task maps to quickly
access PAP-related tasks for the dial-in
server and trusted callers on dial-out
machines.</para><table frame="all" pgwide="100" id="pppsvrconfig.p2plink-tbl-90"><title>Task
Map for PAP Authentication (Dial-in
Server)</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="43.82*"/><colspec colname="colspec1" colwidth="56.18*"/><colspec colname="colspec2" colwidth="56.18*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Gather preconfiguration information</para>
</entry><entry><para>Collect user names and other
data that is needed for authentication.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.p2plink-11" remap="internal">Planning
for Authentication on a Link</olink></para>
</entry>
</row><row><entry><para>2. Update the password database,
if necessary</para>
</entry><entry><para>Ensure that all potential callers
are in the server's password database.</para>
</entry><entry><para><olink targetptr="ppp.auth-62" remap="internal">How
to Create a PAP Credentials Database
(Dial-in Server)</olink></para>
</entry>
</row><row><entry><para>3. Create the PAP database</para>
</entry><entry><para>Create security credentials
for all prospective callers in <filename>/etc/ppp/pap-secrets</filename>.</para>
</entry><entry><para><olink targetptr="ppp.auth-62" remap="internal">How
to Create a PAP Credentials Database
(Dial-in Server)</olink></para>
</entry>
</row><row><entry><para>4. Modify the PPP configuration
files</para>
</entry><entry><para>Add options specific to PAP
to the <filename>/etc/ppp/options</filename> and <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> files.</para>
</entry><entry><para><olink targetptr="ppp.auth-63" remap="internal">How
to Add PAP Support to the PPP Configuration
Files (Dial-in Server)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><table frame="all" pgwide="100" id="pppsvrconfig.p2plink-tbl-100"><title>Task Map for PAP Authentication
(Dial-out Machine)</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="43.82*"/><colspec colname="colspec1" colwidth="56.18*"/><colspec colname="colspec3" colwidth="56.18*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Gather preconfiguration information</para>
</entry><entry><para>Collect user names and other
data that is needed for authentication.</para>
</entry><entry><para><olink targetptr="pppsvrconfig.p2plink-11" remap="internal">Planning
for Authentication on a Link</olink></para>
</entry>
</row><row><entry><para>2. Create the PAP database for
the trusted caller's machine</para>
</entry><entry><para>Create the security credentials
for the trusted caller and, if necessary,
security credentials for other users
who call the dial-out machine, in <filename>/etc/ppp/pap-secrets</filename>.</para>
</entry><entry><para><olink targetptr="ppp.auth-64" remap="internal">How
to Configure PAP Authentication Credentials
for the Trusted Callers</olink></para>
</entry>
</row><row><entry><para>3. Modify the PPP configuration
files</para>
</entry><entry><para>Add options specific to PAP
to the <filename>/etc/ppp/options</filename> and <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> files.</para>
</entry><entry><para><olink targetptr="ppp.auth-65" remap="internal">How
to Add PAP Support to the PPP Configuration
Files (Dial-out Machine)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="pppsvrconfig.auth-3"><title>Configuring
PAP Authentication on the Dial-in
Server</title><itemizedlist><para>To set up PAP authentication,
you must do the following:</para><listitem><para>Create a PAP credentials
database</para>
</listitem><listitem><para>Modify PPP configuration
files for PAP support</para>
</listitem>
</itemizedlist>
</sect2><task id="ppp.auth-62"><title>How
to Create a PAP Credentials Database
(Dial-in Server)</title><tasksummary><para>This procedure modifies the <filename>/etc/ppp/pap-secrets</filename> file,
which contains the PAP security credentials
that are used to authenticate callers
on the link. <filename>/etc/ppp/pap-secrets</filename> must exist on both machines
on a PPP link.</para><para>The sample PAP configuration
that was introduced in <olink targetptr="pppsvrconfig.p2plink-fig-20" remap="internal">Figure
16&ndash;3</olink> uses the <command>login</command> option of PAP. If you plan
to use this option, you might also
need to update your network's password
database. For more information about
the <command>login</command> option,
refer to <olink targetptr="pppsvrconfig.reference-20" remap="internal">Using
the login Option With /etc/ppp/pap-secrets</olink>.</para>
</tasksummary><procedure><step id="pppsvrconfig.auth-step-11"><para>Assemble a list of all
potential trusted callers. Trusted
callers are people to be granted permission
to call the dial-in server from their
remote machines.</para>
</step><step id="pppsvrconfig.auth-step-13"><para>Verify that each trusted caller
already has a UNIX user name and password
in the dial-in server's password database.</para><note><para>Verification is particularly
important for the sample PAP configuration,
which uses the <command>login</command> option
of PAP to authenticate callers. If
you choose not to implement <command>login</command> for PAP, the callers' PAP
user names do not have to correspond
with their UNIX user names. For information
about standard <filename>/etc/ppp/pap-secrets</filename>, refer to <olink targetptr="pppsvrconfig.reference-25" remap="internal">/etc/ppp/pap-secrets
File</olink>.</para>
</note><para>Do the following if a potential
trusted caller does not have a UNIX
user name and password: </para><substeps><step id="pppsvrconfig.auth-step-14"><para>Confirm with their managers
that callers whom you do not know
personally have permission to access
the dial-in server.</para>
</step><step id="pppsvrconfig.auth-step-15"><para>Create UNIX user names
and passwords for these callers in
the manner that is directed by your
corporate security policy.</para>
</step>
</substeps>
</step><step><para>Become superuser  on the
dial-in server or assume an equivalent
role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="pppsvrconfig.auth-step-16"><para>Edit the <filename>/etc/ppp/pap-secrets</filename> file.</para><para>Solaris
PPP 4.0 provides a <filename>pap-secrets</filename> file
in <filename>/etc/ppp</filename> that
contains comments about how to use
PAP authentication but no options.
You can add the following options
at the end of the comments.</para><screen><userinput>user1      myserver        ""          *</userinput>
<userinput>user2      myserver        ""          *</userinput>
<userinput>myserver   user2           serverpass  *</userinput></screen><para>To use the <literal>login</literal> option
of <filename>/etc/ppp/pap-secrets</filename>,
you must type the UNIX user name of
each trusted caller. Wherever a set
of double quotes (&ldquo;&ldquo;)
appears in the third field, the password
for the caller is looked up in the
server's password database.</para><para>The
entry <literal>myserver *   serverpass
 *</literal> contains the PAP user
name and password for the dial-in
server. In <olink targetptr="pppsvrconfig.p2plink-fig-20" remap="internal">Figure
16&ndash;3</olink>, the trusted caller <literal>user2</literal> requires authentication
from remote peers. Therefore, <literal>myserver</literal>'s <filename>/etc/ppp/pap-secrets</filename> file contains PAP credentials
for use when a link is established
with <literal>user2</literal>.</para>
</step>
</procedure><taskrelated role="see-also"><para>The following list provides
references to related information.</para><itemizedlist><listitem><para><olink targetptr="ppp.auth-55" remap="internal">Modifying
the PPP Configuration Files for PAP
(Dial-in Server)</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.auth-6" remap="internal">Configuring
PAP Authentication for Trusted Callers
(Dial-out Machines)</olink></para>
</listitem>
</itemizedlist>
</taskrelated>
</task><sect2 id="ppp.auth-55"><title>Modifying
the PPP Configuration Files for PAP
(Dial-in Server)</title><para>The tasks in this section explain
how to update any existing PPP configuration
files to support PAP authentication
on the dial-in server. </para>
</sect2><task id="ppp.auth-63"><title>How
to Add PAP Support to the PPP Configuration
Files (Dial-in Server)</title><tasksummary><para>The procedure uses as examples
the PPP configuration files that were
introduced in <olink targetptr="ppp.dialin-18" remap="internal">How to Define
Communications Over the Serial Line
(Dial-in Server)</olink>.</para>
</tasksummary><procedure><step id="pppsvrconfig.auth-step-9"><para>Log in as superuser on the dial-in
server or assume an equivalent role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="pppsvrconfig.auth-step-20"><para>Add authentication options to
the <filename>/etc/ppp/options</filename> file.</para><para>For example, you would
add the options in bold to an existing <filename>/etc/ppp/options</filename> file to
implement PAP authentication:</para><screen>lock
<userinput>auth</userinput>
<userinput>login</userinput>
<userinput>nodefaultroute</userinput>
<userinput>proxyarp</userinput>
<userinput>ms-dns 10.0.0.1</userinput>
<userinput>idle 120</userinput></screen><variablelist><varlistentry><term><literal>auth</literal></term><listitem><para>Specifies that the server
must authenticate callers before establishing
the link.</para>
</listitem>
</varlistentry><varlistentry><term><literal>login</literal></term><listitem><para>Specifies that the remote
caller be authenticated by using the
standard UNIX user authentication
services.</para>
</listitem>
</varlistentry><varlistentry><term><literal>nodefaultroute</literal></term><listitem><para>Indicates that no <command>pppd</command> session on the local
system can establish a default route
without <filename>root</filename> privileges.</para>
</listitem>
</varlistentry><varlistentry><term><literal>proxyarp</literal></term><listitem><para>Adds an entry to the
system's Address Resolution Protocol
(ARP) table that specifies the IP
address of the peer and the Ethernet
address of the system. With this option
the peer appears to be on the local
Ethernet to other systems.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ms-dns
10.0.0.1</literal></term><listitem><para>Enables <command>pppd</command> to
supply a Domain Name Server (DNS)
address, <literal>10.0.0.1</literal>,
for the client</para>
</listitem>
</varlistentry><varlistentry><term><literal>idle
120</literal></term><listitem><para>Specifies that idle
users are disconnected after two minutes.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="pppsvrconfig.auth-step-211"><para>In the <filename>/etc/ppp/options.cua.a</filename> file, add the following
address for the <filename>cua/a</filename> user.</para><screen>:10.0.0.2</screen>
</step><step><para>In the <filename>/etc/ppp/options.cua.b</filename> file, add the following
address for the <filename>cua/b</filename> user.</para><screen>:10.0.0.3</screen>
</step><step><para>In the <filename>/etc/ppp/pap-secrets</filename> file, add the following
entry.</para><screen><userinput>*     *     	""     *</userinput></screen><note><para>The <literal>login</literal> option,
as previously described, supplies
the necessary user authentication.
This entry in the <filename>/etc/ppp/pap-secrets</filename> file is the standard way
of enabling PAP with the <literal>login</literal> option.</para>
</note>
</step>
</procedure><taskrelated role="see-also"><para>To configure PAP authentication
credentials for trusted callers of
the dial-in server, refer to <olink targetptr="pppsvrconfig.auth-6" remap="internal">Configuring
PAP Authentication for Trusted Callers
(Dial-out Machines)</olink>.</para>
</taskrelated>
</task><sect2 id="pppsvrconfig.auth-6"><title>Configuring
PAP Authentication for Trusted Callers
(Dial-out Machines)</title><para>This section contains tasks
for setting up PAP authentication
on the dial-out machines of trusted
callers. As system administrator,
you can set up PAP authentication
on the systems before distribution
to  prospective callers. Or, if the
remote callers already have their
machines, you can give these callers
the tasks in this section.</para><itemizedlist><para>Configuring PAP for trusted
callers involves two tasks:</para><listitem><para>Configuring the callers'
PAP security credentials</para>
</listitem><listitem><para>Configuring the callers'
dial-out machines to support PAP authentication</para>
</listitem>
</itemizedlist>
</sect2><task id="ppp.auth-64"><title>How
to Configure PAP Authentication Credentials
for the Trusted Callers</title><tasksummary><para>This procedure shows how to
set up PAP credentials for two trusted
callers, one of which requires authentication
credentials from remote peers. The
steps in the procedure assume that
you, the system administrator, are
creating the PAP credentials on the
trusted callers' dial-out machines. </para>
</tasksummary><procedure><step id="pppsvrconfig.auth-step-24"><para>Become superuser  on a dial-out
machine or assume an equivalent role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><para>Using the sample PAP
configuration that was introduced
in <olink targetptr="pppsvrconfig.p2plink-fig-20" remap="internal">Figure
16&ndash;3</olink>, assume that the
dial-out machine belongs to <literal>user1</literal>.</para>
</step><step id="pppsvrconfig.auth-step-25"><para>Modify the pap-secrets database
for the caller.</para><para>Solaris PPP 4.0 provides
an <filename>/etc/ppp/pap-secrets</filename> file
that contains helpful comments but
no options. You can add the following
options to this <filename>/etc/ppp/pap-secrets</filename> file.</para><screen><userinput>user1    myserver  pass1    *</userinput></screen><para>Note that <literal>user1</literal>'s
password <literal>pass1</literal> is
passed in readable ASCII form over
the link. <literal>myserver</literal> is
caller <literal>user1</literal>'s
name for the peer.</para>
</step><step id="pppsvrconfig.auth-step-26"><para>Become superuser on another
dial-out machine or assume an equivalent
role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink></para><para>Using the PAP authentication
example, assume that this dial-out
machine belongs to the caller <literal>user2</literal>.</para>
</step><step id="pppsvrconfig.auth-step-27"><para>Modify the pap-secrets database
for the caller.</para><para>You can
add the next options to the end of
the existing <filename>/etc/ppp/pap-secrets</filename> file.</para><screen><userinput>user2     myserver   pass2       *</userinput>
<userinput>myserver  user2      serverpass  *</userinput></screen><para>In this example, <filename>/etc/ppp/pap-secrets</filename> has two entries. The first
entry contains the PAP security credentials
that <literal>user2</literal> passes
to dial-in server <literal>myserver</literal> for
authentication. </para><para><literal>user2</literal> requires PAP credentials
from the dial-in server as part of
link negotiation. Therefore, the <filename>/etc/ppp/pap-secrets</filename> also
contains PAP credentials that are
expected from <literal>myserver</literal> on
the second line.</para><note><para>Because most ISPs do not
supply authentication credentials,
 the previous scenario might be unrealistic
for communications with an ISP.</para>
</note>
</step>
</procedure><taskrelated role="see-also"><para>The following list provides
references to related information.</para><itemizedlist><listitem><para><olink targetptr="ppp.auth-62" remap="internal">How to Create
a PAP Credentials Database (Dial-in
Server)</olink></para>
</listitem><listitem><para><olink targetptr="ppp.auth-64" remap="internal">How to Configure
PAP Authentication Credentials for
the Trusted Callers</olink></para>
</listitem>
</itemizedlist>
</taskrelated>
</task><sect2 id="ppp.auth-56"><title>Modifying
PPP Configuration Files for PAP (Dial-out
Machine)</title><para>The following tasks explain
how to update existing PPP configuration
files to support PAP authentication
on the dial-out machines of trusted
callers. </para><para>The procedure uses the following
parameters to configure PAP authentication
on the dial-out machine that belongs
to <literal>user2</literal>, who was
introduced in <olink targetptr="pppsvrconfig.p2plink-fig-20" remap="internal">Figure
16&ndash;3</olink>. <literal>user2</literal> requires
incoming callers to authenticate,
including calls from dial-in <literal>myserver</literal>.</para>
</sect2><task id="ppp.auth-65"><title>How
to Add PAP Support to the PPP Configuration
Files (Dial-out Machine)</title><tasksummary><para>This procedure uses as examples
the PPP configuration files that were
introduced in <olink targetptr="ppp.dialin-53" remap="internal">How to Define
Communications Over the Serial Line</olink> .
The procedure configures the dial-out
machine that belongs to <literal>user2</literal>,
as shown in <olink targetptr="pppsvrconfig.p2plink-fig-20" remap="internal">Figure
16&ndash;3</olink>.</para>
</tasksummary><procedure><step id="pppsvrconfig.auth-step-31"><para>Log in to the dial-out machine
as superuser.</para>
</step><step id="pppsvrconfig.auth-step-32"><para>Modify the <filename>/etc/ppp/options</filename> file.</para><para>The
next <filename>/etc/ppp/options</filename> file
contains options for PAP support,
which are shown in bold.</para><screen># <userinput>cat /etc/ppp/options</userinput>
lock
<userinput>name user2</userinput>
<userinput>auth</userinput>
<userinput>require-pap</userinput></screen><variablelist><varlistentry><term>name user2</term><listitem><para>Sets <literal>user2</literal> as
the PAP name of the user on the local
machine. If the <command>login</command> option
is used, the PAP name must be the
same as the user's UNIX user name
in the password database.</para>
</listitem>
</varlistentry><varlistentry><term>auth</term><listitem><para>States that the dial-out
machine must authenticate callers
before establishing the link.</para><note><para>This dial-out machine
demands authentication from its peers,
even though most dial-out machines
do not make this demand. Either way
is acceptable.</para>
</note>
</listitem>
</varlistentry><varlistentry><term>require-pap</term><listitem><para>Demands PAP credentials
from the peer.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="pppsvrconfig.auth-step-33"><para>Create an <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file
for the remote machine <filename>myserver</filename>.</para><para>The next
example shows how to add PAP support
to the existing <filename>/etc/ppp/peers/myserver</filename> file that was created
in <olink targetptr="ppp.dialin-55" remap="internal">How
to Define the Connection With an Individual
Peer</olink>.</para><screen># <userinput>cat /etc/ppp/peers/myserver</userinput>
/dev/cua/a
57600
noipdefault
defaultroute
idle 120
<userinput>user user2</userinput>
<userinput>remotename myserver</userinput>
connect "chat -U 'mypassword' -f /etc/ppp/mychat"</screen><para>The new options in bold add
PAP requirements for peer <filename>myserver</filename>.</para><variablelist><varlistentry><term>user user2</term><listitem><para>Defines <literal>user2</literal> as
the user name of the local machine</para>
</listitem>
</varlistentry><varlistentry><term>remotename myserver</term><listitem><para>Defines <literal>myserver</literal> as a peer that requires
authentication credentials from the
local machine</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><taskrelated role="see-also"><para>The following list provides
references to related information.</para><itemizedlist><listitem><para>To test the PAP authentication
setup by calling the dial-in server,
see <olink targetptr="pppsvrconfig.dialin-proc-27" remap="internal">How
to Call the Dial-in Server</olink>.</para>
</listitem><listitem><para>To learn more about
PAP authentication, see <olink targetptr="pppsvrconfig.intro-8" remap="internal">Password
Authentication Protocol (PAP)</olink>.</para>
</listitem>
</itemizedlist>
</taskrelated>
</task>
</sect1><sect1 id="pppsvrconfig.auth-5"><title>Configuring
CHAP Authentication</title><para>The
tasks in this section explain how
to implement authentication on a PPP
link by using the Challenge-Handshake
Authentication Protocol (CHAP). The
tasks use the example that is shown
in <olink targetptr="pppsvrconfig.p2plink-fig-18" remap="internal">Figure
16&ndash;4</olink> to illustrate a
working CHAP scenario for dialing
up a private network. Use the instructions
as the basis for implementing CHAP
authentication at your site.</para><itemizedlist><para>Before you perform the next
procedures, you must have done the
following:</para><listitem><para>Set up and tested
the dial-up link between the dial-in
server and dial-out machines that
belong to trusted callers</para>
</listitem><listitem><para>Obtained superuser
permission for the local machine,
either dial-in server or dial-out
machine</para>
</listitem>
</itemizedlist><sect2 id="ppp.auth-59"><title>Setting
Up CHAP Authentication (Task Maps)</title><table frame="all" pgwide="100" id="pppsvrconfig.p2plink-tbl-12"><title>Task
Map for CHAP Authentication (Dial-in
Server)</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="43.68*"/><colspec colname="colspec1" colwidth="56.32*"/><colspec colname="colspec4" colwidth="56.32*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Assign CHAP secrets to all
trusted callers</para>
</entry><entry><para>Create, or have the callers
create, their CHAP secrets.</para>
</entry><entry><para><olink targetptr="ppp.auth-67" remap="internal">How
to Create a CHAP Credentials Database
(Dial-in Server)</olink></para>
</entry>
</row><row><entry><para>2. Create the chap-secrets database</para>
</entry><entry><para>Add the security credentials
for all trusted callers to the <filename>/etc/ppp/chap-secrets</filename> file.</para>
</entry><entry><para><olink targetptr="ppp.auth-67" remap="internal">How
to Create a CHAP Credentials Database
(Dial-in Server)</olink></para>
</entry>
</row><row><entry><para>3. Modify the PPP configuration
files</para>
</entry><entry><para>Add options specific to CHAP
to the <filename>/etc/ppp/options</filename> and <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> files.</para>
</entry><entry><para><olink targetptr="ppp.auth-68" remap="internal">How
to Add CHAP Support to the PPP Configuration
Files (Dial-in Server)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><table frame="all" pgwide="100" id="pppsvrconfig.p2plink-tbl-14"><title>Task
Map for CHAP Authentication (Dial-out
Machine)</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="43.12*"/><colspec colwidth="56.88*"/><colspec colname="colspec5" colwidth="56.88*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Create the CHAP database
for the trusted caller's machine</para>
</entry><entry><para>Create the security credentials
for the trusted caller and, if necessary,
security credentials for other users
who call the dial-out machine, in <filename>/etc/ppp/chap-secrets</filename>.</para>
</entry><entry><para><olink targetptr="ppp.auth-67" remap="internal">How
to Create a CHAP Credentials Database
(Dial-in Server)</olink></para>
</entry>
</row><row><entry><para>2. Modify the PPP configuration
files</para>
</entry><entry><para>Add options specific to CHAP
to the <filename>/etc/ppp/options</filename> file.</para>
</entry><entry><para><olink targetptr="ppp.auth-70" remap="internal">How
to Add CHAP Support to the PPP Configuration
Files (Dial-out Machine)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="pppsvrconfig.auth-7"><title>Configuring
CHAP Authentication on the Dial-in
Server</title><para>The first task in setting up
CHAP authentication is modifying the <filename>/etc/ppp/chap-secrets</filename> file.
This file contains the CHAP security
credentials, including the CHAP secret,
that are used to authenticate callers
on the link.</para><note><para>UNIX or PAM authentication
mechanisms do not work with CHAP.
For example, you cannot use the PPP <literal>login</literal> option as described
in <olink targetptr="ppp.auth-62" remap="internal">How
to Create a PAP Credentials Database
(Dial-in Server)</olink>. If your
authentication scenario requires PAM
or UNIX-style authentication, choose
PAP instead.</para>
</note><para>The next procedure implements
CHAP authentication for a dial-in
server in a private network. The PPP
link is the only connection to the
outside world. The only callers who
can access the network  have been
granted permission by managers of
the network, possibly including the
system administrator.</para>
</sect2><task id="ppp.auth-67"><title>How
to Create a CHAP Credentials Database
(Dial-in Server)</title><procedure><step id="pppsvrconfig.auth-step-37"><para>Assemble a list that contains
the user names of all trusted callers.
Trusted callers include all people
who have been granted permission to
call the private network.</para>
</step><step id="pppsvrconfig.auth-step-38"><para>Assign each user a CHAP secret.</para><note><para>Be sure to choose a good
CHAP secret that is not easily guessed.
No other restrictions are placed on
the CHAP secret's contents.</para>
</note><para>The method for assigning CHAP
secrets depends on your site's security
policy. Either you have the responsibility
for creating the secrets, or the callers
must create their own secrets. If
you are not responsible for CHAP secret
assignment, be sure to get the CHAP
secrets that were created by, or for,
each trusted caller.</para>
</step><step><para>Become superuser on the
dial-in server or assume an equivalent
role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="pppsvrconfig.auth-step-39"><para>Modify the <filename>/etc/ppp/chap-secrets</filename> file.</para><para>Solaris
PPP 4.0 includes an <filename>/etc/ppp/chap-secrets</filename> file that contains helpful
comments but no options. You can add
the following options for the server <literal>CallServe</literal> at the end of
the existing <filename>/etc/ppp/chap-secrets</filename> file.</para><screen><userinput>account1  CallServe   key123   *</userinput>
<userinput>account2  CallServe   key456   *</userinput></screen><para><literal>key123</literal> is
the CHAP secret for trusted caller <literal>account1</literal>. </para><para><literal>key456</literal> is the CHAP secret
for trusted caller <literal>account2</literal>.</para>
</step>
</procedure><taskrelated role="see-also"><para>The following list provides
references to related information.</para><itemizedlist><listitem><para><olink targetptr="ppp.auth-67" remap="internal">How to Create
a CHAP Credentials Database (Dial-in
Server)</olink></para>
</listitem><listitem><para><olink targetptr="ppp.auth-68" remap="internal">How to Add
CHAP Support to the PPP Configuration
Files (Dial-in Server)</olink></para>
</listitem><listitem><para><olink targetptr="pppsvrconfig.auth-42" remap="internal">Configuring
CHAP Authentication for Trusted Callers
(Dial-out Machines)</olink></para>
</listitem>
</itemizedlist>
</taskrelated>
</task><sect2 id="pppsvrconfig.auth-8"><title>Modifying
the PPP Configuration Files for CHAP
(Dial-in Server)</title><para>The task in this section explains
how to update existing PPP configuration
files to support CHAP authentication
on the dial-in server. </para>
</sect2><task id="ppp.auth-68"><title>How
to Add CHAP Support to the PPP Configuration
Files (Dial-in Server)</title><procedure><step id="pppsvrconfig.auth-step-19"><para>Log in to the dial-in server
as superuser.</para>
</step><step id="pppsvrconfig.auth-step-200"><para>Modify the <filename>/etc/ppp/options</filename> file.</para><para>Add
the options that are shown in bold
for CHAP support.</para><screen># <userinput>cat /etc/ppp/options</userinput>
lock
nodefaultroute
<userinput>name CallServe</userinput>
<userinput>auth</userinput></screen><variablelist><varlistentry><term><literal>name</literal> <emphasis>CallServe</emphasis></term><listitem><para>Defines <emphasis>CallServe</emphasis> as
the CHAP name of the user on the local
machine, in this instance the dial-in
server</para>
</listitem>
</varlistentry><varlistentry><term><literal>auth</literal></term><listitem><para>Makes the local machine
authenticate callers before establishing
the link</para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="pppsvrconfig.auth-step-21"><para>Create the remaining PPP configuration
files to support the trusted callers.</para><para>See <olink targetptr="ppp.dialin-10" remap="internal">How to Configure
Users of the Dial-in Server</olink> and <olink targetptr="ppp.dialin-18" remap="internal">How to Define
Communications Over the Serial Line
(Dial-in Server)</olink>.</para>
</step>
</procedure><taskrelated role="see-also"><para>To configure CHAP authentication
credentials for trusted callers, refer
to <olink targetptr="ppp.auth-67" remap="internal">How
to Create a CHAP Credentials Database
(Dial-in Server)</olink>.</para>
</taskrelated>
</task><sect2 id="pppsvrconfig.auth-42"><title>Configuring
CHAP Authentication for Trusted Callers
(Dial-out Machines)</title><para>This section contains
tasks for setting up CHAP authentication
on the dial-out machines of trusted
callers. Depending on your site's
security policy, either you or the
trusted callers might be responsible
for setting up CHAP authentication. </para><para>For remote callers  to configure
CHAP, ensure that the callers' local
CHAP secrets match the callers' equivalent
CHAP secrets in the dial-in server's <filename>/etc/ppp/chap-secrets</filename> file.
Then give the callers the tasks in
this section for configuring CHAP.</para><itemizedlist><para>Configuring CHAP for trusted
callers involves two tasks:</para><listitem><para>Creating the callers'
CHAP security credentials</para>
</listitem><listitem><para>Configuring the callers'
dial-out machines to support CHAP
authentication</para>
</listitem>
</itemizedlist>
</sect2><task id="ppp.auth-69"><title>How
to Configure CHAP Authentication Credentials
for the Trusted Callers</title><tasksummary><para>This procedure shows how
to set up CHAP credentials for two
trusted callers. The steps in the
procedure assume that you, the system
administrator, are creating the CHAP
credentials on the trusted callers'
dial-out machines. </para>
</tasksummary><procedure><step id="pppsvrconfig.auth-step-44"><para>Become superuser on a dial-out
machine or assume an equivalent role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><para>Using the sample CHAP
configuration in <olink targetptr="pppsvrconfig.p2plink-17" remap="internal">Example
of a Configuration Using CHAP Authentication</olink>, assume that the dial-out
machine belongs to trusted caller <literal>account1</literal>.</para>
</step><step id="pppsvrconfig.auth-step-45"><para>Modify the chap-secrets database
for caller <literal>account1</literal>.</para><para>Solaris PPP 4.0 includes
an <filename>/etc/ppp/chap-secrets</filename> file
that has helpful comments but no options.
You can add the following options
to the existing <filename>/etc/ppp/chap-secrets</filename> file.</para><screen><userinput>account1  CallServe   key123   *</userinput></screen><para><literal>CallServe</literal> is
the name for the peer that <literal>account1</literal> is trying to reach. <literal>key123</literal> is the CHAP secret to be
used for links between <literal>account1</literal> and <literal>CallServer</literal>.</para>
</step><step id="pppsvrconfig.auth-step-46"><para>Become superuser on another
dial-out machine or assume an equivalent
role.</para><para>Roles contain authorizations
and privileged commands. For more
information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
To configure a role with the Primary
Administrator profile, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><para>Assume that this machine
belongs to caller <literal>account2</literal>.</para>
</step><step id="pppsvrconfig.auth-step-47"><para>Modify the <filename>/etc/ppp/chap-secrets</filename> database for caller account2.</para><screen><userinput>account2  CallServe   key456   *</userinput></screen><para>Now, <literal>account2</literal> has
secret <literal>key456</literal> as
its CHAP credentials for use over
links to peer <literal>CallServe</literal>.</para>
</step>
</procedure><taskrelated role="see-also"><para>The following list provides
references to related information.</para><itemizedlist><listitem><para><olink targetptr="ppp.auth-67" remap="internal">How to Create
a CHAP Credentials Database (Dial-in
Server)</olink></para>
</listitem><listitem><para><olink targetptr="ppp.auth-69" remap="internal">How to Configure
CHAP Authentication Credentials for
the Trusted Callers</olink></para>
</listitem>
</itemizedlist>
</taskrelated>
</task><sect2 id="ppp.auth-57"><title>Adding
CHAP to the Configuration Files (Dial-out
Machine)</title><para>To learn more about CHAP authentication,
refer to <olink targetptr="pppsvrconfig.reference-21" remap="internal">Challenge-Handshake
Authentication Protocol (CHAP)</olink>.
The next task configures the dial-out
machine that belongs to caller <literal>account1</literal>, which is introduced in <olink targetptr="pppsvrconfig.p2plink-17" remap="internal">Example
of a Configuration Using CHAP Authentication</olink>.</para>
</sect2><task id="ppp.auth-70"><title>How
to Add CHAP Support to the PPP Configuration
Files (Dial-out Machine)</title><procedure><step id="pppsvrconfig.auth-step-50"><para>Log in to the dial-out machine
as superuser.</para>
</step><step id="pppsvrconfig.auth-step-2"><para>Ensure that the <filename>/etc/ppp/options</filename> file has the following
options.</para><screen># <userinput>cat /etc/ppp/options</userinput>
lock
nodefaultroute</screen>
</step><step id="pppsvrconfig.auth-step-52"><para>Create an <filename>/etc/ppp/peers/</filename><replaceable>peer-name</replaceable> file
for the remote machine <filename>CallServe</filename>.</para><screen># <userinput>cat /etc/ppp/peers/CallServe</userinput>
/dev/cua/a
57600
noipdefault
defaultroute
idle 120
<userinput>user account1</userinput>
connect "chat -U 'mypassword' -f /etc/ppp/mychat"</screen><para>The option <literal>user account1</literal> sets <literal>account1</literal> as the CHAP user
name to be given to <literal>CallServe</literal>.
For a description of the other options
in the previous file, see the similar <filename>/etc/ppp/peers/myserver</filename> file
in <olink targetptr="ppp.dialin-55" remap="internal">How
to Define the Connection With an Individual
Peer</olink>.</para>
</step>
</procedure><taskrelated role="see-also"><para>To test CHAP authentication
by calling the dial-in server, refer
to <olink targetptr="pppsvrconfig.dialin-proc-27" remap="internal">How
to Call the Dial-in Server</olink>.</para>
</taskrelated>
</task>
</sect1>
</chapter>