开发者

Open ldap modify - /usr/bin/modify problem

Can anyone help me out on this? I'am trying to add another attribute on my LDAP, but i don't know much about this. It returns 开发者_JAVA百科an error after trying the sample i searched on net. This command will be used on my perl program to add new attribute "status" w/ value "yes"..

Help pls?

/usr/bin/ldapmodify -x -D "cn=Test,ou=mygroup.com,o=group2.com" -a "status=yes"??

the -W doesn't work too.

Error: ldap_bind: Can't contact LDAP server (-1)


Try -v for detail log and -w should be in lower case. As for excluding the password one way is to use '-w -' which you will be prompt to enter the password. Hope this helps.


Ensure that you have the status attribute defined in the schema (the attribute cannot be added to an entry unless the entry has an objectClass attribute value that allows the status attribute). Further, the authentication identity cn=Test,ou=mygroup.com,o=group2.com must have permission to add the attribute.

Use ldapmodify to add the status attribute:

ldapmodify -x -D "cn=Test,ou=mygroup.com,o=group2.com" -h hostname -p port <<!
version: 1
dn: uid=user.0,ou=people,dc=example,dc=com
changetype: modify
add: status
status: first value
status: second value
!

The above example adds two values to the status attribute (assuming it is a multi-valued attribute). For more information about the ldapmodify tool see "Using ldapmodify".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜