Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got two webservers which takes part in a load balanced setup. The two webservers are in other words mirrors of each other.

As it is right now I'm synchronizing data between these two servers using lsyncd + csync2. Directories and files, along with ownership and permissions, are thus replicated between the two servers upon create, update and delete.

However, when I add a user to one of the servers I need to manually add that users with the same UID (and GUI) on the other server.

What is the easiest way to make sure that when I add a new user on server A, that user is also created on user B with the same UID + GID? Do I really need to set up LDAP and do all the work related to that; or is there an easier way to achieve this?

share|improve this question
    
LDAP is the easier way. –  Ignacio Vazquez-Abrams Jan 10 '13 at 7:30
    
Alright :-D Does LDAP mean that ALL accounts on both systems gets centralised? What happens if i install apache on both servers, but each server assigns the automatically generated apache account different uids? –  sbrattla Jan 10 '13 at 7:32
    
You can have it so that only accounts that don't exist locally are looked up via LDAP. –  Ignacio Vazquez-Abrams Jan 10 '13 at 7:52
1  
Ignacio, you should submit that as an answer. –  mrdenny Jan 10 '13 at 7:53
    
Alright, thanks. Submit your comment as answer and i'll accept it. –  sbrattla Jan 10 '13 at 8:41
add comment

1 Answer

up vote 2 down vote accepted

LDAP is the easiest way to do so. Accounts that should be the same on both systems will be added to the LDAP server, and per-server accounts should be created locally instead.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.