Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
when am trying to add LDIF files to the database, am getting this error.
[root@server ~]# ldapadd -x -D "cn=Manager,dc=example,dc=com" \
> -W -f /etc/openldap/example.com.ldif
Enter LDAP Password:
adding new entry "dc=example,dc=com"
ldap_add: Undefined attribute type (17)
additional info: decription: attribute type undefined
I cant able to add the LDIF file.
Totally am having 3 LDIF files,
1)example.com.ldif
2)ldapusers.ldif
3)root.ldif
In my slapd.conf file i have added the slappasswd as below which
i mention in dark letters.Is it correct?
I had just given slappasswd in my prompt and type the new password
and retype password.It automatically encrypt that password.
I copied that password and given in slapd.conf
This is my slapd.conf file.
===========================================
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com" rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap/example.com
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM
Is the above snippet included 2 times in your slapd.conf, or it's just a copy/paste error? It should exists only once.
2nd: There are no schema files included in your slapd.conf. Objectclasses are defined inside the various schema files (usually under /etc/openldap/schema).
Also you didn't post the ldif files you're trying to add, so we can have a better look in your prob.
[root@server openldap]# cat example.com.ldif
dn: dc=example,dc=com
dc: example
description: Root LDAP entry for example.com
objectClass: dcObject
objectClass: organizationalUnit
ou: rootobject
dn: ou=People, dc=example,dc=com
ou: People
description: All people in organisation
objectClass: organizationalUnit
[root@server openldap]#
here is slapd file.
schema file is also there.[root@server openldap]# cat slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it. Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
#rootpw {SSHA}E3+Pe58NVPdZY1VOePmlvvsjDAkRjnEC
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}9+PB01CrKc/w1oCejdgnSIpq+m1Whyfv
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap/example.com
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM
it was also copying error.
Last edited by aravindhcl; 12-05-2007 at 05:33 AM.
Reason: for reference
Given the example.com.ldif you're trying to import and the error you get:
Quote:
ldap_add: Undefined attribute type (17)
additional info: decription: attribute type undefined
it seems it cannot find the decription attribute (typo?). I cannot see any typo in your ldif file. Perhaps you should look better your ldif for typos, or you can remove the lines with the "description" attribute to see if you can add the ldif into the server.
FYI, I've used your slapd.conf and example.com.ldif in my slapd server (version 2.4.6) and everything worked fine.
If I change "description: Root LDAP entry for example.com" to "decription: Root LDAP entry for example.com", then I get the same error as you do. So double-check the ldif, or better yet rewrite it from scratch using vi.
Or you can use slapadd (with slapd server stopped) to add the ldif:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.