Determining user's privileges (in W2K Pro) without using Control Panel

  • Thread starter Thread starter tomlaw
  • Start date Start date
T

tomlaw

I need to be able to determine what privileges my users (on other W2K
Pro machines on my network) have, without going through the "control
panel" GUI process.

Ideally, I'd set it up so that their login script would run a "reg
query" (or whatever it takes to view their privileges from the command
line), and write the result to a file in their home network directory.
Any suggestions?
 
I need to be able to determine what privileges my users (on other W2K
Pro machines on my network) have, without going through the "control
panel" GUI process.

Ideally, I'd set it up so that their login script would run a "reg
query" (or whatever it takes to view their privileges from the command
line), and write the result to a file in their home network directory.
Any suggestions?

What exactly do you mean with "privileges"? Which group they
belong to? If they have access to certain folders? If so, are there
specific folders you wish to consider?
 
Which group they belong to.

Try this batch file:

@echo off
if not exist c:\temp md c:\temp

echo Group memberships for user %UserName%:

net user %UserName% | find "*" > c:\temp\user.txt
for /F "tokens=*" %%* in (c:\temp\user.txt) do call :sub %%*
goto :eof
============================
:sub
set parm=%*

echo %parm% | find /i "Membership" > nul
if %ErrorLevel%==0 (
set G1=%parm:~30,20%
set G2=%parm:~52,20%
set G3=
) else (
set G1=%parm:~1,20%
set G2=%parm:~23,20%
set G3=%parm:~41,20%
)

if not "%G1%"=="" echo %G1%
if not "%G2%"=="" echo %G2%
if not "%G3%"=="" echo %G3%
 
Back
Top