You'll need to escape the backslash characters with a "\5c" (without the quotes). Use this syntax: "homedirectory=\5c\5ctconwl11\5chome\5c1973" Didn't try it with LDP, but it works with ADFind...
********************** Charlie Kaiser W2K3 MCSA/MCSE/Security, CCNA Systems Engineer Essex Credit / Brickwalk 510 595 5083 ********************** > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Steve Rochford > Sent: Tuesday, March 21, 2006 1:34 AM > To: [email protected] > Subject: [ActiveDir] Script to find owner of home directory > > I know to write a script which will take a username and find > that user's > home directory but can I do the reverse? What I want to to is clean up > the home directories folders - I've got nearly 20,000 home folders but > only about 15,000 active accounts so what I want to do is take each > folder name and ask AD who it belongs to. > > I've tried using LDP with the query: > > (homedirectory=\\tconwl11\home\1973) > > but I get no results (but I know that I should get a result - > that's my > home folder!) and I've tried the same thing as an ADSI search in > VBScript and also get no results. > > I also tried Joe's ADFind: > > AdFind.exe -b dc=cnwl,dc=ac,dc=uk -f > "homedirectory=\\tconwl11\home\1973" > > AdFind V01.29.00cpp Joe Richards ([EMAIL PROTECTED]) December 2005 > > Using server: tconwl4.cnwl.ac.uk:389 > Directory: Windows 2000 > > > 0 Objects returned > > Steve > List info : http://www.activedir.org/List.aspx > List FAQ : http://www.activedir.org/ListFAQ.aspx > List archive: > http://www.mail-archive.com/activedir%40mail.activedir.org/ > List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
