In a perfect world that would be good; sadly, this is not a
perfect world :-) I know that we have some (many?) folders where the owner is
"administrators" and even the permissions are wrong (eg "users" have modify
access so the person who should be owner can get in and so doesn't complain
about a problem). It's partly because of this that I'm trying to tidy up and
Charlie's escape chars is just what I need.
Steve
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of matheesha weerasinghe
Sent: 21 March 2006 10:43
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Script to find owner of home directory
Why dont you ask NTFS instead of AD? Why not you use something like
subinacl and query the folders of the owner? Assuming all folders that are valid
have proper owners, I guess the invalid folders will have unresolvable SIDs or
Administrator as the owner against them.
M@
On 21/03/06, Steve
Rochford <[EMAIL PROTECTED]>
wrote:
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/