[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

System User's Guide: Communications and Networks


Customizing TCP/IP Features

This section provides information about the following:

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 typing 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. For example:

    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 ($), type:

    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 ftp 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, type:

    ftp hostname
    

    Where hostname is the name of the host to which you are connecting. ftp scans the $HOME/.netrc file for a login definition matching your host name and uses that login definition to log you in.

  3. After logging in, at the command line prompt, type:

    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 is executed automatically upon login. Other macros can be executed from the ftp prompt (ftp>) by typing 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 to customize key functions or sequences.

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 using the following steps:
    1. Start the vi editor on a new file and enter insert mode.
    2. Press the Ctrl-V key sequence and then the key that you want to map. This displays a value for the pressed key.
    3. 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. It should be owned by the local user and the owner should have read permission on this file. The minimum permission setting for this file is 400.

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.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]