Thursday, January 31, 2013

openSUSE: How to set up an LDAP server

Read guides:
  • https://help.ubuntu.com/12.10/serverguide/openldap-server.html

  • First, make sure you have the following packages installed:
  • # rpm -qa | grep ldap
    openldap2-client-2.4.31-2.1.3.x86_64
    yast2-ldap-2.22.2-2.1.3.x86_64
    yast2-ldap-server-2.22.2-2.1.3.x86_64
    libldap-2_4-2-32bit-2.4.31-2.1.3.x86_64
    libldap-2_4-2-2.4.31-2.1.3.x86_64
    openldap2-devel-2.4.31-2.1.3.x86_64
    openldap2-2.4.31-2.1.3.x86_64
    libldapcpp1-0.3.0-8.1.2.x86_64
    yast2-ldap-client-2.22.10-2.4.1.noarch
    #
    
  • Run YaST, go to "Network Services", choose "LDAP Server".
  • In the left column, notice where it says "Databases", click on it.
  • Now, the window section to the right displays info on the LDAP databases currently installed. Delete the "dc=example,dc=com" (or whatever it's called) database and Add your own.
  • Write down your Administrator DN/password combination somewhere so you don't forget.
  • Click "Next"
  • Click "OK"

After you finish the above, you should be able to run the following command with similar results to these:
$ ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts 
#

#
dn:
namingContexts: o=smithfarm

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
$

  • Enjoy the openSUSE OpenLDAP goodness!






No comments:

Post a Comment