Results 1 to 3 of 3

Thread: Password expiration

  1. #1
    Join Date
    Sep 2005
    Posts
    5

    Password expiration

    Hi,

    Everybody knows that on SQL 2005 password expiration can be enabled for SQL logins. The question is how to know on a Client side about password expiration date in advance? You know, to ask user something like "You password will expire in a 2 days, do you wanna change it now or what?"

    Thanks.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    I didn't find that yet.

  3. #3
    Join Date
    Sep 2005
    Posts
    5
    Well, I did. Could be calculated from last password change time and maximum password age:

    The password last set time can be retrieved from SQL Server using the
    loginproperty builtin - the name of the property is PasswordLastSetTime.
    Here's the syntax:

    select loginproperty('login_name', 'PasswordLastSetTime')

    The maximum password age can be retrieved from Windows using the
    NetUserModalsGet API
    (http://msdn.microsoft.com/library/de...modalsget.asp).

    Tx.

Posting Permissions

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