The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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-26-2008 12:11 AM
host cp in ksh script not working tparker123 Shell Programming and Scripting 1 05-09-2008 04:46 PM
Running command "md5" on remote host not working. ynilesh UNIX for Advanced & Expert Users 1 02-01-2008 08:15 AM
How to delete the files from local host to remote host krishna176 SUN Solaris 3 03-24-2007 04:48 PM
QNX host cannot ping SCO host, vice versa gavon IP Networking 2 08-20-2001 08:57 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-13-2005
FunnyCats FunnyCats is offline
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 04:28 PM.. Reason: found the solution
  #2 (permalink)  
Old 05-13-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
That kind of thing works for me. What is the dns entry in your /etc/nsswitch.conf file?
  #3 (permalink)  
Old 05-13-2005
FunnyCats FunnyCats is offline
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.
  #4 (permalink)  
Old 05-13-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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
  #5 (permalink)  
Old 05-13-2005
FunnyCats FunnyCats is offline
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! :-)
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0