Highlighted
Absent Member.
Absent Member.
1382 views

single-character wildcard for ldapsearch?


Is there a wildcard character available for ldapsearch other than '*'?

I need to match on a single character and have been unable to determine
how to get ldapsearch to do that. Some documentation suggests that '?'
will work, but I have not had any luck with that. Alternately, if there
is a means by which to get the globalQuery in UserApp to search on a
string that contains a colon that would also solve my problem.


--
keithbmartin
------------------------------------------------------------------------
keithbmartin's Profile: http://forums.novell.com/member.php?userid=48654
View this thread: http://forums.novell.com/showthread.php?t=448200

Labels (1)
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: single-character wildcard for ldapsearch?


Lots of views and no replies generally mean either the answer is 'no' or
that I didn't phrase the question very well. Or both.

We have a custom multi-valued attribute that stores email addresses for
use in our cloud-based email solution (MS Live.) Each value includes a
prefix (generally either "smtp:" or "x500:") and the email address
itself, including the domain.

So, for new account creation, we need to verify that the name requested
is not already in use as an smtp address somewhere, since obviously only
one account can own any given email address. The problem is, the
globalQuery function doesn't want to handle the ':' in the string, but
treats it as a value separator. So if I search against my custom
attribute for any object that contains the value "smtp:user@domain" it
searches for values containing "stmp" and containing "user@domain" - and
they *all *contain "stmp:"

A single-character wildcard that I could pass as part of the value to
search for would have solved the problem, but as best I can tell that's
not an option. The wildcard that ldapsearch does support matches 0 or
more characters at that position, so that's not a solution either. We've
tried every method of escaping the ':' we can discover without success.
Is there a way to get the globalQuery to not treat that colon as a
separator but just to match using it.


--
keithbmartin
------------------------------------------------------------------------
keithbmartin's Profile: http://forums.novell.com/member.php?userid=48654
View this thread: http://forums.novell.com/showthread.php?t=448200

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: single-character wildcard for ldapsearch?

Hello,

i am not sure if i understand your problem. I can successfully search
with a colon in a custom Attribut (Syntax: Case ignore String, Syntax
OID 1.3.6.1.4.1.1466.115.121.1.15)

Nerveless, the rfc4515 (Page 3) says, that you can escape characters.
COLON = %x3A ; colon (":")

So a Filter of
'(&(objectclass=user)(customAttr=smtp\3ATest@domain.com))'
may work?!


Am 16.11.2011 17:16, schrieb keithbmartin:
>
> Lots of views and no replies generally mean either the answer is 'no' or
> that I didn't phrase the question very well. Or both.
>
> We have a custom multi-valued attribute that stores email addresses for
> use in our cloud-based email solution (MS Live.) Each value includes a
> prefix (generally either "smtp:" or "x500:") and the email address
> itself, including the domain.
>
> So, for new account creation, we need to verify that the name requested
> is not already in use as an smtp address somewhere, since obviously only
> one account can own any given email address. The problem is, the
> globalQuery function doesn't want to handle the ':' in the string, but
> treats it as a value separator. So if I search against my custom
> attribute for any object that contains the value "smtp:user@domain" it
> searches for values containing "stmp" and containing "user@domain" - and
> they *all *contain "stmp:"
>
> A single-character wildcard that I could pass as part of the value to
> search for would have solved the problem, but as best I can tell that's
> not an option. The wildcard that ldapsearch does support matches 0 or
> more characters at that position, so that's not a solution either. We've
> tried every method of escaping the ':' we can discover without success.
> Is there a way to get the globalQuery to not treat that colon as a
> separator but just to match using it.
>
>


0 Likes
Absent Member.
Absent Member.

Re: single-character wildcard for ldapsearch?

Keith,

afaik, no. The RFC als doesn't mention it
(https://tools.ietf.org/html/rfc4515)

Pieter

On 14/11/2011 10:26, keithbmartin wrote:
>
> Is there a wildcard character available for ldapsearch other than '*'?
>
> I need to match on a single character and have been unable to determine
> how to get ldapsearch to do that. Some documentation suggests that '?'
> will work, but I have not had any luck with that. Alternately, if there
> is a means by which to get the globalQuery in UserApp to search on a
> string that contains a colon that would also solve my problem.
>
>


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.