SteveS832001 has asked for the wisdom of the Perl Monks concerning the following question:
use Win32; use Win32::NetAdmin; use Win32::AdminMisc; print "Enter the (ip or name) of the remote PC\n"; $server = (<stdin>); chomp($server); $user = "Guest"; my %users; my %detail; Win32::NetAdmin::GetUsers($server, FILTER_NORMAL_ACCOUNT, \%users); foreach (%users) { print "$_\n"; } Win32::AdminMisc::UserGetMiscAttributes ($server, $user, \%detail); $Hash{USER_FLAGS} = $Hash{USER_FLAGS} | UF_ACCOUNTDISABLE; Win32::AdminMisc::UserSetMiscAttributes ($server, $user, USER_FLAGS, $ +Hash{USER_FLAGS} );
2006-03-15 Retitled by Corion, as per Monastery guidelines
Original title: 'Help'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Disable Guest Accounts on Win32 PC's
by davidrw (Prior) on Mar 15, 2006 at 04:59 UTC | |
|
Re: Disable Guest Accounts on Win32 PC's
by PodMaster (Abbot) on Mar 15, 2006 at 05:07 UTC |