Operating System

C

Thread Starter

Chris Ryan

MorningList,
Does anyone know of a utility to list/print the configured user base on an NT domain? I'm not concerned with security info i.e. passwords just the user id and description details.
Thanks

Chris 'RYNO' Ryan
Slab Group PPI
Bethlehem Steel Corp
Sparrows Point Div.
410.388.7817
[email protected]
 
D
From the command prompt "net user" by default prints the configured accounts.

"net user /domain" should print all accounts configured on the domain.

D. Beebe

 
J

Johan Bengtsson

I don't know a tool that could do it directly, but does those two bat files do what you need?


file listusers.bat --------------------------------

@echo off
net user /DOMAIN >%temp%\users.tmp

for /F "tokens=3D1*" %%a in (%temp%\users.tmp) do call listuser %%a %%b

del %temp%\users.tmp

---------------------- end of listusers.bat

file listuser.bat --------------------------------

if "%1" =3D=3D
"------------------------------------------------------------------------=
------
-" goto done
if "%1 %2 %3" =3D=3D "The request will" goto done
if "%1 %2 %3" =3D=3D "The command completed" goto done
if "%1 %2 %3" =3D=3D "User accounts for" goto done


:loop

if "%1" =3D=3D "" goto done

net user %1 /domain
shift
goto loop

:done

---------------------- end of listuser.bat

The first line of list user.bat will probably be truncated by the mail system, it should begin with 'if "%1" =3D=3D' and end with 'goto done'

place both files in a directory where your path is pointing, or of course run them from the directory where you have them

run listusers.bat, this is the "main" bat file

the command net user gives you a list of all users
the for loop will iterate thru each line in this list and call listuser.bat for each line

Some of the lines should not be processed, the exact lines to ignore might vary between different versions (especially different
languages) of NT and might have to be adjusted

The output from listusers.bat might of course be redirected to a file/printer/whatever....



/Johan Bengtsson

----------------------------------------
P&L, Innovation in training
Box 252, S-281 23 H=E4ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------
 
B

Bill Somerfield

Try "Belarc Advisor" at www.belarc.com or possibly "Track-It" at www.blueocean.com.

Bill Somerfield
Elizabeth-Hata International
14559 Route 30
North Huntingdon, PA 15642 USA
412-829-7700
Fax 412-829-7330
[email protected]




> MorningList,
> Does anyone know of a utility to list/print the configured user base on an NT domain? I'm not concerned with security info i.e. passwords just the user id and description details.
> Thanks
>
> Chris 'RYNO' Ryan
> Slab Group PPI
> Bethlehem Steel Corp
> Sparrows Point Div.
> 410.388.7817
> [email protected]
 
Top