2253 is only about distinguished if memory serves. The rules for a query vary a little and you can get more info from 2254 which deals with filters. 2251-2256 are all good reading.
-- O'Reilly Active Directory Third Edition - http://www.joeware.net/win/ad3e.htm -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 10:55 PM To: [email protected] Subject: RE: [ActiveDir] Script to find owner of home directory This is an interesting topic. I am having loads of issues w/ different applications as vendors become more and more ldap compatible. It seems back when we started w/ win2k, the adc was used to import distribution lists w/ a leading space in the name. Apparently lots of applications don't know to use \20 as a space. All the native tools for AD won't allow a leading space (or trailing, crops them both). Anyway, it was interesting for me -- here's a snippet: If the UTF-8 string does not have any of the following characters which need escaping, then that string can be used as the string representation of the value. o a space or "#" character occurring at the beginning of the string o a space character occurring at the end of the string o one of the characters ",", "+", """, "\", "<", ">" or ";" Implementations MAY escape other characters. If a character to be escaped is one of the list shown above, then it is prefixed by a backslash ('\' ASCII 92). Here's a link to the RFC: http://rfc.net/rfc2253.html ... :m:dsm:cci:mvp marcusoh.blogspot.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe Sent: Tuesday, March 21, 2006 8:59 PM To: [email protected] Subject: RE: [ActiveDir] Script to find owner of home directory 1. When using slashes in a query you need to be careful of the characters following them. Officially you are supposed to specify all slashes that are part of a query as \5c. However a lot of the times you can skip that, except if the slash is followed by a valid HEX character 0-9 and A-F. What happens then is that it gets translated to a binary value and won't match on much most likely. In the string you specify, \19 for instance becomes EM (End of Medium) which is obviously not the 1973 you were expecting. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/ad si/s earch_filter_syntax.asp 2. Get ready to upgrade ADFIND, a new version will be out within a week - V01.31.00. HUGE changes. So huge I almost considered making it V01.50.00 because I won't do V02.00.00 until it is a major rewrite. -- O'Reilly Active Directory Third Edition - http://www.joeware.net/win/ad3e.htm -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Rochford Sent: Tuesday, March 21, 2006 4: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/ 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/
