LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-03-2007, 09:11 PM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
script for virtual server


Hi,

Is that possible one script can make change in all instances of server running on a machine.
Suppose I need to modify one line in passwd file on all instances.

I think I am trying to ask what is the directory structure(file system) like on a machine which runs 5 or 6 virtual servers.


Thanks.
 
Old 10-04-2007, 10:56 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Almost certainly, & there is probably more than one approach.

Before I outline one idea, let me say that I think it would be easier to do this manually if there are only "5 or 6 virtual servers"; unless the task will need to be performed on a fairly regular basis.

I would give my script a list of the VM's & their root passwords by name or IP address. This could be in a file or embedded in the script. Then for each VM, I would ssh in as root, run an appropriate sed -i command, & log out.

This assumes several things:
  1. You're making the same change to all the /etc/passwd files.
  2. The box that runs the script has network access to the VM's.
  3. sshd is running on all the VM's.
  4. You have the necessary root passwords.
  5. You can keep them secure in the script or the VM/password list file.
  6. You have sed on the VM's & it's the same sed, or at least they all work the same.
  7. etc., etc., etc. . . . (homage to Yul Brynner)
 
Old 11-07-2007, 06:55 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
What did you do?

Is your problem solved? ... How?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute a ssh script on Linux server from Windows through a bat script? wanna13e Programming 13 10-23-2009 02:41 AM
KDEPrint virtual printer that pipes content to custom shell script? hexstar Linux - Software 1 07-03-2007 09:17 AM
Virtual Server GeneralChaos Slackware 2 09-20-2005 07:32 PM
Need help finishing Bash Script to add new user and map virtual e-mail info. O_Chaos Linux - Newbie 1 02-09-2004 04:06 PM
Virtual Server ONOM Debian 1 09-30-2003 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration