https://github.com/lldap/lldap logo
Jakob - Hey, I'm fiddling around with postfix a...
# troubleshooting
j
Hey, I'm fiddling around with postfix and added a few attributes:
Copy code
# lldap-cli schema attribute user list
Name           Type        Is list  Is visible  Is editable
----           ----        -------  ----------  -----------
avatar         JPEG_PHOTO  false    true        true
creation_date  DATE_TIME   false    true        false
display_name   STRING      false    true        true
email_address  STRING      false    true        false
email_aliases  STRING      true     true        false
email_quota    STRING      false    true        false
first_name     STRING      false    true        true
last_name      STRING      false    true        true
mail           STRING      false    true        true
user_id        STRING      false    true        false
uuid           STRING      false    true        false
If I try to query any of my custom attributes, I get
dict_ldap_lookup: Search error -7: Bad search filter
. Doesn't matter if the attribute is String or List. The same config that queries "mail" works.
a
message has been deleted
j
In this example I tried to query email_aliases:
Copy code
INFO     ๏ฝ‰ [info]: LDAP session start: 4cb8eaf9-75f6-455b-a186-e3b2ce1a4e46
INFO     LDAP request [ 226ms | 6.89% / 100.00% ] session_id: 4cb8eaf9-75f6-455b-a186-e3b2ce1a4e46
DEBUG    โ”โ” ๐Ÿ› [debug]:  | msg: LdapMsg { msgid: 1, op: BindRequest(LdapBindRequest { dn: "uid=query,ou=people,dc=<example,dc>=com", cred: LdapBindCred::Simple }), ctrl: [] }
DEBUG    โ”โ” do_bind [ 211ms | 1.47% / 93.11% ] dn: uid=query,ou=people,dc=example,dc=com
DEBUG    โ”‚  โ”โ” bind [ 201ms | 11.75% / 88.54% ]
INFO     โ”‚  โ”‚  โ”โ” ๏ฝ‰ [info]: Login attempt for "query"
DEBUG    โ”‚  โ”‚  โ”โ” get_password_file_for_user [ 1.38ms | 0.61% ] user_id: "query"
DEBUG    โ”‚  โ”‚  โ”•โ” passwords_match [ 173ms | 76.18% ] username: query
DEBUG    โ”‚  โ”โ” get_user_groups [ 7.02ms | 3.10% ] user_id: "query"
DEBUG    โ”‚  โ”‚  โ”•โ” ๐Ÿ› [debug]:  | return: {GroupDetails { group_id: 3, display_name: "lldap_strict_readonly", creation_date: 2023-11-25T08:48:56.853861229, uuid: "8d3a20f7-b5d3-3afb-85d5-3e99f67ee5de", attributes: [] }}
DEBUG    โ”‚  โ”•โ” ๐Ÿ› [debug]: Success!
DEBUG    โ”•โ” ๐Ÿ› [debug]:  | response: BindResponse(LdapBindResponse { res: LdapResult { code: Success, matcheddn: "", message: "", referral: [] }, saslcreds: None })
INFO     LDAP request [ 26.6ยตs | 100.00% ] session_id: 4cb8eaf9-75f6-455b-a186-e3b2ce1a4e46
DEBUG    โ”โ” ๐Ÿ› [debug]:  | msg: LdapMsg { msgid: 3, op: UnbindRequest, ctrl: [] }
DEBUG    โ”•โ” ๐Ÿ› [debug]: Unbind request for query
INFO     ๏ฝ‰ [info]: LDAP session end: 4cb8eaf9-75f6-455b-a186-e3b2ce1a4e46
Any ideas?
n
Ldapsearch doesn't support underscores in attribute names...
j
LOL, thats easy. Thanks
n
Not something I can change, I'm afraid, but there are some proposals for adding some warning/not letting people create attributes with underscores
j
I wanted to stay within lldaps naming scheme, the only reason I chose the names. But thats easily fixable then, thanks a lot.
n
Yeah, we'll migrate the existing names as well, or at least list alternative spellings