My home directory is \\servername\ckaiser$. If I use the syntax: adfind -default -f "homedirectory=\5c\5cservername\5cckaiser$"
It gives me the LDAP information for the share. If I want to map share names to folder names, I use the reskit utility share.vbs. Here's the syntax: cscript "C:\Program Files\Resource Kit\Share.Vbs" /L /S servername ********************** 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 > Douglas W Stelley > Sent: Tuesday, March 21, 2006 7:08 AM > To: [email protected] > Subject: RE: [ActiveDir] Script to find owner of home directory > > > Hey, that's pretty good! works nicely! > > I'm trying to put it all together with other tools, I can get > a listing of all homedirectories easily enough, now I can get > the owners of specific directories. But one last item. How > can I get a listing of all directories if they the shares are > hidden with a "$"? > example: my homedirectory is \\ADProd1\1965$, but that > doesn't match the "actual" name of the folder. > > > Doug > > > > > > "Charlie Kaiser" <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > > 03/21/2006 09:44 AM > Please respond to > [email protected] > > To > <[email protected]> > cc > Subject > RE: [ActiveDir] Script to find owner of home directory > > > > > > > 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/ > > > 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/
