Parameter substitution is the debil.

Try this:

        adfind -f "(homeDirectory=\\<server>\users\BookBagAdmin)"

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Michael Leone
Sent: Wednesday, April 29, 2015 3:20 PM
To: [email protected]; ActiveDir Mailing List
Subject: [NTSysADM] Re: ADfind doesn't seem to find by homeDirectory for some 
users

I even found a list post where I asked this same question, almost 4 years ago. 
:-) But the answer then isn't working.

Escape characters, that's the ticket! Except, in this case, it isn't ...

If I replace each "\" with "\5c" instead, the search fails with
ldap_get_next_page_s: [<someDC>] Error 0x20 (32) - No Such Object

So the escaping didn't help, this time ...


On Wed, Apr 29, 2015 at 3:04 PM, Michael Leone <[email protected]> wrote:
> Hoping somebody can tell me what I am missing here. ADfind search for 
> one of my generic logins:
>
> P:\utils>adfind -f samaccountname=laptopuser
>
> AdFind V01.49.00.00cpp Joe Richards ([email protected]) February 2015
>
> Using server: <someDC>
> Directory: Windows Server 2008 R2
> Base DN: DC=<this, that and the other>
>
> dn:CN=Laptop User....
>>homeDirectory: \\<server>\users\BookBagAdmin
>
> Yet, when I search for a homeDirectory that matches, it fails:
>
> P:\utils>adfind -f homeDirectory=\\<server>\users\BookBagAdmin
>
> AdFind V01.49.00.00cpp Joe Richards ([email protected]) February 2015
>
> Using server: <someDC>
> Directory: Windows Server 2008 R2
> Base DN: <this, that and the other>
>
>
> 0 Objects returned
>
>
> So how come the 2nd search failed, if I am filtering for an attribute 
> that was returned by the first search? I've done lots of searches this 
> way, without fail.
>
> Yet for some reason, I can't search for this one particular homeDirectory.
>
> Clues as to why? It's gotta be me misunderstanding something ...


Reply via email to