1833652 Members
3964 Online
110062 Solutions
New Discussion

FTP does not work.

 
FTP Not working
New Member

FTP does not work.

Hi,
We have HPUX server.

The default shell for users in NIS is set to /usr/bin/csh. ., they are not able to do FTP. They can logon and continue with their work,but ftp does not work.
When I check at log, I see the message as 'BAD SHELL'.
However if I change it back to /sbin/sh., everything looks okay.
Do I have to make changes to make ftp work with csh.

#cat shells
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/bin/tcsh
/usr/local/bin/tcsh
/opt/tcsh/bin/tcsh
/bin/csh
/bin/sh
/bin/ksh
/usr/bin/false
/bin/false

Cheers,
Abhinesh
11 REPLIES 11
Steven Schweda
Honored Contributor

Re: FTP does not work.

"man ftpd":
[...]
+ The user must have a standard shell returned by
getusershell().
[...]


"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

as if they were contained in /etc/shells.
The file is left open so that the next call
returns the next shell. A null pointer (0)
is returned on EOF or error.
[...]


So, I'd look at /etc/shells.
Kapil Jha
Honored Contributor

Re: FTP does not work.

Hello Abhinesh,
This problem is with all the users or with only a bunch of user.

If it is with only some users i think ur answer lies in
http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1208239186565+28353475&threadId=1055096

else we need more information,
ur user have csh as default shell , he is running ftp from csh or how???
BR,
Kapil
I am in this small bowl, I wane see the real world......
Safarali
Valued Contributor

Re: FTP does not work.

Hi Abhinesh
1. is this user is listed in /etc/passwd or nis passwd file or passwd file same or nis and normal user

what is the working shell of the user in /etc/passwd file

please provide the out put of

grep username /etc/passwd
ypcat passwd | grep username

Regards
Safar
FTP Not working
New Member

Re: FTP does not work.

the user is in NIS. Output of passwd.yp file from NIS. He is able to logon to network with no issues using his NIS account.

ypcat passwd | grep ath

ath*:cod*:522:20:Ath*:/home1/ath*:/usr/bin/csh
Safarali
Valued Contributor

Re: FTP does not work.

Hi Abhinesh how about the out put of
grep ath /etc/passwd

if possible create one more test user in nis with korn shell or bshell and try the ftp
let me investigate this issue mean time try this option

Regards
safar
Dennis Handly
Acclaimed Contributor

Re: FTP does not work.

>ypcat passwd | grep ath
ath*:cod*:522:20:Ath*:/home1/ath*:/usr/bin/csh

Should we ask why you have a "*" in the name and home directory fields?
Is this some NIS special?
FTP Not working
New Member

Re: FTP does not work.

>ypcat passwd | grep ath
ath*:cod*:522:20:Ath*:/home1/ath*:/usr/bin/csh

Should we ask why you have a "*" in the name and home directory fields?
Is this some NIS special?

I am sorry.
athor:cod*(Passwd Hash Masked):522:20:AthorBrown:/home1/athor:/usr/bin/csh

Safarali
Valued Contributor

Re: FTP does not work.

Hi Abhinesh

This is not nis special account is different in Nis and normal passwd, either you can remove user author from normal and user and keep only NIS, no need of two user


Regards
safar
FTP Not working
New Member

Re: FTP does not work.

Hi,
Adding CSH to /etc/shells to hosts worked. Before this I was making shells entry only to NIS server., When I make an entry to all the hosts it works.
Cheers,
Abhinesh
Safarali
Valued Contributor

Re: FTP does not work.

Hi Abhinesh
your out put was not clear, from your out put showing that an entry in /usr/bin/csh but you did not tell there is no entry of /usr/bin/csh in /etc/shell of the other server, nis user does not have cshell /etc/shell that is the reason it was not working

Regards
Safar
FTP Not working
New Member

Re: FTP does not work.

I made an entry to /etc/shells to all hosts and the issue is resolved.,