Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Problems with ldap

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Problems with ldap

#1 Post by awachens »

Hi, first sorry for my English I'm from Spain ...

I need install ldap server in vb with Debian jissie as server and Linux mint as client.

When I add an base.ldif with this:

Dn: ou=Awachens,dc=awachens,dc=net
objectClass: organizationalUnit
Ou: awachens

Without caps, sorry I'm writing from mobile.

When I add the base.ldif all it's correct . If I try add again said me the base.ldif is added in ldap (or something like this )

My problem come when I try to add user.ldif

Ask me for the password of admin in ldap, write the password but nothing amiss..

When I try to search dn or user ldap say me can't found ...
What can I do ?
What can I try to see where is the problem ?

Thx guys

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Problems with ldap

#2 Post by arochester »

For future information
Spanish
http://barrapunto.com/index.pl?section=debian - Barrapunto.com - Debian related News.
http://blog.desdelinux.net/tag/debian - DesdeLinux - Documentation, news and forums related to Debian.
http://www.exdebian.org - exDebian - Documentation, news and forums related to Debian.
Spanish/Mexico
http://www.garryricketsonartworks.org/Debian-spanish/ -New, support questions, discussion

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#3 Post by awachens »

Jajajajaja thx but I don't hope they can help me :p
I trust in this community
Regards

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

#4 Post by GarryRicketson »

Ok, no problem,...
My problem come when I try to add user.ldif

Ask me for the password of admin in ldap, write the password but nothing amiss---snip--- When I try to search dn or user ldap say me can't found
Please tell us exactly how you are adding the user. What commands you use,
and configuration.
For example, are you using :

Code: Select all

useradd
or

Code: Select all

adduser
Details on the difference,

Code: Select all

man useradd
and

Code: Select all

man adduser

This is a small quote from the 'adduser' manual
EXIT VALUES
0 The user exists as specified. This can have 2 causes: The user
was created by adduser or the user was already present on the
system before adduser was invoked. If adduser was returning 0 ,
invoking adduser a second time with the same parameters as
before also returns 0.

1 Creating the user or group failed because it was already present
with other UID/GID than specified. The username or groupname was
rejected because of a mismatch with the configured regular
expressions, see adduser.conf(5). Adduser has been aborted by a
signal.
Or for many other yet undocumented reasons which are printed to
console then. You may then consider to remove --quiet to make
adduser more verbose.

FILES
/etc/adduser.conf
Default configuration file for adduser and addgroup
Removing the --quiet option will give more details as to why it did not work, maybe.
It would be best if you just give the details on how you are adding the user 'ldap'

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#5 Post by awachens »

Hi! Thx for answer!

I use:

Ldapadd -x -D 'cn=admin,dc=awachens,dc=net' -W -f user.ldif

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

#6 Post by GarryRicketson »

Code: Select all

 
Ldapadd -x -D 'cn=admin,dc=awachens,dc=net' -W -f user.ldif 
When I try to search dn or user ldap say me can't found ---
I am not positive on this, so hope fully some one else maybe can say more,
but it looks like to me, you added a user called "user.ldif"
Maybe it should be :

Code: Select all

ldapadd -x -D 'cn=admin,dc=awachens,dc=net' -W -f ldap.ldif   
I am basing my answer on this:
http://www.thegeekstuff.com/2015/02/ope ... ers-groups
There is a example:
Add a LDAP User using ldapadd

Now, use ldapadd command and the above ldif file to create a new user called adam in our OpenLDAP directory as shown below:

Code: Select all

# ldapadd -x -W -D "cn=ramesh,dc=tgs,dc=com" -f adam.ldif
Enter LDAP Password:
adding new entry "uid=adam,ou=users,dc=tgs,dc=com" 
How ever, since I am not familiar with LDAP or OpenLDAP, I am not sure
if the example, and info is correct,... It appears to be,
https://debian-administration.org/artic ... _on_Debian
Also say about the same,..but in their example:

Code: Select all

ldapadd -c -x -D cn=admin,dc=spinlock,dc=hr -W -f /var/tmp/user1.ldif 
For example, they use "user1" as a example, but you would want to relace that with
the correct username,..IE: 'ldap', 'joe', 'admin',...etc ,...what ever the username should be.

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#7 Post by awachens »

I have a question ... isn't the same openldap and ldap no ?

I'm using ldap.

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#8 Post by awachens »

Good morning !!

Im trying again !


Image

This whats up when i try to do some search...

Some help ?

bye !

EDIT: When i try this:
ldapsearch -h localhost -x -s base | grep '^dn:'

ldap answer empty dn:

dn:

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

#9 Post by GarryRicketson »

Post by awachens » 2017-03-30 11:33
I have a question ... isn't the same openldap and ldap no ?
Good morning,
I never got a chance to respond yesterday on this,...
Are openldap and ldap the same
=====
https://en.wikipedia.org/wiki/OpenLDAP
========
http://www.openldap.org/doc/admin22/intro.html
===========
and
http://searchsecurity.techtarget.com/ti ... s-and-Unix
======
No they are not exactly the same, but :
LDAP stands for Lightweight Directory Access Protocol . .... No matter which LDAP server a client connects to, it sees the same view of the directory; a name ...snip---

Like I said, I have never used either, LDAP or OpenLDAP, so all I can really do
is try to do some searches, and find something that may help you.
You have not mentioned this, but it may be important,..
what version of Debian are you using, ?

https://wiki.debian.org/LDAP

Apparently the wiki is rather out of date on this,..
https://wiki.debian.org/LDAP/OpenLDAPSetup

Everything I am finding indicates you need to have installed, not only
'openldap', but also a package called 'slapd' ,...see this:
https://debian-handbook.info/browse/sta ... ctory.html
11.7.1. Installing
The slapd package contains the OpenLDAP server. The ldap-utils package includes command-line tools for interacting with LDAP servers.
Installing slapd usually asks very few questions and the resulting database is unlikely to suit your needs. Fortunately a simple dpkg-reconfigure slapd will let you reconfigure the LDAP database with more details:
Based on your screen shot, the datbase is not yet created,..that may be the problem ?

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#10 Post by awachens »

Hi thank you for answer !

I wrote ant start of post but misspelled, i have Debian jessie 8

I have installed slapd.
I think database it's created.... is base.ldif file.. i think its correct:

dn: ou=ansa,dc=awachens,dn=cat
objectClass: organizationalUnit
ou: ansa

I think is correct file..

Bye !

User avatar
awachens
Posts: 68
Joined: 2016-03-06 11:28

Re: Problems with ldap

#11 Post by awachens »

Hi guys sorry for don't write before. I'm really busy ...
I can solve this problem so i can enter in ldap with my user.
But now I can't create my home in ldap server ...

So many tip ?

Image

Image

Post Reply