From f6162be2e139b59cf660417ff4f22d516106e834 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Wed, 5 Mar 2025 02:54:07 +0000 Subject: [PATCH] Update files/ldap-ssh-key.sh --- files/ldap-ssh-key.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/ldap-ssh-key.sh b/files/ldap-ssh-key.sh index 29f26bd..af101ad 100644 --- a/files/ldap-ssh-key.sh +++ b/files/ldap-ssh-key.sh @@ -1,9 +1,9 @@ #!/bin/bash -ldapsearch -H "ldap://10.1.0.55" \ - -D "cn=ldapclient service,ou=People,dc=theta42,dc=com" \ - -w "1lovebyte" \ - -b "ou=People,dc=theta42,dc=com" \ - "(&(uid=$1)(|(memberof=cn=host_access,ou=Groups,dc=theta42,dc=com)(memberof=cn=host_ldap-client-test_access,ou=Groups,dc=theta42,dc=com)))" \ +ldapsearch -H "{{ldap_host}}" \ + -D "{{ldap_bind_dn}}" \ + -w "{{ldap_bind_password}}" \ + -b "ou=People,{{ldap_base_dn}}" \ + "(&(uid=$1)(|(memberof=cn=host_access,ou=Groups,{{ldap_base_dn}})(memberof=cn=host_{{current_host}}_access,ou=Groups,{{ldap_base_dn}})))" \ '*' | sed -n '/^ /{H;d};/sshPublicKey:/x;$g;s/\n *//g;s/sshPublicKey: //gp' \ No newline at end of file