Operating System - HP-UX
1833764 Members
2886 Online
110063 Solutions
New Discussion

After setting up securetty ftp cannot work

 
SOLVED
Go to solution
twtandigi.com.my
Frequent Advisor

After setting up securetty ftp cannot work

Hi,

I have an issue with my hp-ux 11.00. After i have set up securetty, the ftp cannot be access. i have checked that the process is running.

this is the error i get

ftp> ls
200 PORT command successful.
425 Can't build data connection: Connection refused.
ftp>

what is wrong with the connection

Regards,
Calvin
15 REPLIES 15
Naveej.K.A
Honored Contributor

Re: After setting up securetty ftp cannot work

hi calvin,

#cat /etc/shells
/usr/bin/ksh
/usr/bin/sh
/usr/bin/false
/sbin/sh
#

is the /etc/shells file has the shell of the user mentioned??

with best wishes
Naveej
practice makes a man perfect!!!
twtandigi.com.my
Frequent Advisor

Re: After setting up securetty ftp cannot work

i don't understand what to do with the command as there is not shells in etc
Jose Mosquera
Honored Contributor

Re: After setting up securetty ftp cannot work

Hi,

Could you provide us more datailed infor about this issue?

Rgds.
twtandigi.com.my
Frequent Advisor

Re: After setting up securetty ftp cannot work

I have included
securetty

with only

console
tty1

before that securetty was not included in the system.
i am not able to list out the file that is in the hp-ux system
Naveej.K.A
Honored Contributor

Re: After setting up securetty ftp cannot work

sorry calvin,

if you don't have the shell of the user in the /etc/shells, you won't be able to login even. the message clearly shows that the port 20 which is used for ftp: data is blocked.

regds
naveej
practice makes a man perfect!!!
Joseph Loo
Honored Contributor

Re: After setting up securetty ftp cannot work

hi,

u may like to read this post:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=179550

regards.
what you do not see does not mean you should not believe
twtandigi.com.my
Frequent Advisor

Re: After setting up securetty ftp cannot work

425 Can't build data connection: Connection refused.

tried to force it to pasv.
but still the same problem happen
i still am not able to ftp
mget or get also cannot work

now i am seriously confused
Bruno Ganino
Honored Contributor

Re: After setting up securetty ftp cannot work

If you have a firewall on port used for connection, try to disable it.
Bruno
Torino (Turin) +2H
Mark Grant
Honored Contributor

Re: After setting up securetty ftp cannot work

Well, connection refused can be for a number of reasons.

Yes, if the users shell is not in /etc/shells then you will get an error but there are other possibilities too. For example, if the ftp entry is commented out in /etc/services or /etc/inetd.conf. You will get this if /var/adm/inetd.sec is restricting you too.

However, it looks to me from your posting that you have actually logged in and it is when you type "ls" that you get the error. Either that, or you haven't logged in yet.

Could you explain exactly how you are connecting to the HPUX machine with ftp as I have heard some WIndows ftp clients don't always behave nice with ftp and need patching.

As a test, you could try ftp from the HP machine to itself.
Never preceed any demonstration with anything more predictive than "watch this"
iminus
Frequent Advisor

Re: After setting up securetty ftp cannot work

securetty should not affect ftp to work... it just limit the root login to the terminals... in your case it's only console and tty that root can login. probably other problems with ftp... did you close the port for data transfer in ftp? try this:

cat /etc/services | grep ftp-data

is there any result returned? if there's a line returned, is it comment out?
hope it helps
Bruno Ganino
Honored Contributor

Re: After setting up securetty ftp cannot work

if problem caused by firewall
read here (search "200 port" into pdf file)
http://ovweb.external.hp.com/ovnsmdps/pdf/ovo_f40.pdf

Bruno
Torino (Turin) +2H
twtandigi.com.my
Frequent Advisor

Re: After setting up securetty ftp cannot work

I would try out the firewall as i can still ftp across the the other machines in the same segment.

I do get connection to the machine only i am not sure what is restricting my connection to the machine...

Sorrel G. Jakins
Valued Contributor
Solution

Re: After setting up securetty ftp cannot work

Cal,

Try this:

Let's say the userid you are trying to use for the ftp is called ftpuid.

grep ftpuid /etc/passwd

Look for the shell that ftp user is setup to use: something like /usr/bin/ksh (it's in the 7th and last field of the entry).

Now do:

touch /etc/shells
echo /usr/bin/ksh >> /etc/shells

Try your ftp again. Post your results here.

Sorrel Jakins
BYU

BTW (By The Way) - if user 'ftpuid' is only used for ftp and never logs on, you ought to give it a non-existant shell, such as /usr/bin/false, and then echo /usr/bin/false >> /etc/shells
Mel Burslan
Honored Contributor

Re: After setting up securetty ftp cannot work

in all the conversations above, I noticed nobody I asked this question so far :

are you trying to do your ftp as root user ? by setting up securetty, you have restricted your root logins. And if you are trying to login to ftp as root, more than likely it will NOT work.

________________________________
UNIX because I majored in cryptology...
twtandigi.com.my
Frequent Advisor

Re: After setting up securetty ftp cannot work

Thank you for your advise.