Using rdist to distribute passwd files.

Using rdist to distribute passwd files.

Post by db7 » Tue, 30 Jan 1996 04:00:00



  Hello.  I am wondering what the best way to distribute passwd files across a
network of linux boxes is.  I'd like to avoid NIS/yp, because of the security
risks and other problems associated with it.  Doing it over nfs is also not
an option, the speed on our systems just isn't adequate.  

I have heard its possible to distribute them via rdist/rdistd, and after looking
at the package, i cannot see how this is done.  Presently, i would just like to
get two machines up, with the same passwd files on each.  I want it so if a user
changes their passwd on machine1, in a couple minutes or whatever the change is
reflected in machine2, and the other way around..

thanks,

 
 
 

Using rdist to distribute passwd files.

Post by Thomas Koen » Tue, 30 Jan 1996 04:00:00



                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please put your hostname into /etc/NNTP_INEWS_DOMAIN.  Yes, I know that
this ranks pretty near the top on the newsreader's broken features hall of
shame...

Quote:>I have heard its possible to distribute them via rdist/rdistd, and after looking
>at the package, i cannot see how this is done.

First, use ssh for this, don't use rsh.  The Linux version of rdist does indeet
work with it :-)

Suppose you want to keep your password file on host1, and distribute it to host2.

On host1, create a rdist config file, for example as /etc/rdist-passwd.cf

HOSTS = ( host2 )
/etc/passwd -> ${HOSTS}

Then create a user-callable suid root program, which looks like this
(let's put it into /usr/sbin/dist-passwd):

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

char *envp[] =
{
    "TMPDIR=/root",
    "LOGNAME=root",
    NULL

Quote:}

int main()
{
    execle("/usr/sbin/rdist","/usr/sbin/rdist","-f","/etc/rdist-passwd.cf",
                NULL,envp);
    perror("Cannot exec /usr/sbin/rdist");
    exit(1);

Quote:}

On host1, alias passwd to

alias passwd="/usr/bin/passwd && /usr/sbin/dist-passwd"

On host2, alias passwd to

alias passwd="ssh -t host1 '/usr/bin/passwd && /usr/sbin/dist-passwd'"

You're set.
--

The joy of engineering is to find a straight line on a double
logarithmic diagram.

 
 
 

1. Best tool to distribute files (rdist, rsync, cfengine)

I have to distribute files to quite a number of remote machines.

I want to be able to do the following:
- distribute from account userA on machineA to account userB on
   machineB C ... Z
- distribute from filesystem /a/b/c to filesystem /x/y/c
- distribution to be fast even if files are large
- incremental distribution
- if host machine is unavailable or if copy fails, get an error message
- have a way of checking after the distribution is complete to see if the
files got there (some kind of logging mechanism and ls -lrt output)
- able to use ssh

I've heard of rdist, rsync and cfengine.

Can these do the above, and is any of them preferable over the other?
And is pull technology better than push technology and if so, why?

2. PAP Help

3. Distributed Passwd File Tools

4. Welcome to comp.unix.questions [Frequent posting]

5. Distributed passwd file maintenance

6. SOCKS5 proxy & UDP packets - Help!

7. BSDi passwd file to Linux Passwd file

8. Arrrrgh, HELP

9. rdist cannot distribute non-writable directories?

10. Changing a passwd thru rdist

11. Distributed Passwd Summary (Long)

12. Using /etc/passwd file for Web Authorization

13. apache user authentication using /etc/passwd file ?