Beantwortet ADSI SetPassword

  • Monday, March 05, 2012 4:42 AM
     
     

    Hi Guys,

    I've been writting vb script to bind to windows AD. So far it has been a sucess, i could create user objects, change passwords, etc

    I was using basic bind operation without a port number, where i assume the  default port number is 389.

    Today i decided to change my bind operations to including 389 port number.

    For example:

    Set dso = GetObject("LDAP:")
    Set ou = dso.OpenDSObject("LDAP://ServerIpAddress:389/cn=user1234,ou=test,dc=cerrotorre,dc=de", "administrator", "P@ssw0rd", 1)

    I then decided to change the password

    ou.SetPassword "NewPassword1"

    I keep getting the following error - The remote server machine does not exist or is unavailable

    If i remove port number, it works fine. Can some one please help


    • Edited by Kayd Dalmar Monday, March 05, 2012 5:01 AM
    •  

All Replies

  • Monday, March 05, 2012 2:37 PM
     
     

    Can you please try with port 636, It is secure LDAP port and make sure that you have issued domain controllers certificate for peer DC.


    Sajeed AM

  • Monday, March 05, 2012 2:59 PM
     
     

    I never specify a port number myself. Setting passwords requires SSL. This link documents the ports used by AD. Note that port 636 supports SSL, while 389 does not:

    http://technet.microsoft.com/en-us/library/dd772723(v=WS.10).aspx


    Richard Mueller - MVP Directory Services

  • Monday, March 05, 2012 3:29 PM
     
     
    I guss the syntax itself connecting to the right port as it mentioned LDAP as protocol. LDAP://ServerIpAddress/cn=user1234,ou=test,dc=cerrotorre,dc=de"

    Sajeed AM

  • Monday, March 05, 2012 9:48 PM
     
     

    .

    • Edited by Kayd Dalmar Monday, March 05, 2012 9:49 PM
    •  
  • Monday, March 05, 2012 9:49 PM
     
     

    Thanks allot for your responses.

    I still dont have a solution to my issue. Supply port 636 is giving me server not operatonal error.

    Like i said earlier, I WAS able to setpassword without using port 636. I was doing this without supplying any port. This has been working fine in my environment.

    For example

    Set dso = GetObject("LDAP:")
    Set ou = dso.OpenDSObject("LDAP://Ipaddress/ou=Users,ou=my Users,dc=devenv,dc=myLocalEnv", "admin", "P@ssw0rd", 1)

    changing it to this is causing me greive

    OR

    Set ou = dso.OpenDSObject("LDAP://Ipaddress:636/ou=Users,ou=my Users,dc=devenv,dc=myLocalEnv", "admin", "P@ssw0rd", 1)

  • Tuesday, March 06, 2012 9:45 AM
    Moderator
     
     Answered

    Hi,


    If you encounter any difficulties when writing the scripts, you may submit a new question in The Official Scripting Guys Forum! which is a best resource for scripting related issues.


    The Official Scripting Guys Forum!
    http://social.technet.microsoft.com/Forums/en/ITCG/threads


    Thanks for your understanding!

    Best Regards
    Elytis Cheng

     

     


    Elytis Cheng

    TechNet Community Support