This section provides information on customizing the .netrc and .3270keys files. Information on writing FTP macros is also provided.
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.
cp /usr/lpp/tcpip/samples/netrc $HOME
machine host1.austin.century.com login fred password bluebonnet
chmod 600 $HOME/.netrc
mv $HOME/netrc $HOME/.netrc
The $HOME/.netrc file can contain multiple login definitions and up to 16 macros per login definition.
ftp macros are defined in the $HOME/.netrc file. The following steps describe how to create an ftp macro.
You must have created the $HOME/.netrc file.
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.
ftp abyssIn 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.
ftp initIn 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:
$getitIn this example, the $ executes the ftp macro getit.
The following steps describe how to create and edit the $HOME/.3270keys file.
cp /etc/3270.keys $HOME/.3270keys
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
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.
The securetcpip command.
The .netrc file format.
The telnet, tn, and tn3270 commands.
The TCP/IP .3270keys File Format.