Page 1 of 1 1
Topic Options
#61489 - 2001-12-19 10:39 AM Net User
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
I want to disable/enable user account on specific domain controller (where I have admin account on it), I want to run this process from my workstation (Win 2000 professional).

Addusers.exe create & delete users, it does not modify the existing account.

I think Net User.exe (Win2000 Resource kit command) can do this, but I have some inquiries about it.

Net User.exe User name /Active:No

This worked fine and disabled the account locally. When I wanted to perform the same thing on the domain, it did not work.

Net User.exe User name /Active:No /Domain controller name

Is the reason because in this case the command should be executed on the Domain controller it self?

If yes, Is there any other tool to modify user account on specific Domain Controller thru a workstation?

Top
#61490 - 2001-12-19 10:52 AM Re: Net User
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
If I understood right, deactivating the useraccount on domain basis, is not what you are looking for.
like:
code:
net user user_name /active:no /domain

but then. Didn't know it is even possible to deactivate a useraccount on single DC only...

_________________________
!

download KiXnet

Top
#61491 - 2001-12-19 11:26 AM Re: Net User
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Yes, deactivating user account on specific DC is what I am looking for.

I did use this command “net user user_name /active:no /domain”
(Domain name is SPC20)

But it deactivate the account locally (in the workstation which I executed the command from),although the same account exist on the DC(SPC20), it did not deactivate it there.

Thank you.

Top
#61492 - 2001-12-19 11:40 AM Re: Net User
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so you have it also locally on your wksta?
because when I tried it with some test username it worked just fine.
_________________________
!

download KiXnet

Top
#61493 - 2001-12-19 08:32 PM Re: Net User
Anonymous
Unregistered


Hi,

on the w2k resource kit there should be an exe called cusrmgr ( Console User Manager ) same idea as net user but alot more options

good luck

Alex T

Top
#61494 - 2001-12-19 08:50 PM Re: Net User
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
net user is not 'net' - able !!!

it only executes on local ! the /domain switch specifies to execute the command on the computers! primary domain controller !

I think there was a sample post (from me) of how to use net user in addition with rcmd somewhere in the starters forum ...

J.

_________________________



Top
#61495 - 2001-12-22 02:22 PM Re: Net User
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Gentlemen, Thanks a lot for every one for this kind of help

.

Ch3lsea:
I found exactly what I was looking for (account disabled) in CUsrMgr, thank you very much
.

Top
#61496 - 2001-12-27 08:01 PM Re: Net User
evanwiley Offline
Fresh Scripter

Registered: 2001-12-12
Posts: 7
Loc: Vancouver, BC
Thier is also MEMBER.EXE in the deveoper tool kit.
_________________________
--- Evan R. Wiley evan.wiley@telus.com

Top
#61497 - 2001-12-27 09:11 PM Re: Net User
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
you can do this using ADSI as well.

code:

$user = "testuser"

$user = getobject("WinNT://@domain/$user")

if @error <> 0
exit(1)
endif

if $user.accountdisabled <> 1
$user.AccountDisabled = 1
$user.setinfo
endif


Bryce

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org