- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script to update /etc/hosts automaticaly
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
05-02-2006 02:09 AM
05-02-2006 02:09 AM
Script to update /etc/hosts automaticaly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 02:15 AM
05-02-2006 02:15 AM
Re: Script to update /etc/hosts automaticaly
have you got rhosts set up? If so, rcp the file.
If not, can you not use ftp to put the file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 02:25 AM
05-02-2006 02:25 AM
Re: Script to update /etc/hosts automaticaly
If you want to distribute a master host files to your servers it would be better to use scp.
Provided you have deployed your ssh keys on all servers, this line would do it:
for i in `< serverlist.txt`;do scp -p /etc/hosts $i:/etc/;done
serverlist.txt being a simple file containing your servers names.
If you did not deploy your ssh keys, it will still work but you will have to provide the password for every server when asked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 02:26 AM
05-02-2006 02:26 AM
Re: Script to update /etc/hosts automaticaly
You can either use rcp/scp if been setup on all the servers.
Another thing is are you going to treat a particular server as a master server which will distribute the hosts file - this will help you in having a single source to update, so that if any server is unavailable at a particular time - the next time you distribute or if you distribute once the server is up consistent file will be there across hosts - rather than allowing from any host to all hosts.
regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 02:30 AM
05-02-2006 02:30 AM
Re: Script to update /etc/hosts automaticaly
I recommend setting up password free insfrastructure on ssh/scp and distributing the host files that way.
/etc/hosts deals with Internet DNS names resolution. NIS really doesn't. What NIS provides is that one login works on many servers, saving you a headache in administrering passwords.
A more modern solution to the user management issue is LDAP or integration with a Windows based ADS server. Samba can also be integreted toa Primary domain controller or become a Primary Domain Controller itself.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 02:42 AM
05-02-2006 02:42 AM
Re: Script to update /etc/hosts automaticaly
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=840826
(see my posts to this).
live free or die
harry d brown jr