• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Linux OS Service ‘ldap’

by admin

Linux provides both server-side and client-side support for the Lightweight Directory Access Protocol (LDAP) facility. This is a standards-based facility, so it is compatible with other LDAP implementations, including Microsoft’s Active Directory. Data suitable for a directory service has low volatility as LDAP is optimized for read-mostly access; database systems are tailored for more volatile data. A classic example of data suitable for directory services is the ordinary telephone directory.

LDAP content is organized according to a data definition language, or schema. Standard schema are available but customized schema are also possible. Much of the value of using LDAP is to consolidate corporate information about resources, such as login passwords, to centralize administration efforts.

The Linux LDAP implementation has two main components: slapd, a stand-alone LDAP daemon, and slurpd, a stand-alone LDAP replication daemon. The two daemons work cooperatively, slapd maintaining the local LDAP information and slurpd replicating these changes to additional LDAP directories.

Both these LDAP daemons are configured using a common /etc/openldap/slapd.conf file. The ldap service script also consults the /etc/sysconfig/network configuration file to determine whether the Linux network layer is activated, but no LDAP configuration is done there.

Service Control

How to start or stop this service immediately:

# service ldap start
# service ldap stop

To control the service on future boots:

# chkconfig --list ldap
ldap 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig ldap on

To obtain this service, install the below package using yum:

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                             Arch                                      Version                                           Repository                               Size
===============================================================================================================================================================================================
Installing:
 openldap-servers                                    x86_64                                    2.4.44-5.el7                                      BAVA                                    2.2 M
Installing for dependencies:
 libtool-ltdl                                        x86_64                                    2.4.2-22.el7_3                                    BAVA                                     49 k
Updating for dependencies:
 openldap                                            x86_64                                    2.4.44-5.el7                                      BAVA                                    354 k

Transaction Summary
===============================================================================================================================================================================================
Install  1 Package  (+1 Dependent package)
Upgrade             ( 1 Dependent package)

Total download size: 2.6 M
Is this ok [y/d/N]: 

Configuration file

Configuration file is /etc/openldap/ldap.conf and the default is shown below:

# vi /etc/openldap/ldap.conf
#BASE dc=example, dc=com
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666

#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
URI ldap://127.0.0.1/
BASE dc=example,dc=com
TLS_CACERTDIR /etc/openldap/cacerts

This file must be customized prior to starting the LDAP services.

Filed Under: Linux, Linux Services

Some more articles you might also be interested in …

  1. pidstat Command Examples in Linux
  2. pstree Command Examples in Linux
  3. apt-add-repository: command not found
  4. physlock Command Examples in Linux
  5. How to find which specific ethernet device corresponds to a specific port on a multi-interface network card in CentOS/RHEL
  6. at Command Examples in Linux
  7. “Volume “myvg/vol01″ Is Not Active Locally” – CentOS/RHEL
  8. bsdtar command – Read and write tape archive files
  9. f5fpc Command Examples
  10. pkginfo: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright