You are not logged in.

#1 13 Sep 2007 10:49

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Unlock a LOCAL account (Win2000)

I need to be able to unlock a local account on a NON-DOMAIN Win200 server from the command line.  The only tool I've found that explicitly claims to have this ability is "cusrmgr" from the Win200 ResKit.  However, the bloody thing seems to do everything else it says on the tin, except this one vital function.  Nice bug.  Thanks Billy-boy.

I've tried, and failed, to find something else which will do this -- all the tools/scripts I've found work at the DOMAIN level only.

Has anyone come across such a tool, to do this locally?

TIA

~bxm


cmd | *sh | ruby | chef

Offline

#2 13 Sep 2007 13:38

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Re: Unlock a LOCAL account (Win2000)

Never mind, I found a little bit of VBS that seems to do the trick.  You just need to specify the hostname rather than the DOMAIN, when prompted; even so I found it complained that the user wasn't locked out even when it definitely bloody was!

Anyhow, to suit my purposes I hacked it down into this:

Set UserObj = GetObject("WinNT://<<COMPUTERNAME>>/<<USERNAME>>")
UserObj.IsAccountLocked = 0
UserObj.SetInfo

With the <<  >> bits being replaced with the appropriate values when I generate the VBS snippet from my CMD script.

~bxm

Last edited by bluesxman (13 Sep 2007 13:39)


cmd | *sh | ruby | chef

Offline

Board footer

Powered by