Tuesday, March 27, 2012

Enumerate Users in NT Groups

Hi,
How Can I list the users in an NT group, ie I have user Joe Bloggs who is
in NT Group Domain/Users.
I need to return to a client app what group they are in.
Julian
Julian
Look at sp_helpusers and also
DECLARE @.cmd VARCHAR(100)
SET @.cmd = 'NET USER "' + yourloginname+ '"'
EXEC master.dbo.xp_cmdshell @.cmd
"Julian" <Jpotter730@.msn.com> wrote in message
news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
> Hi,
> How Can I list the users in an NT group, ie I have user Joe Bloggs who
is
> in NT Group Domain/Users.
> I need to return to a client app what group they are in.
> Julian
>
|||Hi,
Run the below command from command prompt to list the users inside a group.
net group groupname
and for local groups run the below command
net localgroup groupname
Note: From Query analyzer as Uri mentioned you can use xp_cmdshell to
execute the above commands.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:ep7KNCdLEHA.3472@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Julian
> Look at sp_helpusers and also
> DECLARE @.cmd VARCHAR(100)
> SET @.cmd = 'NET USER "' + yourloginname+ '"'
> EXEC master.dbo.xp_cmdshell @.cmd
> "Julian" <Jpotter730@.msn.com> wrote in message
> news:#GH7q9cLEHA.1484@.tk2msftngp13.phx.gbl...
who
> is
>
sql

No comments:

Post a Comment