11-07-2013 04:44 AM
We have to modify /etc/hosts for each new client on 8 "5220" appliances. Lot of time with CLISH ... It is possible to script it by using CLISH or SSH ?
Thanks.
11-07-2013 05:37 AM
Just drop into the O/S via the CLISH (Support - Maintenance - P@ssw0rd - elevate)
and then vi the hosts file - you can copy and paste if logged in via Putty
Hope this helps
11-07-2013 05:49 AM
Thanks for your answer but I would like to modify a central /etc/hosts and then push it via scripting on our 8 "5220" appliances. Loging on each 5220 takes too much time and is not very productive ...
Thanks.
11-07-2013 06:21 AM
I have used pcsp to push files to an appliance but only to open share areas (logs / software) etc.
You would need to test if it worked to the /etc location but it is just SUSE linux so you should be able to
11-07-2013 07:09 AM
Thanks, I will test it and post an reply next week.
Pierre.
11-07-2013 07:16 AM
We tested it and it does not work :
scp test.txt admin@xxxxxxxxxx:/tmp
Password:
lost connection
We received a lost connection error. Any idea ?
Thanks.
11-07-2013 01:54 PM
Netbackup appliances are high secured with symantec system critical protection. You can not scp files into them.
If you have to put the same hosts file on 8 appliances maybe you can script a restore of a master hosts file redirecting them to each appliance?
11-29-2013 04:35 AM
I suggest you look into something like puppet/chef (maybe something simple like fabric even) or any other configuration management tool and have it pull the hosts file from a central repository.
Try avoiding making too much changes in the OS since it is after all an appliance.
11-29-2013 02:27 PM
You mention you need to modify the appliance /etc/host regualrly. I was wondering why, changes to the OS should be avoided where possible. The appliance will first check the /etc/hosts for mapping host names to IP but then it will use dns, see /etc/nsswitch.conf.
12-06-2013 01:00 PM
1) Create a service account on the appliance.
2) scp the updated hosts file to the service account.
3) setup an admin account cron job of some kind that checks for the presence of the updated file and if detected, overwrites the existing appliance hosts file.
While you could start hacking things so you could directly scp to the admin account, aside from breaking the security features I'm sure those kinds of changes would get overwritten again the next time you updated the appliance software.
As for why you'd be making hosts file changes, all the regular reasons you'd do it on any server : because one or more hosts wasn't in DNS (assuming your environment has DNS at all).