Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to run an LDAP server on a openSUSE 12. But I have a couple of doubts.

What I whant is this: testing.com with 2 OU (Info and People ). So the right way would be ou=Info,dc=testing,dc=com.

I use this http://www.padl.com/OSS/MigrationTools.html to generate a ldif file named user user_ldap.ldif, with a few users (this is an example =D). After I edit the migrate_common.ph I create the user_lda.ldif file

 ~ # cat user_ldap.ldif 
dn: uid=inxs,ou=People,dc=testing,dc=com
uid: inxs
cn: INXS
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$yQbmUggV$fNUvBGuOXru0DHQjtlu9h1
shadowLastChange: 15392
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1001
gidNumber: 100
homeDirectory: /home/inxs
gecos: INXS

dn: uid=nofx,ou=People,dc=testing,dc=com
uid: nofx
cn: NOFX
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$vxU/f4tt$LRHuHhLgPhqcGVA2yLUKk/
shadowLastChange: 15392
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1002
gidNumber: 100
homeDirectory: /home/nofx
gecos: NOFX

So I try to do this:

:~ # ldapadd -f user_ldap.ldif 
SASL/DIGEST-MD5 authentication started
Please enter your password: 
ldap_sasl_interactive_bind_s: Invalid credentials (49)
        additional info: SASL(-13): user not found: no secret in database

When I installed the ldap-server, I created the dn=root with his password, so I asumed that is the password that this asking.

I do not create the directory tree I was told that was created automatically from the ldapadd. Or it's false?

I have a lot to learn, but need a guide or a small synthesis.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted
+50

If you want insert this records to the ldap, you must use this command:

ldapadd -D 'whole dn of root' -f user_ldap.ldif

for example:

ldapadd -D 'cn=root,dc=testing,dc=com' -f user_ldap.ldif

Then you will be asking for password, which you set for LDAP root dn. But please: I don't know, which is your root dn, use your own.

EDIT: You have to add basic entries:

dn: dc=testing,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: testing.com organization
dc: testing
structuralObjectClass: organization

dn: ou=People,dc=testing,dc=com
objectClass: organizationalUnit
ou: People
ou: People of testing.com organization
structuralObjectClass: organizationalUnit

Note: When will ldapadd complain, try to remove both structuralObjectClass lines.

For explaining: LDAP want to have defined whole path from 'root' (which is your organization dc=testing,dc=com) to the leafs, which are in this case some users on ou=People 'branch'. If you would like to have in LDAP machines and they will have ou=Machines 'organizational unit', you must add to the LDAP directory 'branch' ou=Machines (like ou=People, but only substitute word 'People' with word 'Machines' in my sample) and then you can add 'leafs' - entries for machines.

share|improve this answer
    
ldap-dind: Server is unwiling to perform (53) now I see that I another issues about the configuration.. hehe thanx anyway... –  user12183 Mar 1 '12 at 10:56
    
@maniat1k Try to add -x option to the ldapadd command. Or you may have not included some schemas in the slapd.conf (or in the /etc/ldap/slapd.d/ directory)... –  Jan Marek Mar 1 '12 at 11:28
    
@maniat1k Have you added entries for dc=testing,dc=com and for ou=People? See my updated answer... –  Jan Marek Mar 1 '12 at 11:38
    
No actually I don't, asumed that the ldif file will do that. Actually later on will continu with the test. thanks! –  user12183 Mar 1 '12 at 12:07
add comment

Have you tried explicitly binding as dn=root?

share|improve this answer
    
please ad more info, show me an example... you mean ldapadd "dn=root" -f user_ldap.ldif ? –  user12183 Feb 27 '12 at 18:37
    
No - the answer below spells it out. –  Cian Feb 29 '12 at 12:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.