I have the ff LDIF file for adding an attributeType passwordNonRootMayResetUserpwd. The attributeType is already existing.
dn: cn=schema
changetype: modify
delete: objectClasses
objectClasses: ( 1.3.6.1.4.1.42.2.27.9.2.6 NAME 'passwordPolicy'
SUP top STRUCTURAL MUST cn MAY ( description $ passwordMaxAge
$ passwordExp $ passwordMinLength $ passwordInHistory
$ passwordChange $ passwordWarning $ passwordLockout
$ passwordMaxFailure $ passwordResetDuration
$ passwordUnlock $ passwordLockoutDuration
$ passwordCheckSyntax $ passwordMustChange
$ passwordStorageScheme $ passwordMinAge
$ passwordResetFailureCount $ passwordExpireWithoutWarning
$ passwordRootdnMayBypassModsChecks ) )
dn: cn=schema
changetype: modify
add: objectClasses
objectClasses: ( 1.3.6.1.4.1.42.2.27.9.2.6 NAME 'passwordPolicy'
SUP top STRUCTURAL MUST cn MAY ( description $ passwordMaxAge
$ passwordExp $ passwordMinLength $ passwordInHistory
$ passwordChange $ passwordWarning $ passwordLockout
$ passwordMaxFailure $ passwordResetDuration
$ passwordUnlock $ passwordLockoutDuration
$ passwordCheckSyntax $ passwordMustChange
$ passwordStorageScheme $ passwordMinAge
$ passwordResetFailureCount $ passwordExpireWithoutWarning
$ passwordRootdnMayBypassModsChecks $ passwordNonRootMayResetUserpwd ) )
I'm getting the ff error and I'm stuck.
$ ldapmodify -h host -p 8888 -D "cn=Directory Manager" -f delete_add.ldif
Enter bind password:
modifying entry cn=schema
ldap_modify: DSA is unwilling to perform
ldap_modify: additional info: objectclasses: No target attribute type or object class specified
I do not know what's causing this error since the attributeType exists as well as the objectClass.
Edit: This LDAP service is running on Sun OS 10.
You do not mention which backend server is offering LDAP services. In general when modifying schema in this fashion, it is best to do the delete and add as one atomic operation.
That is a - after the delete: followed immediately by an add: action.
I got it working by doing the ff sequentially:
Firstly, add the attributeType
Lastly, associate the attributeType to the objectClass
Fire these two on separate LDIF files then invoke ldapmodify