-
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.
-
-
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
-
Forum Rules
|
|