LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-02-2006, 08:10 PM   #1
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Rep: Reputation: 15
ftp problem


hi gurus,

i want to ftp a file from solaris to XP windows. But i meet a problem. have anybody got any idea?

Quote:
tosba-2# uname -a
SunOS tosba-2 5.8 Generic_108528-06 sun4u sparc SUNW,Ultra-80
tosba-2# .
i configure my .netrc file correctly. and when i am using the
command

Quote:
.tosba-2# ftp deppo
Connected to deppo.
220 Microsoft FTP Service
331 Password required for ftpuser.
230 User ftpuser logged in.
ftp> bye
221
tosba-2# ftp -i deppo
Connected to deppo.
220 Microsoft FTP Service
331 Password required for ftpuser.
230 User ftpuser logged in.
as you see,it works perfectly. but when i was running the commad follows, i encountered error followed.

Quote:
.tosba-2# ftp -i -n deppo < ftpdepo.tmp
Local directory now /optlocal/archive/history
Please login with USER and PASS.
Please login with USER and PASS.
Please login with USER and PASS.
Please login with USER and PASS.
tosba-2# .
i can't find any reason why it's not work. but it is.

bye the way i got followed result without redirect the file ftp command.

Quote:
.
tosba-2# ftp -i -n deppo
Connected to deppo.
220 Microsoft FTP Service
ftp> pwd
530 Please login with USER and PASS.
ftp> bye
221
tosba-2#.
thanks in advance.
 
Old 04-02-2006, 09:05 PM   #2
apt-get-dude
Member
 
Registered: Mar 2006
Posts: 98

Rep: Reputation: 15
Not my cup of tea but here is a suggestion.

1. truss the command
2. add the -d (debugging) option

3. According to the documentation, adding the -n prevents auto login, try without it (-n). Then, according to this paragraph from docs.sun.com, it should check the .netrc.

-n

Does not attempt “auto-login” upon initial connection. If auto-login is not disabled, ftp checks the .netrc file in the user's home directory for an entry describing an account on the remote machine. If no entry exists, ftp will prompt for the login name of the account on the remote machine (the default is the login name on the local machine), and, if necessary, prompts for a password and an account with which to login.

Hope it helps. If I am wrong, somebody please let me know.
 
Old 04-03-2006, 01:52 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,724

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
To fix the problem, add the following line in the ftpdepo.tmp file:
"user username password"
This must be the first line of the file.
Obviously, replace username and password by the real ones.
 
Old 04-03-2006, 05:30 PM   #4
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by apt-get-dude
adding the -n prevents auto login, try without it (-n).
thanks apt-get-dude,

as a result, i can't use .netrc file vith -n option of ftp?


Quote:
Originally Posted by jlliagre
"user username password"
.
thanks jlliagre,

i know, i could add username and password in the the file, but i don't want to add any password in an ordinary file or a script. but now i see i hava no more alternative.

regards.
 
Old 04-04-2006, 02:09 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,724

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Quote:
Originally Posted by qrshat
i know, i could add username and password in the the file, but i don't want to add any password in an ordinary file or a script. but now i see i hava no more alternative.
You need not make that file an ordinary file, you can "hide" it with a leading dot, and you can set its permission the same as those requested for .netrc. In that case, it would be more secure that using .netrc, which is such an easy target.

In any case, using ftp in the first place, which sends cleartext passwords on the net, is already putting your security at risk.

If you really care about securing the credentials, you'd better use scp or sftp.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp from LInux to Serv-U ftp server problem csross Linux - General 2 11-07-2005 05:35 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 03:07 PM
FTP problem dafiahmad Linux - Newbie 2 04-08-2004 11:01 PM
problem in wu-ftp lomaree Linux - Software 7 07-12-2003 02:12 AM
FTP Problem lansman Linux - Networking 2 04-30-2003 06:17 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration