Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6152791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:58:52+00:00 2026-05-23T19:58:52+00:00

I have this code: function makeUser() { $info[‘cn’] = Test User; $info[‘sn’] = User;

  • 0

I have this code:

function makeUser() {
    $info['cn'] = "Test User";
    $info['sn'] = "User";
    $info['mail'] = "test@localhost";
    $info['objectclass'][0] = "Person";
    $info['objectclass'][1] = "User";

    $info['userpassword'] = "{MD5}".base64_encode(pack("H*",md5('Password1!')));
    $info['useraccountcontrol'] = 512;

    var_dump(ldap_add($this->connection, "CN=Test User,OU=Users,DC=domain,DC=local", $info));
}

Which gives me this error:

Warning: ldap_add() [function.ldap-add]: Add: Server is unwilling to perform

When I leave out the $info['useraccountcontrol'] = 512; part, It adds the account, but it is disabled..

I get this from the logging on both servers:

Internal event: The LDAP server returned an error.

Additional Data Error value: 0000052D: SvcErr: DSID-031A11E5, problem
5003 (WILL_NOT_PERFORM), data 0

I work on:

  • Windows Server 2008 Active Directory (not R2) & Windows Server 2003
  • PHP 5.3.5
  • Normal LDAP connection, not LDAPS since I’ve given up on trying to get that work..

How can I get it like so, that the user is not disabled and does not have to change password when first logging in?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:58:52+00:00Added an answer on May 23, 2026 at 7:58 pm

    As far Active-directory is concerned the password is not in ‘userpassword’ but in ‘unicodePwd’, you’ve got an example in this other Stckoverflow question. And I think that you need to use LDAPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: dojo.declare(City, null, { constructor : function(cityid, cityinfo){ } }); dojo.declare(TPolyline,
I have this piece of code: $(#faq).click(function () { var url = $.get(faq, {
I have this piece of code: var myObj = function () { this.complex =
i need help with disk_total_space function.. i have this on my code <?php $sql=select
I have this function in my Javascript Code that updates html fields with their
I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
I have this code: function render_message(id) { var xmlHttp; xmlHttp=new XMLHttpRequest(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4)
I have this code: function Item(id, itemType, itemData, itemCategoryId, itemRank) { this.id = id;
I have this code function check(){ $.get(friend.php, { id: friendid }, function(data){ //Do stuff
I have this code: function some_object(...) { this.data = {...}; this.do_something = function(...) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.