LINUX


Monday 3 June 2013

Changing LDAP User’s Password Web-Based / 389-ds / Redhat-ds / Fedora-DS / LDAP

This article will show you how to change password of LDAP Users.
In This Article, I have demonstrated that How to change your Password for those users which are in 389-ds or Redhat-ds.
This is very simple you just need to change few parameters and You will able to change password of Ldap users from 389-ds.
Note :- If you have not Customized LDAP Attributes or Access Rights for Changing Password then it will work, I have Successfully tested the same on RHEL / CentOS 5.x / CentOS 6.x / RHEL 6.x and 389-ds.
Perform Following steps for the same.
Step 1:- Make Sure your LDAP Configured and You have correct Suffix ( i.e dc=tejasbarot,dc=com )
Step 2 :- Make Sure php-ldap Package is installed.
[root@tejas-barot-linux-support-ahmedabad ~]# yum install php-ldap
Step 3 :- Download the Following PHP Script, Thanks to the Original Script I have Modified Suffix for Understanding Purpose.
[root@tejas-barot-linux-support-ahmedabad ~]# wget -c http://www.tejasbarot.com/Scripts/ldap_pass_change.phps
Steps 4:- Now Rename the Script from ldap_pass_change.phps to ldap_pass_change.php
Step 5 :- Now Modify the Suffix in .php file, Open PHP File and Modify 3rd Line which Contains $dn
Change $dn 
from 
$dn = "dc=tejasbarot,dc=com"
TO
$dn = "dc=your,dc=suffix"
Save and Exit from File
Step 6:- Put this Script to your WebRoot Directory (i.e. /var/www/html/ )
Step 7:- Make Sure That PHP Script is executable by your Webserver through URL (i.e. http://ldap.tejasbarot.com or http://localhost/ldap_pass_change.php or http://192.168.1.10/ldap_pass_change.php )
You will able to see Following Screen :-
LDAP Change Password
LDAP Change Password

Step 6:- Now Put Values Like Below Screen Shot :-

Fill the Text Boxes
Fill the Text Boxes

Step 7 :- Once Password get changed, You will get a Notifications like below :-

Successful Password Change
Successful Password Change

Thanks to Original Script :- http://www.warden.pl/docs/pass.phps

No comments:

Post a Comment