member of domain group

  • Is there a way I to find out if the specified user is a member of domain group? I cannot use is_member() because it evaluates the expression based on who is connected to SQL Server. This will not work in most web based scenarious where connection to the SQL Server is done using one standard account. I would like something like

    is_member('user to evaluate', 'domain group') 

    Regards,

    Jesbin

  • Can you not use the ADIS objects to query Active Directory?



    Shamless self promotion - read my blog http://sirsql.net

  • Nicholas is right. It is

    dsget user command with memberof parameter. See

    http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/dsget_user.asp

    This is not SQL but OS command and the executables may exist on the servers, I am not sure about the workstations, probably adminpak should be installed.

    Yelena

    Regards,Yelena Varsha

  • Thank you for the response.

    I could use the command shell. There are other OS commands available such as net group (etc) but,

    it involves using xp_cmdshell and parsing the output to get the desired result. So, I was looking for something more simpler or maybe an undocumented sql server function.

    Jesbin

  • In the case of a web app, if you are using MTS, you would check the security there.  I don't think MTS is in widespread use, but this is one of its advantages.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply