On mar 09, Jan Kowalsky wrote:
Hi all,
Hello. I saw that you already fixed your issue, that's good to hear. Anyway,
some more comments from me that you might find useful.
I go my first steps with slapd and ldap role. As far as I understood
I
set up first an slapd server. This just installs openldap and configures
schema and admin users.
Correct, although the admin account is created by the
'ldap/init-directory.yml' playbook.
After running
debops service/slapd -l
ldap.example.org
I end up with an running openldap and there are two passwords stored in
ansible/secret/slapd/credentials/
But with none of these passswords I can bind to the server:
/usr/bin/ldapsearch -H
ldaps://ldap.example.org -D
"cn=admin,dc=example,dc=org" -b "dc=example,dc=org" -W
passwords are created here (roles/slapd/defaults/main.yml):
slapd__superuser_config_password: '{{ "{CRYPT}" +
lookup("password",
secret + "/slapd/credentials/" + slapd__config_rootdn | to_uuid +
".password"+ " encrypt=sha512_crypt length=32") }}'
I understand: "DebOps uses the "to_uuid" Ansible filter to convert LDAP
Distinguished Names". Is there any possibility to convert uuids back to
ldap dn's to know which one is which?
Unfortunately not, since this is a hashed value. But if you know a possible
value you can get its UUID using the 'ldap/get-uuid.yml' playbook - it will
ask you first for an 'uid' login name, and if you don't specify it, a full
Distinguished Name which then will be converted to an UUID based on the
algorithm used by Ansible. This should help you match the DNs to UUIDs.
Cheers,
Maciej