0

I have default LDAP schema (389 DS instance) with the following objectClasses:

objectClasses: ( 1.3.6.1.1.1.2.17 NAME 'automount' DESC 'An entry in an automo
 unter map' SUP top STRUCTURAL MUST ( cn $ automountInformation ) MAY descript
 ion X-ORIGIN 'draft-howard-rfc2307bis' )
objectClasses: ( 1.3.6.1.1.1.2.16 NAME 'automountMap' DESC 'An group of relate
 d automount objects' SUP top STRUCTURAL MUST ou X-ORIGIN 'draft-howard-rfc230
 7bis' )

I need modify thoses classes for using automount on a Solaris clients to the next state:

objectClasses: ( 1.3.6.1.1.1.2.16 NAME 'automountMap' DESC 'Automount Map information' SUP top
 STRUCTURAL MUST automountMapName MAY description X-ORIGIN 'user defined' )
objectClasses: ( 1.3.6.1.1.1.2.17 NAME 'automount' DESC 'Automount information' SUP top STRUCTURAL
 MUST ( automountKey $ automountInformation ) MAY description X-ORIGIN 'user defined' )

AttributeTypes automountKey and automountMapName has been added by me. But I not able edit objectClasess automount and automountMap. Via GUI console edit button is not clickable. Via ldapmodify I gets unexpected error:

ldapmodify: invalid format (line 5) entry: "cn=schema"

I think my ldif file looks correct:

dn: cn=schema
changetype: modify
add: objectclasses
objectClasses: ( 1.3.6.1.1.1.2.16
 NAME 'automountMap'
 DESC 'Automount Map information'
 SUP top
 STRUCTURAL
 MUST automountMapName
 MAY description
)

objectClasses: ( 1.3.6.1.1.1.2.17
 NAME 'automount'
 DESC 'Automount information'
 SUP top
 STRUCTURAL
 MUST (automountKey $ automountInformation)
 MAY description
)

How can I edit those objectClasses? Is it possible? Or how can I redefine those objectClasses?

alexBl
  • 37
  • 2
  • 6

2 Answers2

1

You just didn't choose the right dn.

Instead of dn: cn=schema you should have chosen cn=schema,cn=config.

Still in my opinion it would be better to define a custom schema, which you can put right under this dn. So instead of adding it to cn=schema,cn=config, you would do something like this:

ldapadd -xWD cn=admin,cn=config dn: cn=<schemaName>,cn=schema,cn=config objectClass: olcSchemaConfig cn: <schemaName> olcObjectClasses: ...

randomnickname
  • 513
  • 2
  • 11
0

I have found a workaround. I edited schema files in /etc/dirsrv/slapd-centos/schema

alexBl
  • 37
  • 2
  • 6