Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Consumer Configuration
Customization warning
The LDIF above has some parameters that you should review before deploying in production on your directory. In particular: • olcSpCheckpoint, olcSpSessionLog: please see the slapo-syncprov(5) manpage. In general, olcSpSessionLog should be equal to, or preferably larger, than the number of entries in your directory. Also see ITS #8125 for details on an existing bug. • olcAccessLogPurge: check the slapo-accesslog(5) manpage Create a directory: sudo −u openldap mkdir / var / l i b / l d a p / a c c e s s l o g Add the new content: sudo ldapadd −Q −Y EXTERNAL −H l d a p i : / / / −f p r o v i d e r _ s y n c . l d i f The Provider is now configured. Consumer Configuration Install the software by going through Installation. Make sure schemas and the database suffix are the same, and enable TLS. Create an LDIF file with the following contents and name it consumer_sync.ldif: dn : cn=module { 0 } , cn=c o n f i g changetype : modify add : olcModuleLoad olcModuleLoad : s yn c p ro v dn : o l c D a t a b a s e ={1}mdb , cn=c o n f i g changetype : modify add : olcDbIndex olcDbIndex : entryUUID eq 201 − add : o l c S y n c r e p l o l c S y n c r e p l : r i d =0 p r o v i d e r=l d a p : / / l d a p 0 1 . example . com bindmethod=s i m p l e binddn=”cn=r e p l i c a t o r , dc=example , dc=com” c r e d e n t i a l s= s e a r c h b a s e =”dc=example , dc=com” l o g b a s e =”cn=a c c e s s l o g ” l o g f i l t e r =”(&( o b j e c t C l a s s=a u d i t W r i t e O b j e c t ) ( r e q R e s u l t =0) ) ” schemachecking=on type=r e f r e s h A n d P e r s i s t r e t r y =”60 +” s y n c d a t a=a c c e s s l o g s t a r t t l s= c r i t i c a l t l s _ r e q c e r t=demand − add : olcUpdate Ref olcUpdateRef : l d a p : / / l d a p 0 1 . example . com Ensure the following attributes have the correct values: • provider (Provider server’s hostname – ldap01.example.com in this example – or IP address). It must match what is presented in the provider’s SSL certificate. • binddn (the bind DN for the replicator user) • credentials (the password you selected for the replicator user) • searchbase (the database suffix you’re using, i.e., content that is to be replicated) • olcUpdateRef (Provider server’s hostname or IP address, given to clients if they try to write to this consumer) • rid (Replica ID, an unique 3-digit that identifies the replica. Each consumer should have at least one rid) Note Note that a successful encrypted connection via START_TLS is being enforced in this configu- ration, to avoid sending the credentials in the clear across the network. See LDAP with TLS for details on how to setup OpenLDAP with trusted SSL certificates. Add the new configuration: sudo ldapadd −Q −Y EXTERNAL −H l d a p i : / / / −f consumer_sync . l d i f You’re done. The dc=example,dc=com tree should now be synchronizing. Testing Once replication starts, you can monitor it by running $ l d a p s e a r c h −z1 −LLL −x −s b a s e −b dc=example , dc=com contextCSN dn : dc=example , dc=com contextCSN : 2 0 2 0 0 4 2 3 2 2 2 3 1 7 . 7 2 2 6 6 7 Z#000000#000#000000 on both the provider and the consumer. Once the contextCSN value for both match, both trees are in sync. Every time a change is done in the provider, this value will change and so should the one in the consumer(s). If your connection is slow and/or your ldap database large, it might take a while for the consumer’s con- textCSN match the provider’s. But, you will know it is progressing since the consumer’s contextCSN will be steadly increasing. 202 If the consumer’s contextCSN is missing or does not match the provider, you should stop and figure out the issue before continuing. Try checking the slapd entries in /var/log/syslog in the provider to see if the consumer’s authentication requests were successful or its requests to retrieve data return no errors. In particular, verify that you can connect to the provider from the consumer as the replicator binddn using START_TLS: ldapwhoami −x −ZZ −D cn=r e p l i c a t o r , dc=example , dc=com −W −h l d a p 0 1 . example . com For our example, you should now see the john user in the replicated tree: $ l d a p s e a r c h −x −LLL −b dc=example , dc=com −h l d a p 0 2 . example . com ’ ( u i d=john ) ’ u i d dn : u i d=john , ou=People , dc=example , dc=com u i d : john Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling