NIS 'ypcat hosts'

NIS 'ypcat hosts'

Post by Tan Zheng D » Sun, 16 Dec 2001 01:03:27



I am practicing setting up a NIS server.  After ypinit -m, I did this:

# ypcat hosts.byname
127.0.0.1       localhost localhost.localdomain
192.168.0.3     omnibook omnibook.localdomain
192.168.0.1     garfield garfield.localdomain
192.168.0.17    moo moo.localdomain
192.168.0.11    ra ra.localdomain loghost
127.0.0.1       localhost localhost.localdomain
192.168.0.3     omnibook omnibook.localdomain
192.168.0.1     garfield garfield.localdomain
192.168.0.11    ra ra.localdomain loghost
192.168.0.17    moo moo.localdomain
192.168.0.11    ra ra.localdomain loghost

Is it normal for the hosts entries to be repeated?  On the other hand,

# ypcat hosts.byaddr
192.168.0.17    moo             moo.localdomain
192.168.0.11    ra              ra.localdomain          loghost
192.168.0.3     omnibook        omnibook.localdomain
192.168.0.1     garfield        garfield.localdomain
127.0.0.1       localhost       localhost.localdomain

does not repeat.

--
tzd.

 
 
 

NIS 'ypcat hosts'

Post by Alex » Sun, 16 Dec 2001 01:42:18




Quote:> I am practicing setting up a NIS server.  After ypinit -m, I did this:

> # ypcat hosts.byname
> 127.0.0.1       localhost localhost.localdomain
> 192.168.0.3     omnibook omnibook.localdomain
> 192.168.0.1     garfield garfield.localdomain
> 192.168.0.17    moo moo.localdomain
> 192.168.0.11    ra ra.localdomain loghost
> 127.0.0.1       localhost localhost.localdomain
> 192.168.0.3     omnibook omnibook.localdomain
> 192.168.0.1     garfield garfield.localdomain
> 192.168.0.11    ra ra.localdomain loghost
> 192.168.0.17    moo moo.localdomain
> 192.168.0.11    ra ra.localdomain loghost

> Is it normal for the hosts entries to be repeated?  On the other hand,

> # ypcat hosts.byaddr
> 192.168.0.17    moo             moo.localdomain
> 192.168.0.11    ra              ra.localdomain          loghost
> 192.168.0.3     omnibook        omnibook.localdomain
> 192.168.0.1     garfield        garfield.localdomain
> 127.0.0.1       localhost       localhost.localdomain

> does not repeat.

> --
> tzd.

TZD,

Your NIS master server is working properly.  Good work!  :-)

~ Alex

 
 
 

NIS 'ypcat hosts'

Post by Tan Zheng D » Sun, 16 Dec 2001 02:08:32





>>I am practicing setting up a NIS server.  After ypinit -m, I did this:

>># ypcat hosts.byname
>>127.0.0.1       localhost localhost.localdomain
>>192.168.0.3     omnibook omnibook.localdomain
>>192.168.0.1     garfield garfield.localdomain
>>192.168.0.17    moo moo.localdomain
>>192.168.0.11    ra ra.localdomain loghost
>>127.0.0.1       localhost localhost.localdomain
>>192.168.0.3     omnibook omnibook.localdomain
>>192.168.0.1     garfield garfield.localdomain
>>192.168.0.11    ra ra.localdomain loghost
>>192.168.0.17    moo moo.localdomain
>>192.168.0.11    ra ra.localdomain loghost

>>Is it normal for the hosts entries to be repeated?  On the other hand,

>># ypcat hosts.byaddr
>>192.168.0.17    moo             moo.localdomain
>>192.168.0.11    ra              ra.localdomain          loghost
>>192.168.0.3     omnibook        omnibook.localdomain
>>192.168.0.1     garfield        garfield.localdomain
>>127.0.0.1       localhost       localhost.localdomain

>>does not repeat.

>>--
>>tzd.

> TZD,

> Your NIS master server is working properly.  Good work!  :-)

> ~ Alex

Thanks!  Do you know the reason why hosts.byname repeats itself?

--
tzd.

 
 
 

NIS 'ypcat hosts'

Post by Chris Thomps » Sun, 16 Dec 2001 02:26:15




[...]

Quote:>>># ypcat hosts.byname
>>>127.0.0.1       localhost localhost.localdomain
>>>192.168.0.3     omnibook omnibook.localdomain
>>>192.168.0.1     garfield garfield.localdomain
>>>192.168.0.17    moo moo.localdomain
>>>192.168.0.11    ra ra.localdomain loghost
>>>127.0.0.1       localhost localhost.localdomain
>>>192.168.0.3     omnibook omnibook.localdomain
>>>192.168.0.1     garfield garfield.localdomain
>>>192.168.0.11    ra ra.localdomain loghost
>>>192.168.0.17    moo moo.localdomain
>>>192.168.0.11    ra ra.localdomain loghost
[...]
>> Your NIS master server is working properly.  Good work!  :-)

>Thanks!  Do you know the reason why hosts.byname repeats itself?

Because there are entries for "127.0.0.1 localhost localhost.localdomain"
under two keys, "localhost" and "localhost.localdomain", for example. Use

  ypcat -k hosts.byname

and it may be clearer to you what is happening.

Chris Thompson
Email: cet1 [at] cam.ac.uk

 
 
 

NIS 'ypcat hosts'

Post by Tan Zheng D » Sun, 16 Dec 2001 02:31:12





> [...]

>>>># ypcat hosts.byname
>>>>127.0.0.1       localhost localhost.localdomain
>>>>192.168.0.3     omnibook omnibook.localdomain
>>>>192.168.0.1     garfield garfield.localdomain
>>>>192.168.0.17    moo moo.localdomain
>>>>192.168.0.11    ra ra.localdomain loghost
>>>>127.0.0.1       localhost localhost.localdomain
>>>>192.168.0.3     omnibook omnibook.localdomain
>>>>192.168.0.1     garfield garfield.localdomain
>>>>192.168.0.11    ra ra.localdomain loghost
>>>>192.168.0.17    moo moo.localdomain
>>>>192.168.0.11    ra ra.localdomain loghost

> [...]

>>>Your NIS master server is working properly.  Good work!  :-)

>>Thanks!  Do you know the reason why hosts.byname repeats itself?

> Because there are entries for "127.0.0.1 localhost localhost.localdomain"
> under two keys, "localhost" and "localhost.localdomain", for example. Use

>   ypcat -k hosts.byname

> and it may be clearer to you what is happening.

> Chris Thompson
> Email: cet1 [at] cam.ac.uk

Ahh, I see.  Thank you!

--
tzd.

 
 
 

1. NIS: ypcat works, but I can't login

I have an NIS server setup on RH 6.0 and *had* a client working under RH
6.0 until I upgraded the client to RH 6.1. Now I can't seem to login
(except as root, of course) even after adjusting the changes the upgrade
made to /etc/nsswitch.conf.  I can login as myself on other clients.

I've also tried to run through authconfig, to no avail.

Any ideas would be greatly appreciated.

TIA,
    - Chuck

2. how do i get a module to stay loaded?

3. Nis troubles,can't login but can ypcat

4. SUMMARY (where are lpr's locks?)

5. NIS Problem - Ypcat doesn't work

6. Frustrated with Linux - StarOffice Install

7. Can't ypcat on Solaris 2.2 yp server ( not nis+ )

8. Redhat 6.1 and XDMCP Problems

9. ypcat passwd and ypcat hosts

10. ping -g 'gateway-IP' 'host-IP' DOESN'T work!

11. 'host' or 'nslookup' for linux?

12. NIS+ NIS compatibility mode and the 'passwd' map

13. 'host' command not using /etc/hosts?