Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using LDAP which is installed in a solaris machine. To check the version of LDAP i go to /ldap and check the version installed as if it is version 5 then there is a directory of the name v5.0 and so on. After getting into the directory i check the directory structure.

Can anybody tell me is there any shortest way or one liner to check the version of ldap installed in my machine?

share|improve this question

migrated from stackoverflow.com Aug 13 '11 at 17:17

This question came from our site for professional and enthusiast programmers.

2 Answers 2

The correct method is to query the root DSE. According to RFC3045, clients should query the root DSE for vendorName and vendorVersion. For more general information about the root DSE, see this blog entry.

By way of example, a client could query the root DSE like this:

ldapsearch --hostname hostname --port port \
    --searchScope base --baseDn '' '(&)' vendorName vendorVersion

If you use the older OpenLDAP version of ldapsearch:

ldapsearch -h hostname -p port \
     -s base -b '' '(&)' vendorName vendorVersion

Note that the information in the root DSE might be restricted, that is, subject to access control.

share|improve this answer

On Solaris, check out the "pkginfo" command, or try "ldapsearch -V"

share|improve this answer
    
pkginfo is giving me the following output ERROR: information for "ldap" was not found although ldap is installed in the machine –  PJ Sep 9 '09 at 4:47
    
For ldapsearch -V i am getting the following help from man pages and it is not giving me the desired esult: -V version Specify the LDAP protocol version number to be used for the delete operation, either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to servers that do not support v3. –  PJ Sep 9 '09 at 12:36
    
going the pkginfo route, something like this ls /var/sadm/pkg/| grep -i ldap | xargs pkginfo -x will give you the name and version of all package names containing "ldap" - at least those installed via the Solaris pkg system. –  Chad Feller Aug 26 '11 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.