On Fri, Dec 22, 2000 at 12:24:22PM +0000, Justin Mason wrote:
> > I need to manage the passwd and shadow files on two linked machines in a
> > programmed manner. I have a shell script which, amongst other things, allows
> > the changing of any user's password by simplying calling passwd with the
> > user name. This script may be run on either of the two machines, and if a
> > user's password is changed, it must be changed on both machines (in this
> > situation, NIS is NOT an option). Root on either machine can carry out
> > unattended operations on the other machine using ssh and appropriate
> > authorisation file.
>> I have a script I used to use in a previous workplace to synch passwords
> across a network of machines with the following features:
>> 1. one central server, updating other machines periodically via rsh/ssh
>> 2. passwords, passwd file entries and groups are synced
>> 3. only user accounts are synced -- others are ignored
>> 4. safe writes -- if the write fails due to disk full, it backs out
>> 5. written in Perl, of course. ;)
This script started out as a small shell script and like a lot of such
things, it's gotten bigger. I should have written it in Perl from the
get-go, but I couldn't be arsed changing it now, when it basically does what
I need, apart from this password issue. I did consider simply scp'ing
/etc/passwd and /etc/shadow from one machine to the other, but I am loath to
do that - don't have a concrete reason, just instinct. The password files on
these machines should always be exactly in sync, so probably there's no reason
to not simply scp the files, but . . .
Regards,
Niall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!