Which ldap client is in use?
|Assigned to:||Clément OUDOT||% Done:||
I noticed that in some of my systems where LTB Openldap is installed, the client path is different than in others. For example:
# rpm -qa | grep openldap symas-openldap-silver-2.4.25-110503 openldap-devel-2.3.43-12.el5_7.10 openldap-ltb-debuginfo-2.4.30b3-2 openldap-ltb-contrib-overlays-2.4.30b3-2 openldap-ltb-check-password-1.1-5.el5 symas-openldap-silver-client-2.4.25-110503 openldap-2.3.43-12.el5_7.10 openldap-ltb-2.4.30b3-2 # # echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/berkeleydb/bin:/usr/local/openldap/bin:/usr/local/openldap/sbin:/root/bin # # which ldapsearch /usr/local/openldap/bin/ldapsearch
# rpm -qa | grep openldap openldap-2.3.43-12.el5_7.10 openldap-clients-2.3.43-12.el5_7.10 openldap-ltb-2.4.30b3-2 openldap-ltb-debuginfo-2.4.30b3-2 # # echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/berkeleydb/bin:/usr/local/openldap/bin:/usr/local/openldap/sbin:/root/bin # # which ldapsearch /usr/bin/ldapsearch
Can you please help me understand why there is this difference, and how we can correct things? I would expect all systems with ltb installed to use /usr/local/openldap/bin/ldapsearch.
Updated by Nick Milas over 4 years ago
OK, I see that ldap* executables of standard openldap-clients package are in /usr/bin/.
So, if openldap-clients is installed in a system, then /usr/local/openldap/bin/ldapsearch will never be used, because /usr/bin/ will always be preferred.
Is there a way to define /usr/local/openldap/bin/ldap* as the default tools, overriding /usr/bin/ldap* whether they exist or not (taking into account that /usr/bin cannot be easily removed from the $PATH) or the only option is to uninstall openldap-clients RPM?
Updated by Clément OUDOT over 4 years ago
- Category set to OpenLDAP RPM
- Status changed from New to Assigned
- Assigned to set to Clément OUDOT
One solution could be to add /usr/local/openldap/bin to the beginning of the PATH variable, instead of the end.
This can be done in openldap.sh, by changing:
But I don't think it should be done by default, you can change it on your installation if needed.