LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-16-2011, 08:35 PM   #1
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Rep: Reputation: Disabled
OPEN LDAP:-INSTALL STUCK WITH libgpg-error-1.0 DEPENDENCY


I am trying to install Open LDAP and I am stuck with while trying to install libgpg-error-1.0 dependency for libgpgcrypt which is in turn used for GnuTLS.(OpenLDAP clients and servers require installation of OpenSSL, GnuTLS ) I am using CentOS 6 and I am aiming to configure a system to use LDAP directory service for user and group information.

Here's the error when I try to 'make' libgpg-error-1.0 :-


[root@server libgpg-error-1.0]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for gawk... (cached) gawk
checking for cc for build... gcc
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking whether NLS is requested... yes
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strerror_r... (cached) yes
checking for an ANSI C-conforming const... yes
configure: creating ./config.status
config.status: creating src/gpg-error-config
config.status: creating Makefile
config.status: creating po/Makefile.in
config.status: creating m4/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile


[root@server libgpg-error-1.0]# make
make all-recursive
make[1]: Entering directory `/root/Desktop/libgpg-error-1.0'
Making all in m4
make[2]: Entering directory `/root/Desktop/libgpg-error-1.0/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/Desktop/libgpg-error-1.0/m4'
Making all in src
make[2]: Entering directory `/root/Desktop/libgpg-error-1.0/src'
gawk -f ./mkstrtable.awk -v textidx=3 \
./err-sources.h.in >err-sources.h
gawk -f ./mkstrtable.awk -v textidx=3 \
./err-codes.h.in >err-codes.h
gawk -f ./mkerrnos.awk ./errnos.in >code-to-errno.h
gawk -f ./mkerrcodes1.awk ./errnos.in >_mkerrcodes.h
gcc -E _mkerrcodes.h | grep GPG_ERR_ | gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
./mkerrcodes | gawk -f ./mkerrcodes2.awk >code-from-errno.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
./err-sources.h.in >err-sources-sym.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
./err-codes.h.in >err-codes-sym.h
gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
-v prefix=GPG_ERR_ -v namespace=errnos_ \
./errnos.in >errnos-sym.h
gawk -f ./mkheader.awk \
./err-sources.h.in \
./err-codes.h.in \
./errnos.in \
./gpg-error.h.in > gpg-error.h
make all-am
make[3]: Entering directory `/root/Desktop/libgpg-error-1.0/src'
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strsource.lo -MD -MP -MF ".deps/strsource.Tpo" \
-c -o strsource.lo `test -f 'strsource.c' || echo './'`strsource.c; \
then mv -f ".deps/strsource.Tpo" ".deps/strsource.Plo"; \
else rm -f ".deps/strsource.Tpo"; exit 1; \
fi
rm -f .libs/strsource.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strsource.lo -MD -MP -MF .deps/strsource.Tpo -c strsource.c -fPIC -DPIC -o .libs/strsource.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strsource.lo -MD -MP -MF .deps/strsource.Tpo -c strsource.c -o strsource.o >/dev/null 2>&1
mv -f .libs/strsource.lo strsource.lo
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strerror.lo -MD -MP -MF ".deps/strerror.Tpo" \
-c -o strerror.lo `test -f 'strerror.c' || echo './'`strerror.c; \
then mv -f ".deps/strerror.Tpo" ".deps/strerror.Plo"; \
else rm -f ".deps/strerror.Tpo"; exit 1; \
fi
rm -f .libs/strerror.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strerror.lo -MD -MP -MF .deps/strerror.Tpo -c strerror.c -fPIC -DPIC -o .libs/strerror.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT strerror.lo -MD -MP -MF .deps/strerror.Tpo -c strerror.c -o strerror.o >/dev/null 2>&1
mv -f .libs/strerror.lo strerror.lo
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-to-errno.lo -MD -MP -MF ".deps/code-to-errno.Tpo" \
-c -o code-to-errno.lo `test -f 'code-to-errno.c' || echo './'`code-to-errno.c; \
then mv -f ".deps/code-to-errno.Tpo" ".deps/code-to-errno.Plo"; \
else rm -f ".deps/code-to-errno.Tpo"; exit 1; \
fi
rm -f .libs/code-to-errno.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-to-errno.lo -MD -MP -MF .deps/code-to-errno.Tpo -c code-to-errno.c -fPIC -DPIC -o .libs/code-to-errno.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-to-errno.lo -MD -MP -MF .deps/code-to-errno.Tpo -c code-to-errno.c -o code-to-errno.o >/dev/null 2>&1
mv -f .libs/code-to-errno.lo code-to-errno.lo
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-from-errno.lo -MD -MP -MF ".deps/code-from-errno.Tpo" \
-c -o code-from-errno.lo `test -f 'code-from-errno.c' || echo './'`code-from-errno.c; \
then mv -f ".deps/code-from-errno.Tpo" ".deps/code-from-errno.Plo"; \
else rm -f ".deps/code-from-errno.Tpo"; exit 1; \
fi
rm -f .libs/code-from-errno.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-from-errno.lo -MD -MP -MF .deps/code-from-errno.Tpo -c code-from-errno.c -fPIC -DPIC -o .libs/code-from-errno.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT code-from-errno.lo -MD -MP -MF .deps/code-from-errno.Tpo -c code-from-errno.c -o code-from-errno.o >/dev/null 2>&1
mv -f .libs/code-from-errno.lo code-from-errno.lo
/bin/sh ../libtool --mode=link gcc -g -O2 -o libgpg-error.la -rpath /usr/local/lib -version-info 1:3:1 strsource.lo strerror.lo code-to-errno.lo code-from-errno.lo
rm -fr .libs/libgpg-error.la .libs/libgpg-error.* .libs/libgpg-error.*
gcc -shared strsource.lo strerror.lo code-to-errno.lo code-from-errno.lo -Wl,-soname -Wl,libgpg-error.so.0 -o .libs/libgpg-error.so.0.1.3
(cd .libs && rm -f libgpg-error.so.0 && ln -s libgpg-error.so.0.1.3 libgpg-error.so.0)
(cd .libs && rm -f libgpg-error.so && ln -s libgpg-error.so.0.1.3 libgpg-error.so)
ar cru .libs/libgpg-error.a strsource.o strerror.o code-to-errno.o code-from-errno.o
ranlib .libs/libgpg-error.a
creating libgpg-error.la
(cd .libs && rm -f libgpg-error.la && ln -s ../libgpg-error.la libgpg-error.la)
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -MT gpg_error-strsource-sym.o -MD -MP -MF ".deps/gpg_error-strsource-sym.Tpo" \
-c -o gpg_error-strsource-sym.o `test -f 'strsource-sym.c' || echo './'`strsource-sym.c; \
then mv -f ".deps/gpg_error-strsource-sym.Tpo" ".deps/gpg_error-strsource-sym.Po"; \
else rm -f ".deps/gpg_error-strsource-sym.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -MT gpg_error-strerror-sym.o -MD -MP -MF ".deps/gpg_error-strerror-sym.Tpo" \
-c -o gpg_error-strerror-sym.o `test -f 'strerror-sym.c' || echo './'`strerror-sym.c; \
then mv -f ".deps/gpg_error-strerror-sym.Tpo" ".deps/gpg_error-strerror-sym.Po"; \
else rm -f ".deps/gpg_error-strerror-sym.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -MT gpg_error-gpg-error.o -MD -MP -MF ".deps/gpg_error-gpg-error.Tpo" \
-c -o gpg_error-gpg-error.o `test -f 'gpg-error.c' || echo './'`gpg-error.c; \
then mv -f ".deps/gpg_error-gpg-error.Tpo" ".deps/gpg_error-gpg-error.Po"; \
else rm -f ".deps/gpg_error-gpg-error.Tpo"; exit 1; \
fi
/bin/sh ../libtool --mode=link gcc -g -O2 -o gpg-error gpg_error-strsource-sym.o gpg_error-strerror-sym.o gpg_error-gpg-error.o ./libgpg-error.la
gcc -g -O2 -o .libs/gpg-error gpg_error-strsource-sym.o gpg_error-strerror-sym.o gpg_error-gpg-error.o ./.libs/libgpg-error.so -Wl,--rpath -Wl,/usr/local/lib
creating gpg-error
make[3]: Leaving directory `/root/Desktop/libgpg-error-1.0/src'
make[2]: Leaving directory `/root/Desktop/libgpg-error-1.0/src'
Making all in tests
make[2]: Entering directory `/root/Desktop/libgpg-error-1.0/tests'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -g -O2 -MT t-strerror.o -MD -MP -MF ".deps/t-strerror.Tpo" \
-c -o t-strerror.o `test -f 't-strerror.c' || echo './'`t-strerror.c; \
then mv -f ".deps/t-strerror.Tpo" ".deps/t-strerror.Po"; \
else rm -f ".deps/t-strerror.Tpo"; exit 1; \
fi
/bin/sh ../libtool --mode=link gcc -g -O2 -o t-strerror t-strerror.o ../src/libgpg-error.la
gcc -g -O2 -o .libs/t-strerror t-strerror.o ../src/.libs/libgpg-error.so -Wl,--rpath -Wl,/usr/local/lib
creating t-strerror
make[2]: Leaving directory `/root/Desktop/libgpg-error-1.0/tests'
Making all in po
make[2]: Entering directory `/root/Desktop/libgpg-error-1.0/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/Desktop/libgpg-error-1.0/po'
make[2]: Entering directory `/root/Desktop/libgpg-error-1.0'
make[2]: Leaving directory `/root/Desktop/libgpg-error-1.0'
make[1]: Leaving directory `/root/Desktop/libgpg-error-1.0'

Last edited by linux_rhca; 08-16-2011 at 08:37 PM. Reason: add details
 
Old 08-17-2011, 12:35 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

There is no error. Become root and run "make install" to install the software.
BTW, why don't you use yum to install openldap and all its dependencies?

Regards
 
1 members found this post helpful.
Old 08-17-2011, 12:47 AM   #3
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

There is no error. Become root and run "make install" to install the software.
BTW, why don't you use yum to install openldap and all its dependencies?

Regards
I used yum install openldap* and it installed. Thanks!
 
Old 08-17-2011, 02:22 AM   #4
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

There is no error. Become root and run "make install" to install the software.
BTW, why don't you use yum to install openldap and all its dependencies?

Regards
I have the following packages installed through yum, is it a complete install? I cannot find /etc/ldap.conf or /usr/local/etc/openldap/slapd.conf (reference http://www.openldap.org/doc/admin24/quickstart.html) file and any graphic interface for configuration. Are there more packages to be installed for the interface?

Installed Packages
openldap.i686 2.4.19-15.el6_0.2 @updates
openldap-clients.i686 2.4.19-15.el6_0.2 @updates
openldap-devel.i686 2.4.19-15.el6_0.2 @updates
openldap-servers.i686 2.4.19-15.el6_0.2 @updates
openldap-servers-sql.i686 2.4.19-15.el6_0.2 @update

Last edited by linux_rhca; 08-17-2011 at 02:54 AM.
 
Old 08-17-2011, 02:56 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Yes, these are the necessary packages (although openldap-devel is not really needed).
The ldap.conf is used for clients, not for servers, so you don't need it for your server.
Regarding a gui, there are some web frontends, like LAM, phpLDAPadmin and a module for webmin, to name a few

Regards
 
Old 08-17-2011, 10:57 PM   #6
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

Yes, these are the necessary packages (although openldap-devel is not really needed).
The ldap.conf is used for clients, not for servers, so you don't need it for your server.
Regarding a gui, there are some web frontends, like LAM, phpLDAPadmin and a module for webmin, to name a few

Regards
I am trying to install phpLDAPadmin but I am stuck at step 6.What changes do I make in config.php file so that I can access the interface by typing IP address/URL in a browser?


To install

1) Install and setup your favourite LDAP server somewhere in your network. (Or, get your LDAP details from your LDAP administrator.)
2)Insure you have all the required prerequisites
3)Download the latest PLA from SourceForge
4)Unpack the archive somewhere convenient.
5)Put the resulting 'phpldapadmin' directory somewhere in your webroot.

6)Copy 'config.php.example' to 'config.php' and edit to taste.
7)Then, point your browser to the phpldapadmin directory.

(http://phpldapadmin.sourceforge.net/...p/Installation)

config.php file :-

Code:
<?php
/** NOTE **
 ** Make sure that <?php is the FIRST line of this file!
 ** IE: There should NOT be any blank lines or spaces BEFORE <?php
 **/

/**
 * The phpLDAPadmin config file
 * See: http://phpldapadmin.sourceforge.net/wiki/index.php/Config.php
 *
 * This is where you can customise some of the phpLDAPadmin defaults
 * that are defined in config_default.php.
 *
 * To override a default, use the $config->custom variable to do so.
 * For example, the default for defining the language in config_default.php
 *
 * $this->default->appearance['language'] = array(
 *  'desc'=>'Language',
 *  'default'=>'auto');
 *
 * to override this, use $config->custom->appearance['language'] = 'en_EN';
 *
 * This file is also used to configure your LDAP server connections.
 *
 * You must specify at least one LDAP server there. You may add
 * as many as you like. You can also specify your language, and
 * many other options.
 *
 * NOTE: Commented out values in this file prefixed by //, represent the
 * defaults that have been defined in config_default.php.
 * Commented out values prefixed by #, dont reflect their default value, you can
 * check config_default.php if you want to see what the default is.
 *
 * DONT change config_default.php, you changes will be lost by the next release
 * of PLA. Instead change this file - as it will NOT be replaced by a new
 * version of phpLDAPadmin.
 */

/*********************************************
 * Useful important configuration overrides  *
 *********************************************/

/* If you are asked to put PLA in debug mode, this is how you do it: */
#  $config->custom->debug['level'] = 255;
#  $config->custom->debug['syslog'] = true;
#  $config->custom->debug['file'] = '/tmp/pla_debug.log';

/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
   to a big random string. */
// $config->custom->session['blowfish'] = null;

/* If your auth_type is http, you can override your HTTP Authentication Realm. */
// $config->custom->session['http_realm'] = sprintf('%s %s',app_name(),'login');

/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
   to determine your language automatically. Otherwise, available lanaguages
   are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
   Localization is not complete yet, but most strings have been translated.
   Please help by writing language files. See lang/en.php for an example. */
// $config->custom->appearance['language'] = 'auto';

/* The temporary storage directory where we will put jpegPhoto data
   This directory must be readable and writable by your web server. */
// $config->custom->jpeg['tmpdir'] = '/tmp';     // Example for Unix systems
#  $config->custom->jpeg['tmpdir'] = 'c:\\temp'; // Example for Windows systems

/* Set this to (bool)true if you do NOT want a random salt used when
   calling crypt().  Instead, use the first two letters of the user's
   password.  This is insecure but unfortunately needed for some older
   environments. */
#  $config->custom->password['no_random_crypt_salt'] = true;

/* PHP script timeout control. If php runs longer than this many seconds then
   PHP will stop with an Maximum Execution time error. Increase this value from
   the default if queries to your LDAP server are slow. The default is either
   30 seconds or the setting of max_exection_time if this is null. */
// $config->custom->session['timelimit'] = 30;

/* Our local timezone
   This is to make sure that when we ask the system for the current time, we
   get the right local time. If this is not set, all time() calculations will
   assume UTC if you have not set PHP date.timezone. */
// $config->custom->appearance['timezone'] = null;
#  $config->custom->appearance['timezone'] = 'Australia/Melbourne';

/*********************************************
 * Commands                                  *
 *********************************************/

/* Command availability ; if you don't authorize a command the command
   links will not be shown and the command action will not be permitted.
   For better security, set also ACL in your ldap directory. */
/*
$config->custom->commands['cmd'] = array(
	'entry_internal_attributes_show' => true,
	'entry_refresh' => true,
	'oslinks' => true,
	'switch_template' => true
);

$config->custom->commands['script'] = array(
	'add_attr_form' => true,
	'add_oclass_form' => true,
	'add_value_form' => true,
	'collapse' => true,
	'compare' => true,
	'compare_form' => true,
	'copy' => true,
	'copy_form' => true,
	'create' => true,
	'create_confirm' => true,
	'delete' => true,
	'delete_attr' => true,
	'delete_form' => true,
	'draw_tree_node' => true,
	'expand' => true,
	'export' => true,
	'export_form' => true,
	'import' => true,
	'import_form' => true,
	'login' => true,
	'logout' => true,
	'login_form' => true,
	'mass_delete' => true,
	'mass_edit' => true,
	'mass_update' => true,
	'modify_member_form' => true,
	'monitor' => true,
	'purge_cache' => true,
	'query_engine' => true,
	'rename' => true,
	'rename_form' => true,
	'rdelete' => true,
	'refresh' => true,
	'schema' => true,
	'server_info' => true,
	'show_cache' => true,
	'template_engine' => true,
	'update_confirm' => true,
	'update' => true
);
*/

/*********************************************
 * Appearance                                *
 *********************************************/

/* If you want to choose the appearance of the tree, specify a class name which
   inherits from the Tree class. */
// $config->custom->appearance['tree'] = 'AJAXTree';
#  $config->custom->appearance['tree'] = 'HTMLTree';

/* Just show your custom templates. */
// $config->custom->appearance['custom_templates_only'] = false;

/* Disable the default template. */
// $config->custom->appearance['disable_default_template'] = false;

/* Hide the warnings for invalid objectClasses/attributes in templates. */
// $config->custom->appearance['hide_template_warning'] = false;

/* Configure what objects are shown in left hand tree */
// $config->custom->appearance['tree_filter'] = '(objectclass=*)';

/* The height and width of the tree. If these values are not set, then
   no tree scroll bars are provided. */
// $config->custom->appearance['tree_height'] = null;
#  $config->custom->appearance['tree_height'] = 600;
// $config->custom->appearance['tree_width'] = null;
#  $config->custom->appearance['tree_width'] = 250;

/* Confirm create and update operations, allowing you to review the changes
   and optionally skip attributes during the create/update operation. */
// $config->custom->confirm['create'] = true;
// $config->custom->confirm['update'] = true;

/* Confirm copy operations, and treat them like create operations. This allows
   you to edit the attributes (thus changing any that might conflict with
   uniqueness) before creating the new entry. */
// $config->custom->confirm['copy'] = true;

/*********************************************
 * User-friendly attribute translation       *
 *********************************************/

/* Use this array to map attribute names to user friendly names. For example, if
   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
// $config->custom->appearance['friendly_attrs'] = array();
$config->custom->appearance['friendly_attrs'] = array(
	'facsimileTelephoneNumber' => 'Fax',
	'gid'                      => 'Group',
	'mail'                     => 'Email',
	'telephoneNumber'          => 'Telephone',
	'uid'                      => 'User Name',
	'userPassword'             => 'Password'
);

/*********************************************
 * Hidden attributes                         *
 *********************************************/

/* You may want to hide certain attributes from being edited. If you want to
   hide attributes from the user, you should use your LDAP servers ACLs.
   NOTE: The user must be able to read the hide_attrs_exempt entry to be
   excluded. */
// $config->custom->appearance['hide_attrs'] = array();
#  $config->custom->appearance['hide_attrs'] = array('objectClass');

/* Members of this list will be exempt from the hidden attributes. */
// $config->custom->appearance['hide_attrs_exempt'] = null;
#  $config->custom->appearance['hide_attrs_exempt'] = 'cn=PLA UnHide,ou=Groups,c=AU';

/*********************************************
 * Read-only attributes                      *
 *********************************************/

/* You may want to phpLDAPadmin to display certain attributes as read only,
   meaning that users will not be presented a form for modifying those
   attributes, and they will not be allowed to be modified on the "back-end"
   either. You may configure this list here:
   NOTE: The user must be able to read the readonly_attrs_exempt entry to be
   excluded. */
// $config->custom->appearance['readonly_attrs'] = array();

/* Members of this list will be exempt from the readonly attributes. */
// $config->custom->appearance['readonly_attrs_exempt'] = null;
#  $config->custom->appearance['readonly_attrs_exempt'] = 'cn=PLA ReadWrite,ou=Groups,c=AU';

/*********************************************
 * Group attributes                          *
 *********************************************/

/* Add "modify group members" link to the attribute. */
// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid');

/* Configure filter for member search. This only applies to "modify group members" feature */
// $config->custom->modify_member['filter'] = '(objectclass=Person)';

/* Attribute that is added to the group member attribute. */
// $config->custom->modify_member['attr'] = 'dn';

/* For Posix attributes */
// $config->custom->modify_member['posixattr'] = 'uid';
// $config->custom->modify_member['posixfilter'] = '(uid=*)';
// $config->custom->modify_member['posixgroupattr'] = 'memberUid';

/*********************************************
 * Support for attrs display order           *
 *********************************************/

/* Use this array if you want to have your attributes displayed in a specific
   order. You can use default attribute names or their fridenly names.
   For example, "sn" will be displayed right after "givenName". All the other
   attributes that are not specified in this array will be displayed after in
   alphabetical order. */
// $config->custom->appearance['attr_display_order'] = array();
#  $config->custom->appearance['attr_display_order'] = array(
#   'givenName',
#   'sn',
#   'cn',
#   'displayName',
#   'uid',
#   'uidNumber',
#   'gidNumber',
#   'homeDirectory',
#   'mail',
#   'userPassword'
#  );

/*********************************************
 * Define your LDAP servers in this section  *
 *********************************************/

$servers = new Datastore();

/* $servers->NewServer('ldap_pla') must be called before each new LDAP server
   declaration. */
$servers->newServer('ldap_pla');

/* A convenient name that will appear in the tree viewer and throughout
   phpLDAPadmin to identify this LDAP server to users. */
$servers->setValue('server','name','My LDAP Server');

/* Examples:
   'ldap.example.com',
   'ldaps://ldap.example.com/',
   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
           (Unix socket at /usr/local/var/run/ldap) */
// $servers->setValue('server','host','127.0.0.1');

/* The port your LDAP server listens on (no quotes). 389 is standard. */
// $servers->setValue('server','port',389);

/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
   auto-detect it for you. */
// $servers->setValue('server','base',array(''));

/* Four options for auth_type:
   1. 'cookie': you will login via a web form, and a client-side cookie will
      store your login dn and password.
   2. 'session': same as cookie but your login dn and password are stored on the
      web server in a persistent session variable.
   3. 'http': same as session but your login dn and password are retrieved via
      HTTP authentication.
   4. 'config': specify your login dn and password here in this config file. No
      login will be required to use phpLDAPadmin for this server.

   Choose wisely to protect your authentication information appropriately for
   your situation. If you choose 'cookie', your cookie contents will be
   encrypted using blowfish and the secret your specify above as
   session['blowfish']. */
// $servers->setValue('login','auth_type','session');

/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
   you specify a login_attr in conjunction with a cookie or session auth_type,
   then you can also specify the bind_id/bind_pass here for searching the
   directory for users (ie, if your LDAP server does not allow anonymous binds. */
// $servers->setValue('login','bind_id','');
#  $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');

/* Your LDAP password. If you specified an empty bind_id above, this MUST also
   be blank. */
// $servers->setValue('login','bind_pass','');
#  $servers->setValue('login','bind_pass','secret');

/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
// $servers->setValue('server','tls',false);

/************************************
 *      SASL Authentication         *
 ************************************/

/* Enable SASL authentication LDAP SASL authentication requires PHP 5.x
   configured with --with-ldap-sasl=DIR. If this option is disabled (ie, set to
   false), then all other sasl options are ignored. */
// $servers->setValue('server','sasl_auth',false);

/* SASL auth mechanism */
// $servers->setValue('server','sasl_mech','PLAIN');

/* SASL authentication realm name */
// $servers->setValue('server','sasl_realm','');
#  $servers->setValue('server','sasl_realm','example.com');

/* SASL authorization ID name
   If this option is undefined, authorization id will be computed from bind DN,
   using sasl_authz_id_regex and sasl_authz_id_replacement. */
// $servers->setValue('server','sasl_authz_id', null);

/* SASL authorization id regex and replacement
   When sasl_authz_id property is not set (default), phpLDAPAdmin will try to
   figure out authorization id by itself from bind distinguished name (DN).

   This procedure is done by calling preg_replace() php function in the
   following way:

   $authz_id = preg_replace($sasl_authz_id_regex,$sasl_authz_id_replacement,
    $bind_dn);

   For info about pcre regexes, see:
   - pcre(3), perlre(3)
   - http://www.php.net/preg_replace */
// $servers->setValue('server','sasl_authz_id_regex',null);
// $servers->setValue('server','sasl_authz_id_replacement',null);
#  $servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
#  $servers->setValue('server','sasl_authz_id_replacement','$1');

/* SASL auth security props.
   See http://beepcore-tcl.sourceforge.net/tclsasl.html#anchor5 for explanation. */
// $servers->setValue('server','sasl_props',null);

/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
   blowfish, crypt or leave blank for now default algorithm. */
// $servers->setValue('appearance','password_hash','md5');

/* If you specified 'cookie' or 'session' as the auth_type above, you can
   optionally specify here an attribute to use when logging in. If you enter
   'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
   and log in as that user.
   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
   your LDAP server requires you to login to perform searches, you can enter the
   DN to use when searching in 'bind_id' and 'bind_pass' above. */
// $servers->setValue('login','attr','dn');

/* Base DNs to used for logins. If this value is not set, then the LDAP server
   Base DNs are used. */
// $servers->setValue('login','base',array());

/* If 'login,attr' is used above such that phpLDAPadmin will search for your DN
   at login, you may restrict the search to a specific objectClasses. EG, set this
   to array('posixAccount') or array('inetOrgPerson',..), depending upon your
   setup. */
// $servers->setValue('login','class',array());

/* If you specified something different from 'dn', for example 'uid', as the
   login_attr above, you can optionally specify here to fall back to
   authentication with dn.
   This is useful, when users should be able to log in with their uid, but
   the ldap administrator wants to log in with his root-dn, that does not
   necessarily have the uid attribute.
   When using this feature, login_class is ignored. */
// $servers->setValue('login','fallback_dn',false);

/* Specify true If you want phpLDAPadmin to not display or permit any
   modification to the LDAP server. */
// $servers->setValue('server','read_only',false);

/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
   in the tree viewer. */
// $servers->setValue('appearance','show_create',true);

/* This feature allows phpLDAPadmin to automatically determine the next
   available uidNumber for a new entry. */
// $servers->setValue('auto_number','enable',true);

/* The mechanism to use when finding the next available uidNumber. Two possible
   values: 'uidpool' or 'search'.
   The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
   blindly lookup the next available uidNumber. The 'search' mechanism searches
   for entries with a uidNumber value and finds the first available uidNumber
   (slower). */
// $servers->setValue('auto_number','mechanism','search');

/* The DN of the search base when the 'search' mechanism is used above. */
#  $servers->setValue('auto_number','search_base','ou=People,dc=example,dc=com');

/* The minimum number to use when searching for the next available number
   (only when 'search' is used for auto_number. */
// $servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));

/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
   searching for the uidnumber. The idea is, this user id would have full
   (readonly) access to uidnumber in your ldap directory (the logged in user
   may not), so that you can be guaranteed to get a unique uidnumber for your
   directory. */
// $servers->setValue('auto_number','dn',null);

/* The password for the dn above. */
// $servers->setValue('auto_number','pass',null);

/* Enable anonymous bind login. */
// $servers->setValue('login','anon_bind',true);

/* Use customized page with prefix when available. */
#  $servers->setValue('custom','pages_prefix','custom_');

/* If you set this, then only these DNs are allowed to log in. This array can
   contain individual users, groups or ldap search filter(s). Keep in mind that
   the user has not authenticated yet, so this will be an anonymous search to
   the LDAP server, so make your ACLs allow these searches to return results! */
#  $servers->setValue('login','allowed_dns',array(
#   'uid=stran,ou=People,dc=example,dc=com',
#   '(&(gidNumber=811)(objectClass=groupOfNames))',
#   '(|(uidNumber=200)(uidNumber=201))',
#   'cn=callcenter,ou=Group,dc=example,dc=com'));

/* Set this if you dont want this LDAP server to show in the tree */
// $servers->setValue('server','visible',true);

/* This is the time out value in minutes for the server. After as many minutes
   of inactivity you will be automatically logged out. If not set, the default
   value will be ( session_cache_expire()-1 ) */
#  $servers->setValue('login','timeout',30);

/* Set this if you want phpldapadmin to perform rename operation on entry which
   has children. Certain servers are known to allow it, certain are not. */
// $servers->setValue('server','branch_rename',false);

/* If you set this, then phpldapadmin will show these attributes as
   internal attributes, even if they are not defined in your schema. */
// $servers->setValue('server','custom_sys_attrs',array(''));
#  $servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));

/* If you set this, then phpldapadmin will show these attributes on
   objects, even if they are not defined in your schema. */
// $servers->setValue('server','custom_attrs',array(''));
#  $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));

/* These attributes will be forced to MAY attributes and become option in the
   templates. If they are not defined in the templates, then they wont appear
   as per normal template processing. You may want to do this because your LDAP
   server may automatically calculate a default value.
   In Fedora Directory Server using the DNA Plugin one could ignore uidNumber,
   gidNumber and sambaSID. */
// $servers->setValue('force_may','attrs',array(''));
#  $servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));

/*********************************************
 * Unique attributes                         *
 *********************************************/

/* You may want phpLDAPadmin to enforce some attributes to have unique values
   (ie: not belong to other entries in your tree. This (together with
   'unique','dn' and 'unique','pass' option will not let updates to
   occur with other attributes have the same value. */
#  $servers->setValue('unique','attrs',array('mail','uid','uidNumber'));

/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
   searching for attribute uniqueness. The idea is, this user id would have full
   (readonly) access to your ldap directory (the logged in user may not), so
   that you can be guaranteed to get a unique uidnumber for your directory. */
// $servers->setValue('unique','dn',null);

/* The password for the dn above. */
// $servers->setValue('unique','pass',null);

/**************************************************************************
 * If you want to configure additional LDAP servers, do so below.         *
 * Remove the commented lines and use this section as a template for all  *
 * your other LDAP servers.                                               *
 **************************************************************************/

/*
$servers->newServer('ldap_pla');
$servers->setValue('server','name','LDAP Server');
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','port',389);
$servers->setValue('server','base',array(''));
$servers->setValue('login','auth_type','cookie');
$servers->setValue('login','bind_id','');
$servers->setValue('login','bind_pass','');
$servers->setValue('server','tls',false);

# SASL auth
$servers->setValue('server','sasl_auth',true);
$servers->setValue('server','sasl_mech','PLAIN');
$servers->setValue('server','sasl_realm','EXAMPLE.COM');
$servers->setValue('server','sasl_authz_id',null);
$servers->setValue('server','sasl_authz_id_regex','/^uid=([^,]+)(.+)/i');
$servers->setValue('server','sasl_authz_id_replacement','$1');
$servers->setValue('server','sasl_props',null);

$servers->setValue('appearance','password_hash','md5');
$servers->setValue('login','attr','dn');
$servers->setValue('login','fallback_dn',false);
$servers->setValue('login','class',null);
$servers->setValue('server','read_only',false);
$servers->setValue('appearance','show_create',true);

$servers->setValue('auto_number','enable',true);
$servers->setValue('auto_number','mechanism','search');
$servers->setValue('auto_number','search_base',null);
$servers->setValue('auto_number','min',array('uidNumber'=>1000,'gidNumber'=>500));
$servers->setValue('auto_number','dn',null);
$servers->setValue('auto_number','pass',null);

$servers->setValue('login','anon_bind',true);
$servers->setValue('custom','pages_prefix','custom_');
$servers->setValue('unique','attrs',array('mail','uid','uidNumber'));
$servers->setValue('unique','dn',null);
$servers->setValue('unique','pass',null);

$servers->setValue('server','visible',true);
$servers->setValue('login','timeout',30);
$servers->setValue('server','branch_rename',false);
$servers->setValue('server','custom_sys_attrs',array('passwordExpirationTime','passwordAllowChangeTime'));
$servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountLock'));
$servers->setValue('force_may','attrs',array('uidNumber','gidNumber','sambaSID'));
*/
?>
 
Old 08-18-2011, 12:41 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,,

As I see it, config.php is self explanatory. So read carefully the instructions for each option and use those that match your setup.
E.g, if both webserver and slapd are running on localhost uncomment
Quote:
$servers->setValue('server','host','127.0.0.1');
Also uncomment:
Quote:
$servers->setValue('login','auth_type','session');
If you are not using sasl authentication you should be able to use it through your browser.

Regards
 
Old 08-18-2011, 09:47 PM   #8
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,,

As I see it, config.php is self explanatory. So read carefully the instructions for each option and use those that match your setup.
E.g, if both webserver and slapd are running on localhost uncomment

Also uncomment:

If you are not using sasl authentication you should be able to use it through your browser.

Regards
Thanks for the reply. I have made the changes.How to I tell slapd to run on localhost? Is there a conf file for it.(I cannot find it installed in the /usr/local/etc/, there is no openldap folder there)Apache is running on local host. And also when I restart slapd it gives me following error:-

Code:
[root@server ~]# service slapd restart
Stopping slapd:                                            [  OK  ]
Checking configuration files for slapd:                    [WARNING]
bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).
Expect poor performance for suffix "dc=my-domain,dc=com".
config file testing succeeded
Starting slapd:                                            [  OK  ]

Last edited by linux_rhca; 08-18-2011 at 11:56 PM. Reason: add details
 
Old 08-19-2011, 12:23 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Quote:
How to I tell slapd to run on localhost? Is there a conf file for it.(I cannot find it installed in the /usr/local/etc/, there is no openldap folder there)Apache is running on local host.
If apache and slapd run on the same box, then in the config.php above you use the localhost IP (127.0.0.1). No need to do look for other config files

Quote:
And also when I restart slapd it gives me following error:
Copy the file form /usr/share/openldap-servers-x.y.z//DB_CONFIG.example and put it into /var/lib/ldap as DB_CONFIG.
 
1 members found this post helpful.
Old 08-19-2011, 03:07 AM   #10
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,


If apache and slapd run on the same box, then in the config.php above you use the localhost IP (127.0.0.1). No need to do look for other config files


Copy the file form /usr/share/openldap-servers-x.y.z//DB_CONFIG.example and put it into /var/lib/ldap as DB_CONFIG.
ok...thanks slapd is restarting ok now. I copied DB_CONFIG file too. I have put phpldapadmin-1.2.1.1 folder in the following way for apache:- /var/www/html/phpldapadmin-1.2.1.1/config/config.php is it ok? What file does the browser pick up? Right now typing 127.0.0.1 brings up the default apache page.
 
Old 08-19-2011, 03:40 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You should use http://localhost/phpldapadmin-1.2.1.1/
 
Old 08-22-2011, 12:24 AM   #12
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
When I put http://localhost/phpldapadmin-1.2.1.1 in the browser I get this :-

Forbidden

You don't have permission to access /phpldapadmin-1.2.1.1/ on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
 
Old 08-22-2011, 12:52 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Edit httpd.conf and add index.php in the DirectoryIndex directive among the other index files (index.html, index.htm etc)

Regards
 
Old 08-22-2011, 01:45 AM   #14
linux_rhca
LQ Newbie
 
Registered: Jun 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

Edit httpd.conf and add index.php in the DirectoryIndex directive among the other index files (index.html, index.htm etc)

Regards
Done it, restarted httpd and slapd but getting same 'Forbidden' error message.
 
Old 08-22-2011, 02:11 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Done it, restarted httpd and slapd but getting same 'Forbidden' error message.
Doh, it could be SELinux that does no allow access to that directory, even it should as it's under the docroot.
Anyway take a look here to see what you need to do.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libfreetype.so.6 dependency error when install OpenOffice on Slackware13 konzo Linux - Software 4 08-25-2010 01:55 PM
Installation stuck at checking dependency when upgrading to FC 6 saravkrish Fedora 1 03-25-2007 03:43 PM
Can't install via adept/apt-get, weird dependency error... Letherian Linux - Software 0 02-26-2006 04:12 PM
Gentoo, problem when "emergeing" libgpg-error Snerkel Linux - Distributions 1 10-26-2004 08:46 AM
Gentoo libgpg-error-1.0 emerge problem ahh Linux - Software 2 09-21-2004 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration