If at this point you are not sure of exactly what LDAP is, I recommend this post which provides an excellent definition with examples. (In a nutshell it helps to think of an LDAP server as a specialised database).
Installing an LDAP Server
I'm running on a MBP. After looking around for a while I found that the easiest LDAP Server to install was ApacheDirectory which you can download from here. (To install and start the server should take less than 5 minutes)
Once it's installed it automatically starts the daemon. You can then run the server with this command.
sudo launchctl start org.apache.directory.server
For further installation instructions see here.
(If you need to uninstall you will find the application installed at /usr/local/apacheds-2.0.0-M20 just delete that directory and it will be gone)
LDAP Client
You will want to view the contents of your LDAP Server. The easiest LDAP client to install is Apache Directory Studio which can be downloaded from here.
Once it is downloaded you need to create a connection to the server - the instructions for which are contained here.
When connected your Apache Directory Studio should look something like this:
Now to access LDAP from a Java program. The best way to show you how to do this is through an example program. The program will perform the following tasks:
- Create an new LDAP object
- View an LDAP object
- Add a new attribute to an LDAP object
- Modify an attribute on an LDAP object
- Remove an attribute on an LDAP object
- Delete an LDAP object
- Search for all LDAP objects in a specific domain
Note: This class cleans up after itself i.e. It leaves the LDAP Server in the state in which it was found. If you want to see the various tasks in action just run one of the tasks and take a look at the LDAP Object through the LDAP Client. Don't forget you can modify the object in the LDAP Client and test in that way.
The code is below and should be self explanatory.
This helped a lot, thanks! You saved me at least a few hours poking around trying to figure it out myself :)
ReplyDelete- Fred
Thank you for this informative post!
ReplyDeleteI read this article. I think You put a lot of effort to create this article. I appreciate your work.
ReplyDeletePhD Thesis Writing Services
Excellent work, keepup
ReplyDeleteAwesome article! You are providing us very valid information. This is worth reading. Keep sharing more such articles.
ReplyDeleteOracle Training in Chennai
Oracle Course in chennai
Microsoft Dynamics CRM Training in Chennai
Microsoft Dynamics Training in Chennai
JavaScript Training in Chennai
JavaScript Course in Chennai
Oracle Training in Adyar
Oracle Training in OMR
ReplyDeleteExcellent blog. Looking for software courses?
DOT NET Training in Chennai
Hadoop Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
JAVA Training in Chennai
German Classes in chennai
web designing course in chennai
web designing training in chennai
Great job. Keep updating this article by posting new informations.
ReplyDeleteSpoken English Classes in Chennai
English Coaching Classes in Chennai
IELTS Coaching in OMR
TOEFL Coaching Centres in Chennai
french classes
pearson vue
French Classes in anna nagar
Spoken English Class in Anna Nagar
Hey, very nice site. I came across this on Google, and I am stoked that I did. I will definitely be coming back here more often. Wish I could add to the conversation and bring a bit more to the table, but am just taking in as much info as I can at the moment. Thanks .
ReplyDeleteDedicatedHosting4u.com
I visit your blogs and get updated with the information you include but today’s blog would be the most appreciable...
ReplyDeleteThanks
Cpa offers
This is very good blog to getting a knowledge.
ReplyDeleteweb designing and development course training institute in Chennai with placement
PHP MySQL programming developer course training institute in chennai with placement
Magento 2 Developer course training institute in chennai
Here is the details of B.Sc Perfusion Technology colleges in Bangalore. If you are looking to study BSc Perfusion Technology in Bangalore, the below will help you to find the best Perfusion Technology colleges in Bangalore.
ReplyDeleteBSc Perfusion Technology Colleges in Bangalore | Perfusion Technology Colleges in Bangalore |
Here is the details of B.Sc Respiratory Care Technology colleges in Bangalore. If you are looking to study BSc Respiratory Care Technology in Bangalore, the below will help you to find the best Respiratory Technology colleges in Bangalore.
ReplyDeleteBSc Respiratory Care Technology Colleges in Bangalore | Respiratory Care Colleges in Bangalore |
Here is the details of B.Sc Optometry colleges in Bangalore. If you are looking to study BSc Optometry in Bangalore, the below will help you to find the best Optometry colleges in Bangalore.
ReplyDeleteBSc Optometry Colleges in Bangalore | Optometry Colleges in Bangalore |
Here is the details of BMIT (Medical Imaging Technology) colleges in Bangalore. If you are looking to study BMIT in Bangalore, the below will help you to find the best BMIT colleges in Bangalore.
ReplyDeleteBSc Medical Imaging Technology Colleges in Bangalore | Medical Imaging Technology Colleges in Bangalore |
It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge. good luck.
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Đặt vé tại phòng vé Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ Vietnam Airline
vé máy bay vinh đi hồ chí minh
vé máy bay đà nẵng đi hà nội
vé máy bay đi đà lạt khứ hồi
vé máy bay đi Huế bao nhiêu
xe đưa rước sân bay
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete