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 2008 Forums
 Transact-SQL (2008)
 Xp_logininfo

Author  Topic 

frank.svs
Constraint Violating Yak Guru

368 Posts

Posted - 2010-06-02 : 01:03:27
From SQL Server, can i see who all the windows users and groups has admin privilege??

I tried this one and it is working fine in 2008

Xp_logininfo 'Builtin\Administrators',members
account name type privilege mapped login name permission path
CSD\u1 group admin CSD\Admins-India Builtin\Administrators
CSD\Domain Admins group admin CSD\Domain Admins Builtin\Administrators
CSD\ramesh user admin CSD\ramesh Builtin\Administrators


Secondly, I used
Xp_logininfo

account name type privilege mapped login name permission path
CSD\ramesh user admin CSD\ramesh NULL
BUILTIN\Administrators group admin BUILTIN\Administrators NULL
NT AUTHORITY\NETWORK SERVICE user admin NT AUTHORITY\NETWORK SERVICE NULL
NT AUTHORITY\SYSTEM user admin NT AUTHORITY\SYSTEM NULL



But when i tried to use the below command to know who all the members falling in below two groups but am getting an error

Xp_logininfo 'NT AUTHORITY\SYSTEM',members
go
Xp_logininfo 'NT AUTHORITY\NETWORK SERVICE',members
go
/*
Msg 15404, Level 16, State 5, Procedure xp_logininfo, Line 42
Could not obtain information about Windows NT group/user 'NT AUTHORITY\SYSTEM', error code 0x8ac.
Msg 15404, Level 16, State 5, Procedure xp_logininfo, Line 42
Could not obtain information about Windows NT group/user 'NT AUTHORITY\NETWORK SERVICE', error code 0x8ac.
*/

Can anybody figure out why it is saying so??

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-06-02 : 12:23:31
There aren't any members as those aren't groups.

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

Subscribe to my blog
Go to Top of Page

frank.svs
Constraint Violating Yak Guru

368 Posts

Posted - 2010-06-02 : 13:13:11
Thanks Tara!
Go to Top of Page
   

- Advertisement -