Go to main content

Managing Serial Networks Using UUCP and PPP in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017
 
 

How to Invoke a Chat Script (Task)

  1. Create the chat script as an ASCII file.
  2. Invoke the chat script in any PPP configuration file by using the following syntax:
    connect 'chat  -f /etc/ppp/chatfile'

    The -f flag indicates that a file name is to follow. /etc/ppp/chatfile represents the name of the chat file.

  3. Give read permission for the external chat file to the user who runs the pppd command.

    Caution

    Caution  - The chat program always runs with the user's privileges, even if the connect 'chat ...' option is invoked from a privileged source. Thus, a separate chat file that is read with the -f option must be readable by the invoking user. This privilege can be a security problem if the chat script contains passwords or other sensitive information.


Example 3  Inline Chat Script

You can place the entire chat script conversation on a single line, similar to the following:

connect 'chat "" "AT&F1" OK ATDT5551212 CONNECT "\c"'

The complete chat script follows the chat keyword. The script terminates with "\c"'. You can use this form in any PPP configuration file or on the command line as an argument to pppd.

Chat Script in an External File

If the chat script that is needed for a particular peer is long or complicated, consider creating the script as a separate file. External chat files are easy to maintain and to document. You can add comments to the chat file by preceding the comments with the hash (#) sign.

The procedure How to Create the Instructions for Calling a Peer shows the use of a chat script that is contained in an external file.