Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TSQL to find if logins have password same as loginname?

I want to check if SQL logins have passwords same as thier login name. E.g. login name 'abc123' has password= 'abc123'. I need to do this for a security audit across many 2000 and 2005 servers.

Is it possible to check using TSQL?

Thanks in advance

like image 624
Manjot Avatar asked Feb 22 '10 00:02

Manjot


1 Answers

select * from syslogins where pwdcompare (name,password)=1

BOL: pwdcompare

like image 183
Manjot Avatar answered Oct 04 '22 21:10

Manjot