Solved

ldapadd command

Posted on 2014-09-09
4
514 Views
Last Modified: 2014-09-09
I am on Red Hat 6.x

I have ldap running on my system, as follows:

[root@mmclnt1 openldap]# yum install openldap-servers
...
Package openldap-servers-2.4.23-34.el6_5.1.x86_64 already installed and latest version
Nothing to do

[root@mmclnt1 openldap]# service slapd start
Starting slapd: ln: creating hard link `/var/run/slapd.pid': File exists

[root@mmclnt1 openldap]# chkconfig slapd on
[root@mmclnt1 openldap]#

Open in new window


I also checked the following:

[root@mmclnt1 openldap]# chkconfig --list
...
slapd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
...

[root@mmclnt1 openldap]# yum search ldap
Loaded plugins: product-id, rhnplugin, security, 
============================== N/S Matched: ldap ===============================
apr-util-ldap.x86_64 : APR utility library LDAP support
bind-dyndb-ldap.x86_64 : LDAP back-end plug-in for BIND
compat-openldap.i686 : OpenLDAP compatibility shared libraries.
compat-openldap.x86_64 : OpenLDAP compatibility shared libraries.
krb5-server-ldap.i686 : The LDAP storage plugin for the Kerberos 5 KDC
krb5-server-ldap.x86_64 : The LDAP storage plugin for the Kerberos 5 KDC
ldapjdk.x86_64 : The Mozilla LDAP Java SDK
mod_authz_ldap.x86_64 : LDAP authorization module for the Apache HTTP Server
openldap.i686 : LDAP support libraries
openldap.x86_64 : LDAP support libraries
openldap-clients.x86_64 : LDAP client utilities
openldap-devel.i686 : LDAP development libraries and header files
openldap-devel.x86_64 : LDAP development libraries and header files
openldap-servers.x86_64 : LDAP server
pam_ldap.i686 : PAM module for LDAP
pam_ldap.x86_64 : PAM module for LDAP
perl-LDAP.noarch : LDAP Perl module
perl-Mozilla-LDAP.x86_64 : LDAP Perl module that wraps the OpenLDAP C SDK
php-ldap.x86_64 : A module for PHP applications that use LDAP
python-ldap.x86_64 : An object-oriented API to access LDAP directory servers
libldb.i686 : A schema-less, ldap like, API and database
libldb.x86_64 : A schema-less, ldap like, API and database
migrationtools.noarch : Migration scripts for LDAP
nss-pam-ldapd.i686 : An nsswitch module which uses directory servers
nss-pam-ldapd.x86_64 : An nsswitch module which uses directory servers

Open in new window


So now I want to run the ldapadd command, however, the system can not the command:

[root@mmclnt1 openldap]# ldapadd
-bash: ldapadd: command not found
[root@mmclnt1 openldap]#

Open in new window



How can I diagnose or resolve the problem ?

Thanks
0
Comment
Question by:Anthony Lucia
  • 2
  • 2
4 Comments
 

Author Comment

by:Anthony Lucia
Comment Utility
By the way, I also did the following:

[root@mmclnt1 openldap]# ps -ef | grep slapd
ldap     23608     1  0 10:38 ?        00:00:00 /usr/sbin/slapd -h  ldap:/// ldapi:/// -u ldap
root     23856 20519  0 11:49 pts/2    00:00:00 grep slapd

Open in new window

0
 
LVL 11

Accepted Solution

by:
Radek Baranowski earned 500 total points
Comment Utility
you probably have only server installed, no client utilities.

you did only yum search, not installation:

yum search ldap

Open in new window


try to install all packages:

yum install *openldap* -y

Open in new window


and if you are sure your slapd process is fully configured an running fine, then  you should be able to use ldap commands after that.

please let me know if that helped (installing other openldap packages)
0
 

Author Comment

by:Anthony Lucia
Comment Utility
Yes, the following command fixed the issue

yum install *openldap* -y

Open in new window


Thank you
0
 
LVL 11

Expert Comment

by:Radek Baranowski
Comment Utility
nice one, happy to help!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now