- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/hosts file on NIS slave server does not match...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 07:47 AM
04-20-2007 07:47 AM
I have NIS running on two 11.11 v1 systems where one is the Master and the other is the Slave. I noticed that the /etc/hosts files on the slave server does not match that on the Master. I want to synchronize the two, and also have it automated so that whenever a new system is added to the domain, the changes that are made on the master are automatically propogated to the slave. How can I do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 08:48 AM
04-20-2007 08:48 AM
Solutiondata base files to the slaves and clients,
consider "yppush". ("man yppush".) "cron"
can arrange to do this for you periodically,
if you wish.
NIS does not update "etc/hosts" files
anywhere. There exist programs like "rsync"
to do things like that:
http://samba.anu.edu.au/rsync/
Is there some actual problem which you are
trying to solve?
Also, in NIS, "slave" normally means "slave
server", which is different from "client".
Which do you mean? (Not that it affects the
material above significantly, but it might be
interesting later.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 08:54 AM
04-20-2007 08:54 AM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 09:38 AM
04-20-2007 09:38 AM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
Which file? The stuff in "/var/yp"
determines everything that happens. The last
time I did this (long ago) it was on Solaris,
and there the "hosts" map was derived from
"/etc/hosts" on the NIS master. From what I
can see on an HP-UX system,
"/usr/sbin/stdhosts" gets dragged into the
picture, and I don't know what-all it does.
You could just add something to "/etc/hosts",
or whatever your guess is, do a "ypmake" and
then "ypcat hosts" to see if the change made
it into the NIS data base.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2007 11:27 PM
04-20-2007 11:27 PM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
you should read something about NIS to get an idea, how it works on HP-UX.
A list of maps you get via:
ypwhich -m
The content of one of the host maps:
ypcat hosts.byname
At HP-UX (and most UNIX flavours) the NIS information is kept solely in the maps.
Via an entry in /etc/nsswitch.conf (look there!) it is determined, which kind of name service is used for passwd, hosts, ...
Only some UNIXes like SCO-Unix or ReliantUnix call something like 'map2ascii' to integrate NIS information into the 'normal local' source.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2007 12:23 AM
04-21-2007 12:23 AM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
ypcat hosts - This will give you a list of all the machines
that are in the host tables of the nis master.
man 1M ypbind
Refer to ypserv(1M) and ypfiles(4) for an overview of Network
Information Service.
- Edit the /etc/hosts file on the NIS Master server
and do a yppush
(makes slave servers update their map versions )
man ypxfr will give you the info relates to the scripts which you can use in cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2007 08:45 AM
04-21-2007 08:45 AM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
>- Edit the /etc/hosts file on the NIS Master server
and do a yppush
(makes slave servers update their map versions )
I missed the ypmke which is the command to rebuild the text files to data files (maps).
Here is the correct method:
1. vi /etc/hosts (adds new host)
2. ypmake hosts (rebuilds the hosts map only and automatically pushed it to the slave servers
Reg. your question, please note that whenever you add new systems, you have to do the above steps. Because without using ypmake it will not rebuild the text files to map files. Whenever you use ypmake it will also automatically (it calls the yppush command) push the map files from master server to slave server.
The ypxfr* scripts in /var/yp/ can be placed on cron on the SLAVE server only and it will pull all the updated maps from master to slave. The hourly script ypxfr_1perhour can be run on hourly basis on the cron and it will pull the passwd maps from the master so that it will be synchronized on the slave.
Run ypxfr_2perday daily 2 times (12 hr interval) and ypxfr_1perday will pull and sync the other maps from master to slave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2007 07:22 AM
04-22-2007 07:22 AM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2007 10:59 PM
04-26-2007 10:59 PM
Re: /etc/hosts file on NIS slave server does not match that of NIS master server
Please take a moment to assign points to those who have taken the time to assist you. Here's how:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Thanks,
Gary