1752572 Members
4610 Online
108788 Solutions
New Discussion юеВ

Re: ftp issue

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor

Re: ftp issue

> can we concentrate on only technical stuff?

I'd like to, but with my weak psychic powers,
I can't see what you're doing, and you're not
telling me what I want to know, that is, what
you're doing, and what happens when you do
it.
infarakesh
Advisor

Re: ftp issue

> # ypwhich -m
> [...]

You win. No "services.byname". So you need
to use the "/etc/services" _file_.

so.. what's the next step??

only 1 inetd

# ps -aef|grep -i inetd
root 1501 1 0 May 25 ? 0:05 /usr/sbin/inetd
root 21691 14807 0 16:43:47 pts/1 0:00 grep -i inetd
#


tell me if you have any technique to find if I am running other "inetd -c"
Steven Schweda
Honored Contributor

Re: ftp issue

> tell me if you have any technique to find
> if I am running other "inetd -c"

"inetd -c" tells the real running inetd to
re-read its configuration.

man inetd

You could also re-boot the system to restart
inetd, but that shouldn't be necessary.
infarakesh
Advisor

Re: ftp issue

did "inetd -c" still getting the same errors

May 31 17:00:50 inescape inetd[1501]: Rereading configuration
May 31 17:00:50 inescape inetd[1501]: ftp/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: telnet/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: login/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: shell/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: ftp/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: exec/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: ntalk/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: auth/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: printer/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: daytime/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: daytime/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: time/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: echo/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: echo/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: discard/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: discard/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: chargen/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: chargen/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: kshell/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: klogin/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: recserv/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: dtspc/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: swat/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: hacl-probe/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: registrar/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: hacl-cfg/udp: Unknown service
May 31 17:00:50 inescape inetd[1501]: hacl-cfg/tcp: Unknown service
May 31 17:00:50 inescape inetd[1501]: Configuration complete
Steven Schweda
Honored Contributor

Re: ftp issue

> did "inetd -c" still getting the same errors

What have you changed? What's in
/etc/services
/etc/nsswitch.conf
now?
infarakesh
Advisor

Re: ftp issue

# cat /etc/services|grep -i ftp
ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)
tftp 69/udp # Trivial File Transfer Protocol
sftp 115/tcp # Simple File Transfer Protocol
bftp 152/tcp # Background File Transfer Protocol
ftp-ftam 8868/tcp # FTP->FTAM Gateway
#

# cat /etc/nsswitch.conf
#
# /etc/nsswitch.nis:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: compat
#passwd: files nis
group: compat
#group: files nis
hosts: nis [NOTFOUND=return] files
ipnodes: files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: files
#


# netstat -an|grep '*.21'
tcp 0 0 *.2121 *.* LISTEN
tcp 0 0 *.2148 *.* LISTEN
udp 0 0 *.2121 *.*
udp 0 0 *.2148 *.*
#
Patrick Wallek
Honored Contributor

Re: ftp issue

Above you said /etc/inetd.conf has:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l

Try commenting out the ftp line that has tcp6 in it and run 'inetd -c' again.

Also, can you attach a copy of the /etc services file? There still appears to be something wrong there.

Also:

ls -l /etc/services /etc/inetd.conf /etc/nsswitch.conf
infarakesh
Advisor

Re: ftp issue

commented tcp6 and ran "inetd -c". same result.

attaching services file as txt format.

# ls -l /etc/services /etc/inetd.conf /etc/nsswitch.conf
-rw-r--r-- 1 root sys 4892 May 31 21:51 /etc/inetd.conf
-rw-r--r-- 1 root sys 591 May 31 16:58 /etc/nsswitch.conf
-rw-r--r-- 1 bin bin 11545 May 31 14:53 /etc/services



Thanks in advance for all your time!!
Steven Schweda
Honored Contributor
Solution

Re: ftp issue

man nsswitch.conf

On my 11.31 system, it says:

[...]
WARNINGS
Within each process that uses nsswitch.conf(), the entire file is read
only once. If the file is later changed, the process will continue
using the old configuration.
[...]

So, "inetd -c" (or "kill -HUP") may not be
enough. You may need to stop and restart the
inetd process to get it to see any changes in
the name resolution configuration.

> You could also re-boot the system to restart
> inetd, but that shouldn't be necessary.

But it might have worked better than "inetd
-c". "-k" (followed by a manual restart)
might do more than "-c".
infarakesh
Advisor

Re: ftp issue

wow, that did the trick.

did "inetd -k" and then inetd. ftp is working finr now