Page 2 of 2 <12
Topic Options
#130399 - 2004-12-02 09:45 PM Re: Take Ownership using XCACLS
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
Thanks, NTDOC. Actually, I do this myself, but am not normally the one who works with setting up or disabling the accounts. Getting others to follow this example is the trick. I'll work on it, though.

tjcarst

Top
#130400 - 2004-12-02 10:55 PM Re: Take Ownership using XCACLS
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
A slightly better method would be to use the date format like most of the World outside the US uses.

OBSOLETE
    04-09-12_BLWARNE
    04-10-15_JMSMITH

Top
#130401 - 2004-12-03 12:48 AM Re: Take Ownership using XCACLS
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
If you routine use EnumObject.exe or other method to dump the accounts. You could easily compare last months dump with the current one and know right away what accounts are no longer in the domain. The dump from last month would contain the home directory property data for the account. You would sinmply determine the account in the old dump that are not in the new dump and process the home directories.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#130402 - 2004-12-03 03:57 AM Re: Take Ownership using XCACLS
Anonymous
Unregistered


Thanks, everyone.

I also use AutoShare Manager to share all user's home directories in a subfolder called Users and assign the user and Administrator full control. I wish ScriptLogic would add the ability to Take Ownership for the user assigned..... Wishfull thinking.

Top
#130403 - 2004-12-03 04:01 AM Re: Take Ownership using XCACLS
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
Oops. Forgot to sign on for that last post.

Howard - I know it is a simple task, but somehow I never have enough time for routine maintenance. Something new always needs added or something old always needs fixed. It nearly drives me crazy to think of all the things behind the scenes that need done that noone sees but me. I will give EnumObject a whirl and try to add it to my monthly To Do list. Thanks for the suggestion.

tjcarst

Top
#130404 - 2004-12-03 05:33 AM Re: Take Ownership using XCACLS
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
It is only one potential method to get to your desired end result. The basics will have to maintain a list of accounts in a data file, then periodically add new and report ones that are no longer there. If you need to have a click and go solution, I may be able to find some time to code something up.

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#130405 - 2004-12-03 06:00 AM Re: Take Ownership using XCACLS
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
SetOwner.exe has been updated to provide input parameter checking and will exit with the proper error code if the parameters are invalid. I will try to get the size reduced some by finding a different methodology to validate the user account.

This version is 1.0.2.0.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#130406 - 2004-12-03 10:04 PM Re: Take Ownership using XCACLS
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
Thanks, Howard. SetOwner works great! It sure was getting a workout for a few hours there!

I would appreciate a simpler point and click solution, but don't spend a lot of time on it unless you see it to be useful for many lan admins. I've taken enough of your time.

tjcarst

Top
#130407 - 2004-12-03 11:11 PM Re: Take Ownership using XCACLS
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Quote:

point and click solution




Sorry, this is a KiXtart Scripting board. If you want point and click then you'll need to run on over to http://www.scriptlogic.com for some of their point and click solution software.

Or you could go over to http://www.kixforms.com and get some of the CODE-POINT & CLICK software.

Top
#194010 - 2009-05-26 02:14 PM Re: Take Ownership using XCACLS [Re: tjcarst]
LudvigX Offline
Just in Town

Registered: 2009-05-26
Posts: 1
Loc: Denmark
Did you ever get this to work ??

 Originally Posted By: tjcarst
Thanks, Howard.

I need to step through what is happening and make some sense of each step in order to troubleshoot. I will stop scratching my head and wait to see if SetOwner will work for my environment.

This makes no sense to me that MS would not allow for the change of ownership when moving directories. If the systme was a clean install and users immediately created files it would work. And if you wanted to add space by bakcing up the data, installing add'l space, and restoring, this is is always going to be a problem for administrators. So frustrating.

 Quote:

$domain='domainname'
$basehomefolder='f:\home'
$computer='servername
if not $computer $computer = "." endif

;GET FOLDERS
$colfolders=GetObject('winmgmts:{impersonationLevel=impersonate}!\\' + strComputer + '\root\cimv2').ExecQuery('ASSOCIATORS OF {Win32_Directory.Name=$basehomefolder}' + 'WHERE AssocClass = Win32_Subdirectory ' + 'ResultRole = PartComponent')

for each $objFolder in $colSubfolders
$homefolder = objFolder.Name
? "Home Folder " + $homefolder
? @serror ?
next

;GET USERS
$objOU = GetObject("LDAP://ou=Users,dc=domain,dc=local")
$objOU.Filter = Array("user")
for each $objUser In $objOU
$aduser = $objUser
? 'AD User ' +$aduser
? @serror ?
next

;MATCH USERS & FOLDERS
for each $homefolder
if $aduser = $homefolder
Shell 'cmd.exe /c @scriptdir\xcacls $homefolder /g $domain\$aduser:o'
endif
next

next


Top
#210328 - 2015-05-29 10:08 PM Re: Take Ownership using XCACLS [Re: LudvigX]
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
I just noticed I did not ever answer. It's been so long I don't remember if it worked.

I am currently migrating a 2003 file server to a netapp array and find myself faced with the same problem. Ironic I stumble upon my own post again. :-|

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 369 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.103 seconds in which 0.076 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org