Skip to content

Installing a local LDAP server

Björn Geuken edited this page Aug 16, 2017 · 6 revisions

It can be useful to run your local OBS instance on a locally installed LDAP server for testing and feature development.

  1. Install required packages:
sudo zypper in yast2-ldap-server openldap2-client
  1. Configure LDAP in yast:
sudo yast
  • Go to Network Services -> Authentication Server

  • Configure Basic Database Settings:

    • Base DN: dc=local

    • Enter LDAP Administrator Password

  1. Create an ldiff file for admin: admin.ldif
dn: cn=John Smith,dc=local
objectClass: inetOrgPerson
cn: John Smith
sn: John
mail: jsmith@suse.de
  1. Create the admin user account: (Enter the password from step 2)
ldapadd -x -W -D "cn=Administrator,dc=local" -f admin.ldif
  1. Set a password for the admin user: (Enter John's password twice then enter the password from step 2)
ldappasswd -xD "cn=Administrator,dc=local" -W -S "cn=John Smith,dc=local"
  1. Update your config/options.yml file to include these options:
ldap_mode: :on
ldap_authenticate: :ldap
ldap_servers: localhost
ldap_ssl: :off
ldap_start_tls: :off
ldap_referrals: :off
ldap_search_base: dc=local
ldap_search_attr: sn
ldap_name_attr: cn
ldap_mail_attr: mail
ldap_search_user: "cn=Administrator,dc=local"
ldap_search_auth: "pass"
  1. Start the server and try logging in with username "John" and the password you set in step 5
Clone this wiki locally