Hi,
did anybody tri force password policy by modifing
sp_addlogin
and
sp_password
Raising custom error if password to be inserted or cnanged does not meet company policy.
Why microsoft did not add this condition in code?
Thank you
Alex
Printable View
Hi,
did anybody tri force password policy by modifing
sp_addlogin
and
sp_password
Raising custom error if password to be inserted or cnanged does not meet company policy.
Why microsoft did not add this condition in code?
Thank you
Alex
It's in sql2k5.
Add this statement as the first statement in sp_password
if datalength(@new) < 16
begin
print datalength(@new)/2
raiserror('Length of password cannot be less than 8',18,1)
return
end
--This enforce that password should be atleast 8 character long. even when you change from EM you will get the error message.