Re: syncrepl 2.4 issue from 2.3 master
by FRLinux
On Fri, Sep 18, 2009 at 11:31 PM, Quanah Gibson-Mount <quanah(a)zimbra.com> wrote:
> Read the 2.4 Admin guide to start, the TLS options for syncrepl are now part
> of the syncrepl stanza. You will want to configure it there.
Hello, I am back again on that one as I cannot get it to work.
I am getting:
main: TLS init def ctx failed: 1
slapd destroy: freeing system resources.
slapd stopped.
connections_destroy: nothing to destroy.
This is my replication config on the slave (2.4 on Debian):
syncrepl rid=124 \
provider=ldaps://masterldap.example.com:636 \
type=refreshAndPersist \
searchbase="dc=example,dc=com" \
scope=sub \
filter="(objectClass=*)" \
attrs="*" \
schemachecking=off \
tls_cacert=/etc/ldap/cert/cacert.pem \
bindmethod=sasl \
saslmech=GSSAPI \
binddn="cn=LDAPReplicator,dc=example,dc=com" \
credentials=xxxxxx
Anything I might be doing wrong?
Cheers,
Steph
14 years
"subordinate needs a suffix"
by Marc Patermann
Hi,
Yesterday I did update a SLES test server from 2.4.17 to 2.4.18.
I use the old plain configuration by file.
On startup I got "subordinate needs a suffix" errors.
The database definitions contain suffix and subordinate as well (for
ages ...), but "subordinate" is the second statement after "database",
"suffix" is third.
I changed subordinate to the last statement of each database definition
and it works again.
I found "Fixed slapd subordinate needs a suffix (ITS#6216)" in "CHANGES".
The ITS mails does not talk about this issue. (It's all about config by
ldif.) So this change may not been intended. Or did I overlook something?
Marc
14 years
problem with security ppolicy
by Evgeniy
Hello.
OpenLdap 2.4.18.
Attribute "pwdAccountLockedTime" is set, but auth is still Ok . Why ? On Ldap 2.3 it works normal - user don't auth after this date.
# date
Tue Sep 22 21:24:44 MSD 2009
ldapsearch -h localhost -x -b 'ou=SrpUsers,dc=company,dc=com' -D "cn=admin,dc=company,dc=com" -w password "cn=_1*" + | grep pwdAccountLockedTime
pwdAccountLockedTime: 20090922153148Z
but
slapauth -v -f /usr/local/etc/openldap/slapd.conf -U _125363 -X u:_125363
bdb_db_open: warning - no DB_CONFIG file found in directory /usr/local/var/accesslog-data: (2).
Expect poor performance for suffix "cn=accesslog".
bdb_db_open: warning - no DB_CONFIG file found in directory /usr/local/var/openldap-data: (2).
Expect poor performance for suffix "dc=company,dc=com".
ID: <_125363>
authcDN:
authzDN:
authorization OK
How I can resolve problem with non-working "pwdAccountLockedTime" ?
--
---______________________________________________---
Evgeniy
14 years
Can't start slapd with slapd.d
by Akihiro Moriguchi
Hello,
I've just start studying OpenLDAP after reading OpenLDAP site and now
following "Mastering OpenLDAP" by Matt Butcher.
I have troubled with starting slapd after exporting slapd.conf to
slapd.d with following syslog output.
####### syslog output #########
Sep 20 16:12:59 vubuntu slapd[10550]: @(#) $OpenLDAP: slapd 2.4.15
(Mar 19 2009 10:08:25) $
^Ibuildd@palmer:/build/buildd/openldap-2.4.15/debian/build/servers/slapd
Sep 20 16:12:59 vubuntu slapd[10550]: olcAttributeTypes: value #0
olcAttributeTypes: Duplicate attributeType: "2.16.840.1.113730.3.1.1"
Sep 20 16:12:59 vubuntu slapd[10550]: config error processing
cn={3}inetorgperson,cn=schema,cn=config: olcAttributeTypes: Duplicate
attributeType: "2.16.840.1.113730.3.1.1"
Sep 20 16:12:59 vubuntu slapd[10550]: slapd stopped.
Sep 20 16:12:59 vubuntu slapd[10550]: connections_destroy: nothing to destroy.
root@vubuntu:/etc/ldap#
####### syslog output #########
I can still start slapd without problem when I use old slapd.conf with
"/usr/sbin/slapd -f /etc/ldap/slapd.conf" but I want to debug the
problem for my study and understanding slapd.d.
Please tell me what the problem of this error.
Best regards,
Akihiro
14 years
slapd consumer deletes entries
by Tony Smith
Hello,
[I sent this message once but somehow it didn't get through so I
resend it -- my sincere apology if anyone received this twice]
I am trying to troubleshot a problem with entries being deleted on
consumer, exactly as described in this thread:
http://www.openldap.org/lists/openldap-software/200704/msg00248.html
I am running both provider and consumer on debian etch. After some
searching I see
some hints that openldap as provided by debian etch (2.3.30) is out of
date and this bug might be fixed in 2.3.34, I installed openldap from
sources (2.3.43) on both provider and consumer. But the problem is not
gone.
Perhaps it has something to do with the fact that the consumer is not
online all the time; it is switched on/off daily. I am thinking of
upgrading to openldap 2.4, but I am still a bit reluctant since the
configuration syntax has changed.
Can someone please give me a hint how to proceed further? I appended
the config file of both provider/consumer below. They were derived
from debian config files with little modification.
thanks,
Tony
Update: it seems that the deletion happens on consumer if data on
provider have been changed during the period the consumer was off. At
least I can reproduce this consistently.
slapd.conf on provider:
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.
#######################################################################
# Global Directives:
# Features to permit
#allow bind_v2
# Schema and objectClass definitions
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
## <added for gosa minimal>
include /etc/ldap/schema/gosa/samba3.schema
include /etc/ldap/schema/gosa/trust.schema
include /etc/ldap/schema/gosa/gosystem.schema
include /etc/ldap/schema/gosa/gofon.schema
include /etc/ldap/schema/gosa/goto.schema
include /etc/ldap/schema/gosa/gosa-samba3.schema
include /etc/ldap/schema/gosa/gofax.schema
include /etc/ldap/schema/gosa/goserver.schema
include /etc/ldap/schema/gosa/goto-mime.schema
## </added for gosa minimal>
## <added for gosa additional plugins>
include /etc/ldap/schema/gosa/fai.schema
## </added for gosa additional plugins>
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile /var/run/slapd/slapd.pid
# List of arguments that were passed to the server
argsfile /var/run/slapd/slapd.args
# Read slapd.conf(5) for possible values
loglevel 0
# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_bdb
moduleload syncprov.la
# The maximum number of entries that is returned for a search operation
sizelimit 500
# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1
#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend bdb
checkpoint 512 30
#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend <other>
#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database bdb
# The base of your directory in database #1
suffix "dc=example,dc=com"
# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
# rootdn "cn=admin,dc=example,dc=com"
# Where the database file are physically stored for database #1
directory "/var/lib/ldap"
# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0
# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057
# for more information.
# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500
# Indexing options for database #1
#index objectClass eq
# Save the time that the entry gets modified, for database #1
lastmod on
# Where to store the replica logs for database #1
# replogfile /var/lib/ldap/replog
## <setting for replica using syncreplrefreshAndPersist; master config>
overlay syncprov
syncprov-checkpoint 100 10
# syncprov-sessionlog 100
index objectclass,entryCSN,entryUUID eq
TLSCertificateFile /etc/ssl/certs/cert.pem
TLSCertificateKeyFile /etc/ssl/certs/key.pem
TLSCACertificateFile /etc/ssl/certs/cacert.pem
TLSCipherSuite HIGH:MEDIUM:+SSLv2
## </setting for replica using syncreplrefreshAndPersist; master config>
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
# ldapSync can read anything
access to *
by dn.base="cn=ldapSync,dc=example,dc=com" read
by * none break
# allow readUserInfo can read users and groups
access to dn.regex=".*ou=(people|groups),dc=example,dc=com"
by dn.base="cn=readUserInfo,ou=admin,dc=example,dc=com" read
by * none break
# admin can change anything
access to attrs=userPassword,shadowLastChange
by dn="cn=admin,dc=example,dc=com" write
by anonymous auth
by self write
by * none
# Ensure read access to the base for things like
# supportedSASLMechanisms. Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
access to dn.base="" by * read
# The admin dn has full write access, everyone else
# can read everything.
access to *
by dn="cn=admin,dc=example,dc=com" write
by * read
# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
# by dn="cn=admin,dc=example,dc=com" write
# by dnattr=owner write
#######################################################################
# Specific Directives for database #2, of type 'other' (can be bdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database <other>
# The base of your directory for database #2
#suffix "dc=debian,dc=org"
slapd.conf on consumer:
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.
#######################################################################
# Global Directives:
# Features to permit
#allow bind_v2
# Schema and objectClass definitions
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
## <added for gosa minimal>
include /etc/ldap/schema/gosa/samba3.schema
include /etc/ldap/schema/gosa/trust.schema
include /etc/ldap/schema/gosa/gosystem.schema
include /etc/ldap/schema/gosa/gofon.schema
include /etc/ldap/schema/gosa/goto.schema
include /etc/ldap/schema/gosa/gosa-samba3.schema
include /etc/ldap/schema/gosa/gofax.schema
include /etc/ldap/schema/gosa/goserver.schema
include /etc/ldap/schema/gosa/goto-mime.schema
## </added for gosa minimal>
## <added for gosa additional plugins>
include /etc/ldap/schema/gosa/fai.schema
## </added for gosa additional plugins>
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile /var/run/slapd/slapd.pid
# List of arguments that were passed to the server
argsfile /var/run/slapd/slapd.args
# Read slapd.conf(5) for possible values
# loglevel 0
loglevel 16384
# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_bdb
moduleload ppolicy.la
# The maximum number of entries that is returned for a search operation
sizelimit 500
# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1
#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend bdb
checkpoint 512 30
#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend <other>
#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database bdb
# The base of your directory in database #1
suffix "dc=example,dc=com"
# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
# rootdn "cn=admin,dc=example,dc=com"
rootdn "cn=admin,dc=example,dc=com"
# Where the database file are physically stored for database #1
directory "/var/lib/ldap"
# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0
# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057
# for more information.
# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500
# Indexing options for database #1
index objectClass eq
# Save the time that the entry gets modified, for database #1
lastmod on
## read-only is good for slave
readonly on
# Where to store the replica logs for database #1
# replogfile /var/lib/ldap/replog
syncrepl rid=001
provider=ldaps://ldap-provider.example.com:636
type=refreshAndPersist
retry="5 5 300 +"
searchbase="dc=example,dc=com"
filter="(objectClass=*)"
scope=sub
attrs="*"
schemachecking=off
bindmethod=simple
binddn="cn=ldapSync,dc=example,dc=com"
credentials=SECRET
# allow readUserInfo can read users and groups
access to dn.regex=".*ou=(people|groups),dc=example,dc=com"
by dn.base="cn=readUserInfo,dc=example,dc=com" read
by * none break
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
access to attrs=userPassword,shadowLastChange
by dn="cn=admin,dc=example,dc=com" write
by anonymous auth
by self write
by * none
# Ensure read access to the base for things like
# supportedSASLMechanisms. Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
access to dn.base="" by * read
# default
access to *
by self read
by users read
by * none
--
--
Tony
14 years
problem with replication [syncrepl] hash of passwords
by Evgeniy
Hello.
Openldap 2.4.18, master-slave replication .
Slave server successfully replicates all data, except hashed {sha} passwords.
It is not problem with "access to attrs=userPassword " - I test ithis.
How I can solve it and sync passwords ?
[ slapd.conf ]
master server:
#
index objectClass eq
#
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100
#
slave server:
syncrepl rid= <>
provider=ldap://server:389
type=refreshOnly
interval=00:00:05:00
searchbase="dc=company,dc=com"
filter="(objectClass=*)"
scope=sub
attrs="*"
#
schemachecking=off
bindmethod=simple
binddn="cn=adminuser,dc=company,dc=com"
credentials=company-pass
###
------------------------------------------------
policy for passwords:
objectClass: top
objectClass: device
objectClass: pwdPolicy
pwdAttribute: userPassword
pwdFailureCountInterval: 600
pwdGraceAuthNLimit: 1
pwdMaxFailure: 5
pwdInHistory: 6
--
---______________________________________________---
with deference, Evgeniy
14 years
set.regex and substring substitution
by Ronie Gilberto Henrich
Hi,
I am trying to grant users access to a ldap object when
user/allowedDomain match the Mail object ou.
To accomplish that I have to use set.regex and substring
substitution, but I was not able to figure out what I am doing wrong.
This is the current ACL:
access to dn.regex="^(.+,)?ou=([^,]+),ou=Mail,o=example,c=BR$"
by set="user/allowedDomain & this/ou" write
result:
=======
"ou=example.com,ou=Mail,o=example,c=BR" = write(=wrscxd)
"mail=test(a)example.com,ou=example.com,ou=Mail,o=example,c=BR" = 0
This is the ACL that I am trying to build. It was expecting both
results as = write(=wrscxd), but I am getting only = 0.
access to dn.regex="^(.+,)?ou=([^,]+),ou=Mail,o=example,c=BR$"
by set.regex="user/allowedDomain & $2" write
result:
=======
"ou=example.com,ou=Mail,o=example,c=BR" = 0
"mail=test(a)example.com,ou=example.com,ou=Mail,o=example,c=BR" = 0
Any ideas about what I should do for this to work?
Thanks!
Ronie
14 years
Re: syncrepl 2.4 issue from 2.3 master
by FRLinux
On Fri, Sep 18, 2009 at 11:31 PM, Quanah Gibson-Mount <quanah(a)zimbra.com> wrote:
> Read the 2.4 Admin guide to start, the TLS options for syncrepl are now part
> of the syncrepl stanza. You will want to configure it there.
Hello, quick one about this, i read this page:
http://www.openldap.org/doc/admin24/slapdconfig.html#syncrepl
The part I am wondering about is this: "by default the TLS parameters
from a ldap.conf(5) configuration file will be used. TLS settings may
be specified here, in which case any ldap.conf(5) settings will be
completely ignored"
So i do have a valid /etc/ldap.conf which contains references to TLS
cert and stuff, why do i need more settings in slapd.conf? Reason I am
asking is when i add this, in the syncrepl section, it fails saying
unknown directive:
[starttls=yes|critical]
[tls_cacert=<file>]
For info, this is my ldap.conf:
BASE dc=example, dc=com
URI ldaps://masterldap.example.com:636/
TLS_CACERT /etc/ldap/cert/cacert.pem
TLS_REQCERT demand
Cheers,
Steph
14 years
Re: slapd consumer deletes entries
by Tony Smith
On 9/20/09, Quanah Gibson-Mount <quanah(a)zimbra.com> wrote:
> --On Saturday, September 19, 2009 9:29 PM +0100 Tony Smith
> <tony.smith.124(a)googlemail.com> wrote:
>
>
>
> > ah, sorry, I spoke too soon. The deletions still appear regardless
> > those above options. It must be something else...
> >
>
> I would suggest that you slapcat the master and slapadd the replica, so
> that the replica is fully in sync with a known correct database.
I tried this, the deletions continue but your suggestion led me to try
to reload the provider as well; after that the problem seems to be
gone.
thanks again for your patience and help,
Tony
14 years