Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Active Directory > update user distinguishedName attribute

Reply
Thread Tools Display Modes

update user distinguishedName attribute

 
 
update user cn attribute
Guest
Posts: n/a

 
      05-17-2010
I use java program ldap to accept active directory
i have two question,please help me, thanks

i want update user informatoin, if i don't update user name or cn attribute,
it can run sucess. but when i want update name or cn attribute it error.
the error is:

javax.naming.OperationNotSupportedException: [LDAP: error code 53 -
00002016: Sv
cErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0

how can i update name and cn attribute in user


the second question is:
i want move user from an group to another group, forexample:
i want update user dn:
CN=test1,OU=AD111,OU=*望,OU=外来服务人员, O=gdepb,DC=gdepb,DC=gov,DC=cn
to another group with dn update to
dn:CN=test1,OU=AD222,OU=*望,OU=外来服务人 ,O=gdepb,DC=gdepb,DC=gov,DC=cn

how i can move user from AD111 to AD222
 
Reply With Quote
 
 
 
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      05-17-2010
See below:

"update user cn attribute" <update user cn
> wrote in message
news:E9DC8304-4A86-4092-92B6-...
>I use java program ldap to accept active directory
> i have two question,please help me, thanks
>
> i want update user informatoin, if i don't update user name or cn
> attribute,
> it can run sucess. but when i want update name or cn attribute it error.
> the error is:
>
> javax.naming.OperationNotSupportedException: [LDAP: error code 53 -
> 00002016: Sv
> cErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0
>
> how can i update name and cn attribute in user


You cannot modify the cn attribute directly. Instead you must rename the
object. I've never seen a Java program for this, but in VBScript you bind to
the parent container/OU object and use the MoveHere method to rename
objects.

>
>
> the second question is:
> i want move user from an group to another group, forexample:
> i want update user dn:
> CN=test1,OU=AD111,OU=??,OU=??????,O=gdepb,DC=gdepb ,DC=gov,DC=cn
> to another group with dn update to
> dn:CN=test1,OU=AD222,OU=??,OU=??????,O=gdepb,DC=gd epb,DC=gov,DC=cn
>
> how i can move user from AD111 to AD222


What you describe are not groups but Organizational Units. You want to move
the objects from one OU to another. Again in VBScript you use the MoveHere
method of the OU where you want to object to reside (OU=AD222 in your
example).

Note, the "name" of any object is the Relative Distinguished Name (the name
of the object in its parent container/OU), which in the case of user objects
is the string "cn=" followed by the value of the cn attribute.

A VBScript program to rename user cn=Test1 to cn=NewName in OU=AD111 would
be:

Set objOU =
GetObject("LDAP://OU=AD111,OU=??,OU=??????,O=gdepb,DC=gdepb,DC=gov,D C=cn")
objOU.MoveHere
"LDAP://CN=test1,OU=AD111,OU=??,OU=??????,O=gdepb,DC=gdepb ,DC=gov,DC=cn",
"cn=NewName"

A VBScript program to move user cn=Test1 from OU=AD111 to OU=AD222 would be:

Set objOU =
GetObject("LDAP://OU=AD222,OU=??,OU=??????,O=gdepb,DC=gdepb,DC=gov,D C=cn")
objOU.MoveHere
"LDAP://CN=test1,OU=AD111,OU=??,OU=??????,O=gdepb,DC=gdepb ,DC=gov,DC=cn",
vbNullString

If the MoveHere method is available in Java, perhaps you can convert these
examples. Otherwise, perhaps someone else can help.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update des27 Windows Update 31 04-08-2010 05:34 PM
Windows Update error code 8007065E Martin R Windows Update 7 01-14-2010 01:33 PM
"Some updates could not be installed" Antnee20x Windows Update 7 12-18-2009 07:01 PM
931125 endless loop jamie Update Services 8 12-11-2009 08:55 AM
Explorer Crashes after Update Trader Windows Update 1 11-10-2009 05:41 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59