AaaHaaa. !!
I've tracked down the exact situation when it fails.
If I try to set the owner to an account that exists on my machine, it will
set the owner to the account that's defined on my machine.
So,
print "New owner is " . $sd->Owner('BUILTIN\User2') . "\n";
Sets the owner to DOMAIN\User2 as User2 isn't defined on my machine,
but
print "New owner is " . $sd->Owner('BUILTIN\User1') . "\n";
sets the owner to LOCALMACHINE\User1 as User1 is defined on my machine.
It doesn't matter if I use BUILTIN or DOMAINNAME.
----- Original Message -----
From: "Dan Anolik" <[EMAIL PROTECTED]>
To: "'Simon Crute (Demon)'" <[EMAIL PROTECTED]>; "'Win32 Perl Admin
ActiveState LS (E-mail)'" <[EMAIL PROTECTED]>
Sent: Wednesday, November 15, 2000 7:16 AM
Subject: RE: win32::perms problems
> Hello Simon,
>
> I've actually had great success with the win32::perms module. I'm not sure
> exactly what is going wrong on your system but I have a few ideas.
>
> - First try using DCNAME\USERNAME instead of DOMAIN\USERNAME . Remember
that
> domain accounts are treated as local users on a DC. If you don't want to
> hard-code a particular DC in your script, then you can use the
> AdminMisc::GetDC function to pick one dynamicaly.
>
> - Make sure that you are logged into the domain (not locally) when you are
> testing the script. I don't believe that is a requirement, but it would be
> good troubleshooting. I've found that if I am logged into the domain when
> running a win32::Perms script, it assumes the local domain. It works for
me
> by simply calling:
>
> $sd->Owner('Username');
>
>
> good luck and let me know if you are still having trouble,
>
> Dan
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Simon Crute (Demon)
> > Sent: Monday, November 13, 2000 7:27 AM
> > To: Win32 Perl Admin ActiveState LS (E-mail)
> > Subject: Re: win32::perms problems
> >
> >
> > Unfortunately win32::filesecurity doesn't have anything for
> > manipulating
> > ownership, only DACLs. :(
> >
> > Can anyone suggest anything else ? Or how to get win32::perms working
> > properly ?
> >
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: "Simon Crute" <[EMAIL PROTECTED]>
> > Sent: Monday, November 13, 2000 2:03 PM
> > Subject: Re: win32::perms problems
> >
> >
> > >
> > >
> > > That is odd. I, for one, have tried but never succeeded in
> > getting the
> > perms
> > > module to behave as it is expected to. I ended up using
> > Win32::FileSecurity for
> > > my permissions handling. It works as expected, reliably.
> > >
> > > Others say perms works great. Must be in my typing. : )
> > >
> > > Eric
> > >
> > >
> > >
> > >
> > >
> > > "Simon Crute" <[EMAIL PROTECTED]> on 11/10/2000 01:09:43 AM
> > >
> > > To: Eric Lengvenis/Mortenson@Mortenson
> > > cc:
> > >
> > > Subject: Re: win32::perms problems
> > >
> > >
> > >
> > >
> > > Ah, Good point.
> > > However it won't set the userID to DOMAIN\Administrator, or
> > DOMAIN\MyuserID,
> > > but it does set it to BULTIN\Administrators
> > >
> > > So it will set it to the group, but not the individual user.
> > >
> > > ----- Original Message -----
> > > From: <[EMAIL PROTECTED]>
> > > To: "Simon Crute (Demon)" <[EMAIL PROTECTED]>
> > > Sent: Thursday, November 09, 2000 6:08 PM
> > > Subject: Re: win32::perms problems
> > >
> > >
> > > >
> > > >
> > > > Does your domain have a group DOMAIN\Administrators? Or
> > did you mean to
> > > use
> > > > DOMAIN\Domain Admins?
> > > >
> > > > Eric Lengvenis
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Simon Crute \(Demon\)" <[EMAIL PROTECTED]> on 11/09/2000
> > 11:31:56
> > > AM
> > > >
> > > > To: [EMAIL PROTECTED]
> > > > cc: (bcc: Eric Lengvenis/Mortenson)
> > > >
> > > > Subject: win32::perms problems
> > > >
> > > >
> > > >
> > > >
> > > > Hi,
> > > > I'm having problems getting the Win32::Perms module
> > working as I'd
> > > expect.
> > > >
> > > > I'm trying to change ownership of some directories on a
> > network drive. I
> > > am
> > > > in the administrators group on the domain.
> > > >
> > > > The following code fragment seems to be OK.
> > > >
> > > > printf "$_ is owned by %s\n", $sd->Owner();
> > > > print "New owner is " .
> > $sd->Owner('BUILTIN\Administrators') . "\n";
> > > >
> > > > But if I try to set the new owner to 'DOMAIN\Administrator' or
> > > > 'DOMAIN\myuserid' it actually gets set to
> > > > 'MYMACHINE\Administrator' or 'MYMACHINE\myuserid'
> > > >
> > > > Any clues anyone ?
> > > >
> > > > I've also found that ResolveSid doesn't work if you call it via
> > > > $sd->ResolveSid("userid"), but it does if you call
> > > > Win32::Misc::ResolveSid("userid")
> > > > which seems a bit wrong.
> > > >
> > > >
> > > > Thanks.
> > > >
> > > > --
> > > > Simon Crute
> > > > [EMAIL PROTECTED]
> > > >
> > > > _______________________________________________
> > > > Perl-Win32-Admin mailing list
> > > > [EMAIL PROTECTED]
> > > > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> > _______________________________________________
> > Perl-Win32-Admin mailing list
> > [EMAIL PROTECTED]
> > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
> >
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin