locked
list the windows Nt group members RRS feed

  • Question

  • hi,

    i need to scan the members under windows group. How can i get the list of users under a windows group from SQL Server.

    I have used xp_loginInfo 'groupname', 'members'

    it returns the following error: Error: 8198, Could not obtain information about Windows NT group/user 'groupname'

    Please help..

    Thanks
    sr
    Tuesday, October 13, 2009 5:08 PM

Answers

  • Please let us know which state of the error you are facing.



    SQL Server statePossible cause
    21 The xp_logininfo extended stored procedure was not run on a computer that is running a Microsoft Windows NT operating system.
    The backslash ("\") character that separates the Windows domain name and the account name in the Windows account name is missing.
    22 An error occurred when SQL Server queried the Windows operating system to retrieve information about a Windows account name.
    24 When the SQL Server engine queried the Windows operating system to retrieve information about a Windows account name, access was denied.
    25 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a Windows account name.
    26 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a local Windows group where the Windows user is a member. (Windows user refers to the security context account).
    27 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a local Windows group where the Windows user is a member. (Windows user refers to the security context account).

    Thanks, Leks
    Wednesday, October 14, 2009 2:17 AM

All replies

  • Have you tried master..xp_cmdshell 'net localgroup <group name>' or master..xp_cmdshell 'net group <group name>'?



    ajmer dhariwal || eraofdata.com
    Tuesday, October 13, 2009 5:53 PM
  • Please let us know which state of the error you are facing.



    SQL Server statePossible cause
    21 The xp_logininfo extended stored procedure was not run on a computer that is running a Microsoft Windows NT operating system.
    The backslash ("\") character that separates the Windows domain name and the account name in the Windows account name is missing.
    22 An error occurred when SQL Server queried the Windows operating system to retrieve information about a Windows account name.
    24 When the SQL Server engine queried the Windows operating system to retrieve information about a Windows account name, access was denied.
    25 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a Windows account name.
    26 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a local Windows group where the Windows user is a member. (Windows user refers to the security context account).
    27 An error occurred when the SQL Server engine queried the Windows operating system to retrieve information about a local Windows group where the Windows user is a member. (Windows user refers to the security context account).

    Thanks, Leks
    Wednesday, October 14, 2009 2:17 AM