- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp process
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 02:44 AM
05-26-2008 02:44 AM
ftp process
Having problems while using ftp command. My user id is:sathis\$sps07 (NT server). I am trying to do ftp a file from a HP-UX server to a Windows NT server.
ftp -nv <
user sathis\$sps07
quit
EOF
If I try the above then the 'login failed' error is coming though the logon details are correct. It is taking the user name as 'sathis$sps07' instead of 'sathis\$sps07'. Could you please help me in correcting this problem?
Thanks.
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 02:57 AM
05-26-2008 02:57 AM
Re: ftp process
Send username : 'sathis\\\$sps07'
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 02:57 AM
05-26-2008 02:57 AM
Re: ftp process
Are you doing scriptname
I'd suggest using sftp instead.
Better yet scp.
This is key authenticated and you won't be entering passwords anywhere in plain text.
Can manually run ftp and login with the username and password?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:04 AM
05-26-2008 03:04 AM
Re: ftp process
I thought the format was
user
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:05 AM
05-26-2008 03:05 AM
Re: ftp process
ftp -i -n << EOF
open
user sathis\\\$sps07
quit
EOF
is giving error as
User 'sathis$sps07' can not login..It still takes as 'sathis$sps07' instead of 'sathis\$sps07'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:07 AM
05-26-2008 03:07 AM
Re: ftp process
I really encourage you to look at SSH and the SFTP / SCP options.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:08 AM
05-26-2008 03:08 AM
Re: ftp process
when you put a variable beside a slash add the braces.
${variable}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:35 AM
05-26-2008 03:35 AM
Re: ftp process
>ftp -i -n << EOF
open
user sathis\\\$sps07
quit
EOF
ftp -i -n server name<< EOF
user sathis passwd
ls
quit
EOF
rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:51 AM
05-26-2008 03:51 AM
Re: ftp process
Could you please let me know how I should give the userid ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 03:57 AM
05-26-2008 03:57 AM
Re: ftp process
ftp -i -n servername<< EOF
user satis \$sps07
dir
quit
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:08 AM
05-26-2008 04:08 AM
Re: ftp process
ftp -i -n << EOF
open ntservername
user satis \$sps07
status
pwd
quit
EOF
rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:08 AM
05-26-2008 04:08 AM
Re: ftp process
It is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:09 AM
05-26-2008 04:09 AM
Re: ftp process
You can hardcode the username in the script as you're doing now.
But I looked at Rasheeds post which runs on HP-UX. He has a space after the username and before the \. Maybe that's your issue.
Unfortunately I don't have a system to test.
But I don't think you need the \ at all.
user username password <-- put spaces in
or try your original line but with a space
user username \password <--Like Rasheeds script
You can pass the username as a variable as well just like the password.
For instance if you don't want to store either the user's name or password in the script you can type both in after the script name
scriptname.sh kevin kevinspassword
My username will be passed as $1
My password will be passed as $2
So your script could look like
ftp -nv <
user $1 $2 (I didn't put he \ in but try it)
quit
EOF
Wish I had a system to test this for you.
If you put the \ in then try
user ${1} \${$2}
Good luck,
Kevin
I'll keep monitoring your post for further questions :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:12 AM
05-26-2008 04:12 AM
Re: ftp process
If your ID has "\" and "$" you would have to quote each. Or you tell the shell to not treat characters special by quoting the here document word:
ftp -nv <<\EOF
open
user sathis\$sps07
quit
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:15 AM
05-26-2008 04:15 AM
Re: ftp process
I assumed $sps07 was a variable. But if the $ is part of the password you will have to quote it.
Also you don't need the \ look at this post
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1234898
Regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:17 AM
05-26-2008 04:17 AM
Re: ftp process
Just ensure you have a space between the username and password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 04:28 AM
05-26-2008 04:28 AM
Re: ftp process
I have tested it on both HP and Win.
on my post, I took
username as satis
and passwd as $sps07
and I used a backslash char to escape the $ sign in the passwd as below and between the username and passwd there is a space.
user satis \$sps07
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:12 AM
05-26-2008 05:12 AM
Re: ftp process
Below code works:
ftp -nv << \EOF
open
user sathis\\$sps07
EOF
1) \ - is added with EOF 2) \ is added in username as sathis\\$sps07 (though the user name is sathis\$sps07)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:18 AM
05-26-2008 05:18 AM
Re: ftp process
I was treating sathis as the username and $sps07 as the password.
Glad you got it going.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:21 AM
05-26-2008 05:21 AM
Re: ftp process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:41 AM
05-26-2008 05:41 AM
Re: ftp process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 05:53 AM
05-26-2008 05:53 AM
Re: ftp process
I still don't understand why that "//" is needed in the here document. I suppose you could use tusc to figure it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 06:07 AM
05-26-2008 06:07 AM
Re: ftp process
I don't know either Dennis.
I'd like sathis to try the script without the \\ and use the double quotes around the username and password to see if that works.
But how will the script interpret the \ ?. Maybe the \ is needed after all.
But I'm curious if it work without the extra \ and use double quotes like this
ftp -nv << \EOF
open
user "sathis$sps07" "
EOF
But now I'm thinking it does need to be escaped (\'d) because the user command is and FTP command and not shell interpretation.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 01:24 PM
05-27-2008 01:24 PM
Re: ftp process
So either you aren't using a real shell or there is something special about ftp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 01:30 PM
05-27-2008 01:30 PM
Re: ftp process
It works.
In fact with only one backslash I get this error:
331 Password required for sathis\$sps07.
But only if I put double quotes around the user name. But the shell doesn't need the extra backslash.