Problems with ldap

If none of the more specific forums is the right place to ask

Problems with ldap

Postby awachens » 2017-03-30 10:23

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
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby arochester » 2017-03-30 10:30

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
"Something to be aware of: Debian is a core or source distribution. This means there are many Debian-based distributions. THEY ARE NOT DEBIAN."
arochester
 
Posts: 1054
Joined: 2010-12-07 19:55

Re: Problems with ldap

Postby awachens » 2017-03-30 10:35

Jajajajaja thx but I don't hope they can help me :p
I trust in this community
Regards
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby GarryRicketson » 2017-03-30 12:17

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'
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4277
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

Postby awachens » 2017-03-30 12:23

Hi! Thx for answer!

I use:

Ldapadd -x -D 'cn=admin,dc=awachens,dc=net' -W -f user.ldif
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby GarryRicketson » 2017-03-30 13:18

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/openldap-add-users-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/article/585/OpenLDAP_installation_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
GarryRicketson
 
Posts: 4277
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

Postby awachens » 2017-03-30 17:33

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

I'm using ldap.
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby awachens » 2017-03-31 05:47

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:
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby GarryRicketson » 2017-03-31 13:47

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/tip/The-pros-and-cons-of-deploying-OpenLDAP-Windows-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/stable/sect.ldap-directory.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
GarryRicketson
 
Posts: 4277
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Problems with ldap

Postby awachens » 2017-03-31 18:31

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 !
awachens
 
Posts: 13
Joined: 2016-03-06 11:28

Re: Problems with ldap

Postby awachens » 2017-04-04 21:48

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
awachens
 
Posts: 13
Joined: 2016-03-06 11:28


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable