LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-12-2013, 10:52 PM   #1
TJNII
LQ Newbie
 
Registered: Aug 2011
Distribution: Gentoo, Debian, RHEL
Posts: 12

Rep: Reputation: Disabled
Adding a LDAP user ACL for replication


Hello, group:

I'm attempting to set up slapd on Debian for basic refreshOnly replication. I've added a specific user for replication, and now I want to add a ACL so that this user has full read privileges .

I've added the following to my etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif:

PHP Code:
olcAccess: {0}to by dn="cn=repluser,ou=replication,dc=mydomain,dc=com" read break 
However this breaks logins by all but the master admin user. With this line set slapd rejects the password for both repluser and normal users. I've tried with and without the break (though based on my understanding the break is required) and I receive "ldap_bind: Invalid credentials (49)" with both combinations.

Here is my olc for this db:

PHP Code:
# {1}hdb, config
dnolcDatabase={1}hdb,cn=config
objectClass
olcDatabaseConfig
objectClass
olcHdbConfig
olcDatabase
: {1}hdb
olcDbDirectory
: /var/lib/ldap
olcSuffix
dc=mydomain,dc=com
olcAccess
: {0}to by dn="cn=repluser,ou=replication,dc=mydomain,dc=com" read bre
 ak
olcAccess
: {1}to attrs=userPassword,shadowLastChange by self write     by anon
 ymous auth     by dn
="cn=admin,dc=mydomain,dc=com" write     by none
olcAccess
: {2}to dn.base="" by read
olcAccess
: {3}to by self write     by dn="cn=admin,dc=mydomain,dc=com" write   
   by 
read
olcLastMod
TRUE
olcRootDN
cn=admin,dc=mydomain,dc=com
olcDbCheckpoint
512 30
olcDbConfig
: {0}set_cachesize 0 2097152 0
olcDbConfig
: {1}set_lk_max_objects 1500
olcDbConfig
: {2}set_lk_max_locks 1500
olcDbConfig
: {3}set_lk_max_lockers 1500
olcDbIndex
objectClass eq 
Can someone please advise? I don't understand why this breaks logins completely. Thank you.
 
Old 01-15-2013, 07:30 AM   #2
rmacd
LQ Newbie
 
Registered: Jan 2013
Location: Scotland
Distribution: Debian
Posts: 16

Rep: Reputation: 3
Think of LDAP ACLs like riding along a zipline or driving down the road. Imagine you're initially only concerned with to whom a rule applies to.

Right now, everything below rule{0} is being thrown off the road by your break at the end of the line. You'll have to give an option to those that don't match the filter: by dn="cn=repluser..."

See what happens when you replace
Code:
olcAccess: {0}to * by dn="cn=repluser,ou=replication,dc=mydomain,dc=com" read break
with
Code:
olcAccess: {0}to * by dn="cn=repluser,ou=replication,dc=mydomain,dc=com" read by * break
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ldap don't recognize courier object class when I'm adding a user or his attributes mfran Linux - Server 1 07-04-2012 12:39 PM
Proble in adding new user in ldap server and client amit11rhce Linux - Server 1 05-03-2010 02:56 AM
ldap replication neverland Linux - Server 1 03-22-2010 05:18 AM
adding LDAP user in server rmugunthan Red Hat 1 03-02-2010 03:04 AM
Adding user to ACL from Windows Zym0tiC Linux - Networking 1 07-05-2005 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration