﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Thao Truong  / Find weak login passwords in your server / 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>Sun, 19 May 2013 06:59:20 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>[url=http://translate.google.com/translate?hl=pl&amp;sl=pl&amp;tl=en&amp;u=http%3A%2F%2Frkubalski.blogspot.com%2F2010%2F10%2Fpwdcompare.html]see here[/url]</description><pubDate>Sun, 07 Nov 2010 02:33:46 GMT</pubDate><dc:creator>rokuba</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>it works, thanks.</description><pubDate>Wed, 19 May 2010 06:19:00 GMT</pubDate><dc:creator>c07550285</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Add COLLATE DATABASE_DEFAULT to table variable definitionDECLARE @WeakPwdList TABLE(WeakPwd NVARCHAR(255) COLLATE DATABASE_DEFAULT )</description><pubDate>Tue, 18 May 2010 23:28:22 GMT</pubDate><dc:creator>Kuido Külm</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Hi, i get this error, any help?.[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot resolve the collation conflict between "Modern_Spanish_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the replace operation.(42000,468)thanks</description><pubDate>Tue, 18 May 2010 09:03:24 GMT</pubDate><dc:creator>c07550285</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Hi,Here is a script that will work for SQL2000 too.DECLARE @WeakPwdList TABLE(WeakPwd NVARCHAR(255))--Define weak password list--Use @@Name if users password contain their nameINSERT INTO @WeakPwdList(WeakPwd)SELECT ''UNION SELECT '123'UNION SELECT '1234'UNION SELECT '12345'UNION SELECT 'abc'UNION SELECT 'default'UNION SELECT 'guest'UNION SELECT '123456'UNION SELECT '@@Name123'UNION SELECT '@@Name'UNION SELECT '@@Name@@Name'UNION SELECT 'admin'UNION SELECT 'Administrator'UNION SELECT 'admin123'-- SELECT * FROM @WeakPwdListSELECT syslogins.name AS [LoginName], CASE WHEN PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',REVERSE(syslogins.name)),password) = 0 THEN REPLACE(t2.WeakPwd,'@@Name',syslogins.name) ELSE REPLACE(t2.WeakPwd,'@@Name',REVERSE(syslogins.name))END AS [Password],syslogins.dbname as Default_Database,(SELECT suser_sname(sid) FROM sysdatabases WHERE sysdatabases.name = syslogins.dbname) AS database_ownerFROM syslogins INNER JOIN @WeakPwdList t2 ON (PWDCOMPARE(t2.WeakPwd, password) = 1 OR PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',syslogins.name),password) = 1OR PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',REVERSE(syslogins.name)),password) = 1 )--WHERE syslogins.is_disabled=0ORDER BY syslogins.name </description><pubDate>Fri, 14 May 2010 02:10:11 GMT</pubDate><dc:creator>bennie.roodt</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>I found that if I included 'password', 'PASSWORD', and 'Password' in the @WeakPwdList table variable the script would not return all users with those passwords. The fix was to use UNION ALL instead of UNION. Thanks for the code. This is very useful.</description><pubDate>Tue, 05 Jan 2010 11:18:07 GMT</pubDate><dc:creator>Lee Linares</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Have you considered simply enforcing password policy?</description><pubDate>Tue, 05 Jan 2010 08:50:47 GMT</pubDate><dc:creator>parmstrong1107</dc:creator></item><item><title>RE: Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Can also add password REVERSE option and add login default database owner to select clauseSELECT sql_logins.name AS [LoginName], CASE 	WHEN PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',REVERSE(sql_logins.name)),password_hash) = 0 THEN REPLACE(t2.WeakPwd,'@@Name',sql_logins.name) 	ELSE REPLACE(t2.WeakPwd,'@@Name',REVERSE(sql_logins.name))END AS [Password],sql_logins.default_database_name,sql_logins.is_policy_checked,sql_logins.is_expiration_checked,sql_logins.is_disabled,(SELECT suser_sname(owner_sid) FROM sys.databases WHERE databases.name = sql_logins.default_database_name) AS database_ownerFROM sys.sql_logins	INNER JOIN @WeakPwdList t2 ON (PWDCOMPARE(t2.WeakPwd, password_hash) = 1 		OR PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',sql_logins.name),password_hash) = 1		OR PWDCOMPARE(REPLACE(t2.WeakPwd,'@@Name',REVERSE(sql_logins.name)),password_hash) = 1 )--WHERE sql_logins.is_disabled=0ORDER BY sql_logins.name</description><pubDate>Tue, 05 Jan 2010 01:45:05 GMT</pubDate><dc:creator>Kuido Külm</dc:creator></item><item><title>Find weak login passwords in your server</title><link>http://www.sqlservercentral.com/Forums/Topic835388-1702-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/T-SQL/69049/"&gt;Find weak login passwords in your server&lt;/A&gt;[/B]</description><pubDate>Wed, 16 Dec 2009 12:38:10 GMT</pubDate><dc:creator>dachimoto</dc:creator></item></channel></rss>