ClonePanel on MS Windows XP

August 14th, 2006

I just installed the latest version of Cygwin and tried it out. The developers have done a truly great job with that because to my surprise it worked!

There was one small glitch – the IP address used on the remote server had some strange characters added, which initially killed the automated remote login. It turned out that I had an escape code entered in front of the IP address of the local server. On further experiment, when entering data at a prompt on the Cygwin terminal, using the cursor keys (up, down, left, right arrows) enters an escape sequence which is invisible but is read by the script. (The same thing happens using PuTTY connecting to a Linux server except that the characters are visible, so are easily deleted.)

So the fix is not to use the arrow keys when prompted for input (backspace seems ok). If you do have problems then check the config file carefully for extra characters – edit the file (eg. clonepanel/hosts/HOSTNAME/config) don’t just print it out, since these characters don’t display!

I’ve now successfully tested backup and sync, get and set dns zone on Cygwin. I’ll take this further when I get the time, unless anyone else would like to continue…?

If you’re interested in using Cygwin for ClonePanel you will need rsync, OpenSSH, openssl, openssl-devel and cron installed in addition to the defaults – just select these from the list during setup. rsync and OpenSSH are under “Net”, cron is under “Admin”, openssl and openssl-devel under “Libs”. Nano / pico fans and anyone wanting a simple easy-to-use editor should also select nano from the “Editors” section.

Edit 1: Added openssl and openssl-devel to list of required modules after testing get_dns and set_dns scripts (these are libraries required by the Net::DNS perl modules).

Edit 2: Changed glitch explanation in the light of further investigation (original below).

I’ll try to work out a fix for this but in the meantime the work-around is to set up the new account with ./account add as in the standard instructions. It will set up the remote key, attempt to test it and fail. Then go into the account on the host server and edit the .ssh/authorized_keys file. On the last line you should see something like:

from=”172.31.255.0″,command=”/home/username/cp0.30/scripts/sync_r” ssh-dss AAA…

Where the IP address and username would be whatever you just entered. This is followed by a long string of characters that make up the key.

If you see other characters between the from=” and your IP address, delete them and save the file.

Then back on the cygwin computer, type:

./sync_remote -u username -H HOSTNAME

to complete the setting up of the remote system (interrupted earlier by the error). If you get no errors this time you should be good to go!

CPAN modules to load

August 13th, 2006

Based on a standard Centos 4.3 distribution, the backup and sync functions of ClonePanel work immediately. However for manipulation of zone files and connecting to hosts to update nameservers using the WHM remote access key the following perl modules also need to be installed:

  • Net::DNS
  • Net::DNS::ZoneFile::Fast
  • HTML::TreeBuilder

The best way to do this, ensuring that all dependencies are satisfied, is to use CPAN – as root, type cpan and follow the prompts. Once cpan itself is installed and you have the cpan> prompt, the command “install modulename” will take care of everything!

Edit: This also applies to a Cygwin install, although in this case I had some tests fail that required a “force install Net::DNS::SEC” (a dependency of Net::DNS::ZoneFile::Fast).