2008/8/14 Michael Ströder michael@stroeder.com:
Kós Tamás wrote:
I got a little bit off topic problem, but I hope you can help me about it. We got an LDAP directory, with many names. We got some same CNs for instance: John Smiths. The only difference is between the 2 names is the e-mail address. How can I modify one of them? ldapmodify request DN, but our enviroment DN seems to be DN: CN=John Smiths. How can I include the e-mail address to the DN?
You can use either just attribute 'mail' as characteristic attribute for forming the RDN.
mail=jsmiths,<..rest of DN..> mail=johnsmiths,<..rest of DN..>
Or you could use so-called multi-valued RDNs:
cn=John Smiths+mail=jsmiths,<..rest of DN..> cn=John Smiths+mail=johnsmiths,<..rest of DN..>
As you can see , and + and some other chars are special in DN string representation so you have to escape them (see RFC 4514).
Ciao, Michael.
Hi!
Thank for your help. I tried to search with this command: ldapsearch -xv -h host.somewhere.net -D "CN=jsmiths,O=ACME" -w password mail=jsmiths@moewhere.net+CN=John\ Smiths Nothing found... This persons don't have O or DC attributes. Can I ask you to give me some examples for searches and to modify people by mail and CN attributes.
Cioa, Tamas