Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Synchroning passwd files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
synt4x
n00b
n00b


Joined: 20 Jun 2005
Posts: 46

PostPosted: Thu Feb 08, 2007 4:09 pm    Post subject: Synchroning passwd files Reply with quote

Currently I have two servers in a load balanced setup over at a coloc. I'm looking to set them up so I really only need to manage users on one server. Obviously one really basic way to keep the servers in sync would be to just cron an rsync job for /etc/{passwd,shadow,group,gshadow} from the primary server to the other server. However, this strikes me as really primitive. Obviously LDAP would do the trick, but given the size of the situation (one other server) and the huge pain in the ass involved in setting up the LDAP servers and then PAM to use the LDAP (I tried this a few years ago and it sure as hell wasn't intuitive back then)... Well, it seems like overkill (and even more packages on the system to eventually become vulnerable). Does anyone have any suggestions or solutions for this sort of situation that's easy to setup, but that will give you the advantages of instant replication?
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Sun Feb 11, 2007 6:15 am    Post subject: Reply with quote

NIS (Network Information Service, formerly Yellow Pages or yp) was designed for exactly this purpose. It's basically in-built to Linux and UNIX so it should be less hassle than LDAP...but perhaps only fractionally so. You'd need the net-nds/ypserv, net-nds/ypbind and net-nds/yp-tools packages, and a fair bit of reading from the Linux NIS Server home page. O'Reilly has an entire book on the subject: Managing NFS and NIS.

Any approach based on file-replication (like rsync) carries a slight risk of corruption from contention. The passwd and group files really should only be edited by vipw/vigr, which manage exclusive locks on the files.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum