1834210 Members
2303 Online
110066 Solutions
New Discussion

Re: error related to FTP

 
Rajesh G. Ghone
Regular Advisor

error related to FTP

Hello,

I am getting error" FTP LOGIN REFUSED (bad shell)" message in syslog while doing FTP.Can somebody help me in this matter??
Rajesh Ghone
10 REPLIES 10
T G Manikandan
Honored Contributor

Re: error related to FTP

The /etc/shells file should contain all the login shell the user uses.

/etc/shells

/usr/bin/ksh
/usr/bin/csh
/usr/bin/sh


Any shell which is not present in the file and the user has that shell as his login shell the ftp gives a "BAD SHELL" message.Add his login shell to /etc/shells file
T G Manikandan
Honored Contributor

Re: error related to FTP

Tom Ward_1
Honored Contributor

Re: error related to FTP

Did you try google? I did.
This may help:
http://newfdawg.com/SHP-FTP-ftphosts.htm

While denial by the ftpusers file will cause the following message to be logged to syslog:



Feb 15 10:17:20 ctg700 ftpd[13478]: FTP LOGIN REFUSED (bad shell) FROM ctg500g [192.168.1.114], root



To see the above type of logging in the syslog file be sure to use the ???-l??? (el) option in the ftpd line of the /etc/inetd.conf file. Using the ftphosts file does not require the use of the ftpaccess file.

Rajesh G. Ghone
Regular Advisor

Re: error related to FTP

Hello Manikanand & Tom,

Thanks for your reply i tried out whatever you people said but the problem remains the same,1 thing i saw is that i m able to login with another user which is mentioned in /etc/ftpd/ftpaccess but i tried adding root also in that but still the same problem,can i get some more tips??.

Regards,

Rajesh G.
Rajesh Ghone
T G Manikandan
Honored Contributor

Re: error related to FTP

What is root user's login shell.
What are the contents of /etc/shells?

/etc/ftpd/ftpusers is
a file that is used to restrict access.

Also check the file for any username or shell to restrict access.

Thanks
T G Manikandan
Honored Contributor

Re: error related to FTP

Abskhan
Occasional Advisor

Re: error related to FTP

Hi,

scrutinise the following files .

1] /etc/inetd.conf - ftp entries
2] /etc/ftpd/ftpaccess
3] /etc/ftpd/ftpusers - the user hould not listed in this file.

what is the shell of the user.Is it listed in the /etc/shells.
Rajesh G. Ghone
Regular Advisor

Re: error related to FTP

Hi,

the default root shell is sh there is no entry in /etc/ftpd/ftpusers.How do i find out the file which restrict any user or shell.

Regards,

Rajesh G.
Rajesh Ghone
Abskhan
Occasional Advisor

Re: error related to FTP

Since the id is root the shell would be /sbin/sh .Is the entry /sbin/sh for the shell listed in /etc/shells .?
T G Manikandan
Honored Contributor

Re: error related to FTP

Yes,check whether

/sbin/sh

is there in /etc/shells.
Else add the shell to the file.