The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
PING - Unknown host 127.0.0.1, Unknown host localhost - Solaris 10 Przemek SUN Solaris 4 05-25-2008 09:11 PM
host cp in ksh script not working tparker123 Shell Programming and Scripting 1 05-09-2008 01:46 PM
Running command "md5" on remote host not working. ynilesh UNIX for Advanced & Expert Users 1 02-01-2008 05:15 AM
How to delete the files from local host to remote host krishna176 SUN Solaris 3 03-24-2007 01:48 PM
QNX host cannot ping SCO host, vice versa gavon IP Networking 2 08-20-2001 05:57 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-13-2005
Registered User
 

Join Date: May 2005
Posts: 6
Unhappy fixed !!!! host alias not working: host not found

Hello,

I am working on HP-UX , and in the /etc/hosts file we have setup an alias:

aa.bb.cc.dd devmach2.unix.org devmach2 devma2v

The alias devma2v does not work. Error when pinging devma2v
ping: unknown host devma2v

For devmach2 the ping works fine , returning the correct IP (aa.bb.cc.dd)/
What could be the problem?

Thank you.

Well - the file /etc/nsswitch.conf was missing!!! That's why it didn't work.

Last edited by FunnyCats; 05-13-2005 at 01:28 PM. Reason: found the solution
Reply With Quote
Forum Sponsor
  #2  
Old 05-13-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
That kind of thing works for me. What is the dns entry in your /etc/nsswitch.conf file?
Reply With Quote
  #3  
Old 05-13-2005
Registered User
 

Join Date: May 2005
Posts: 6
Unhappy host not found - /etc/nsswitch.conf: No such file or directory

On this specific machine (the machine is part of a network - a big one) - no such file:
/etc/nsswitch.conf: No such file or directory

Thanks.
Reply With Quote
  #4  
Old 05-13-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Wow! What version of HP-UX are you using? According to the nsswitch.conf man page, no nsswitch file results in (for hosts):
hosts: nis [NOTFOUND=return] files

This would imply that you are using nis. Only if nis was unavailable (as in during system startup) would the hosts file be referenced. But I've never seen a system without a nsswitch.conf file.

Are you using nis? If so and if your version of hp-ux supports nsswitch.conf, you might try briefly putting a nsswitch.conf file into place with a single line:
hosts: nis [NOTFOUND=continue] files
Reply With Quote
  #5  
Old 05-13-2005
Registered User
 

Join Date: May 2005
Posts: 6
Thumbs up /etc/nsswitch.conf File

Thanks for your help.
It seems someone has moved the /etc/nsswitch.conf file to save and that's why it didn't work.
The file was restored and the alias is working fine.
Thank you again! :-)
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0