Reply
Old February 13th, 2003 Top | #1
NegativeFactor
 
NegativeFactor's Avatar
Unregistered
Posts: n/a

Default Command line NT Domain Controller

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.
  Reply With Quote
Old February 13th, 2003 Top | #2
NegativeFactor
 
NegativeFactor's Avatar
Unregistered
Posts: n/a

Default

come on people there must be something out there!
  Reply With Quote
Old February 13th, 2003 Top | #3

OSNN Folding Team  
Zedric's Avatar
NTFS Guru
Joined: January 2002
Location: Sweden
Posts: 4,006
Reputation: 890
Power: 175

Cool

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.


Did I help you? Please use the reputation system. Click the icon on the left!
Proud host of the OSNN.net folding sigs. Want one? Check the folding thread!
http://zedric.no-ip.com/
Zedric is offline   Reply With Quote
Old February 13th, 2003 Top | #4
 
Enyo's Avatar
OSNN Veteran Addict
Joined: February 2003
Posts: 1,338
Reputation: 330
Power: 130

Default

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/tre...line_tools.asp

It will require a bit of scripting to get the results you want but these are the tools you need.
Enyo is offline   Reply With Quote
Old February 13th, 2003 Top | #5
NegativeFactor
 
NegativeFactor's Avatar
Unregistered
Posts: n/a

Default

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.
  Reply With Quote
Old February 13th, 2003 Top | #6
 
Enyo's Avatar
OSNN Veteran Addict
Joined: February 2003
Posts: 1,338
Reputation: 330
Power: 130

Default

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
Enyo is offline   Reply With Quote
Old February 13th, 2003 Top | #7
 
funky dredd's Avatar
OSNN Veteran Addict
Joined: August 2002
Location: Florida
Posts: 2,346
Reputation: 300
Power: 146

Default

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



funky dredd is offline   Reply With Quote
Old February 13th, 2003 Top | #8
 
Enyo's Avatar
OSNN Veteran Addict
Joined: February 2003
Posts: 1,338
Reputation: 330
Power: 130

Default

Automating the Addition of Users and Groups to a Server:

http://www.windowswebsolutions.com/A...ArticleID=9124

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

http://www.winnetmag.com/Forums/mess...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.
Enyo is offline   Reply With Quote
Old February 13th, 2003 Top | #9
NegativeFactor
 
NegativeFactor's Avatar
Unregistered
Posts: n/a

Default

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.
  Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Question kcnychief Windows Desktop Systems 6 August 18th, 2006 10:36am
Put WHAT in command line? saltee PC Gaming 4 August 2nd, 2006 2:14am
command line osnn :D FishBoy Green Room 6 February 13th, 2005 10:36pm
command line bluzeboy Console Gaming 9 September 10th, 2002 8:08pm
Command Line for... MeFo Windows Desktop Systems 5 May 19th, 2002 4:50am