This project is used to change user password in openldap
After you git clone this project, try go build
If you get an error like this:
fatal error: ldap.h: No such file or directory
You need to install the missing ldap library.
Install it in the command line according to your linux distributin.
- RedHat/CentOS
yum install openldap-devel
- Debian/Ubuntu
apt-get install openldap-devel
Get mqu/openldap if it do not exist in your local gopath:
go get github.com/mqu/openldap
- Step 1:
Modify host and port in main.go,which point to a runningOpenLDAP server
- Step 2:
Change dn in main.go, change oldPassword,newPassword argument of the function ChangePassword()
- Step 3:
go build and run the executable file. Check if any error occured in the log.
- Bind err: Can't contact LDAP server
Check host and port.
- Invalid credentials
Check cn and password