1748128 Members
3344 Online
108758 Solutions
New Discussion

Re: FTP LOG IN REFUSED

 
Yaroki
Super Advisor

FTP LOG IN REFUSED

Hello,

 

I'm running HP-UX, b.11.11

 

When trying to connect ftp via cmd.exe the log in failed and the following syslog.log message received:

 

FTP LOGIN REFUSED (bad shell) FROM <IP_ADDRESS>, <USER>

 

Now, this is true for all users how run tcsh shell except of root that runs sh shell and can perform the above ftp connection.

 

So, I think it is the tcsh shell I "installed" way:

# cp -pr /usr/bin/tcsh /usr/bin (from one HP-UX machine to the current one).

 

Is there a better approperate way to install tcsh or the "cp" command was enough?

 

BR,

Yali 

6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: FTP LOG IN REFUSED

The usual process to install a new shell is to find the 'depot' file, or source code, and install or compile it that way.  Just copying the tcsh executable from another server could work, but there is always a possibility that there may be libraries that the shell needs that you did not copy.  Installing from scratch would take care of that.

 

Assuming the shell is working, the other thing you should check is the /etc/shells file on your server.

 

If the file exists then you need to make sure that the /usr/bin/tcsh shell is specified in the file.

 

Each shell should be on its own line.  Here is an /etc/shells from an 11.11 server:

 

# cat /etc/shells
/sbin/sh
/bin/sh
/bin/ksh
/bin/false
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/rcsh
/usr/bin/keysh

 

Just add your /usr/bin/tcsh to the end of your file on a line by itself.

Yaroki
Super Advisor

Re: FTP LOG IN REFUSED

Yes, of course, I forgot this configuration file.

It wasn't there at all.

Now, it's work properly.

Thank you.

Yaroki
Super Advisor

Re: FTP LOG IN REFUSED

Hello,

 

Some of the shells I would like to copy from HP-UX machine to the the other refused by the following message:

 

cp: cannot create /usr/bin/ksh:  Text file busy

 

How can it be copied?

 

Yali

Dennis Handly
Acclaimed Contributor

Re: FTP LOG IN REFUSED

>Some of the shells I would like to copy from HP-UX machine to the the other:

>cp: cannot create /usr/bin/ksh:  Text file busy

 

That file is already there, why do you want to copy it?

Matti_Kurkela
Honored Contributor

Re: FTP LOG IN REFUSED

/usr/bin/ksh is part of the standard HP-UX, and is managed by swinstall and friends.

 

If you just copy /usr/bin/ksh from one system to another, your swlist information will no longer accurately match the patch state of ksh. And when you install a patch that affects ksh (e.g. in a Quality Pack), your copied ksh will be silently overwritten (if the patch includes a complete new copy of ksh) or corrupted (if the patch includes a set of differences that are supposed to apply to the version of ksh the swinstall knows about, but not to the version you copied).

 

If one of your HP-UX machines contains a non-working version of /usr/bin/ksh and another doesn't, the right way is to identify the difference in patch levels (with commands like "what /usr/bin/ksh" and/or "swlist -l file |grep /usr/bin/ksh") and apply the required patch to the machine with the non-working version.

 

If you suspect that the "good" file has already been copied from somewhere else, you can use swverify to check whether or not the swinstall information matches the actual file.

MK
Yaroki
Super Advisor

Re: FTP LOG IN REFUSED

Thank you very much.