Hi,
Sorry for the newbie question, but I really cannot figure out the problem.
I just follow the "A Quick-Start Guide", what I did is build a example.ldif as follows:
-------------------------example.ldif---------------- dn: dc=example,dc=com objectclass: dcObject objectclass: organization o: Example Company dc: example
dn: cn=Manager,dc=example,dc=com objectclass: organizationalRole cn: Manager -----------------------------------------------------------
Then, using ldapadd to insert these entries:
ldapadd -x -D "cn=Manager,dc=example,dc=com" -f example.ldif -w secret adding new entry "dc=example,dc=com"
adding new entry "cn=Manager,dc=example,dc=com"
Everything is fine.
*****
Then, I want to use ldapdelete to delete the entries I added just now. I tried
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN
and, also, I tried
ldapdelete -D "cn=Manager,dc=example,dc=com" -x -w secret
but this time the client just hangs. I read the manuals and search on google but still does not have idea.
my ldap.conf is as follows
database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /usr/local/var/openldap-data
Could anyone take a look and tell me why? Thanks a lot!
-- Tianyin
On Sun, Apr 15, 2012 at 07:04:03PM -0700, Tianyin Xu wrote:
Hi,
Sorry for the newbie question, but I really cannot figure out the problem.
I just follow the "A Quick-Start Guide", what I did is build a example.ldif as follows:
I may be misrading, but this invokation:
ldapdelete -D "cn=Manager,dc=example,dc=com" -x -w secret
but this time the client just hangs. I read the manuals and search on google but still does not have idea.
without the '-f' flag, expects a list of DNs from STDIN. Were you suppying a DN?
Could anyone take a look and tell me why? Thanks a lot!
-- Tianyin
thx for the reply, Brian!
yes, you are right. Could you tell me why the following command is wrong?
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN
Thanks a lot! T
On Sun, Apr 15, 2012 at 6:20 PM, Brian Reichert reichert@numachi.comwrote:
On Sun, Apr 15, 2012 at 07:04:03PM -0700, Tianyin Xu wrote:
Hi,
Sorry for the newbie question, but I really cannot figure out the
problem.
I just follow the "A Quick-Start Guide", what I did is build a
example.ldif
as follows:
I may be misrading, but this invokation:
ldapdelete -D "cn=Manager,dc=example,dc=com" -x -w secret
but this time the client just hangs. I read the manuals and search on google but still does not have idea.
without the '-f' flag, expects a list of DNs from STDIN. Were you suppying a DN?
Could anyone take a look and tell me why? Thanks a lot!
-- Tianyin
-- Brian Reichert reichert@numachi.com BSD admin/developer at large
On Sun, Apr 15, 2012 at 09:34:41PM -0700, Tianyin Xu wrote:
thx for the reply, Brian!
yes, you are right. Could you tell me why the following command is wrong?
Did you look at the manpage for ldapdelete? E.g.:
http://linux.die.net/man/1/ldapdelete
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN
The DN you with to bind with needs to be specified with '-D', just as your correct invocation does.
Thanks a lot! T
Hi, Brian,
Yes, I looked at the manpage, but I still didn't get it. Maybe I'm too stupid.
I wanna delete the DN, i.e., "cn=Manager,dc=example,dc=com", I added into the directory. So, according to the example in the manpage, I should just do
ldapdelete "cn=Manager,dc=example,dc=com"
"-x -w secret" is just for simple authentication. So, you mean I should do sth like
ldapdelete -D "dc=example,dc=com" "cn=Manager,dc=example,dc=com"
I tried, but still get ldap_bind: Invalid credentials (49)
Thanks a lot! Tianyin
On Sun, Apr 15, 2012 at 6:43 PM, Brian Reichert reichert@numachi.comwrote:
On Sun, Apr 15, 2012 at 09:34:41PM -0700, Tianyin Xu wrote:
thx for the reply, Brian!
yes, you are right. Could you tell me why the following command is wrong?
Did you look at the manpage for ldapdelete? E.g.:
http://linux.die.net/man/1/ldapdelete
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN
The DN you with to bind with needs to be specified with '-D', just as your correct invocation does.
Thanks a lot! T
-- Brian Reichert reichert@numachi.com BSD admin/developer at large
Hi Tianyin,
if you want to delete the entry cn=Manager,dc=example,dc=com, it has to be the last part of your ldapdelete command. The argument for -D is the account you use to bind against the LDAP server. So your command should look like this:
ldapdelete -D "cn=Manager,dc=example,dc=com" -w secret -x "cn=Manager,dc=example,dc=com"
Btw. Did you set a password for the Manager account already?
Best regards, Michael
-- Michael Wünsche
From: openldap-technical-bounces@OpenLDAP.org [mailto:openldap-technical-bounces@OpenLDAP.org] On Behalf Of Tianyin Xu Sent: Monday, April 16, 2012 6:56 AM To: Brian Reichert Cc: openldap-technical@openldap.org Subject: Re: ldapdelete "ldap_bind: Invalid DN syntax (34)"
Hi, Brian,
Yes, I looked at the manpage, but I still didn't get it. Maybe I'm too stupid.
I wanna delete the DN, i.e., "cn=Manager,dc=example,dc=com", I added into the directory. So, according to the example in the manpage, I should just do
ldapdelete "cn=Manager,dc=example,dc=com"
"-x -w secret" is just for simple authentication. So, you mean I should do sth like
ldapdelete -D "dc=example,dc=com" "cn=Manager,dc=example,dc=com"
I tried, but still get ldap_bind: Invalid credentials (49)
Thanks a lot! Tianyin
On Sun, Apr 15, 2012 at 6:43 PM, Brian Reichert <reichert@numachi.commailto:reichert@numachi.com> wrote: On Sun, Apr 15, 2012 at 09:34:41PM -0700, Tianyin Xu wrote:
thx for the reply, Brian!
yes, you are right. Could you tell me why the following command is wrong?
Did you look at the manpage for ldapdelete? E.g.:
http://linux.die.net/man/1/ldapdelete
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN
The DN you with to bind with needs to be specified with '-D', just as your correct invocation does.
Thanks a lot! T
-- Brian Reichert <reichert@numachi.commailto:reichert@numachi.com> BSD admin/developer at large
Hi, Michael,
Yes, it works! Thanks a lot for the explanation!!
Best, Tianyin
On Mon, Apr 16, 2012 at 2:29 AM, Wuensche Michael < Michael.Wuensche@devoteam.com> wrote:
Hi Tianyin,****
if you want to delete the entry cn=Manager,dc=example,dc=com, it has to be the last part of your ldapdelete command.****
The argument for –D is the account you use to bind against the LDAP server. So your command should look like this:****
ldapdelete -D "cn=Manager,dc=example,dc=com" -w secret -x "cn=Manager,dc=example,dc=com"****
Btw. Did you set a password for the Manager account already?****
Best regards,****
Michael****
-- ****
Michael Wünsche****
*From:* openldap-technical-bounces@OpenLDAP.org [mailto: openldap-technical-bounces@OpenLDAP.org] *On Behalf Of *Tianyin Xu *Sent:* Monday, April 16, 2012 6:56 AM *To:* Brian Reichert *Cc:* openldap-technical@openldap.org *Subject:* Re: ldapdelete "ldap_bind: Invalid DN syntax (34)"****
Hi, Brian,
Yes, I looked at the manpage, but I still didn't get it. Maybe I'm too stupid.
I wanna delete the DN, i.e., "cn=Manager,dc=example,dc=com", I added into the directory. So, according to the example in the manpage, I should just do
ldapdelete "cn=Manager,dc=example,dc=com"
"-x -w secret" is just for simple authentication. So, you mean I should do sth like
ldapdelete -D "dc=example,dc=com" "cn=Manager,dc=example,dc=com"
I tried, but still get ldap_bind: Invalid credentials (49)
Thanks a lot! Tianyin
**
On Sun, Apr 15, 2012 at 6:43 PM, Brian Reichert reichert@numachi.com wrote:****
On Sun, Apr 15, 2012 at 09:34:41PM -0700, Tianyin Xu wrote:
thx for the reply, Brian!
yes, you are right. Could you tell me why the following command is wrong?
Did you look at the manpage for ldapdelete? E.g.:
http://linux.die.net/man/1/ldapdelete****
ldapdelete "cn=Manager,dc=example,dc=com" -x -w secret ldap_bind: Invalid DN syntax (34) additional info: invalid DN****
The DN you with to bind with needs to be specified with '-D', just as your correct invocation does.
Thanks a lot!****
T
-- Brian Reichert reichert@numachi.com BSD admin/developer at large****
openldap-technical@openldap.org