in reply to Setting Win NT permissions

There is a bug in the Win32::FileSecurity module. It would be easy to fix if the module had been written with all of the "interesting" code in Perl (I hate modules that write more than trivial amounts of code in C that could be done in Perl).

Anyway, the problem is that they split the name at the \ and use the first part as a server name.

The work-around is pretty easy; you use the name of a domain controller rather than the name of the domain. If you don't know the name of a domain controller, then do:

use Win32::NetAdmin; Win32::NetAdmin::GetAnyDomainController("","CTSDEV",$dc) or die "Can't find domain controller for CTSDEV: $^E\n"; $PERMISSIONS{"$dc\\Domain Admins"}= "F";

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Setting Win NT permissions
by JeffreyHoward (Initiate) on Apr 17, 2001 at 23:02 UTC

    I tried running what you sent, but I keep getting the following:

    Can't find domain controller for CTSDEV: The system could not find the environment option that was entere

    I even tried using the Domain Controller name in the original script, but after the script runs I don't get the Domain name before the group name.