Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Domain user access check

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-20 : 12:06:55
How to find out whether a domain user has access to sql server or not?

Many domain groups have access to my sql server. I need to check whether a user has access to server or not.

Probably I need to check which windows group the user belongs. This looks more like an o/s question than DB. How do you guys manage this scenario?


------------------------
I think, therefore I am - Rene Descartes

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-20 : 13:35:46
Use xp_logininfo.

EXEC master.dbo.xp_logininfo 'DomainName\GroupName', 'MEMBERS'

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-20 : 13:49:45
Great!

It gives only first level members.
Is there a xp where I can give the user name and findout the groups?

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-20 : 13:52:45
You can still use xp_logininfo for that. Play around with it and see what you get.

EXEC master.dbo.xp_logininfo 'DomainName\UserName'

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2008-06-20 : 13:56:36
Ok; Thnaks again.

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -