Command line NT Domain Controller

N

NegativeFactor

Guest
Does anyone know of a tool that will allow you to add and remove users from domain groups from the command line? Basically i'm looking to be able to remove users from groups in the login scripts.

Thanks in advance.
 
come on people there must be something out there!
 
You'll have to wait more than two hours for the answer to that one! :) It's not common knowledge. Personally I have no idea.
 
dsadd--Adds objects to the directory. For more information, see Dsadd.
dsget--Displays properties of objects in the directory. For more information, see Dsget.
dsmod--Modifies select attributes of an existing object in the directory. For more information, see Dsmod.
dsquery--Finds objects in the directory that match a specified search criteria. For more information, see Dsquery.
dsmove--Moves an object from its current location to a new parent location. For more information, see Dsmove.
dsrm--Removes an object, the complete subtree under an object in the directory, or both. For more information, see Dsrm.

The command line tools that may help you are here:

http://www.microsoft.com/technet/tr...ver/proddocs/server/DS_command_line_tools.asp

It will require a bit of scripting to get the results you want but these are the tools you need.
 
Thanks for the info, but this appears to be for use with Active Directory (Windows 2000), which unfortuntely we do not yet have implemented.

We are using the old NT4 'Domain' Structure.
 
Ah i see, sorry bud.

Erm... im betting on a tool from the resource kit but have never worked much with NT4 so cant help too much.

Maybe UPEDIT or ADDUSERS from the ResKit.

USRTOGRP.EXE can add users to local or global groups from a user specified input text file but i dont know about removing.

Ill see if i can get a solution this has my interest now :D
 
Try doing a search on Windows 2000 magazine's website. I once read an article they did on how to do this. If your lucky it might still be there.

Windows 2000 mag
 
Automating the Addition of Users and Groups to a Server:

http://www.windowswebsolutions.com/Articles/Index.cfm?ArticleID=9124

And a forum thread about USRTOGRP.EXE which i mentioned earlier:

http://www.winnetmag.com/Forums/messageview.cfm?catid=38&threadid=28812

USRTOGRP from the NT 4 Resource Kit:
Usrtogrp.exe

-----------

Purpose:

Creates a local or global group IF it doesn't already exist and populates
the new or existing group according to information in the user specified
input text file. This requires admin access to the domain. Usrtogrp will
search the specified domain for the user accounts. If you are manipulating
a local group, usrtogrp will also search trusted domains, so the user
accounts should be specified as just "JohnDoe", not "DomainName\JohnDoe".
This tool is useful for granting users (1000 max per iteration)
membership to a group, especially if you don't know in which trusted domain the user
account is contained. This tool is meant for use with domains containing
Windows NT Advanced Servers. It will not populate groups on your local Windows NT client.

Usage: Usrtogrp.exe
Where: is a text file with the following format:

domain: domainname

localgroup(or globalgroup): groupname

User1

User2

User3

(etc...)


Example: Usrtogrp file.txt

Also mentions net group so take a look at

NET HELP GROUP

NET GROUP adds, displays, or modifies global groups on servers. Used
without parameters, it displays the groupnames on the server.
 
Thanks for the help people, i'm not at work at the moment so I can't do any fiddling.

I'll give these methods a try tomorrow and let you know how I get on.

Cheers.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back