Hi All,
Apologies if this is a stupid question, but I can't find the answer via Google.
I need to make the same modification to every entry in my address book. Can I do this with a single ldapmodify command? If so, what is the syntax for the mod file? I'm assuming something like this:
dn: ?? changetype: modify add: objectClass objectClass: evolutionPerson
... but I can't think what the DN would be, since I don't really understand how wildcards work in DNs, if at all. The entries I want to modify are all in ou=addressbook,dc=mydomain, but all have different cns.
Second, some of the entries already have that object class - will this cause a problem? Will ldapmodify simply ignore those entries, or create a duplicate identical objectClass, or crash?
Many thanks in advance,
CC
This e-mail may contain information which is confidential, legally privileged and/or copyright protected. This e-mail is intended for the addressee only. If you receive this in error, please contact the sender and delete the material from your computer
On Monday 14 July 2008 14:20:56 Carr, Chris wrote:
Hi All,
Apologies if this is a stupid question, but I can't find the answer via Google.
I need to make the same modification to every entry in my address book. Can I do this with a single ldapmodify command? If so, what is the syntax for the mod file? I'm assuming something like this:
dn: ?? changetype: modify add: objectClass objectClass: evolutionPerson
... but I can't think what the DN would be, since I don't really understand how wildcards work in DNs, if at all.
You would have to do a search to generate a list of DNs.
E.g. something like this could work:
ldapsearch -LLL -x -D <dn_with_unlimited_size_access> -W -b ou=addressbook,dc=mydomain 1.1 |perl -p0e 's/\n\n/\nadd: objectclass\nobjectclass: evolutionPerson\n\n/g' | ldapmodify -c -x -D <dn_with_write_access> -W
The entries I want to modify are all in ou=addressbook,dc=mydomain, but all have different cns.
What cn they have is irrelevant, the DN is all that matters.
Second, some of the entries already have that object class - will this cause a problem? Will ldapmodify simply ignore those entries,
It will continue if you give it the -c flag, as documented in the man page.
or create a duplicate identical objectClass,
This is impossible.
or crash?
That would be a bug.
Many thanks in advance,
2008/7/14 Carr, Chris Chris.Carr@camden.gov.uk:
Hi All,
Apologies if this is a stupid question, but I can't find the answer via Google.
I need to make the same modification to every entry in my address book. Can I do this with a single ldapmodify command? If so, what is the syntax for the mod file? I'm assuming something like this:
dn: ?? changetype: modify add: objectClass objectClass: evolutionPerson
One alternative solution is utilize on client ldap browser with this feature. What you want may be encontred in: * "Apache Directory Studio" - http://directory.apache.org/studio/ - need java to work - have version for Windows and Linux; * "Ldap Admin" - http://ldapadmin.sourceforge.net/ - standalone client - only have version for Windows - but works with "wine" in Linux.
[]'s Jarbas
... but I can't think what the DN would be, since I don't really understand how wildcards work in DNs, if at all. The entries I want to modify are all in ou=addressbook,dc=mydomain, but all have different cns.
Second, some of the entries already have that object class - will this cause a problem? Will ldapmodify simply ignore those entries, or create a duplicate identical objectClass, or crash?
Many thanks in advance,
CC
This e-mail may contain information which is confidential, legally privileged and/or copyright protected. This e-mail is intended for the addressee only. If you receive this in error, please contact the sender and delete the material from your computer
-----Original Message----- From: Jarbas Peixoto Júnior [mailto:jarbas.junior@gmail.com] Sent: 15 July 2008 01:51 To: Carr, Chris Cc: openldap-technical@openldap.org Subject: Re: Modifying every entry in an LDAP address book
2008/7/14 Carr, Chris Chris.Carr@camden.gov.uk:
Hi All,
Apologies if this is a stupid question, but I can't find the answer via Google.
I need to make the same modification to every entry in my address book. Can I do this with a single ldapmodify command? If so, what is the syntax for the mod file? I'm assuming something like this:
dn: ?? changetype: modify add: objectClass objectClass: evolutionPerson
One alternative solution is utilize on client ldap browser with this feature. What you want may be encontred in:
- "Apache Directory Studio" - http://directory.apache.org/studio/
- need java to work - have version for Windows and Linux;
- "Ldap Admin" - http://ldapadmin.sourceforge.net/ -
standalone client - only have version for Windows - but works with "wine" in Linux.
Thanks Jarbas. Someone on Usenet recommended ldapvi, which is a simple standalone unix program which opens your entire addressbook (or indeed any set of search results) in your default text editor, lets you edit and then commits the changes. Works like a dream - just thought others might like to know if they have changes to make to multiple entries.
CC
This e-mail may contain information which is confidential, legally privileged and/or copyright protected. This e-mail is intended for the addressee only. If you receive this in error, please contact the sender and delete the material from your computer
openldap-technical@openldap.org