1NETRC(5)                    BSD File Formats Manual                   NETRC(5)
2

NAME

4     netrc, .netrc — user configuration for ftp
5

DESCRIPTION

7     This file contains configuration and autologin information for the File
8     Transfer Protocol client ftp(1).
9
10     The .netrc file contains login and initialization information used by the
11     auto-login process.  It resides in the user's home directory.  The fol‐
12     lowing tokens are recognized; they may be separated by spaces, tabs, or
13     new-lines:
14
15     machine name
16               Identify a remote machine name.  The auto-login process
17               searches the .netrc file for a machine token that matches the
18               remote machine specified on the ftp command line or as an open
19               command argument.  Once a match is made, the subsequent .netrc
20               tokens are processed, stopping when the end of file is reached
21               or another machine or a default token is encountered.
22
23     default   This is the same as machine name except that default matches
24               any name.  There can be only one default token, and it must be
25               after all machine tokens.  This is normally used as:
26
27                     default login anonymous password user@site
28
29               thereby giving the user automatic anonymous ftp login to
30               machines not specified in .netrc.  This can be overridden by
31               using the -n flag to disable auto-login.
32
33     login name
34               Identify a user on the remote machine.  If this token is
35               present, the auto-login process will initiate a login using the
36               specified name.
37
38     password string
39               Supply a password.  If this token is present, the auto-login
40               process will supply the specified string if the remote server
41               requires a password as part of the login process.  Note that if
42               this token is present in the .netrc file for any user other
43               than anonymous, ftp will abort the auto-login process if the
44               .netrc is readable by anyone besides the user.
45
46     account string
47               Supply an additional account password.  If this token is
48               present, the auto-login process will supply the specified
49               string if the remote server requires an additional account
50               password, or the auto-login process will initiate an ACCT com‐
51               mand if it does not.
52
53     macdef name
54               Define a macro.  This token functions like the ftp macdef com‐
55               mand functions.  A macro is defined with the specified name;
56               its contents begin with the next .netrc line and continue until
57               a null line (consecutive new-line characters) is encountered.
58               If a macro named init is defined, it is automatically executed
59               as the last step in the auto-login process.
60

SEE ALSO

62     ftp(1), ftpd(8)
63
64Linux NetKit (0.17)           September 23, 1997           Linux NetKit (0.17)
Impressum