Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: Why doesn't Solaris recognize my /etc/inet/hosts file?

632 views
Skip to first unread message

Jim Sokoloff

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to Ron Nichols

Ron Nichols wrote:
>
> OK, I'm still converting from SunO/S4.1.x to Solaris . . .but . . .
> I have put the proper entries in the hosts file, and was careful not to use
> spaces, and still cannot ping using the common or nick name. I _can_ ping
> using the IP address, but no matter what, I cannot say:

I believe the file should be in /etc/hosts, not /etc/inet/hosts

---Jim

Ron Nichols

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

OK, I'm still converting from SunO/S4.1.x to Solaris . . .but . . .
I have put the proper entries in the hosts file, and was careful not to use
spaces, and still cannot ping using the common or nick name. I _can_ ping
using the IP address, but no matter what, I cannot say:

ping boris

I must say

ping 168.169.170.213

I can also rlogin with the IP address, but not the machine name.

For the life of me, I cannot figure out what's wrong. I have designated
the host machine as the nameserver, I have rebooted, etc. The other SunO/S
machines can ping the Solaris machine, but the Solaris machine cannot ping
other host names. Since I am trying to set up my networked HP plotters, I
do seem to need the hosts file to work.

Suggestions and answers are very appreciated.

Thanks!!


--
Ron Nichols
Netherland, Sewell & Associates

Vartan Narinian

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

Jim Sokoloff <soko...@tiac.net> writes:
>
>I believe the file should be in /etc/hosts, not /etc/inet/hosts

/etc/hosts is a link to /etc/inet/hosts in Sol 2.

The original user can have a look at /etc/nsswitch.conf to see in which
order the naming services are searched.

--
Vartan

mas...@pobox.com

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

>> OK, I'm still converting from SunO/S4.1.x to Solaris . . .but . . .
>> I have put the proper entries in the hosts file, and was careful not to use
>> spaces, and still cannot ping using the common or nick name. I _can_ ping
>> using the IP address, but no matter what, I cannot say:
>
>I believe the file should be in /etc/hosts, not /etc/inet/hosts

No. On Solaris 2.x, /etc/hosts is meant to be a symlink to ./inet/hosts,
and then the real data goes in /etc/inet/hosts.

My guess is that the original poster's /etc/nsswitch.conf says

hosts: dns [NOTFOUND=return] files

or

hosts: nis [NOTFOUND=return] files

(i.e. slavishly follow the SunOS 4.x behaviour). For what he wants, he
should at least get rid of the "[NOTFOUND=return]" and probably should
also move "files" to first place in the list.

Thomas
mas...@pobox.com

LMS Curtis

unread,
Sep 19, 1997, 3:00:00 AM9/19/97
to

Ron Nichols wrote:
>
> OK, I'm still converting from SunO/S4.1.x to Solaris . . .but . . .
> I have put the proper entries in the hosts file, and was careful not to use
> spaces, and still cannot ping using the common or nick name. I _can_ ping
> using the IP address, but no matter what, I cannot say:
>
> ping boris
>
> I must say
>
> ping 168.169.170.213
>
> I can also rlogin with the IP address, but not the machine name.
>
> For the life of me, I cannot figure out what's wrong. I have designated
> the host machine as the nameserver, I have rebooted, etc. The other SunO/S
> machines can ping the Solaris machine, but the Solaris machine cannot ping
> other host names. Since I am trying to set up my networked HP plotters, I
> do seem to need the hosts file to work.
>
> Suggestions and answers are very appreciated.
>
> Thanks!!
>
> --
> Ron Nichols
> Netherland, Sewell & Associates

If you are using the /etc/inet/hosts file are your primary
name resolver, you either need to copy /etc/nsswitch.files
to /etc/nsswitch.conf, or make sure the files is the first
entry on the hosts line in your /etc/nsswitch.conf.

--
Laura Curtis
email: Laura....@pnl.gov
voice: (509)375-2311

Dale E. Higgs

unread,
Sep 19, 1997, 3:00:00 AM9/19/97
to

Vartan Narinian wrote:


>
> Jim Sokoloff <soko...@tiac.net> writes:
> >
> >I believe the file should be in /etc/hosts, not /etc/inet/hosts
>

> /etc/hosts is a link to /etc/inet/hosts in Sol 2.
>
> The original user can have a look at /etc/nsswitch.conf to see in which
> order the naming services are searched.


hosts: files dns


>
> --
> Vartanhosts: files dns


and /etc/resolv.conf

order local,bind


-
______________________________________________________________________
| Dale E. Higgs |
| Senior Software Engineer |
| Primex Aerospace Company Ion Thrusters 'R' Us |
| (formerly Olin Aerospace Company) |
| (formerly Rocket Research Company) |
----------------------------------------------------------------------

Thomas Maslen

unread,
Sep 23, 1997, 3:00:00 AM9/23/97
to

>> The original user can have a look at /etc/nsswitch.conf to see in which
>> order the naming services are searched.
>
>hosts: files dns

Yes.

>and /etc/resolv.conf
>
>order local,bind

No. That looks more like an incantation for resolv+ on a SunOS 4.x system,
and even then doesn't it go in /etc/hosts.conf rather than /etc/resolv.conf?
(Caveat: I've never actually used resolv+).

Thomas
mas...@pobox.com

0 new messages