OpenLDAP cn=config: No such object (32)?Securing userPassword access with OpenLDAP in RHELOpenldap/Sasl/GSSAPI on Debian: Key table entry not foundWhat is SSHA-512? How can OpenLDAP support it?error: Automatically removed objectClass from template as it is not defined in the schemaOpenLDAP: Index to olcDatabase not respectedgnupg integration with openLDAP - ACL ErrorOpenLdap Configuration IssueOpenldap enable ssl on replicationOpenldap RootDN and other 'admin' user work differently when changing userPasswordCreating an OpenLdap administrator group on LDAP server
How could a civilization detect tachyons?
Why doesn't Dany protect her dragons better?
Align a table column at a specific symbol
Program for finding longest run of zeros from a list of 100 random integers which are either 0 or 1
Creating Stored Procedure in local db that references tables in linked server
Crime rates in a post-scarcity economy
How can one see if an address is multisig?
How to avoid making self and former employee look bad when reporting on fixing former employee's work?
Where do 5 or more U.S. counties meet in a single point?
What should I use to get rid of some kind of weed in my onions
Visual Studio Code download existing code
Is this strange Morse signal type common?
What is the Ancient One's mistake?
What's the difference between "ricochet" and "bounce"?
What's an appropriate age to involve kids in life changing decisions?
Was Mohammed the most popular first name for boys born in Berlin in 2018?
Can the president of the United States be guilty of insider trading?
Capturing the entire webpage with WebExecute's CaptureImage
Why doesn't a particle exert force on itself?
Are wands in any sort of book going to be too much like Harry Potter?
How is it believable that Euron could so easily pull off this ambush?
Why is the episode called "The Last of the Starks"?
Should one save up to purchase a house/condo or maximize their 401(k) first?
Why does this pattern in powers happen?
OpenLDAP cn=config: No such object (32)?
Securing userPassword access with OpenLDAP in RHELOpenldap/Sasl/GSSAPI on Debian: Key table entry not foundWhat is SSHA-512? How can OpenLDAP support it?error: Automatically removed objectClass from template as it is not defined in the schemaOpenLDAP: Index to olcDatabase not respectedgnupg integration with openLDAP - ACL ErrorOpenLdap Configuration IssueOpenldap enable ssl on replicationOpenldap RootDN and other 'admin' user work differently when changing userPasswordCreating an OpenLdap administrator group on LDAP server
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm attempting to follow several tutorials on setting the root LDAP password (our previous sysadmin departed...abruptly), which all say more or less the same thing:
- http://sysadminnotebook.blogspot.com/2014/06/change-root-dn-password-on-openldap.html
- https://tech.feedyourhead.at/content/openldap-set-config-admin-password
- https://www.linuxwave.info/2015/07/reset-openldap-default-admin-password.html
...but getting stuck at the first step. This seems bad:
# ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
No such object (32)
What I've tried so far:
I can locate the data that query is intended to retrieve by digging it out of the slapd-config files:
# find /etc/ldap/slapd.d -type f -exec grep Root +
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootDN: cn=admin,cn=config
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootDN: cn=admin,dc=example,dc=com
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
and confirmed that slapd is in theory set up to read from those files:
# ps -ef | grep slapd
openldap 2244 1 0 Oct26 ? 00:00:16 /usr/sbin/slapd -h ldap:/// ldapi:/// ldaps:/// -g openldap -u openldap -F /etc/ldap/slapd.d
When I turn on ACL logging (and run from the command line; turning on logging from init.d makes slapd hang on start) I get this:
5bdb2ef2 => access_allowed: search access to "cn=config" "entry" requested
5bdb2ef2 => acl_get: [1] attr entry
5bdb2ef2 => acl_mask: access to entry "cn=config", attr "entry" requested
5bdb2ef2 => acl_mask: to all values by "gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth", (=0)
5bdb2ef2 <= check a_dn_pat: *
5bdb2ef2 <= acl_mask: [1] applying none(=0) (stop)
5bdb2ef2 <= acl_mask: [1] mask: none(=0)
5bdb2ef2 => slap_access_allowed: search access denied by none(=0)
5bdb2ef2 => access_allowed: no more rules
Ideas?
openldap
add a comment |
I'm attempting to follow several tutorials on setting the root LDAP password (our previous sysadmin departed...abruptly), which all say more or less the same thing:
- http://sysadminnotebook.blogspot.com/2014/06/change-root-dn-password-on-openldap.html
- https://tech.feedyourhead.at/content/openldap-set-config-admin-password
- https://www.linuxwave.info/2015/07/reset-openldap-default-admin-password.html
...but getting stuck at the first step. This seems bad:
# ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
No such object (32)
What I've tried so far:
I can locate the data that query is intended to retrieve by digging it out of the slapd-config files:
# find /etc/ldap/slapd.d -type f -exec grep Root +
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootDN: cn=admin,cn=config
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootDN: cn=admin,dc=example,dc=com
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
and confirmed that slapd is in theory set up to read from those files:
# ps -ef | grep slapd
openldap 2244 1 0 Oct26 ? 00:00:16 /usr/sbin/slapd -h ldap:/// ldapi:/// ldaps:/// -g openldap -u openldap -F /etc/ldap/slapd.d
When I turn on ACL logging (and run from the command line; turning on logging from init.d makes slapd hang on start) I get this:
5bdb2ef2 => access_allowed: search access to "cn=config" "entry" requested
5bdb2ef2 => acl_get: [1] attr entry
5bdb2ef2 => acl_mask: access to entry "cn=config", attr "entry" requested
5bdb2ef2 => acl_mask: to all values by "gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth", (=0)
5bdb2ef2 <= check a_dn_pat: *
5bdb2ef2 <= acl_mask: [1] applying none(=0) (stop)
5bdb2ef2 <= acl_mask: [1] mask: none(=0)
5bdb2ef2 => slap_access_allowed: search access denied by none(=0)
5bdb2ef2 => access_allowed: no more rules
Ideas?
openldap
add a comment |
I'm attempting to follow several tutorials on setting the root LDAP password (our previous sysadmin departed...abruptly), which all say more or less the same thing:
- http://sysadminnotebook.blogspot.com/2014/06/change-root-dn-password-on-openldap.html
- https://tech.feedyourhead.at/content/openldap-set-config-admin-password
- https://www.linuxwave.info/2015/07/reset-openldap-default-admin-password.html
...but getting stuck at the first step. This seems bad:
# ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
No such object (32)
What I've tried so far:
I can locate the data that query is intended to retrieve by digging it out of the slapd-config files:
# find /etc/ldap/slapd.d -type f -exec grep Root +
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootDN: cn=admin,cn=config
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootDN: cn=admin,dc=example,dc=com
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
and confirmed that slapd is in theory set up to read from those files:
# ps -ef | grep slapd
openldap 2244 1 0 Oct26 ? 00:00:16 /usr/sbin/slapd -h ldap:/// ldapi:/// ldaps:/// -g openldap -u openldap -F /etc/ldap/slapd.d
When I turn on ACL logging (and run from the command line; turning on logging from init.d makes slapd hang on start) I get this:
5bdb2ef2 => access_allowed: search access to "cn=config" "entry" requested
5bdb2ef2 => acl_get: [1] attr entry
5bdb2ef2 => acl_mask: access to entry "cn=config", attr "entry" requested
5bdb2ef2 => acl_mask: to all values by "gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth", (=0)
5bdb2ef2 <= check a_dn_pat: *
5bdb2ef2 <= acl_mask: [1] applying none(=0) (stop)
5bdb2ef2 <= acl_mask: [1] mask: none(=0)
5bdb2ef2 => slap_access_allowed: search access denied by none(=0)
5bdb2ef2 => access_allowed: no more rules
Ideas?
openldap
I'm attempting to follow several tutorials on setting the root LDAP password (our previous sysadmin departed...abruptly), which all say more or less the same thing:
- http://sysadminnotebook.blogspot.com/2014/06/change-root-dn-password-on-openldap.html
- https://tech.feedyourhead.at/content/openldap-set-config-admin-password
- https://www.linuxwave.info/2015/07/reset-openldap-default-admin-password.html
...but getting stuck at the first step. This seems bad:
# ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
No such object (32)
What I've tried so far:
I can locate the data that query is intended to retrieve by digging it out of the slapd-config files:
# find /etc/ldap/slapd.d -type f -exec grep Root +
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootDN: cn=admin,cn=config
/etc/ldap/slapd.d/cn=config/olcDatabase=0config.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootDN: cn=admin,dc=example,dc=com
/etc/ldap/slapd.d/cn=config/olcDatabase=1hdb.ldif:olcRootPW: SSHA[xxxxxx hash redacted xxxxxx]
and confirmed that slapd is in theory set up to read from those files:
# ps -ef | grep slapd
openldap 2244 1 0 Oct26 ? 00:00:16 /usr/sbin/slapd -h ldap:/// ldapi:/// ldaps:/// -g openldap -u openldap -F /etc/ldap/slapd.d
When I turn on ACL logging (and run from the command line; turning on logging from init.d makes slapd hang on start) I get this:
5bdb2ef2 => access_allowed: search access to "cn=config" "entry" requested
5bdb2ef2 => acl_get: [1] attr entry
5bdb2ef2 => acl_mask: access to entry "cn=config", attr "entry" requested
5bdb2ef2 => acl_mask: to all values by "gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth", (=0)
5bdb2ef2 <= check a_dn_pat: *
5bdb2ef2 <= acl_mask: [1] applying none(=0) (stop)
5bdb2ef2 <= acl_mask: [1] mask: none(=0)
5bdb2ef2 => slap_access_allowed: search access denied by none(=0)
5bdb2ef2 => access_allowed: no more rules
Ideas?
openldap
openldap
asked Nov 1 '18 at 16:57
krivardkrivard
1387
1387
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
On a number of modern Linux systems root as identified by SASL/EXTERNAL
as gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
is either the rootDN
or has manager
permissions when openldap-server/slapd is installed.
For your existing installation that is not currently the case.
If you know the password for your various rootDNs, use those. Otherwise, replace your rootDN (or it's password) to something you can use. You'll have to do this outside of LDAP by editing /etc/openldap/slapd.d/cn=config/olcDatabase=0config.ldif
or your equivalent and restarting slapd.
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
add a comment |
I've stumbled over this issue myself but wasn't satisfied by accepted answer as it points out the reason for the issue but is very limited on providing actual instructions on how to fix it. So I kept searching and stumbled over this issue.
Precondition
I like using this SASL/EXTERNAL approach and as I'm trying to create a docker container setting up slapd properly is part of my intention. The problem is: how to set access rights on cn=config
. The container is converting some initial slapd.conf file into cn=config
on first start when there is no existing cn=config
in configuration folder selected with option -F
. So there must be some way to have cn=config
setting up permissions as desired.
Analysis
Using rootDN
seems to be odd as it is configured in scope of different database and according to previously resulting cn=config
configuration still is bound to different database.
In addition cn=config
is configured to grant none
permissions to everyone accessing anything in database at cn=config
. Check the file /your/config/dir/cn=config/olcDatabase=0config.ldif:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e01f7658
dn: olcDatabase=0config
objectClass: olcDatabaseConfig
olcDatabase: 0config
olcAccess: 0to * by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=config
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
structuralObjectClass: olcDatabaseConfig
entryUUID: a85462ad-0102-456d-a2d7-e6d082b7e613
creatorsName: cn=config
createTimestamp: 20190429143842Z
entryCSN: 20190429143842.339724Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20190429143842Z
It clearly states olcAccess: 0to * by * none
so I'm pretty sure using rootDN
doesn't help either.
In an existing LDAP server there is a different access rule applied:
olcAccess: 0to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external
,cn=auth manage by * break
So, this is what I need in my case!
Solution
When converting from slapd.conf to cn=config
slapd and its tools are accepting partial configuration for the resulting database. olcDatabase=0config
is the resulting DN for a database named config
. So add configuration for that database in your file. The following excerpt appended to the end of my slapd.conf file has been taken from issue linked before:
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * read
Don't miss to remove any existing configuration folder so the updated slapd.conf file will be converted to cn=config
once again.
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html
– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases andcn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless grantingaccess to * by * read
on database config the rootDN of your "actual" database can't read anything at suffixcn=config
. Tried myself.
– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f938235%2fopenldap-cn-config-no-such-object-32%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
On a number of modern Linux systems root as identified by SASL/EXTERNAL
as gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
is either the rootDN
or has manager
permissions when openldap-server/slapd is installed.
For your existing installation that is not currently the case.
If you know the password for your various rootDNs, use those. Otherwise, replace your rootDN (or it's password) to something you can use. You'll have to do this outside of LDAP by editing /etc/openldap/slapd.d/cn=config/olcDatabase=0config.ldif
or your equivalent and restarting slapd.
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
add a comment |
On a number of modern Linux systems root as identified by SASL/EXTERNAL
as gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
is either the rootDN
or has manager
permissions when openldap-server/slapd is installed.
For your existing installation that is not currently the case.
If you know the password for your various rootDNs, use those. Otherwise, replace your rootDN (or it's password) to something you can use. You'll have to do this outside of LDAP by editing /etc/openldap/slapd.d/cn=config/olcDatabase=0config.ldif
or your equivalent and restarting slapd.
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
add a comment |
On a number of modern Linux systems root as identified by SASL/EXTERNAL
as gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
is either the rootDN
or has manager
permissions when openldap-server/slapd is installed.
For your existing installation that is not currently the case.
If you know the password for your various rootDNs, use those. Otherwise, replace your rootDN (or it's password) to something you can use. You'll have to do this outside of LDAP by editing /etc/openldap/slapd.d/cn=config/olcDatabase=0config.ldif
or your equivalent and restarting slapd.
On a number of modern Linux systems root as identified by SASL/EXTERNAL
as gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
is either the rootDN
or has manager
permissions when openldap-server/slapd is installed.
For your existing installation that is not currently the case.
If you know the password for your various rootDNs, use those. Otherwise, replace your rootDN (or it's password) to something you can use. You'll have to do this outside of LDAP by editing /etc/openldap/slapd.d/cn=config/olcDatabase=0config.ldif
or your equivalent and restarting slapd.
edited Nov 7 '18 at 4:11
answered Nov 2 '18 at 5:49
8410484104
10.5k43168
10.5k43168
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
add a comment |
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
No passwords are available, only systems root access. Is replacing one's rootDN an ldapmodify thing or a slapcat/edit/slapadd thing?
– krivard
Nov 2 '18 at 19:15
add a comment |
I've stumbled over this issue myself but wasn't satisfied by accepted answer as it points out the reason for the issue but is very limited on providing actual instructions on how to fix it. So I kept searching and stumbled over this issue.
Precondition
I like using this SASL/EXTERNAL approach and as I'm trying to create a docker container setting up slapd properly is part of my intention. The problem is: how to set access rights on cn=config
. The container is converting some initial slapd.conf file into cn=config
on first start when there is no existing cn=config
in configuration folder selected with option -F
. So there must be some way to have cn=config
setting up permissions as desired.
Analysis
Using rootDN
seems to be odd as it is configured in scope of different database and according to previously resulting cn=config
configuration still is bound to different database.
In addition cn=config
is configured to grant none
permissions to everyone accessing anything in database at cn=config
. Check the file /your/config/dir/cn=config/olcDatabase=0config.ldif:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e01f7658
dn: olcDatabase=0config
objectClass: olcDatabaseConfig
olcDatabase: 0config
olcAccess: 0to * by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=config
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
structuralObjectClass: olcDatabaseConfig
entryUUID: a85462ad-0102-456d-a2d7-e6d082b7e613
creatorsName: cn=config
createTimestamp: 20190429143842Z
entryCSN: 20190429143842.339724Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20190429143842Z
It clearly states olcAccess: 0to * by * none
so I'm pretty sure using rootDN
doesn't help either.
In an existing LDAP server there is a different access rule applied:
olcAccess: 0to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external
,cn=auth manage by * break
So, this is what I need in my case!
Solution
When converting from slapd.conf to cn=config
slapd and its tools are accepting partial configuration for the resulting database. olcDatabase=0config
is the resulting DN for a database named config
. So add configuration for that database in your file. The following excerpt appended to the end of my slapd.conf file has been taken from issue linked before:
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * read
Don't miss to remove any existing configuration folder so the updated slapd.conf file will be converted to cn=config
once again.
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html
– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases andcn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless grantingaccess to * by * read
on database config the rootDN of your "actual" database can't read anything at suffixcn=config
. Tried myself.
– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
add a comment |
I've stumbled over this issue myself but wasn't satisfied by accepted answer as it points out the reason for the issue but is very limited on providing actual instructions on how to fix it. So I kept searching and stumbled over this issue.
Precondition
I like using this SASL/EXTERNAL approach and as I'm trying to create a docker container setting up slapd properly is part of my intention. The problem is: how to set access rights on cn=config
. The container is converting some initial slapd.conf file into cn=config
on first start when there is no existing cn=config
in configuration folder selected with option -F
. So there must be some way to have cn=config
setting up permissions as desired.
Analysis
Using rootDN
seems to be odd as it is configured in scope of different database and according to previously resulting cn=config
configuration still is bound to different database.
In addition cn=config
is configured to grant none
permissions to everyone accessing anything in database at cn=config
. Check the file /your/config/dir/cn=config/olcDatabase=0config.ldif:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e01f7658
dn: olcDatabase=0config
objectClass: olcDatabaseConfig
olcDatabase: 0config
olcAccess: 0to * by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=config
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
structuralObjectClass: olcDatabaseConfig
entryUUID: a85462ad-0102-456d-a2d7-e6d082b7e613
creatorsName: cn=config
createTimestamp: 20190429143842Z
entryCSN: 20190429143842.339724Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20190429143842Z
It clearly states olcAccess: 0to * by * none
so I'm pretty sure using rootDN
doesn't help either.
In an existing LDAP server there is a different access rule applied:
olcAccess: 0to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external
,cn=auth manage by * break
So, this is what I need in my case!
Solution
When converting from slapd.conf to cn=config
slapd and its tools are accepting partial configuration for the resulting database. olcDatabase=0config
is the resulting DN for a database named config
. So add configuration for that database in your file. The following excerpt appended to the end of my slapd.conf file has been taken from issue linked before:
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * read
Don't miss to remove any existing configuration folder so the updated slapd.conf file will be converted to cn=config
once again.
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html
– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases andcn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless grantingaccess to * by * read
on database config the rootDN of your "actual" database can't read anything at suffixcn=config
. Tried myself.
– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
add a comment |
I've stumbled over this issue myself but wasn't satisfied by accepted answer as it points out the reason for the issue but is very limited on providing actual instructions on how to fix it. So I kept searching and stumbled over this issue.
Precondition
I like using this SASL/EXTERNAL approach and as I'm trying to create a docker container setting up slapd properly is part of my intention. The problem is: how to set access rights on cn=config
. The container is converting some initial slapd.conf file into cn=config
on first start when there is no existing cn=config
in configuration folder selected with option -F
. So there must be some way to have cn=config
setting up permissions as desired.
Analysis
Using rootDN
seems to be odd as it is configured in scope of different database and according to previously resulting cn=config
configuration still is bound to different database.
In addition cn=config
is configured to grant none
permissions to everyone accessing anything in database at cn=config
. Check the file /your/config/dir/cn=config/olcDatabase=0config.ldif:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e01f7658
dn: olcDatabase=0config
objectClass: olcDatabaseConfig
olcDatabase: 0config
olcAccess: 0to * by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=config
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
structuralObjectClass: olcDatabaseConfig
entryUUID: a85462ad-0102-456d-a2d7-e6d082b7e613
creatorsName: cn=config
createTimestamp: 20190429143842Z
entryCSN: 20190429143842.339724Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20190429143842Z
It clearly states olcAccess: 0to * by * none
so I'm pretty sure using rootDN
doesn't help either.
In an existing LDAP server there is a different access rule applied:
olcAccess: 0to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external
,cn=auth manage by * break
So, this is what I need in my case!
Solution
When converting from slapd.conf to cn=config
slapd and its tools are accepting partial configuration for the resulting database. olcDatabase=0config
is the resulting DN for a database named config
. So add configuration for that database in your file. The following excerpt appended to the end of my slapd.conf file has been taken from issue linked before:
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * read
Don't miss to remove any existing configuration folder so the updated slapd.conf file will be converted to cn=config
once again.
I've stumbled over this issue myself but wasn't satisfied by accepted answer as it points out the reason for the issue but is very limited on providing actual instructions on how to fix it. So I kept searching and stumbled over this issue.
Precondition
I like using this SASL/EXTERNAL approach and as I'm trying to create a docker container setting up slapd properly is part of my intention. The problem is: how to set access rights on cn=config
. The container is converting some initial slapd.conf file into cn=config
on first start when there is no existing cn=config
in configuration folder selected with option -F
. So there must be some way to have cn=config
setting up permissions as desired.
Analysis
Using rootDN
seems to be odd as it is configured in scope of different database and according to previously resulting cn=config
configuration still is bound to different database.
In addition cn=config
is configured to grant none
permissions to everyone accessing anything in database at cn=config
. Check the file /your/config/dir/cn=config/olcDatabase=0config.ldif:
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 e01f7658
dn: olcDatabase=0config
objectClass: olcDatabaseConfig
olcDatabase: 0config
olcAccess: 0to * by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: cn=config
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE
structuralObjectClass: olcDatabaseConfig
entryUUID: a85462ad-0102-456d-a2d7-e6d082b7e613
creatorsName: cn=config
createTimestamp: 20190429143842Z
entryCSN: 20190429143842.339724Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20190429143842Z
It clearly states olcAccess: 0to * by * none
so I'm pretty sure using rootDN
doesn't help either.
In an existing LDAP server there is a different access rule applied:
olcAccess: 0to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external
,cn=auth manage by * break
So, this is what I need in my case!
Solution
When converting from slapd.conf to cn=config
slapd and its tools are accepting partial configuration for the resulting database. olcDatabase=0config
is the resulting DN for a database named config
. So add configuration for that database in your file. The following excerpt appended to the end of my slapd.conf file has been taken from issue linked before:
database config
access to *
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage
by * read
Don't miss to remove any existing configuration folder so the updated slapd.conf file will be converted to cn=config
once again.
edited Apr 30 at 22:41
answered Apr 29 at 15:09
cepharumcepharum
1215
1215
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html
– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases andcn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless grantingaccess to * by * read
on database config the rootDN of your "actual" database can't read anything at suffixcn=config
. Tried myself.
– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
add a comment |
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html
– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases andcn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless grantingaccess to * by * read
on database config the rootDN of your "actual" database can't read anything at suffixcn=config
. Tried myself.
– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html– 84104
May 3 at 16:02
Never add the rootdn to the by clauses. ACLs are not even processed for operations performed with rootdn identity (otherwise there would be no reason to define a rootdn at all).
openldap.org/doc/admin24/access-control.html– 84104
May 3 at 16:02
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases and
cn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless granting access to * by * read
on database config the rootDN of your "actual" database can't read anything at suffix cn=config
. Tried myself.– cepharum
May 4 at 21:49
@84104 Your falling into trap of ambiguous documentation here. The rootDN is defined in scope of a database. So are ACLs. The quoted rule is true for accessing the database the rootDN is associated with. But a single LDAP server can house multiple databases and
cn=config
is just one of them. If either database's rootDN would be capable of gaining full access on any defined databases this would be a great mess. So, just try it out yourself: unless granting access to * by * read
on database config the rootDN of your "actual" database can't read anything at suffix cn=config
. Tried myself.– cepharum
May 4 at 21:49
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
Yes, each db has its own rootdn. Multiple DITs can share the same rootdn.
– 84104
May 5 at 2:09
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f938235%2fopenldap-cn-config-no-such-object-32%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown