This section provides information about the following:
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 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.
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.
The following steps describe how to create and edit the $HOME/.3270keys file to customize key functions or sequences.
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. 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.