A Zimbra server extension to change Active Directory passwords from the Zimbra web client.
The original project by Antonio Messina (email@example.com) https://github.com/xMAnton/ADPassword this version is tested on Zimbra 8.6 and Windows 2012 R2 Active Directory. And Zimbra 8.7 and Windows 2016.
I recommend the cli install from below. If you do not want the cli install, you can also try the GUI most steps are in the video: https://www.youtube.com/watch?v=AYmsdw3tHoU
External LDAP account for Authentication. The DN from zimbraAuthLdapExternalDn will then be used.
If you use the same SSL certificate on your AD as on Zimbra there is a good change you can skip this step. If you already use your AD server for external auth, you can probably skip this as well. If you are not sure, configure your domain to auth against AD first before installing this extension.
On 8.6: * /opt/zimbra/j2sdk-20140721/bin/keytool -import -alias cacertclass1ca -keystore /opt/zimbra/java/jre/lib/security/cacerts -import -trustcacerts -file your-exported-cert.cer * default password: changeit
On 8.7: * /opt/zimbra/common/bin/keytool -import -alias win2012 -keystore /opt/zimbra/common/etc/java/cacerts -trustcacerts -file your-exported-cert.cer * default password: changeit
You can get any ldaps ssl certificate by using OpenSSL: openssl s_client -connect servername:port, copy paste the cert from -----BEGIN CERTIFICATE----- to -----END CERTIFICATE----- and put it in a file on your server. Then import using above commands.
Review your LDAP configuration in the commands below and then copy-paste them:
mkdir -p /opt/zimbra/lib/ext/adpassword wget https://github.com/Zimbra-Community/ADPassword/releases/download/0.0.3/ADPassword.jar -O /opt/zimbra/lib/ext/adpassword/adPassword.jar su zimbra zmprov md domain.ext zimbraAuthLdapBindDn "%firstname.lastname@example.org" zmprov md domain.ext zimbraAuthLdapSearchBase "CN=Users,DC=DOMAIN,DC=EXT" zmprov md domain.ext zimbraAuthLdapSearchBindDn "CN=serviceAccount,CN=Users,DC=DOMAIN,DC=EXT" zmprov md domain.ext zimbraAuthLdapSearchBindPassword "your-password-here" zmprov md domain.ext zimbraAuthLdapSearchFilter "(samaccountname=%u)" zmprov md domain.ext zimbraAuthLdapURL "ldaps://ad-server-ip-or-dns:636" zmprov md domain.ext zimbraExternalGroupLdapSearchBase "CN=Users,DC=DOMAIN,DC=EXT" zmprov md domain.ext zimbraExternalGroupLdapSearchFilter "(samaccountname=%u)" zmprov md domain.ext zimbraAuthMech "ad" zmprov md domain.ext zimbraAuthMechAdmin "ad" zmprov md domain.ext zimbraPasswordChangeListener ADPassword zmprov gd domain.ext | grep -i ldap | grep -v Gal zmprov gd domain.ext | grep -i zimbraPasswordChangeListener zmprov md domain.ext zimbraAuthFallbackToLocal FALSE zmcontrol restart
ADPassword also supports Zentyal as directory server, please check the wiki:
Do a password change while you run the following command:
tail -f /opt/zimbra/log/mailbox.log
Verify your configuration:
zmprov gd domain.ext | grep -i ldap | grep -v Gal
Wrong bind DN: LDAP: error code 34 - 0000208F: NameErr: DSID-03100225, problem 2006 (BAD_NAME) Forgot to set zimbraAuthLdapSearchFilter or other required attribute: A network service error has occurred system failure: java.lang.NullPointerException
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|Rating||( 2 ratings )|
|Categories||Business , Mail|
|License||Apache License v2.0|
By: rlipski on on 1/18/17 for version 0.0.1
The plugin works but only for zimbraAuthLdapSearchBase that is set. So basically, as long as the users are located in the following search base:
OU=TestDomain,DC=Test,DC=local as set in the zimbraAuthLdapSearchBase then it will find the user and reset the password.
However, I have multiple sub-ous that are setup. So if i have users in the following ou under that above search base (zimbraAuthLdapSearchBase "OU=TestDomain,DC=Test,DC=local ")
It will say permission denied in the password reset dialog. After debugging the log, i found that it is searching for that user in the search base despite the fact that they are located under another OU under that search base hence why they cannot find the user for password reset. Not sure if there is a way to work around this, but other than that it works great. But, currently i can only use one OU of Users. I also confirmed this by changing the search base to that OU to test what I had thought and it will reset only the users in that search base that is set.
That is correct, multiple OU's are not supported.
Replied on 4/7/17
By: ajcody on on 12/23/16 for version 0.0.1