rsync for /etc/passwrd /etc/samba/passwd

Franco Bagnoli franco.bagnoli at
Wed Nov 13 01:59:14 EST 2002

On Tue, 12 Nov 2002, Gurnish Anand wrote:

> Can somebody give me a quick education on sync'ing users, passwords and 
> groups between 2 linux servers. Im using Redhat 7.1 as PDC and BDC using 
> Samba. I want to sync mainly /etc/passwd, /etc/smbpasswd, /etc/group to 
> get a consistancy going in the domain...

first suggestion: keep your password on one server and use yellow pages 
or an ldap server or any network system supported by pam (ypserv and
ypbind are the simplest ones). You may need also to share homes using NFS. 

second suggestion: I implemented what you were asking on a small
cluster for I don't remember what reason (probably ypbind wasn't
working on those aold alphas) using scp, bat rsync has the same  effect:
replace the passwd command with a one which:

1) logs into the server using ssh 
2) launch the original passwd command
3) synchronizes the password files

(you may not need to log into the server, you may execute passwd using rsh
or other solutions).  
It does not work when using other tools for changing password. 

Franco Bagnoli (franchino) <bagnoli at>
Dipartimento di Matematica Applicata "G. Sansone" - Universita' di Firenze
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787
GPG Key fingerprint = 169D 9EA5 8FD3 7EDA E43A  9830 255F BCEC 0D63 3728

More information about the rsync mailing list