1 |
763 |
simons |
.\" Copyright (c) 1985, 1989, 1990 The Regents of the University of California.
|
2 |
|
|
.\" All rights reserved.
|
3 |
|
|
.\"
|
4 |
|
|
.\" Redistribution and use in source and binary forms, with or without
|
5 |
|
|
.\" modification, are permitted provided that the following conditions
|
6 |
|
|
.\" are met:
|
7 |
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
8 |
|
|
.\" notice, this list of conditions and the following disclaimer.
|
9 |
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
10 |
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
11 |
|
|
.\" documentation and/or other materials provided with the distribution.
|
12 |
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
13 |
|
|
.\" must display the following acknowledgement:
|
14 |
|
|
.\" This product includes software developed by the University of
|
15 |
|
|
.\" California, Berkeley and its contributors.
|
16 |
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
17 |
|
|
.\" may be used to endorse or promote products derived from this software
|
18 |
|
|
.\" without specific prior written permission.
|
19 |
|
|
.\"
|
20 |
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
21 |
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22 |
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
23 |
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
24 |
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25 |
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
26 |
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27 |
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
28 |
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
29 |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
30 |
|
|
.\" SUCH DAMAGE.
|
31 |
|
|
.\"
|
32 |
|
|
.\" from: @(#)ftp.1 6.18 (Berkeley) 7/30/91
|
33 |
|
|
.\" from: ftp.1,v 1.2 1997/06/08 20:01:35 dholland Exp
|
34 |
|
|
.\" $Id: netrc.5,v 1.1 2002-03-25 22:32:01 simons Exp $
|
35 |
|
|
.\"
|
36 |
|
|
.Dd September 23, 1997
|
37 |
|
|
.Dt NETRC 5
|
38 |
|
|
.Os "Linux NetKit (0.16)"
|
39 |
|
|
.Sh NAME
|
40 |
|
|
.Nm netrc, .netrc
|
41 |
|
|
.Nd user configuration for ftp
|
42 |
|
|
.Sh DESCRIPTION
|
43 |
|
|
This file contains configuration and autologin information for the
|
44 |
|
|
File Transfer Protocol client
|
45 |
|
|
.Xr ftp 1 .
|
46 |
|
|
.Pp
|
47 |
|
|
The
|
48 |
|
|
.Pa .netrc
|
49 |
|
|
file contains login and initialization information
|
50 |
|
|
used by the auto-login process.
|
51 |
|
|
It resides in the user's home directory.
|
52 |
|
|
The following tokens are recognized; they may be separated by spaces,
|
53 |
|
|
tabs, or new-lines:
|
54 |
|
|
.Bl -tag -width password
|
55 |
|
|
.It Ic machine Ar name
|
56 |
|
|
Identify a remote machine
|
57 |
|
|
.Ar name .
|
58 |
|
|
The auto-login process searches the
|
59 |
|
|
.Pa .netrc
|
60 |
|
|
file for a
|
61 |
|
|
.Ic machine
|
62 |
|
|
token that matches the remote machine specified on the
|
63 |
|
|
.Nm ftp
|
64 |
|
|
command line or as an
|
65 |
|
|
.Ic open
|
66 |
|
|
command argument.
|
67 |
|
|
Once a match is made, the subsequent
|
68 |
|
|
.Pa .netrc
|
69 |
|
|
tokens are processed,
|
70 |
|
|
stopping when the end of file is reached or another
|
71 |
|
|
.Ic machine
|
72 |
|
|
or a
|
73 |
|
|
.Ic default
|
74 |
|
|
token is encountered.
|
75 |
|
|
.It Ic default
|
76 |
|
|
This is the same as
|
77 |
|
|
.Ic machine
|
78 |
|
|
.Ar name
|
79 |
|
|
except that
|
80 |
|
|
.Ic default
|
81 |
|
|
matches any name.
|
82 |
|
|
There can be only one
|
83 |
|
|
.Ic default
|
84 |
|
|
token, and it must be after all
|
85 |
|
|
.Ic machine
|
86 |
|
|
tokens.
|
87 |
|
|
This is normally used as:
|
88 |
|
|
.Pp
|
89 |
|
|
.Dl default login anonymous password user@site
|
90 |
|
|
.Pp
|
91 |
|
|
thereby giving the user
|
92 |
|
|
.Ar automatic
|
93 |
|
|
anonymous ftp login to
|
94 |
|
|
machines not specified in
|
95 |
|
|
.Pa .netrc .
|
96 |
|
|
This can be overridden
|
97 |
|
|
by using the
|
98 |
|
|
.Fl n
|
99 |
|
|
flag to disable auto-login.
|
100 |
|
|
.It Ic login Ar name
|
101 |
|
|
Identify a user on the remote machine.
|
102 |
|
|
If this token is present, the auto-login process will initiate
|
103 |
|
|
a login using the specified
|
104 |
|
|
.Ar name .
|
105 |
|
|
.It Ic password Ar string
|
106 |
|
|
Supply a password.
|
107 |
|
|
If this token is present, the auto-login process will supply the
|
108 |
|
|
specified string if the remote server requires a password as part
|
109 |
|
|
of the login process.
|
110 |
|
|
Note that if this token is present in the
|
111 |
|
|
.Pa .netrc
|
112 |
|
|
file for any user other
|
113 |
|
|
than
|
114 |
|
|
.Ar anonymous ,
|
115 |
|
|
.Nm ftp
|
116 |
|
|
will abort the auto-login process if the
|
117 |
|
|
.Pa .netrc
|
118 |
|
|
is readable by
|
119 |
|
|
anyone besides the user.
|
120 |
|
|
.It Ic account Ar string
|
121 |
|
|
Supply an additional account password.
|
122 |
|
|
If this token is present, the auto-login process will supply the
|
123 |
|
|
specified string if the remote server requires an additional
|
124 |
|
|
account password, or the auto-login process will initiate an
|
125 |
|
|
.Dv ACCT
|
126 |
|
|
command if it does not.
|
127 |
|
|
.It Ic macdef Ar name
|
128 |
|
|
Define a macro.
|
129 |
|
|
This token functions like the
|
130 |
|
|
.Nm ftp
|
131 |
|
|
.Ic macdef
|
132 |
|
|
command functions.
|
133 |
|
|
A macro is defined with the specified name; its contents begin with the
|
134 |
|
|
next
|
135 |
|
|
.Pa .netrc
|
136 |
|
|
line and continue until a null line (consecutive new-line
|
137 |
|
|
characters) is encountered.
|
138 |
|
|
If a macro named
|
139 |
|
|
.Ic init
|
140 |
|
|
is defined, it is automatically executed as the last step in the
|
141 |
|
|
auto-login process.
|
142 |
|
|
.El
|
143 |
|
|
.Sh SEE ALSO
|
144 |
|
|
.Xr ftp 1 ,
|
145 |
|
|
.Xr ftpd 8
|