OpenLDAP is an open-source implementation of LDAP. The configuration information shown in this section is based on a hypothetical domain waysysweb.us.com. Your environment will differ. You need to substitute your configuration for the hypothetical one shown here.
Setting Up a Virtual Machine with LDAP Using Vagrant
•To start the slapd server:
sudo invoke-rc.d slapd start
•To stop the slapd server:
sudo invoke-rc.d slapd stop
•To view the root DSE for the LDAP server, execute this command.
ldapsearch -x -W -D 'cn=admin,dc=waysysweb,dc=us,dc=com' -b "" -s base
The command parameters are listed in the table below:
-x |
Use simple authentication, instead of SASL |
-W |
Prompt the user for the administrative password |
-D |
The distinguished name to use to connect to the directory. In this case, it is the administrative user. |
-b |
Sets the base distinguished name. Using "" allows access to the root DSE. |
-s base |
Search for just one base entry: the entry specified by the -b parameter |
•To view more information from the root DSE, execute this command. The plus (+) requests all the operational attributes.
ldapsearch -x -W -D 'cn=admin,dc=waysysweb,dc=us,dc=com' -b "" -s base '(objectclass=*)' +
•To view all entries in the database, execute this command.
ldapsearch -D 'cn=admin,dc=waysysweb,dc=us,dc=com' -W -x -b "dc=waysysweb,dc=us,dc=com" -s sub "(objectclass=*)"
•To view a list of users, execute this command.
ldapsearch -x -W -D 'cn=admin,dc=waysysweb,dc=us,dc=com' -b "ou=Users,dc=waysysweb,dc=us,dc=com" -s sub
X.500 attribute descriptions:
String |
X.500 Attribute Description |
---|---|
CN |
commonName |
L |
localityName |
ST |
stateOrProvinceName |
O |
organization |
OU |
organizationalUnitName |
C |
countryName |
STREET |
streetAddress |
DC |
domainComponent |
UID |
userid |
Mastering OpenLDAP: Configuring, Securing, and Integrating Directory Services
Setting Up a Virtual Machine with LDAP Using Vagrant
Setting Up LDAP Access Control