Anonymous_User Absent Member.
Absent Member.
613 views

Change single-valued attributes to multi-valued


Hi All,

There is one *single valued custom attribute *"storeNumber" in the
schema. *one effective class *and *one auxiliary class *is using this
attribute as *optional attribute*. There are huge number of objects in
the eDirectory created from the effective class and User class objects
are using the aux class.

This attribute is needed to be modified from single valued to multi
valued. The standerd process I know is to ldif export all the objects,
delete class and the attributes accordingly and recreate that attribute
as multi valued followed by classes.

But for doing this I might loose user passwords and driver associations.
Is there any way by using ldif schema update I can do this without
deleting objects? I found one NetIQ 'document'
(http://tinyurl.com/m2xy6sv) that describes how to change multi valued
attribute in single valued. But not the reverse. Here is the sample
ldif:


Code:
--------------------
1 version: 1
2 dn: cn=schema
3 changetype: add
4 attributeTypes: ( 2.5.4.12 NAME ’title’ DESC ’Standa
5 rd Attribute’ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{
6 64} SINGLE-VALUE X-NDS_NAME ’Title’ X-NDS_NOT_SCHED
7 _SYNC_IMMEDIATE ’1’ X-NDS_LOWER_BOUND ’1’)
8
--------------------


I tried to remove *SINGLE-VALUE* tag and try this. But no point.

There is also one more ldif import option I have tried. But This is not
helping if any object or class is using the attribute. And if I try
after deleting all classes and objects using the attribute, it is
removing the attribute but not actually recreating it as multi valued.


Code:
--------------------
dn: cn=schema
changetype: modify
delete: attributetypes
attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8} )
-
add: attributetypes
attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} ).

--------------------


--
raktimb
------------------------------------------------------------------------
raktimb's Profile: https://forums.netiq.com/member.php?userid=4402
View this thread: https://forums.netiq.com/showthread.php?t=52181

Labels (1)
0 Likes
3 Replies
jtl1 Absent Member.
Absent Member.

Re: Change single-valued attributes to multi-valued

It's hard to give you an ldif to just copy/paste since we don't have the raw schema definition of storeNumber. But assuming you
want to change the attribute floor the following ldif will do the work:

dn: cn=schema
changetype: modify
delete: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'floor' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} SINGLE-VALUE )
-
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'floor' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{64512} )
-

Just replacing attribute name and oid to your storeNumber won't do the work. The value you remove from attributeTypes must match
the raw schema definition for your attribute and the value you add must match except for SINGLE-VALUE.

Open a ldap browser (apache directory studio, jxplorer,...) and search for cn=schema, find the definition for storeNumber and
use that as the raw schema definition.

Best regards,
Tobias



On 2014-11-13 11:05, raktimb wrote:
>
> Hi All,
>
> There is one *single valued custom attribute *"storeNumber" in the
> schema. *one effective class *and *one auxiliary class *is using this
> attribute as *optional attribute*. There are huge number of objects in
> the eDirectory created from the effective class and User class objects
> are using the aux class.
>
> This attribute is needed to be modified from single valued to multi
> valued. The standerd process I know is to ldif export all the objects,
> delete class and the attributes accordingly and recreate that attribute
> as multi valued followed by classes.
>
> But for doing this I might loose user passwords and driver associations.
> Is there any way by using ldif schema update I can do this without
> deleting objects? I found one NetIQ 'document'
> (http://tinyurl.com/m2xy6sv) that describes how to change multi valued
> attribute in single valued. But not the reverse. Here is the sample
> ldif:
>
>
> Code:
> --------------------
> 1 version: 1
> 2 dn: cn=schema
> 3 changetype: add
> 4 attributeTypes: ( 2.5.4.12 NAME ’title’ DESC ’Standa
> 5 rd Attribute’ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{
> 6 64} SINGLE-VALUE X-NDS_NAME ’Title’ X-NDS_NOT_SCHED
> 7 _SYNC_IMMEDIATE ’1’ X-NDS_LOWER_BOUND ’1’)
> 8
> --------------------
>
>
> I tried to remove *SINGLE-VALUE* tag and try this. But no point.
>
> There is also one more ldif import option I have tried. But This is not
> helping if any object or class is using the attribute. And if I try
> after deleting all classes and objects using the attribute, it is
> removing the attribute but not actually recreating it as multi valued.
>
>
> Code:
> --------------------
> dn: cn=schema
> changetype: modify
> delete: attributetypes
> attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr'
> SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8} )
> -
> add: attributetypes
> attributetypes: ( 2.16.840.1.113719.1.131.4.1.7 NAME 'myNewAttr'
> SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} ).
>
> --------------------
>
>


0 Likes
Knowledge Partner
Knowledge Partner

Re: Change single-valued attributes to multi-valued

Tobias Ljunggren wrote:

> It's hard to give you an ldif to just copy/paste since we don't have the raw
> schema definition of storeNumber. But assuming you want to change the
> attribute floor the following ldif will do the work:
>
> dn: cn=schema
> changetype: modify
> delete: attributeTypes
> attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'floor' SYNTAX
> 1.3.6.1.4.1.1466.115.121.1.15{64512} SINGLE-VALUE ) -
> add: attributeTypes
> attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'floor' SYNTAX
> 1.3.6.1.4.1.1466.115.121.1.15{64512} ) -
>
> Just replacing attribute name and oid to your storeNumber won't do the work.
> The value you remove from attributeTypes must match the raw schema definition
> for your attribute and the value you add must match except for SINGLE-VALUE.
>
> Open a ldap browser (apache directory studio, jxplorer,...) and search for
> cn=schema, find the definition for storeNumber and use that as the raw schema
> definition.


Spot on, see http://www.novell.com/support/kb/doc.php?id=10084796 for more
details and examples of how to this works.
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Change single-valued attributes to multi-valued


THANKS A LOT....................
Actually the attribute SYNTAX was wrong. I took a ldif export from
Apache DS. Made a ldif file for changing attribute type with same
SYNTAX. And it worked..... 🙂

> #NDS attribute:storeNumber
> #Syntax:SYN_CI_STRING
> dn: cn=schema
> changetype: modify
> add: attributeTypes
> attributeTypes: (
> storenumber-oid
> NAME 'storeNumber'
> SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
> SINGLE-VALUE
> X-NDS_NOT_SCHED_SYNC_IMMEDIATE '1'
> )
>


>
>
> dn: cn=schema
> changetype: modify
> delete: attributeTypes
> attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'storeNumber' SYNTAX
> 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
> -
> add: attributeTypes
> attributeTypes: ( 1.3.6.1.4.1.694.2.1.107 NAME 'storeNumber' SYNTAX
> 1.3.6.1.4.1.1466.115.121.1.15 )
> -



--
raktimb
------------------------------------------------------------------------
raktimb's Profile: https://forums.netiq.com/member.php?userid=4402
View this thread: https://forums.netiq.com/showthread.php?t=52181

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.