﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss content posted by Rudy Panigas / Article Discussions / Article Discussions by Author  / Show SQL authentication login information / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 22:59:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Show SQL authentication login information</title><link>http://www.sqlservercentral.com/Forums/Topic1107513-471-1.aspx</link><description>I'm glad this script inspired you today! Here's a question for you. Have you executed my script? It only reports on SQL authenticated user accounts. So you would not get any certificate users and nt authority accounts. As for "sa" I would leave that in the report as you would want to know if someone has been playing account with that account.Thanks,Rudy[quote][b]tim.shirey (5/12/2011)[/b][hr]Hey, you really inspired me today! We have some similar requirements for security auditing so I took the bones of your script to produce the scipt below. I did not want all your columns, but you could add them back in.This version doesn't need to loop it gathers everything in the select statement(s). I also removed the sa account, any certificate accounts, and domain users and groups.------------------------------------------------------------               SQL Login Audit                        ---- Find Local SQL Logins (remove sa, certificate users, ---- and nt authority) then audit the user                -- ----------------------------------------------------------</description><pubDate>Thu, 12 May 2011 11:14:59 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item><item><title>RE: Show SQL authentication login information</title><link>http://www.sqlservercentral.com/Forums/Topic1107513-471-1.aspx</link><description>Hey, you really inspired me today! We have some similar requirements for security auditing so I took the bones of your script to produce the scipt below. I did not want all your columns, but you could add them back in.This version doesn't need to loop it gathers everything in the select statement(s). I also removed the sa account, any certificate accounts, and domain users and groups.------------------------------------------------------------               SQL Login Audit                        ---- Find Local SQL Logins (remove sa, certificate users, ---- and nt authority) then audit the user                -- ----------------------------------------------------------Use MasterGOselect [name] as 'SQL User Name', [CreateDate] as 'CreateDate',(SELECT loginproperty([name], 'BadPasswordCount')) as 'Bad Password Count',(SELECT loginproperty([name], 'BadPasswordTime')) as 'Bad Password Time',(SELECT loginproperty([name], 'DaysUntilExpiration')) as 'Days Until Expiration',(SELECT loginproperty([name], 'DefaultDatabase')) as 'Default Database',(SELECT loginproperty([name], 'HistoryLength')) as 'History Length',(SELECT loginproperty([name], 'IsExpired')) as 'Is Expired',(SELECT loginproperty([name], 'IsLocked')) as 'Is Locked',(SELECT loginproperty([name], 'IsMustChange')) as 'Is Must Change',(SELECT loginproperty([name], 'LockoutTime')) as 'LockoutTime',(SELECT loginproperty([name], 'PasswordLastSetTime')) as 'PasswordLast Set Time' from sysloginswhere isntuser = '0' and isntgroup = '0'and [name] not in ('sa', '##MS_SQLResourceSigningCertificate##','##MS_SQLReplicationSigningCertificate##', '##MS_SQLAuthenticatorCertificate##', '##MS_PolicySigningCertificate##', '##MS_PolicyTsqlExecutionLogin##', 'NT AUTHORITY\SYSTEM', '##MS_PolicyEventProcessingLogin##', '##MS_AgentSigningCertificate##')</description><pubDate>Thu, 12 May 2011 10:38:12 GMT</pubDate><dc:creator>tim.shirey</dc:creator></item><item><title>RE: Show SQL authentication login information</title><link>http://www.sqlservercentral.com/Forums/Topic1107513-471-1.aspx</link><description>[quote][b]Twin-soft.com SME (5/12/2011)[/b][hr]Is there a similar set of queries for Windows based logons?[/quote]Windows authentication information is supplied by active directory. You should talk to your network administrators to get the same inforation. Now after saying that; I'm planning to create another script that will read this information right out of active directory from within SQL server. Only thing is that you will need Domain Admins rights to retrieve the infromation.I'll have it here as soon as it's done and tested.Thanks,Rudy</description><pubDate>Thu, 12 May 2011 06:46:16 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item><item><title>RE: Show SQL authentication login information</title><link>http://www.sqlservercentral.com/Forums/Topic1107513-471-1.aspx</link><description>Is there a similar set of queries for Windows based logons?</description><pubDate>Thu, 12 May 2011 05:40:09 GMT</pubDate><dc:creator>Rick.Cornell.SME</dc:creator></item><item><title>Show SQL authentication login information</title><link>http://www.sqlservercentral.com/Forums/Topic1107513-471-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Security/73511/"&gt;Show SQL authentication login information&lt;/A&gt;[/B]</description><pubDate>Thu, 12 May 2011 02:03:35 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item></channel></rss>