1825954 Members
2516 Online
109690 Solutions
New Discussion

FTP on Unix System

 
SOLVED
Go to solution
Rene Hermann_1
Advisor

FTP on Unix System

Hi,I have some trouble with an ftp connection to a HP-UX 11.0 server.I didn't deny the access for the user.I get the following message when trying to connect:FTP LOGIN REFUSED (bad shell) FROM system [xxx.xxx.xxx.xxx] userWhen connecting to the server, I give the connect the username and get the following:530 User user access denied...Login failed.Whats wrong there? Can anybody help?Thank youRene
# cd pub # more beer
6 REPLIES 6
John Carr_2
Honored Contributor

Re: FTP on Unix System

Hi

have you tried telnet to the server and login as the user to see if the login works ?

John.
Pete Randall
Outstanding Contributor
Solution

Re: FTP on Unix System

Make sure the desired shell exists in the /etc/shells file.


Pete

Pete
Fränky
Occasional Advisor

Re: FTP on Unix System

Hi Rene,

i think the appropriate entry in /etc/shells
(i.e. /bin/csh) is missing

HTH

Fraenky
Mark Grant
Honored Contributor

Re: FTP on Unix System

Check which shell the user has in /etc/passwd and make sure that shell exists in /etc/shells
Never preceed any demonstration with anything more predictive than "watch this"
Rene Hermann_1
Advisor

Re: FTP on Unix System

Hi all,OK, There was no /etc/shells. So I build a new one and added the /bin/csh. Now the ftp works.Thanky to all of you.Rene
# cd pub # more beer
Fabio Ettore
Honored Contributor

Re: FTP on Unix System

Hi,

(as already said from other people forum) the reason of your problem is the shell used from user (see /etc/passwd for that user), about it you have the only two chances:

1. use /etc/shells:
Insert the user's shell into /etc/shells file, if it doesn't exist then create and insert user's shell;

2. don't use /etc/shells
Then the user's shell into /etc/passwd file has to be one of those below:

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

and now I am going to past the reason of this from man getusershell:

getusershell()
Returns a pointer to the first legal user shell as defined in the file /etc/shells (see shells(4)). If /etc/shells does not exist or is not readable, getusershell() returns the following standard system shells:

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

......

Then ftpd's behaviour is due to getusershell which uses /etc/shells and if it doens't exists or is not readable then returns on shells above and only those locations or paths. Only those even if they have links and therefore the same i-node of other files.



I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!