- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- edit hosts file on multiple servers without NIS
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-13-2003 08:39 AM
05-13-2003 08:39 AM
something like
for i in `cat serverlist`
do
remsh 'edit .... file /by scenario'
done
THanks for any Ideas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 08:51 AM
05-13-2003 08:51 AM
Solutionfor i in `cat serverlist`
do
remsh $i "sed 's/old.add/new.add/g /etc/hosts'"
done
I haven't tried this but it should work. Do yourself a favor and implement DNS. It is easy quick with hosts_to_named
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:04 AM
05-13-2003 09:04 AM
Re: edit hosts file on multiple servers without NIS
remsh $i " ed '(1,$) g/old.address/new.address' /etc/hosts"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:04 AM
05-13-2003 09:04 AM
Re: edit hosts file on multiple servers without NIS
IPNEW=yyy
for host in $(
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:06 AM
05-13-2003 09:06 AM
Re: edit hosts file on multiple servers without NIS
for i in `cat serverlist`
do
remsh $i "sed 's/
done
A good tool to distribute files to clients that you should seriously consider using is "rsync". It's easy to implement and is based on rcp plus some added security option. I use it alot to synchoronize some files between machines.
http://samba.anu.edu.au/rsync/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:13 AM
05-13-2003 09:13 AM
Re: edit hosts file on multiple servers without NIS
Distribution file, aka, 'distfile':
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/89-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/89-toc.html&searchterms=rdist&queryid=20030513-111002
'rdist' syntax:
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/89-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/89-toc.html&searchterms=rdist&queryid=20030513-111002
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:15 AM
05-13-2003 09:15 AM
Re: edit hosts file on multiple servers without NIS
for SERVER in `cat hostlist`
do
if [ $SERVER != $HOST ]
then
echo $SERVER
rcp -p $FILENAME $SERVER:$FILENAME
fi
done
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 09:19 AM
05-13-2003 09:19 AM
Re: edit hosts file on multiple servers without NIS
sed s/132.201.90.73/132.201.90.770/g < /etc/hosts > /etc/hosts.new; cat /etc/hosts.new > /etc/hosts;