ldap - ldapmodify raises attributetypes: value #0 invalid per syntax error -


i'm implementing pwdcheckmodule library openldap version 2.4.14 (version cannot changed). during i'd read attributes ldap database. 1 of these attributes called pcpminnumberlowerupper , holds minimum number of lower and/or upper characters. attribute should part of existing objectclass called pwdpolicy located under cn:schema has other attributes pwdmaxage etc.

i'd use ldapmodify terminal command in order add attribute existing ldap database. command i'v used looks following:

ldapmodify -h localhost -p 389 -d "cn=administrator,dc=<mydc>,dc=<mydc>..." -w "<mysecret>" -x -f pcp_attribute_upgrade.ldif 

the corresponding ldif-file has following content:

dn: cn=schema  changetype: modify add: attributetypes attributetypes: ( 1.3.6.1.4.1.42.2.27.8.1.18 name 'pcpminnumberlowerupper' desc 'minimum of upper or lower characters' syntax 1.3.6.1.4.1.1466.115.121.1.27 single-valued usage userapplications ) 

now, if execute command above raises following error message terminal output:

ldap_start_tls: protocol error (2)         additional info: unsupported extended operation modifying entry "cn=schema" ldap_modify: invalid syntax (21)         additional info: attributetypes: value #0 invalid per syntax 

i tried use olcattributetypes instead of attributetypes did not help. nice :-)

thanks in advance, flo

with default openldap configuration, schema modification have use external authentication local ldap servers root account:

sudo ldapmodify -y external -h ldapi:/// -f  pcp.ldif 

and pcp.ldif should be:

dn: cn=schema,cn=config changetype: modify add: olcattributetypes  olcattributetypes: ( 1.3.6.1.4.1.42.2.27.8.1.18 name 'pcpminnumberlowerupper' desc 'minimum of upper or lower characters' syntax 1.3.6.1.4.1.1466.115.121.1.27 single-value usage userapplications ) 

(changed dn, "attributetypes" replaced "olcattributetypes" , "single-valued" "single-value")


Comments

Popular posts from this blog

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

matlab - error with cyclic autocorrelation function -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -