Tuesday, March 25, 2008

Unlocking a User Account from Command Line

Today I fat-fingered a password many times while trying to log into one of our project servers. Our domain accounts have been put into the Administrators group on that server but through Group Policy (or some other mechanism) we cannot load any MMC snap-ins. To get around that we've been given a single local administrator account. That's the account I locked up. I sent off a request to get the account unlocked but being impatient I started looking for a way to unlock a user account through the command line. Here's how (replace <username> with the actual username):

C:> net user /Active:YES <username>

11 comments:

mattypenny said...

That's a really useful tip - exactly what I was looking for. Thanks very much.

kevin said...

with /DOMAIN you can also change accout onthe domain rather than just local accounts.

Nice tip

Anonymous said...

This is a very nice tip, and the /DOMAIN switch did what I needed it to do!

Umer said...

Very useful and V quick, thanks a lot.

John Tuley said...

Thanks! Just one question, why doesn't this show up when you type "net user /?"

Jeremy Wiebe said...

@John. That I don't know.

rha-k said...

Yess, I frankly thanks to this posting. Command Prompt is (still) powerfull at all. :)

Sasi said...

Thanks for the tip. It was quite useful and saved a lot of time.

Unknown said...

Awesome!!!! Thanks.

Anonymous said...

Great!! I'd been looking for this trick for a long time.
Worked flawlessly

Anonymous said...

Unlocking a User Account from Command Line"

it is enable account from disabled not for unlock account.