04-16-2008
Try escaping the backslash, i.e. \\
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have an ftp user, which has been setup to run ftp jobs to a specific machine (different jobs). for the first job i created .netrc in the ftp users home directory and added the appropriate commands
machine FTPBOX01 login user1 password xxx
macdef init
etc
etc
get file
bye
I use the... (3 Replies)
Discussion started by: hcclnoodles
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to ask if the .netrc file should really be stored/placed in the /home/<userid> directory or in the home directory indicated by the uinfo command?
I am currently having problems with a .netrc file which is owned by a id which has it's home directory pointed to a... (2 Replies)
Discussion started by: edu_escandor
2 Replies
3. UNIX for Dummies Questions & Answers
Ok guys (gals?) Im new here as a member, but have come here many times to find answers to questions.
Have played with Unix (ATT Sys 5) and now Linux (RH)...
I told myself I wanst going to ask for help on the current project..but.. I am down to what I think is the last issue:
(and I KNOW the... (3 Replies)
Discussion started by: txdave
3 Replies
4. Shell Programming and Scripting
So...
I'm trying to script and FTP Backup of some files from openVMS Alpha machine to a Unixware 7 machine.
I decided to use .netrc to do all the FTP actions however when I send the
nmap command. It pretty much gets ignored while even other things such "ascii", "case" etc.. get respected... (0 Replies)
Discussion started by: thesubmitter
0 Replies
5. Shell Programming and Scripting
Hi all,
I'm using the following script to automated ftp files to 1 ftp servers
host=192.168.0.1
/usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp
open $host
bin
cd ${directory}
put $files
quit
ftp
and the .netrc file contain
machine 192.168.0.1
login abc... (4 Replies)
Discussion started by: varu0612
4 Replies
6. AIX
Guy's
We have two AIX servers
Server1 and Server2
and we have created user1 in Server1 and Server2 ...
and .netrc file was confiured under /home/user1 with the below line
machine server2 login user1 password abc1234567
-rw------- 1 user1 staff 159 Sep 28 2004 .netrc
... (7 Replies)
Discussion started by: ITHelper
7 Replies
7. Shell Programming and Scripting
I'm writing a script which needs to run under an 'automation' account and there is already a .netrc machine definition for the server I need to connect to.
If I create a new machine entry in the .netrc with a different account this will, of course, be ignored and the ftp session will connect to... (3 Replies)
Discussion started by: DeepakS
3 Replies
8. UNIX for Dummies Questions & Answers
How can I supply the userID/password when executing FTP in the batch mode? Using .netrc is not an option (prohibited per Corporate Policy).
Thank you in advance. (1 Reply)
Discussion started by: compaamat
1 Replies
9. Shell Programming and Scripting
Hi,
i have a doubt. i am using .netrc file for login to a ftp server.
ftp abc.ftp.com
suppose i have 2 userid and password for the same server as shown below. which one is it going to read from the .netrc file?
cat .netrc
machine abc.ftp.com login admin1 password pass1
machine... (13 Replies)
Discussion started by: Little
13 Replies
10. Shell Programming and Scripting
Hi, does anybody know if it is possible to specify a particular port for an FTP address within a .netrc file ?
i have a script which opens the ftp to a machine and then instigates .netrc to login etc.. within .netrc i need it to go to a particular port to enable me to automate the dropping of... (2 Replies)
Discussion started by: forefather1977
2 Replies
NETRC(5) BSD File Formats Manual NETRC(5)
NAME
netrc -- user configuration for ftp
SYNOPSIS
~/.netrc
DESCRIPTION
This file contains configuration and autologin information for the File Transfer Protocol client ftp(1).
The .netrc file contains login and initialization information used by the auto-login process. It resides in the user's home directory. The
following tokens are recognized; they may be separated by spaces, tabs, or new-lines:
machine name
Identify a remote machine name. The auto-login process searches the .netrc file for a machine token that matches the remote
machine specified on the ftp command line or as an open command argument. Once a match is made, the subsequent .netrc tokens are
processed, stopping when the end of file is reached or another machine or a default token is encountered.
default This is the same as machine name except that default matches any name. There can be only one default token, and it must be after
all machine tokens. This is normally used as:
default login anonymous password user@site
thereby giving the user automatic anonymous ftp login to machines not specified in .netrc. This can be overridden by using the -n
flag to disable auto-login.
login name
Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the specified
name.
password string
Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server requires
a password as part of the login process. Note that if this token is present in the .netrc file for any user other than anonymous,
ftp will abort the auto-login process if the .netrc is readable by anyone besides the user.
account string
Supply an additional account password. If this token is present, the auto-login process will supply the specified string if the
remote server requires an additional account password, or the auto-login process will initiate an ACCT command if it does not.
macdef name
Define a macro. This token functions like the ftp macdef command functions. A macro is defined with the specified name; its con-
tents begin with the next .netrc line and continue until a null line (consecutive new-line characters) is encountered. If a macro
named init is defined, it is automatically executed as the last step in the auto-login process.
SEE ALSO
ftp(1), ftpd(8)
Linux NetKit (0.17) September 23, 1997 Linux NetKit (0.17)