Can't add a $ sign to the ldap search

Alexandros Gougousoudis gougousoudis-list at servicecenter-khs.de
Mon May 23 14:07:49 CEST 2011


Hi,

I tried to change the ldap-searchfilter in the ldap module, to search
for a username "user" and "user$" in LDAP, if "user" is given. This is
neccecary to authenticate my workstations and users via LDAP.

This is my filter definition in the ldap module: 

filter =
"(|(uid=%{%{Stripped-User-Name}:-%{User-Name}})(uid=%{%{Stripped-User-Name}:-%{User-Name}}\$))"

This ist what I get:

[ldap]  expand:
(|(uid=%{%{Stripped-User-Name}:-%{User-Name}})(uid=%{%{Stripped-User-Name}:-%{User-Name}}$))
-> (|(uid=scit-beerchen)(uid=scit-beerchen))
[ldap]  expand: dc=verwaltung,dc=kh-berlin,dc=de ->
dc=verwaltung,dc=kh-berlin,dc=de
  [ldap] ldap_get_conn: Checking Id: 0
  [ldap] ldap_get_conn: Got Id: 0
  [ldap] attempting LDAP reconnection
  [ldap] (re)connect to physalis:389, authentication 0
  [ldap] bind as / to physalis:389
  [ldap] waiting for bind result ...
  [ldap] Bind was successful
  [ldap] performing search in dc=verwaltung,dc=kh-berlin,dc=de, with
filter (|(uid=scit-beerchen)(uid=scit-beerchen))
  [ldap] object not found


But the "$" sign is always ignored. I tried also \\$ and some other
combinations. But none worked.  So I'am doing it the wrong way. How do I
add (or escape) the $ into my query?

BTW: The query





More information about the Freeradius-Users mailing list