Re: copy location table?

Michael Dillon (michael@junction.net)
Mon, 18 Sep 1995 20:08:14 -0700 (PDT)

On Mon, 18 Sep 1995, David M. Ramsey wrote:

> Nobody, not even Carl or MZ, offered a suggestion on how to copy the
> locations table from one PM to another (*sniff*, *tears*).
>
> Am I to assume that I have to manually copy the data over?? We are
> doing secure dialback for some sites - that is really the only reason
> I have anything in the the locations table at all.
>
> Somebody? Please? Otherwise I guess I'll start clickin' and a typin' :-(.

You are in luck. While you may not save any time typing with my
suggestion, it will be a lot more fun than rekeying and will not be error
prone. Get a hold of a utility called "expect". Write an expect script to
log in to the Portmaster and show the user table. Capture the output of
that, do a little massaging with vi or awk or whatever you like to use to
turn the raw user table data into another expect script that telnets into
the Portmaster and sets up a user table. If you do the massaging with an
awk or PERL script and hang on to the scripts you have a general user
table backup and restore utility.

Michael Dillon Voice: +1-604-546-8022
Memra Software Inc. Fax: +1-604-542-4130
http://www.memra.com E-mail: michael@memra.com