Authenticating against Active Directory with Java on Linux

There are 3 authentication protocols that can be used to perform authentication between Java and Active Directory on Linux or any other platform (and these are not just specific to HTTP services): Kerberos – Kerberos provides Single Sign-On (SSO) and delegation but web servers also need SPNEGO support to accept SSO through IE. NTLM – … Read more

Query to list all users of a certain group

memberOf (in AD) is stored as a list of distinguishedNames. Your filter needs to be something like: (&(objectCategory=user)(memberOf=cn=MyCustomGroup,ou=ouOfGroup,dc=subdomain,dc=domain,dc=com)) If you don’t yet have the distinguished name, you can search for it with: (&(objectCategory=group)(cn=myCustomGroup)) and return the attribute distinguishedName. Case may matter.

How to write LDAP query to test if user is member of a group?

You should be able to create a query with this filter here: (&(objectClass=user)(sAMAccountName=yourUserName) (memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com)) and when you run that against your LDAP server, if you get a result, your user “yourUserName” is indeed a member of the group “CN=YourGroup,OU=Users,DC=YourDomain,DC=com Try and see if this works! If you use C# / VB.Net and System.DirectoryServices, this snippet … Read more

What is LDAP used for?

I will focus on why using LDAP, not what is LDAP. The use model is similar like how people use library cards or phonebooks. When you have a task that requires “write/update once, read/query many times”, you might consider using LDAP. LDAP is designed to provide extremely fast read/query performance for a large scale of … Read more

I can’t install python-ldap

The python-ldap is based on OpenLDAP, so you need to have the development files (headers) in order to compile the Python module. If you’re on Ubuntu, the package is called libldap2-dev. Debian/Ubuntu: sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev RedHat/CentOS: sudo yum install python-devel openldap-devel

What are the differences between LDAP and Active Directory?

Active Directory is a database based system that provides authentication, directory, policy, and other services in a Windows environment LDAP (Lightweight Directory Access Protocol) is an application protocol for querying and modifying items in directory service providers like Active Directory, which supports a form of LDAP. Short answer: AD is a directory services database, and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)