On Wed, Apr 29, 2015 at 7:54 PM, Luis F. Trejo H. <[email protected]> wrote:
> These errors are related to the parameters of adfind command, not with the
> use of escape characters.


No, it was the escape characters. Dunno what I was doing wrong the
first few times, but I did get it work. User error on my part, no
doubt.


SET _EscapedUserPath=^\5cusers^\5c
SET _EscapedFilePath=^\5c^\5c%_Server%%_EscapedUserPath%

SET _EscapedHome=!_EscapedFilePath!!_User!

JoeWare adfind -b !_LDAP-Base! -nodn -nolabel -list -csv -nocsvheader
-f homeDirectory=!_EscapedHome! sAMAccountName
>ProfileSearchResult.TXT


That time, it worked. Guess I missed something the first time.

Thanks everyone





>
> What is the exact command you're trying? spaces maybe...
>
>
>
> ________________________________
> De: Michael Leone <[email protected]>
> Para: "[email protected]" <[email protected]>;
> ActiveDir Mailing List <[email protected]>
> Enviado: MiƩrcoles, 29 de abril, 2015 14:20:23
> Asunto: Re: [ActiveDir] 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 ...
> List info: http://www.activedir.org/List.aspx
>
>


Reply via email to