Greetings all,

I'm connecting to a Microsoft SQL Server 2008 database via DBI (and thus DBD::ODBC). Our security requires that users have individual logins to the database, with passwords that must meet (server-enforced) complexity requirements, and which expire periodically.

This is a relatively new system we have put in place. I have modified my programs prompt the user for their password, use it to connect to the database, then discard it. Lately, our users' passwords have started expiring. When I call DBI->connect, the call fails with a "password has expired" message. Sensible.

The question is: How can my programs allow users to change their expired passwords? This is possible, somehow. If one of us runs TOAD and tries to connect with an expired password, TOAD pops up a dialog saying "Your password has expired. Enter [old password] [new password] [new password again to confirm]", and the change goes through just fine.

How can I make my Perl programs do this too?


In reply to How to change expired database password via DBI? by Sue D. Nymme

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.