In case anyone ever needs this, I found the registry key that needs to be 
changed to disable anonymous FTP.  Change the value from 1 to 0 and restart 
the msftpsvc service.

HKey_Local_Machine\System\CurrentControlSet\
Services\MSFTPSVC\Parameters\AllowAnonymous

Here's part of the code I used:

sub UpdateReg(){
        $remoteData = "0x00000000";
        print "Updating $host.\n";
        $remoteKey = 
$Registry->{"//$host/LMachine/System/CurrentControlSet/Services/MSFTPSVC/Parameters"} 
|| LogError1;
        $remoteKey->{"/AllowAnonymous"} = [ "0x00000000", "REG_DWORD" ];
        $test = $remoteKey->{"/AllowAnonymous"};
        if ($test eq $remoteData){ print "Update successful at $host\n";}
        else{
                print "Failed to update $host.  Logging Error...\n";
                LogError2();
        }
}

Enjoy!


>From: "Kevin Pendleton" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Disabling Anonymous FTP
>Date: Fri, 29 Mar 2002 09:04:37 -0700
>
>Hello all,
>
>I recently discovered that several hundred NT workstations that I have 
>taken
>over the administration of have anonymous FTP enabled.  I know how to
>manually disable it by taking the checkmark out, but I haven't found a
>command line solution or a module that will do it.  Does anyone have any
>ideas on how I can automate this?  I want to keep the FTP service running,
>just get rid of the anonymous access.
>
>Thanks for your help, I really enjoy this list.
>
>Kevin Pendleton

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to