| Author |  | 
      
        | brayonsemedi Newbie
 
  
 
 Joined: 27 February 2023
 Location: Brazil
 Online Status: Offline
 Posts: 5
 | 
          Hi everyone.
           | Posted: 27 February 2023 at 3:20pm | IP Logged |   |  
           | 
 |  
 I am sorry to disturb everyone.
 I have a problem, i can't set to work this plugin: LdapChangePasswordPlugin.
 It's strange because even changing the module.php to make a direct change with ldap_modify, does not work. i even tried to change the encry to sha1, but still i can see only two things.
 1 - On user interface, says that the password has changed.
 2 - On log, always is saying that the password has changed too.
 
 Check the log bellow...
 
 
| Code: 
 
    
    | 
      
       | ===== API: Mail::ChangePassword LDAP: connect to server.AAAAAA.BBB.CC:389
 LDAP: bind = "ldaptest@AAAAAA.BBB.CC" / "qwer1234asdf1234"
 LDAP: search = "ou=XXXXX XXXX,dc=AAAAAA,dc=BBB,dc=CC / (mail=user.test@AAAAAA.BBB.CC)
 LDAP: connect to server.AAAAAA.BBB.CC:389
 LDAP: bind = "CN=User Test,OU=XXXXX XXXX,DC=AAAAAA,DC=BBB,DC=CC" / "oldpasstest"
 LDAP: ldap_modify = "CN=User Test,OU=XXXXX XXXX,DC=AAAAAA,DC=BBB,DC=CC"
 Array
 {
 [userPassword] =>{SHA}74e99431a652a78dca0da1bc01888bb0aea040a8
 }
 |  |  |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Can you check on your LDAP server and confirm whether the password has actually changed?
           | Posted: 27 February 2023 at 11:11pm | IP Logged |   |  
           | 
 |  
 I would also recommend to recheck that your mailserver actually uses those fields for authentication purposes.
 
 --
 Regards,
 Igor, Afterlogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | brayonsemedi Newbie
 
  
 
 Joined: 27 February 2023
 Location: Brazil
 Online Status: Offline
 Posts: 5
 | 
          Hi.
           | Posted: 28 February 2023 at 11:39am | IP Logged |   |  
           | 
 |  Yes, the server use the active directory authentication for IMAP and SMTP.
 
 Also the Admin page (specific users), can authenticate, anyway, the point is that the authentication is using the Active Directory, on all systems.
 
 The website (not webmail), can change the password normally in AD. But not the webmail, somehow the plugin don't change.
 I already changed the password to confirm. But for knowledge, the password has 16 digits: (up and down case letters, numbers and this symbol $).  Already checked if was charset problem, but isn't. As you can see in the log, is possible to see that the server has authenticated...
 
 But as you said, i checked if has logs from server, and only problems in php opcache, that i already fixed.
 
 Obs1: I want the webmail able to change the password too. If one user change the password there, because all system use the AD authentication, the new password will be used for others systems too.
 Obs2: The mailnickname atribute or  sammaccountname or mail, is the username used for authentication in imap server, website, admin page.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | brayonsemedi Newbie
 
  
 
 Joined: 27 February 2023
 Location: Brazil
 Online Status: Offline
 Posts: 5
 | 
          Sorry if my way to spoke above was too rude. Really sorry.
           | Posted: 28 February 2023 at 11:42am | IP Logged |   |  
           | 
 |  
 But as i said. Everything in AD side, not has changed. still with old password.
 
 and again, my mail server use the Active Directory to authenticate.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Honestly, not sure why this wouldn't work in your particular case. I can only recommend to debug the code in Module.php file (lines 126-131) and see if the valid information is actually passed to LDAP server, you can add extra logging like this:
           | Posted: 28 February 2023 at 10:04pm | IP Logged |   |  
           | 
 |  
 
 
| Code: 
 
    
    | 
      
       | \Aurora\System\Api::Log('Entry:'.$aModifyEntry, \Aurora\System\Enums\LogLevel::Full); |  |  |  
 I'd also recommend to recheck the $sDn value used there, to ensure that it's the correct record that's being updated on LDAP.
 
 --
 Regards,
 Igor, Afterlogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | brayonsemedi Newbie
 
  
 
 Joined: 27 February 2023
 Location: Brazil
 Online Status: Offline
 Posts: 5
 | 
          
           | Posted: 03 March 2023 at 2:17pm | IP Logged |   |  
           | 
 |  
| Code: 
 
    
    | 
      
       | PHP[NOTICE]: ...\...\...\...\modules\LdapChangePasswordPlugin\Module.php [line:132, code:8]
 PHP[NOTICE]: Error: Array to string conversion
 Entry:Array
 
 |  |  |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | brayonsemedi Newbie
 
  
 
 Joined: 27 February 2023
 Location: Brazil
 Online Status: Offline
 Posts: 5
 | 
          Maybe the problem is the atribute, some articles says that the windows ad is unicodePwd. but even if i change that, it still won't change the password...
           | Posted: 03 March 2023 at 2:54pm | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |