i have shell scripts in my redhat server written by previous administrator, which downloads some files from external FTP servers.
lftp -c 'open -e "repeat 10 source getfiles.script" host1' > out_get.out 2>&1 lftp -c 'open -e "repeat 10 source getfiles.script" host2' > out_get.out 2>&1
As i been informed, those scripts were working before, after some changes done in external FTP servers(host1/host2) now its stopped working.
Here in lftp commands username and password for host1 and host2 are not specified, how can it be possible to connect to external FTP servers without any credentials ?
On the host names, how to check the real IP of "host2" ? its not registered in hosts file and when i ping host1 it says unknown host. But ping host2 - displays domain name and real ip but 100% package lost.
Some thoughts: 1. host1 not registred in DNS servers 2. host2 registred in DNS servers but ping gets 100 package lost becouse firewall blocks the connection. Any other ideas ?
I have 2 DNS servers registered in resolv.conf:
nameserver X.X.X.2 nameserver X.X.X.3
etc/nsswitch.conf:
# # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # nisplus or nis+ Use NIS+ (NIS version 3) # nis or yp Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far # # To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis passwd: files shadow: files group: files #hosts: db files nisplus nis dns hosts: files dns # Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files
Thanks a lot.
/etc/resolv.confand your NSS configuration? If the outside FTP service has changed, isn't it most likely that the name has just changed from what you had? – mattdm Dec 5 '10 at 14:16