Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Directory (http://www.linux-archive.org/fedora-directory/)
-   -   Adding bunch attribute type from ldif file (http://www.linux-archive.org/fedora-directory/647985-adding-bunch-attribute-type-ldif-file.html)

Manel Gimeno Zaragozá 03-23-2012 10:39 AM

Adding bunch attribute type from ldif file
 
Hello,

I'm new in 389-ds and I'm trying to implement a new LDAP server. This is the packages I've installed:
#* rpm -qa | grep 389
389-adminutil-1.1.14-2.el6.x86_64
389-ds-base-libs-1.2.10.4-2.el6.x86_64
389-ds-base-1.2.10.4-2.el6.x86_64
389-admin-console-1.1.8-1.el6.noarch
389-ds-console-1.2.6-1.el6.noarch
389-admin-1.1.25-1.el6.x86_64
389-console-1.1.7-1.el6.noarch
389-dsgw-1.1.7-2.el6.x86_64

And the system is a Centos6
#cat /etc/redhat-release
CentOS release 6.2 (Final)

The problem I've found is I can not add attribute type using an ldif file.

If I try to add it in terminal mode typing the attribute type I have no problem:

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )

also If i try to add it through console, the attribute is added correctly, but if I try to add it using an ldif file it show me the following error:

#cat import.ldif
dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition
MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN
'user defined' )

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v -f import.ldif
ldapmodify: wrong attributeType at line 4, entry "cn=schema"

Also If i try to add multiple attributes, I've got the same error:

#cat import2.ldif

dn: cn=schema

changetype: modify

add: attributetypes

attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition
MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN
'user defined' )
-
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.19 NAME 'mainDocsDomainBase' DESC 'Dominio base de Docs' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v -f import2.ldif

ldapmodify: wrong attributeType at line 4, entry "cn=schema"

am I doing something wrong? did I misunderstand something?

Thanks & Regards.

Manel

--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users

Manel Gimeno Zaragozá 03-23-2012 11:43 AM

Adding bunch attribute type from ldif file
 
Hello

I think I found the problem, there was an space after "add: attributetypes " and that's why it fails.

Now I can import attributes in a bunch file.

Regards.

Manel Gimeno Zaragoza
magiza83@hotmail.com


From: magiza83@hotmail.com
To: 389-users@lists.fedoraproject.org
Date: Fri, 23 Mar 2012 12:39:10 +0100
Subject: [389-users] Adding bunch attribute type from ldif file







Hello,

I'm new in 389-ds and I'm trying to implement a new LDAP server. This is the packages I've installed:
#* rpm -qa | grep 389
389-adminutil-1.1.14-2.el6.x86_64
389-ds-base-libs-1.2.10.4-2.el6.x86_64
389-ds-base-1.2.10.4-2.el6.x86_64
389-admin-console-1.1.8-1.el6.noarch
389-ds-console-1.2.6-1.el6.noarch
389-admin-1.1.25-1.el6.x86_64
389-console-1.1.7-1.el6.noarch
389-dsgw-1.1.7-2.el6.x86_64

And the system is a Centos6
#cat /etc/redhat-release
CentOS release 6.2 (Final)

The problem I've found is I can not add attribute type using an ldif file.

If I try to add it in terminal mode typing the attribute type I have no problem:

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )

also If i try to add it through console, the attribute is added correctly, but if I try to add it using an ldif file it show me the following error:

#cat import.ldif
dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition
MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN
'user defined' )

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v -f import.ldif
ldapmodify: wrong attributeType at line 4, entry "cn=schema"

Also If i try to add multiple attributes, I've got the same error:

#cat import2.ldif

dn: cn=schema

changetype: modify

add: attributetypes

attributetypes: ( 1.3.6.1.4.1.99999.1.1.6 NAME 'perditionMailhost' DESC 'Perdition
MailHost' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN
'user defined' )
-
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.99999.1.1.19 NAME 'mainDocsDomainBase' DESC 'Dominio base de Docs' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' )

#ldapmodify -a -h localhost -p 1389 -D "cn=admin" -W -v -f import2.ldif

ldapmodify: wrong attributeType at line 4, entry "cn=schema"

am I doing something wrong? did I misunderstand something?

Thanks & Regards.

Manel


--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users
--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users


All times are GMT. The time now is 07:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.