How to clear MANAGER attribute using LDIFDE

G

Guest

Hello. Using LDIFDE, Win2000, what's the format of the command to clear a field such as a user's manager? I was trying this...

dn: CN=John Doe,CN=Users,DC=domain,DC=com
changetype: modify
replace: title
title: DataBase Admin
-
replace: manager
manager: ;
-


I also tried just having NOTHING after the manager like so...

replace: manager
manager:
-


but that didn't work either. Is there a special keyword to wipe out (null) the contents of an attribute using LDIFDE?

Thanks, Bruce
 
G

Guest

I found how to modifiy specific fields within an LDIFDE MODIFY... You need to do an add, change or delete for each attribute. You can't do what I was trying, which was to replace an attribute with NOTHING, that's a DELETE of teh attribute, and you need to know the OLD value in order to remove it....


dn: CN=John Doe,CN=Users,DC=domain,DC=com
changetype: modify
replace: title
title: DataBase Admin
-
delete: manager
manager: CN=Joe Manager,CN=Users,DC=domain,DC=com
-



----- Bruce de Freitas wrote: -----

Hello. Using LDIFDE, Win2000, what's the format of the command to clear a field such as a user's manager? I was trying this...

dn: CN=John Doe,CN=Users,DC=domain,DC=com
changetype: modify
replace: title
title: DataBase Admin
-
replace: manager
manager: ;
-


I also tried just having NOTHING after the manager like so...

replace: manager
manager:
-


but that didn't work either. Is there a special keyword to wipe out (null) the contents of an attribute using LDIFDE?

Thanks, Bruce
 
S

Stephen Campbell

You were very close....
replace: manager
-

The replace syntax allows multi-valued properties so:
replace: homeTelephone
homeTelephone: 123-4567
homeTelephone: 222-4444
-

Putting 0 entries in deletes the attribute.

Hope this helps...

Bruce de Freitas said:
I found how to modifiy specific fields within an LDIFDE MODIFY... You
need to do an add, change or delete for each attribute. You can't do what I
was trying, which was to replace an attribute with NOTHING, that's a DELETE
of teh attribute, and you need to know the OLD value in order to remove
it....
dn: CN=John Doe,CN=Users,DC=domain,DC=com
changetype: modify
replace: title
title: DataBase Admin
-
delete: manager
manager: CN=Joe Manager,CN=Users,DC=domain,DC=com
-



----- Bruce de Freitas wrote: -----

Hello. Using LDIFDE, Win2000, what's the format of the command to
clear a field such as a user's manager? I was trying this...
dn: CN=John Doe,CN=Users,DC=domain,DC=com
changetype: modify
replace: title
title: DataBase Admin
-
replace: manager
manager: ;
-


I also tried just having NOTHING after the manager like so...

replace: manager
manager:
-


but that didn't work either. Is there a special keyword to wipe out
(null) the contents of an attribute using LDIFDE?
 
C

Christian Schindler

You could also use the "delete" statement instead of "replace".

--

Christian Schindler
MCSA / MCSE / MCT / CCEA

Senior Consultant

NTx BackOffice Consulting Group Austria
mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top