[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldapmodify
Hi,
please stay on the list !
On Saturday 14 August 2004 00:04, Misty Stanley-Jones wrote:
> The entries at the end are not replacements but simple adds.
They aren't entries but attributes of an entry that get updated.
The fact that you add the objectclass containing these attributes tells
that these attributes aren't present in the entry.
Using replace instead of add does no harm here since replace changes all
values of the attribute to those listed in the LDIF file.
> Is it true
> that if I use ldapmodify with -a switch, it will try to add them unless
> there is another directive?
AFAICT yes but you need to have ha plain LDIF file without the
changetype: line. In this case the option -a for ldapmodify adds
the attribute values instead of replacing them
I.e. without -a the entry
dn: cn=Joe Schmo,ou=people,dc=mydomain,dc=com
uid: joe
userPassword: {crypt}7FZxyiS7L2E9I
is equivalent to
dn: cn=Joe Schmo,ou=people,dc=mydomain,dc=com
changetype: modify
replace: uid
uid: joe
-
replace: userPassword
userPassword: {crypt}7FZxyiS7L2E9I
while with -a it is equivalent to
dn: cn=Joe Schmo,ou=people,dc=mydomain,dc=com
changetype: modify
add: uid
uid: joe
-
add: userPassword
userPassword: {crypt}7FZxyiS7L2E9I
Peter
--
Peter Marschall
eMail: peter@adpm.de