Re: Radius 2.0 and Linux 2.0.30

Pedro Melo (melo@co.telenet.pt)
Wed, 30 Apr 1997 19:26:04 GMT

I'm CCing this into portmaster-radius... maybe someone will needed it too

On Wed, 30 Apr 1997 20:56:52 +0200, "Graeme Slogrove" <graeme@fast.co.za>
wrote:

>On 30 Apr 97 at 15:16, Pedro Melo wrote:
>
>> I would use rdist over ssh... Worlks like a charm...
>
>Great! I just checked out the man pages on the rdist, and I'm a bit
>stumped - can you give me a bare bones way of getting it done ? I've
>RTFMed but it seems to me I'll be sitting here for hours getting it
>right :)

First off, get the latest rdist out of

This is the script I use. You will need to change it suite your needs

--------------------- cut here -------------------
#!/bin/sh
#
# Distributes, using rdist over ssh, the control files.
#

PATH=/usr/local/bin:$PATH
RDISTD=/usr/local/bin/rdistd
SSH=/usr/local/bin/ssh
BASE=/usr/local/servers/radius/etc/distribute

export PATH

cd $BASE
rdist -p $RDISTD -P $SSH 2>&1 > error.rdist
----------------- cut here -----------------
RDISTD is the full path of rdistd on the REMOTE host.
SSH is the path to the ssh client on the LOCAL host.
BASE is the directory where the files I need to distribute are located.

next we have the rdist control file. I call it distfile, the standart name
that rdist will look for.

------------------- cut here ------------------
FILES=( allow.new homepages.new passwd.new shadow.new www_users.db )
${FILES} -> radius@secondary.telenet.pt
install /usr/local/admin/config/spool;
cmdspecial "/usr/local/admin/config/bin/update";
-------------- cut here ----------------------
What does this do?
FILES is the list of files to copy.
the 2nd line tells rdist to copy the ${FILES} into secondary.telenet.pt
using the radius remote user. You have to set up a key pair for the local
account *without* the passphrase and put the public key in the *remote*
~/.ssh/authorized_keys file.
The install line tells the remote dir where the files will be placed.
The cmdspecial specifies a remote command to run when all the files are
copied. I use this to copie the file into a temporary directory on the
remote host and then run the script to copy those files into the correct
place and do any kill -HUP you have to...

Hope this helps!

Melo

--
************** Pedro Melo (melo@co.telenet.pt) BOFH ******************
*   TELENET, Servicos de Telecomunicacoes, SA - Tel +351 1 3139190   *
*    finger melo@co.telenet.pt or search key servers for PGP key     *
*           It's management's job to support the geniuses,           *
*                      not to tell them what to do                   *
**********************************************************************