Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unlocking accounts from command prompt

Status
Not open for further replies.

VRIT

IS-IT--Management
Sep 2, 2002
60
GB
Hi,

Is it possible to unlock accounts vis a command prompt ?

Thanks
 
It is possible to create accounts via a vbscript, so in theory you should be able to unlock, lock, delete, etc via a vb script.
 
Try this:

net user <username> /domain /active:yes

This should work from a command prompt. You do need to be an administrator to do this though. It sends the request to the DC.

Daniel.
 
Ah,

net user <username> /active:yes worked BUT I do need to be on one of the servers either directly or through terminal sessions. I was hoping and trying to figure out a way of doing it from a standard command prompt from any workstation - using a user with admin rights of course.
 
how about on the remote workstation

get a blank mmc up
add in the AD users etc snap in
point it to a domain controller
use the tool as normal
(you could even save this in a share and in theory access it from any pc) &quot;Work to live, don't live to work&quot;

&quot;The problem with troubleshooting is that sometimes it shoots back&quot;
 
You can use the command I mentioned on any workstation; I use it all the time, as long as the workstation is a member of the domain and you have admin rights, it will work.

You omitted the &quot;/domain&quot; switch though. This is what routes it from the local workstation to the domain controller.

If I use 'net user danomac /domain /active:no' on my workstation, it sends it to the domain controller and disables the account. If you omit the '/domain' the command will respond with 'User not found' or something like that (unless the user exists in the local userlist).

Daniel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top