Results 1 to 3 of 3

Thread: forcing password policy by modifying sp_addlogin

  1. #1
    Join Date
    Sep 2002
    Posts
    159

    forcing password policy by modifying sp_addlogin

    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

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    It's in sql2k5.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •