LDAP development setup
From MoodleDocs
This is a dump of notes how I have OpenLDAP installed on my dev Linux machine and integrated with Moodle dev installations.
LDAP server (slapd)
- Default installation with the (legacy) flat slapd.conf file
- Added cosine and inetorgperson schema
include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema
- Make sure to have suffix, rootdn and rootpw set and noted
- Users created as inetOrgPerson class objects
dn: uid=s1,ou=Users,dc=example,dc=com objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person objectClass: top cn: Student sn: One mail: s1@example.com uid: s1 userPassword:: dGVzdA==
LDAP client
I found Apache Directory Studio pretty nice and useful.
Moodle setup
Note the plain text password should not be used anywhere but in development/testing environments.
LDAP server setting | Value |
---|---|
Host URL | ldap://localhost/ |
User type | Default |
User attribute | uid |
Password format | Plain text |
First name | cn |
Surname | sn |
Email address |