[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 System User's Guide: Communications and Networks

Customizing TCP/IP Features

This section provides information on customizing the .netrc and .3270keys files. Information on writing FTP macros is also provided.

Creating the .netrc File

The .netrc file specifies automatic login information for the ftp and rexec commands. The following steps describe how to create and edit the $HOME/.netrc file.

Prerequisites

  1. You must have a copy of the /usr/lpp/tcpip/samples/netrc file.
  2. The securetcpip command must not be running on your system.

To Create the .netrc File

  1. Copy the /usr/lpp/tcpip/samples/netrc file to your $HOME directory by entering the following command:
    cp /usr/lpp/tcpip/samples/netrc $HOME
  2. Edit the $HOME/netrc file to supply the appropriate HostName, LoginName, and Password variables.
    machine host1.austin.century.com login fred password bluebonnet
  3. Set the permissions on the $HOME/netrc file to 600 by using the chmod command. At the command line prompt ($), enter:
    chmod 600 $HOME/.netrc
  4. Rename the $HOME/netrc file to $HOME/.netrc file (the initial . (period) causes the file to be hidden).
    mv $HOME/netrc $HOME/.netrc

The $HOME/.netrc file can contain multiple login definitions and up to 16 macros per login definition.

Writing Macros

ftp macros are defined in the $HOME/.netrc file. The following steps describe how to create an ftp macro.

Prerequisites

You must have created the $HOME/.netrc file.

To Write a Macro

  1. Edit the $HOME/.netrc file to include the following instructions:
    macdef init
    put schedule

    Be sure to insert a blank line at the end of your ftp macro. The blank line terminates the ftp macro. In the above example, the macdef subcommand defines the subcommand macro init. The line following is the command the macro specifies, in this case put schedule, where schedule is the name of a file.

  2. After creating the ftp macro, at the command line prompt, enter:
    ftp abyss
    In this example, abyss is the host name to which you are connecting. ftp scans the $HOME/.netrc file for a login definition for the host abyss and uses the login definition to log the user into abyss.

  3. After logging in, at the command line prompt, enter:
    ftp init
    In this example, ftp scans for the macro named init and executes the command or commands the macro specifies.

    An ftp macro is associated with the login entry immediately preceding it. ftp macros are not global to the $HOME/.netrc file. The macro init will be executed automatically upon login. Other macros can be executed from the ftp prompt (ftp>) by entering the following:

    $getit
    In this example, the $ executes the ftp macro getit.

Changing the Assignment of a Key Set

The following steps describe how to create and edit the $HOME/.3270keys file.

Prerequisites

  1. You must have working knowledge of the vi editor.
  2. The vi editor must be on your system.

Procedure

  1. Copy the /etc/3270.keys file to the $HOME directory and rename it .3270keys using the following command:
    cp /etc/3270.keys $HOME/.3270keys
  2. Change the bind statements in the $HOME/.3270keys file to change the assignment of a key set.

  3. Start the vi editor on a new file and enter insert mode.

  4. Press the Ctrl-V key sequence and then the key that you want to map. This displays a value for the pressed key.

  5. Place the displayed value on the appropriate line in the Sequence column of the $HOME/.3270keys file.

    For example, having invoked the vi editor and entered insert mode, press Ctrl-V and then Alt-Insert. This displays [[141q. The first [ is replaced with \e in the Sequence column so that the configured line looks like the following:

          3270 Function  Sequence   Key
    bind   pa1           "\e[141q"  #a_insert

Using a .k5login File

The .k5login file is used when Kerberos V.5 authentication is used for the secure rcmds. This file specifies which DCE principals on which cells are allowed access to the user's account. The file is located at $HOME/.k5login.

The .k5login file contains a list of the DCE principal/cell pairs allowed to access the account. The principal/cell pairs are kept in Kerberos format (as opposed to DCE format). For example, if the file contains

       UserA@Cell1

then the DCE principal UserA on the DCE cell Cell1 can access the account.

If the DCE principal is the same as the user's account name and there is no $HOME/.k5login file for the user's account, the DCE principal gains access to the account (provided Kerberos V.5 authentication is configured).

For more information about Kerberos V.5 authentication, see Understanding the Secure Rcmds.

Related Information

The securetcpip command.

The .netrc file format.

The telnet, tn, and tn3270 commands.

The TCP/IP .3270keys File Format.


[ Previous | Next | Contents | Glossary | Home | Search ]